Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH Added round trip tearheet and supporting functions #210

Merged
merged 18 commits into from
Nov 23, 2015
Merged

Conversation

a-campbell
Copy link
Contributor

  • Adds ability to split trades
  • Adds ability to append "closing" trades to complete round trips open at the end of the backtest
  • Adds various plotting and printing functions to visualize round trip duration, frequency, and profitability
  • Adds ability to display profit attribution by sector.
  • Tests for round trip extraction functions.

screenshot 2015-11-16 18 46 25

@a-campbell
Copy link
Contributor Author

@twiecki should you review this since you wrote a lot of this code?

@twiecki twiecki self-assigned this Nov 17, 2015
@twiecki
Copy link
Contributor

twiecki commented Nov 18, 2015

I found some issues with the code I want to have a closer look at. We also need more unittests I think.

@ssanderson
Copy link
Contributor

We also need more unittests I think.
👍

Also noticed while browsing: many of the new functions' docstrings report that they accept **kwargs and forward them to seaborn, which appears not to be true.

@twiecki twiecki mentioned this pull request Nov 19, 2015
return ax


def show_profit_attribtion(round_trips):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

attribution

@twiecki
Copy link
Contributor

twiecki commented Nov 20, 2015

autopep is your friend :).

Also, I think an example NB with some description would go a long way. Really like where this is going.

@llllllllll
Copy link
Contributor

You might want to consider gzipping the test data. If there is a lot it will make cloning much slower, especially when you don't have great internet.

@a-campbell
Copy link
Contributor Author

good call

In other words, separates of the closing of one short/long position
with the opening of a new long/short position.

For example, the second transaction in this transactions DataFrame
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice/clear description.

@twiecki
Copy link
Contributor

twiecki commented Nov 23, 2015

LGTM. I think there are still the csv files present here.

a-campbell added a commit that referenced this pull request Nov 23, 2015
ENH Round trip tearheet and supporting functions
@a-campbell a-campbell merged commit 1157f0c into master Nov 23, 2015
@twiecki twiecki deleted the round-trip2 branch November 23, 2015 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants