بتكوين
شراء

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.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.