Recommendations on time-series price prediction models?

Discussion in 'Automated Trading' started by jublin, Apr 5, 2021.

  1. jublin

    jublin

    Got it, that makes sense! By standardizing each input independently, you mean each dimension right? If I have OHLCV data, does it make sense to standardize the OHLC data together and the V data separately?
     
    #51     May 18, 2021
  2. userque

    userque

    If those are your only inputs, then yes, you could do OHLC together, or separately. (Yes, by 'input,' I mean dimension.) And I would definitely do V separately, in either case.
     
    #52     May 18, 2021
    jublin likes this.
  3. ph1l

    ph1l

    For my program, I used the raw, unprocessed data from column 7 of inputData.csv in
    https://www.elitetrader.com/et/thre...-prediction-models.357511/page-3#post-5368622
    I didn't want to normalize or standardize the data because I wanted to fit the actual data. And I've never found volume too useful for machine learning problems because it varies too much.

    My x values were offsets in number of days from the input data (0 through 88 for the data I posted for fitting; > 88 for predicting the future).

    It's possible your genetic optimization for function minimization implementation
    • Trained with too few or too many generations.
    • Had a too small or too large population size.
    • Used a crossover that mixed data of different types (e.g., y intercept of a parabola and frequency of a cosine wave probably shouldn't be crossed over).
    • Initialized and/or mutated parameter values that had no chance of helping (e.g., using a value of 123456789 when the input data was orders of magnitude away from that).
    • Used a pseudorandom number generator that wasn't very random or had too short a period. I use WELLRNG44497 (ported from http://www.ritsumei.ac.jp/~harase/WELL44497a_new.c).

    Another thing that could help is using a larger input data size. I've been using 123 calendar days instead of the 89 I posted in this thread because the results seem more consistent among different runs on assorted assets.

    Regarding other function minimizers/sinusoid fitters, I tried
    None of these worked that well for me, because they would sometimes not be able to find a good solution (or sometimes any solution at all).

    So then I tried function minimization by genetic optimization and later linear genetic programming. I currently use the genetic optimization method because my genetic programming implementation produced about the same results but ran slower.
     
    #53     May 19, 2021
    jublin and userque like this.
  4. jublin

    jublin

    Got it, thanks a lot for the thorough reply!

     
    #54     May 21, 2021
  5. jublin

    jublin

    By the way, I went through the post and confirm that it predicts one day ahead. It uses the last 60 days of data to predict the next day:

    Code:
    for i in range(60, 1482):
        X_train.append(training_set_scaled[i-60:i, 0])
        y_train.append(training_set_scaled[i, 0]) 
     
    #55     May 25, 2021
  6. ph1l

    ph1l

    Here is an article that has examples of multi-step LSTM forecasting.
    https://machinelearningmastery.com/how-to-develop-lstm-models-for-time-series-forecasting/
    And another by the same author that mentions other ways to do multi-step forecasting.
    https://machinelearningmastery.com/multi-step-time-series-forecasting/
    His book could be helpful too.
    https://machinelearningmastery.com/introduction-to-time-series-forecasting-with-python/
     
    #56     May 26, 2021
  7. This is pretty bad. Sanity test: if the predictions look like the original data shift back some time your just using the previous price as your prediction for the next price. which is basically modelling it as a stochastic process with no useful signal...
     
    #57     May 29, 2021
  8. [​IMG]
     
    #58     Jun 3, 2021