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 Replace linear cone with bootstrapped non-parametric cone #233

Closed
wants to merge 3 commits into from

Conversation

a-campbell
Copy link
Contributor

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

@a-campbell
Copy link
Contributor Author

@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,
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

made the change

@twiecki twiecki self-assigned this Dec 2, 2015

perf_ts_r = perf_ts_r.append(future_cone)

return perf_ts_r
Copy link
Contributor

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.

@twiecki
Copy link
Contributor

twiecki commented Dec 3, 2015

Looks great overall but see minor comments.

@twiecki
Copy link
Contributor

twiecki commented Dec 4, 2015

Merged with 9cc98eb 👍

@twiecki twiecki closed this Dec 4, 2015
@twiecki twiecki deleted the cone-refactor branch December 4, 2015 08:41
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.

2 participants