Repository navigation
Results and Stats for individual strategies from BacktestEngine testing multiple strategies #5317
Replies: 1 comment
|
Hi @eshaanraval, The backtest statistics cover the entire portfolio of strategies in the run. There isn't an engine result API that breaks them down by You can also reuse |
Uh oh!
There was an error while loading. Please reload this page.
Based on the documentation, you can run multiple strategies in a single node using
BacktestEngineby providing uniquestrategy-id. After the backtest is completed, you can access reports such aspositions,fills, andordersusingengine.generate_*_report()and getgeneral,pnl, andreturnstats usingengine.get_results().stats_*.My question is: Is there a way to retrieve results (stats) for individual strategies, similar to
get_results(strategy_id=...)orget_results(include_individual_stats=True)? I haven't found such a method in the documentation, but it's possible I might have missed it.I understand that individual stats can be computed from the positions (&/or other) reports, and there is a way to implement the calculation of said stats within Python using pandas. My question is whether pre-built functionality already exists to achieve this, as I believe it would be computationally and time-efficient compared to a custom Python implementation.
All reactions