Bitcoin Forecast
Below is a seven-day forecast for the high and low price of Bitcoin. This seven-day forecast is updated daily (pending node/computer problems). The machine learning model used to generate this forecast is a Tensor Flow Keras Sequential model.
This page is not financial advice.
This page is a fun experiment.
The most difficult part of this project is now keeping the Bitcoin Node active and current. Given that the Node is the first stage of the entire process, and without it nothing else can be updated, the visual above may not be current. Ensuring the robustness of the Node is a known issue to the Bitcoin community and is something I am actively working on. If this visual is not updated, I am actively working to bring it up to date and it should not be more than a few days behind at any time. The entire process has been streamlined/automated, pending a computer or node problem, this visual will be updated daily.
These are the steps required to complete this project
Establish a Bitcoin node
Build in redundancy to keep node active/restart when fails
Log blockchain information into SQL database automatically
Build in safeguards to prevent duplication or missed data entries
Write Python script to pull current data and load all data from node after recent entry
Automatically scrape Bitcoin price information daily
Scrape price only once an entire day of blocks are logged, utilizing python
This ensures that the price accurately reflects the high and low for the day
Establish SQL triggers that clean the data required for the Machine Learning Model
Cleaning/unifying the data format
Calculating Stock Flow
Built in safeties to ensure no duplicate/missing data
To view the trigger file click: Here
To view a simpler CTE version of the trigger file click: Here
Create SQL views to simplify the data call process to train and utilize models.
Create uniform tables that update with relevant information easily
To view the "view" file click: Here
Train Machine Learning Model
Call data from SQL database and train models
Save models to pickle file for easy access in external automated python script
Automatically call model on updated data daily
Log forecasts into SQL Database
Write python script to pull data from SQL, then write forecasts to SQL
Send updated forecasts to Google Sheets daily for easy implementation into website
Access Google Sheets Project through API
Create Google Project with shared API
Send most current forecast to Sheets project daily
Write python script to pull data from SQL and send to Google Sheet
Only send most current forecast, if Node is not updated then keep most current forecast
Create visual in Google Sheets that updates automatically when new data is uploaded
Establish safeguards so that the updated sheets will not affect design
Embed visual onto website
Ensure visual updates with no defects
Embed visual into portfolio using Tableau
Parts of this project, such as connecting to the Bitcoin node and being able to pull data from the blockchain, were based on the following project: Extracting Bitcoin Blockchain Data With Python, RPC, Bitcoind, And Bitcoin Core - Python In Office
The idea to utilize stock flow as a variable for forecasting the price of Bitcoin comes from Plan B: PlanB – Medium
The daily Bitcoin price is scraped daily from: Cryptocurrency Prices, Charts And Market Capitalizations | CoinMarketCap