I would like to know whether it's wrong; when working with time series data; to use daily prices as features and the price after 3 days as target.

Is this correct or should I use the next-day price as target and after training; predict 3 times; each time for one more day ahead(using the predicted value as a new feature)

Will these 2 approaches give similar results?

  • $\begingroup$ It is generally fine to use overlapping periods like that when training, although beware you might be overfitting. However, if you are doing cross validation and if you have a test set, you must make sure there is no bleed-over between them. This will probably mean skipping a few days. The data for the first test example must not come from before the target from the last train example, if that makes sense. $\endgroup$
    – Ken Syme
    Aug 6, 2018 at 14:08

2 Answers 2


is it ok to use daily prices?

You can use the daily prices as time series to forecast an arbitrary horizon.


In short, vanilla NN have no memory of previous inputs whereas LSTM NN have. This is particularly useful in your problem because LSTM can learn the temporal (sequential) characteristics of your dataset and therefore forecast several steps ahead. LSTM RNN can learn the dynamics of your problem (vanilla NN cannot). A useful Python/Keras tutorial for your problem can be found here.

Regression vs Classification

In short, classification is the problem of discriminating a sample into discrete categories. Regression refers to using past values of a signal (or more) to estimate future values of the same (or other) signals. In your case, regression is what you ask for.

  • $\begingroup$ Can you please check again the parts on lstm/nn and regressiojn/classification? I explained a bit more what i am looking for. Thank you. $\endgroup$
    – George
    Aug 6, 2018 at 15:40

Use all you got

It is ok to train with the prices per day to predict 3 days in advance.

Suppose you have the data:

[   1,   20,  33, 4444,   2,  21,  34, 4445,   3,  22,  35, 4446]
 t-11  t-10  t-9   t-8  t-7  t-6  t-5   t-4  t-3  t-2  t-1   t

and you want to predict t+3 (spoiler: should be 36).

If you look backward in steps of 3 you will be looking at [t, t-3, t-6, t-9] which corresponds to [4446, 3, 21, 33]. Obviously, it will be much harder to predict 36 from that, compared to if we had looked at [t-1, t-5, t-9] = [35, 34, 33].

Therefore, it is encouraged, to feed all the data you have to your model.

If you are using a neural network, your network should be able to learn this patterns for you.

If you are using some other type of regressor, you might need to figure out which kernel to use your self.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.