A big bug casuse two errors
Borrk opened this issue · 0 comments
Borrk commented
There is actually one fault that causes two errors:
the fault is when you load stock data, its order is ascending.
errors:
- your training data is in reverse order, which might won't impact the result, but it is unreasonable in reality.
- this error is actually series.
when you merge the training and test data, the dates are not continuous as marked with the red circle in the figure.
"dataset_total = pd.concat((dataset_train['Open'], dataset_test['Open']), axis = 0)"
actually, they should be re-ordered: dataset_test = dataset_test.sort_index(ascending=False).