This Go application provides historical price data for Bitcoin over the last 7 days and predicts the price for the next day, along with identifying the trend (upwards, downwards, or stable). The application fetches data from the CoinGecko API and uses a linear regression model for the prognosis. It includes preprocessing steps to prepare the data for more accurate predictions.
To set up this project, you need to have Go installed on your system.
-
Clone the repository:
git clone [repository-url]
-
Navigate to the project directory:
cd bitcoin-prognosis
Run the application with the following command:
go run cmd/main/main.go
This will output the Bitcoin prices for the last 7 days and the prognosis for the next day, including the price trend. You are free to also include any of the pkgs into your own application.
The application includes a preprocessing module that prepares the historical Bitcoin price data for the prognosis. This preprocessing includes handling missing values and removing outliers, providing a cleaner dataset for the prediction model.
To run the tests for this application, use the following command in the project directory:
go test -v ./...
The tests cover the functionality of fetching Bitcoin prices and the prognosis algorithm.
Contributions to this project are welcome. Please fork the repository and submit a pull request with your changes.
This project is open source and available under the MIT License.