-
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
ENH Replace linear cone with bootstrapped non-parametric cone #233
Conversation
@twiecki I think this might be good to go. |
create_future_cone=True): | ||
"""Computes a rolling cone to place in the cumulative returns | ||
plot. See plotting.plot_rolling_returns. | ||
def forecast_cone_bounds(is_returns, num_days, cone_std, |
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.
we might want to add more, so maybe forecast_cone_bootstrap
?
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.
Also could provide default cone_std values of 1, 1.5, and 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.
made the change
|
||
perf_ts_r = perf_ts_r.append(future_cone) | ||
|
||
return perf_ts_r |
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.
So great to see all that complexity go.
Looks great overall but see minor comments. |
Merged with 9cc98eb 👍 |
The old linear cone had several troubling assumptions (normal returns, use of arithmetic-like return averaging in the backtest, linearity of future returns, starting capital of oos == fixed starting value of the cone).
This new bootstrapped cone makes fewer assumptions by building its forward projection from samples drawn directly from the in-sample daily returns. This direct sampling makes the bootstrapped cone non-parametric, it does not assume backtest returns fit into any particular distribution.
Discussion here: #178