-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Capacity tear sheet #284
Capacity tear sheet #284
Conversation
I'm not sure how to make Travis accept |
The first is easy to fix either with |
def get_assets_dollar_volume(positions, market_data, | ||
only_held_days=True, last_n_days=None): | ||
""" | ||
Computes descriptive statsitics for the daily dollar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
statsitics
I haven't really followed the development of the capacity analysis so coming to this with fresh eyes. It's possible that this is the best to display the information we want to extract but overall I find it a bit hard to extract actionable insights. The below points are thus mostly naive questions rather than fully baked feedback on what would be better.
|
vol_analysis.loc[:, 'avg_daily_dv_$mm'] = np.round( | ||
DV.mean() / DISPLAY_UNIT, 2) | ||
vol_analysis['10th_%_daily_dv_$mm'] = np.round(DV.apply( | ||
lambda x: np.nanpercentile(x, 10)) / DISPLAY_UNIT, 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DV.quantile(q=0.1)
pv = timeseries.cum_returns( | ||
returns, starting_value=backtest_starting_capital) * mult | ||
|
||
adj_returns = returns - (daily_penalty / pv) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
daily_penalty
is in dollars, no?
OK, done with this round. |
16f041f
to
a6f1bf8
Compare
@twiecki I think this should be good for another look. I updated the screenshots in the original PR post. |
I think this looks great. You'll need to rebase as we have |
64ff7fc
to
2035582
Compare
All squashed and rebased now. |
👍 |
There are two main analyses here: constraining ticker and a capacity sweep.
The constraining ticker analysis asks "What is the maximum capital base I could have deployed this strategy on without ever consuming more than X% of the {average, 10th_percentile, 90th_percentile} daily volume for each traded name.
The capacity sweep asks "How does my strategy's Sharpe ratio decay as I increase capital base and incur greater slippage on my trades?"
Another change of note is the inclusion of market data in this tear sheet. Since we will likely want to use market data for future tear sheets, we should be sure that we like the Panel data format we are asking for in this API change.
Wondering if it is useful to display the most liquid names in the constraining ticker analysis?