How to backtest a machine learning model which uses a sequence data as input? #339
Answered
by
kernc
AboveTheHeavens
asked this question in
Q&A
-
I have an ML model which uses a 128 value period (think 128 rows) to predict 128+1's output value. I have tried to look at documentation but from my understanding I have to input a df with open, high, low, close columns. How would I go about passing my 128 row sequence input? Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Answered by
kernc
May 3, 2021
Replies: 1 comment 3 replies
-
Have you seen "Trading with Machine Learning" tutorial? It shows an example of a walk-forward analysis. Basically, you pass the whole |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
AboveTheHeavens
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have you seen "Trading with Machine Learning" tutorial? It shows an example of a walk-forward analysis.
Basically, you pass the whole
df
intoBacktest
; thendf.iloc[:128]
ininit()
(ordf.iloc[-128:]
innext()
) at each model training stage.