stock_prediction
stock_prediction copied to clipboard
some calculation wrong?
I just happen to be here , because I am also interested in using machine learning for stock prediction.
but I found your data is ordered from new to old, then use pandas rolling_mean to calculate the SMA value , but that is wrong since it's calculate the future SMA value , I think that's not correct, even your code can get a good result.
simpleMovingAverage = pandas.rolling_mean(df,window=5)