Bitcoin
Long

Predicting BTC price for the next month

534
Predicting BTC price for the next 30 days by using neural prophet in a simple manner.
Black dots represent reality, and the blue line is the prediction.



Here is the code:



if 'google.colab' in str(get_ipython()):
!pip install neuralprophet

import pandas as pd
df = pd.read_csv("BTC.csv")
df.rename(columns={'Date': 'ds', 'Price (Close)': 'y'}, inplace=True)
df['ds'] = pd.to_datetime(df['ds'], errors='coerce', utc=True )
df['ds'] = df['ds'].dt.strftime('%Y-%m-%d %H:%M')
from neuralprophet import NeuralProphet, set_log_level
set_log_level("ERROR")

nprophet_model = NeuralProphet(seasonality_mode='multiplicative')
metrics = nprophet_model.fit(df, freq="d")
future_df = nprophet_model.make_future_dataframe(df,
periods = 30,
n_historic_predictions=True)
preds_df_2 = nprophet_model.predict(future_df)




Please share your feedback, especially if you see mistakes in the process.
And remember:
There is always a possibility for error.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.