jinglescode / time-series-forecasting-pytorch

Acquiring data from Alpha Vantage and predicting stock prices with PyTorch's LSTM
https://www.alphavantage.co/academy/#lstm-for-finance
Apache License 2.0
251 stars 95 forks source link

is this model any good? #6

Closed ren85 closed 3 years ago

ren85 commented 3 years ago

If I were to build a model that predicts yesterdays closing price as today's closing price we would also get similar graph, but the model is useless. Where are prediction accuracy numbers? I bet they would be terrible.

jinglescode commented 3 years ago

Hi @ren85, As we are prediction values, we used MSE. You can check the MSE from the logs, for example, on the training and validation set, where loss is the MSE:

Epoch[100/100] | loss train:0.006102, test:0.000972 | lr:0.000100
ren85 commented 3 years ago

The question is is this any better than using yesterdays closing price as today's prediction

jinglescode commented 3 years ago

is this any better than using yesterdays closing price as today's prediction

To find that out, what you can do is to calculate the error using MSE of yesterdays closing price and today's prediction, and then compare it against the MSE of the model after training.