https://github.com/rezagooner/cryptocurrency-price-prediction-model
A tool for predicting cryptocurrency prices using trained and test data. Includes historical price tracking and interactive line drawing for analysis
https://github.com/rezagooner/cryptocurrency-price-prediction-model
coingecko-api crypto-analysis cryptocurrency data-visualization gui interactive-charts linear-regression matplotlib pandas price-prediction
Last synced: 16 days ago
JSON representation
A tool for predicting cryptocurrency prices using trained and test data. Includes historical price tracking and interactive line drawing for analysis
- Host: GitHub
- URL: https://github.com/rezagooner/cryptocurrency-price-prediction-model
- Owner: RezaGooner
- License: mit
- Created: 2025-03-15T10:08:34.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-15T12:57:21.000Z (about 1 year ago)
- Last Synced: 2025-10-08T19:53:51.001Z (8 months ago)
- Topics: coingecko-api, crypto-analysis, cryptocurrency, data-visualization, gui, interactive-charts, linear-regression, matplotlib, pandas, price-prediction
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cryptocurrency Price Prediction Model
This project is a tool for predicting the price of **TON Coin** based on historical data. It uses the **CoinGecko API** to fetch data and employs a **Linear Regression** model to forecast future prices. The project can be easily extended to other cryptocurrencies by modifying the API.
## Features
- **Price Prediction**: Uses Linear Regression to predict future prices.
- **Simple and Attractive UI**: Eye-catching color schemes and interactive charts.
- **Threshold-Based Analysis**: By selecting a threshold value, the chart is drawn relative to it, and areas of profit and loss are color-coded.
- **Display of Predicted Values**: Predicted prices for future days are displayed.
- **Line Drawing Tool**: Allows drawing lines on the chart for further analysis and clearing them.
- **Interactive Tooltips**: Hover over the chart to display precise price information.
---
## How to Run
### Prerequisites
To run this project, you need to install the required libraries. These libraries are listed in the `requirements.txt` file.
### Installing Dependencies
1. Ensure **Python** and **pip** are installed on your system.
2. Run the following command in your terminal to install the required libraries:
```bash
pip install -r requirements.txt
### Running the Project
After installing the dependencies, simply run the main script (main.py):
```bash
python code.py
```


---
## How It Works
- Data Fetching: Historical price data for TON Coin is fetched from the CoinGecko API.
- Data Preprocessing: The data is prepared for use in the model.
- Modeling: Linear Regression is used to predict future prices.
- Displaying Results: The prediction results are displayed in an interactive chart.
---
## Chart Features
- Threshold-Based Coloring: By selecting a threshold value, the chart is drawn relative to it, and areas of profit and loss are color-coded.
- Interactive Tooltips: Hover over the chart to display precise price information.
- Line Drawing Tool: Draw lines on the chart for further analysis and clear them if needed.
---
## Extending to Other Cryptocurrencies
This project can be easily extended to other cryptocurrencies. Simply replace the CoinGecko API with the API of the desired cryptocurrency and fetch the data.
---
## Reporting Issues or Bugs
If you encounter any issues or bugs while running the project, please let me know through the [**Issues**](https://github.com/RezaGooner/Cryptocurrency-Price-Prediction-Model/issues) section on GitHub. I will try to resolve the problem as soon as possible.
---
## Libraries Used
- **`requests`**: For fetching data from the API.
- **`pandas`**: For data processing and management.
- **`matplotlib`**: For plotting charts.
- **`scikit-learn`**: For implementing the Linear Regression model.
- **`numpy`**: For numerical computations.
- **`mplcursors`**: For adding tooltips to the charts.
---
## License
This project is licensed under the **MIT License**. For more information, see the [LICENSE](LICENSE) file.
---
## Contributing
If you are interested in contributing to this project, please submit your changes via a **Pull Request**. I would be happy to review your ideas and improvements.
---
[RezaGooner](https://github.com/RezaGooner/)
> Best regard!