Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Cumulative Trade Metrics

Is there a way to extract the following data from quantopian backtests? If not how would we program this. Would it be better to just have it log these metrics after each trading day? Would the back tests even be necessary?

Metrics:
Number of Trades
Average Profit/Loss %
Average Bars Held*
Number of Winning Trades
Average Profit %
Average Bars held on Winning Trades*
Maximum Consecutive Winning Trades
Number of Losing Trades
Average Loss %
Average Bars held on Losing Trades*
Maximum Consecutive Losing Trades

  • (could be days, or minutes depending on time frame of strategy)
1 response

Full backtest provides some detail. You could work with this toward those. Additional info about that here.