Skip to content

Walk Forward Optimization #7031

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 tasks done
jaredbroad opened this issue Mar 1, 2023 · 4 comments
Open
3 tasks done

Walk Forward Optimization #7031

jaredbroad opened this issue Mar 1, 2023 · 4 comments

Comments

@jaredbroad
Copy link
Member

jaredbroad commented Mar 1, 2023

Desired Behavior

  • Create Walk Forward Optimization API in LEAN.
  • Harness existing parameters and optimization controller technology to implement scheduled optimizations.
  • Use a pluggable source for the optimization provider.
  • In backtesting, run local LEAN instances inside LEAN Foundation, as backtests can take a long time.
  • In live trading, run an APIOptimizationHandler to run the optimization lift in the cloud; to keep live loads light.
  • Use the Scheduled Event System to handle initializing the optimization.

QCAlgorithm.Optimize(DateRule, TimeRule, {Optimization Target | Optimization Target Func<BacktestResults[]>} )

  • Date/Time Rules - When to run WFO / Month Start, Week Start etc.
  • Optimization Target - Select the winning set pf parameters.
  • The result would then set the algorithm parameters set.

Checklist

  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues
@algo-dude
Copy link

A simple idea of how I would expect to use this:

image

@jaredbroad
Copy link
Member Author

Parent and Child algorithms to avoid nested optimizations

@KlausGlueckert
Copy link

this would be interesting! Please allow to pass an objective function to "score" where one can use the runtime statistics of the backtest and not only point estimates of the score of the backtest.

@RooFernando
Copy link

Is there a way to run the backtest on the research.ipynb?

I would like to optimize parameters but would need to extract values from the run backtest (objective function). Is it possible to call on the backtest strategy within research Jupyter notebook?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants