1 / 10

Backtest Scenario

Backtest Scenario. Scenario File. Every solution has Scenario file with MyScenario class derived from Scenario class defined in the API.Engine The Run button calls MyScenario.Run () method . This method can can be extended by users

monty
Download Presentation

Backtest Scenario

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Backtest Scenario

  2. Scenario File • Every solution has Scenario file with MyScenario class derived from Scenario class defined in the API.Engine • The Run button calls MyScenario.Run() method . This method can can be extended by users • By default MyScenario.Run() calls Scenario.Start() that starts the solution

  3. Configure Solution Programmatically • Solution.StartDate = new DateTime(1995, 1, 1); • Solution.StopDate = new DateTime(2001, 1, 1); • Project project = Solution.Projects[0]; • project.AddInstrument(instrument); • project.Parameters["Length"].Value = 14; • Start();

  4. Batch Backtests • Read sets of parameters from a file • Loop • Set parameters • Start() • Write results

  5. Walk Forward Backtests • Loop • Set in-sample data interval • Optimize • Set out-of-sample data interval • Start();

  6. Monte Carlo Backtests • Read original market data series • Create and set MC instrument • Loop • Clear historical data • Prepare MC data from original data series • Write MC data to historical db • Start() • Store results • Build MC distribution

  7. Continuous Backtests • Set interval (Date1, Date2) • Start(); • ResetOnStart = false; • Set parameters • Set interval (Date2, Date3) • Start(); => continuous results (Date1, Date3);

  8. From Backtest to Live trading • Set interval (Date1, Date2) • Start(); • ResetOnStart = false; • Start(Mode.Live);

  9. Custom Optimization • Loop parameters • Set parameters • Start(); • Objective = Solution.Portfolio.GetValue(); • Set best parameters • Start();

  10. Custom Backtest Reports • Start(); • Write • Solution.Portfolio.GetValue(); • Statistics.AnnualReturn • Statistics.Duration • Statistics.FinalWealth • Statistics.LongTrades • Statistics.LongTradesPnL • Statistics.LosingLongTrades • …

More Related