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

chart.Posn initial artificial drawdown #72

Open
cdries opened this issue May 25, 2018 · 1 comment
Open

chart.Posn initial artificial drawdown #72

cdries opened this issue May 25, 2018 · 1 comment

Comments

@cdries
Copy link

cdries commented May 25, 2018

Drawdown<-rbind(xts(-max(CumPL),order.by=first(index(Drawdown)-1)),Drawdown)

This line causes an initial artificial drawdown the size of the maximum cumulative PL to happen at the start of drawdown series. I think this line can be removed without any consequences.

For an example of this, run the demo code
https://github.com/R-Finance/blotter/blob/master/demo/longtrend.R
up to line 117 where chart.Posn is called.

@braverock
Copy link
Owner

I think we could make this an option.

It is there to force the scale of the cumPL and Drawdowns panels to be the same. I think we put it in before there was a reliable ylim mechanism for panels in chart_Series. I think that with plot.xts we could probably do something smarter to evaluate ylim for the panels, though @rossb34 would know for sure.

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

No branches or pull requests

2 participants