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

no backtesting data show before 1990 #777

Closed
leoleolam opened this issue Oct 15, 2015 · 3 comments
Closed

no backtesting data show before 1990 #777

leoleolam opened this issue Oct 15, 2015 · 3 comments

Comments

@leoleolam
Copy link

get the following if i input data which is all prior than 1990
AssertionError: Period end falls before the first known trading day.

i did some narrow down and see it is hardcode
start = pd.Timestamp('1990-01-01', tz='UTC') in tradingcalendar

is there anyway I can see backtesting result prior to 1990? is there any workaround for the release 0.7

@llllllllll
Copy link
Contributor

hmm, it looks like this date was just chosen based on the data we commonly work with. Currently there is some work that modifies the trading calendar; however, it is not yet completed. This work is a more long term solution as it would allow the user to specify their start date. You can track this progress here: #556. As a temporary workaround, I think you might be able to patch out the start date from the module. For example:

from zipline.utils import tradingcalendar
tradingcalendar.start = pd.Timestamp('1980-01-01')  # set a new start date.

note: This is not supported behavior but it might solve the immediate problem that you have. This will likely break in future versions of zipline.

Another problem with this is that we do not mark all holidays before 1990, so the simulation might be incorrect.

@leoleolam
Copy link
Author

thanks, i did some hack for the current release version and it worked. i also needed to do some patch on the benchmark data, treasury .

agree that it is not a proper way, please let me know if there are some updates for the latest release regarding this soon.

@freddiev4
Copy link
Contributor

Going to close this as it looks like the OP had figured out a solution. Feel free to re-open if you come across a similar issue 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants