Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Running Round Trip Analysis on an IDE Backtest?

Apologies if this has been covered elsewhere but I was looking for a way to return # profitable trades / # total trades which is covered in the pyfolio.create_round_trip_tear_sheet() table.
Is there a way to do this with backtest results from the IDE or do I have to recreate everything in Notebook?

2 responses

One can use the round-trips parameter to add a round trips section to the full tear sheet. Something like this.

bt = get_backtest('5c98136b58db6c4b44beba58')  
bt.create_full_tear_sheet(round_trips=True)

Above is the code which is automatically created when one clicks on 'notebook' in the backtest results page. Just manually add the 'round_trips=True' before running it. Hope that was the question you were asking.

Thank you, sir!