Skip to content

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
Discussion options

You must be logged in to vote

Have you seen "Trading with Machine Learning" tutorial? It shows an example of a walk-forward analysis.

Basically, you pass the whole df into Backtest; then df.iloc[:128] in init() (or df.iloc[-128:] in next()) at each model training stage.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@AboveTheHeavens
Comment options

@AboveTheHeavens
Comment options

@kernc
Comment options

kernc May 3, 2021
Maintainer

Answer selected by AboveTheHeavens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants