Back to Community
Round trips Summary statistics.

I can get it from

bt.create_full_tear_sheet(round_trips = True,)  

along with all that statistics, I do not want.

I just need this table:

Summary stats                All trades    Short trades    Long trades  
Total number of round_trips     238.00         80.00          158.00  
Percent profitable                0.69          0.53            0.77  
Winning round_trips             164.00         42.00          122.00  
Losing round_trips               74.00         38.00           36.00  
Even round_trips                  0.00          0.00            0.00  

I tried different ways to do this unsuccessfully.

Can sombody help me?
Thanks in advance!

Loading notebook preview...
2 responses

Gave it a try...

  1. Was able to get
    pf.create_round_trip_tear_sheet to
    execute, yet that gives you the whole plot and is not what you want.
  2. When trying to get at the round_trip module, ran into the BlackList
    problem... SecurityViolation: 0002 Security Violation(s): Accessing pf.round_trips raised an AttributeError. No attributes with a similar name were found.
  3. Next step might be to copy the
    code from for def extract_round_trips(transactions, portfolio_value=None):

All for now...I tend to stop when reaching the "Blue Screen" of Q!

Loading notebook preview...


Thank you so mach for trying to help me.
I spend another couple hours to solve the problem unsuccessfully.
Copied 414 line Quantopian code from github and when run got an error message:

Importing warnings raised ImportError. No modules or attributes with a similar name were found.  
You tried to import a module that is not whitelisted on Quantopian.  
To see the list of allowed modules in the IDE, go to  
To see the list of additional modules allowed in Research, go to  

@Dan Whitnable, @Thomas Wiecki, @Gus Gordon
Please help me.

Loading notebook preview...