https://github.com/alireza-py/currency-price-prediction
This project uses deep learning to predict cryptocurrency prices. It trains LSTM and Bidirectional LSTM models on historical price data to understand patterns over time. Before training, the data is cleaned and scaled, removing unusual spikes or errors. The app automatically downloads daily, weekly, monthly, and yearly data for each token
https://github.com/alireza-py/currency-price-prediction
ai bidirectional-lstm bilstm cryptocurrency intresting lstm prediction python python3 tensorflow
Last synced: 22 days ago
JSON representation
This project uses deep learning to predict cryptocurrency prices. It trains LSTM and Bidirectional LSTM models on historical price data to understand patterns over time. Before training, the data is cleaned and scaled, removing unusual spikes or errors. The app automatically downloads daily, weekly, monthly, and yearly data for each token
- Host: GitHub
- URL: https://github.com/alireza-py/currency-price-prediction
- Owner: alireza-py
- Created: 2024-08-18T22:35:48.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-09-09T20:45:42.000Z (28 days ago)
- Last Synced: 2025-09-09T23:56:18.208Z (28 days ago)
- Topics: ai, bidirectional-lstm, bilstm, cryptocurrency, intresting, lstm, prediction, python, python3, tensorflow
- Language: Python
- Homepage:
- Size: 864 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ฎ Crypto Price Prediction App
This project is a cryptocurrency price prediction tool that leverages **Deep Learning (LSTM, BiLSTM)** models to forecast future price movements based on historical market data.
The results are automatically saved into a CSV file and can also be synced to a GitHub repository.---
## ๐ Table of Contents
- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
- [Project Structure](#project-structure)
- [How It Works](#how-it-works)
- [Contributing](#contributing)
- [License](#license)---
## Features
- Automated cryptocurrency price forecasting using **Deep Learning** (LSTM + BiLSTM).
- Supports multiple time intervals:
- Daily (`d`)
- Weekly (`w`)
- Monthly (`m`)
- Yearly (`y`)
- **Automatic data fetching** โ each tokenโs historical price data is downloaded on its scheduled day and stored in the `token-history` folder.
- Cleans noisy data with **Isolation Forest** before training.
- Flexible AI configurations depending on the prediction interval.
- Saves results in `result.csv` for easy tracking.
- Automatically updates predictions to a connected **GitHub repository**.---
## Requirements
- **Python 3.9+**
- Core dependencies:
- `tensorflow`
- `pandas`
- `numpy`
- `scikit-learn`
- `statsmodels`
- `requests`
- `PyGithub`---
## Installation
Clone the repository and install the dependencies:```bash
git clone https://github.com//.git
cd
pip install -r requirements.txt
```โ ๏ธ Make sure you have a valid **GitHub Personal Access Token** configured inside `connections.py` in order to push updates to your repository.
---
## Usage
Run the main application:```bash
python main.py
```The program will:
1. Load token configurations and historical price data.
2. Train the LSTM/BiLSTM model for each token.
3. Predict upcoming prices (daily, weekly, monthly, yearly).
4. Save the predictions into `result.csv`.
5. Push the results to the specified GitHub repository.---
## Project Structure
```
.
โโโ main.py # Application entry point
โโโ cryptocurrency.py # Core price prediction logic
โโโ connections.py # GitHub connection and file updating
โโโ utils.py # Utility helpers (Token, Utils classes, etc.)
โโโ TOKENCONFIGS.csv # Token configuration file
โโโ result.csv # Generated predictions
โโโ token-history/ # Folder where historical token data is stored
```---
## How It Works
1. **Token Configuration**
The app reads tokens and their intervals from `TOKENCONFIGS.csv`.
For example, if a token is set with a daily interval, its data will be downloaded and updated once per day.2. **Data Fetching & Storage**
- For each token, historical price data is fetched from the internet.
- Data is automatically saved inside the `token-history` folder in CSV format.
- Each file follows the naming pattern:
```
_.csv
```3. **Data Cleaning**
Historical prices are processed through an **Isolation Forest** to remove outliers (e.g., sudden anomalies, incorrect spikes).4. **Model Training**
- A TensorFlow/Keras **LSTM + BiLSTM** network is built.
- Training parameters (units, epochs, timesteps, batch size) are automatically adjusted for each interval.5. **Prediction**
- The model predicts the next **high/low prices** for each token.
- Forecast horizons include: today, tomorrow, week, month, year.6. **Result Handling**
- Predictions are written into `result.csv`.
- The app pushes the updated results into a GitHub repository (configured in `connections.py`).---
## Contributing
Contributions, issues, and feature requests are welcome!
To contribute:
1. Fork this repo.
2. Create a feature branch (`git checkout -b feature/new-feature`).
3. Commit your changes (`git commit -m 'Add new feature'`).
4. Push to your branch (`git push origin feature/new-feature`).
5. Open a Pull Request.---
## License
Distributed under the **MIT License**. See `LICENSE` for more information.---