搜索
产品
社区
市场
新闻
经纪商
更多
CN
开始
社区
/
观点
/
Predicting BTC price for the next month
比特币
做多
Predicting BTC price for the next month
由dadehkav_tech提供
关注
关注
2022年1月1日
5
6
6
2022年1月1日
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.
Beyond Technical Analysis
dadehkav_tech
关注
更多:
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在
使用条款
阅读更多信息。