-
Notifications
You must be signed in to change notification settings - Fork 411
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
Proposal: change period/annualization API #20
Comments
CC @ahgnaw @abhijeetkalyan |
Great idea, that way we can simplify the API. |
Glad you like it, what do you think of the two options? I kinda like the first one for its simplicity, but the other one has it's pros too. |
I would be careful about enshrining a canonical definition of what "daily" means. There are ~252 trading days in the NYSE calendar, but Zipline already supports calendars other than NYSE, which have different numbers of trading days. |
I have a preference towards the second one. Instead of having users write |
@ssanderson Since it's a free parameter users can pass in whatever is appropriate for the exchange they are trading. But we should definitely make that clear in the doc-string that the default is relative to NYSE. |
One thing I currently think is suboptimal is that we provide
period
andannualization
to do the same thing. That might not be problematic if it was for a broad use-case but most users will be zipline or quantopian users and pass in daily returns. Two alternatives:DAILY = 252
and have onlyannualization
and allow it to be passedannualization=DAILY
orannualization=356
if someone wants custom.str
like'daily'
, essentially move period toannualization
.The text was updated successfully, but these errors were encountered: