Walk Forward Optimization
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
- [x] I have completely filled out this template
- [x] I have confirmed that this issue exists on the current
masterbranch - [x] I have confirmed that this is not a duplicate issue by searching issues
A simple idea of how I would expect to use this:
Parent and Child algorithms to avoid nested optimizations
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.
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?