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.
- 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.
To run this project, you need to install the required libraries. These libraries are listed in the requirements.txt
file.
- Ensure Python and pip are installed on your system.
- Run the following command in your terminal to install the required libraries:
pip install -r requirements.txt
After installing the dependencies, simply run the main script (main.py):
python code.py
- 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.
- 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.
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.
If you encounter any issues or bugs while running the project, please let me know through the Issues section on GitHub. I will try to resolve the problem as soon as possible.
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.
This project is licensed under the MIT License. For more information, see the LICENSE file.
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.
Best regard!