-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Error running zipline backtest with custom trading calendar #2018
Comments
Ah looks like we're loading the options for
in And then passing that to the CLI
And so when we register a new calendar, the new calendar doesn't appear in I'm thinking there are a couple solutions here:
|
Also, a note to add: If I create a 24/7 calendar I'll also have to call |
Made some fake assets and ingested them (
And then a toy algo:
Ran:
And then ran into this:
|
Thanks for pointing the Regarding this last error, I have no idea. I will reproduce what you posted here to see if I have the same error. |
When we enter the
We error at this point (i.e. the
Then I end up with this error (looks like something having to do with sids/symbols, and the
|
Ah,
Changed that to
|
Thank you very much @freddiev4. I got away due to medical issues. I am focusing on catalyst (zipline for crypto) but I am also interested in zipline itself so I will give it a try. |
Just did a new release (1.2.0). You should be able to pip install zipline and run with a custom trading calendar. Going to close this. Feel free to reopen if you still have issues. |
split=1! I set it 0 originally and find moving average not work which seems is related to tradingcalendar. Search for module 'zipline.utils.tradingcalendar' has no attribute 'session_distance' find @freddiev4's example, this set solved my moving average problem. |
From @vonpupp in #1800 (comment):
Hi @freddiev4 ,
I am new to zipline. I am trying to use a 24/7 calendar, so I am trying to use the feature of this PR already to do it in a proper way. I am using zipline installed via pip directly from github's egg (`pip install git+git://github.com/quantopian/zipline')
Unfortunately I am not able to use this feature properly, here is what I am doing:
I edited the
extensions.py
as follows:As you can see I am using csvdir bundle which has recently been merged. The ingestion process seems to work fine (no errors and I also verified the directory and the sqlite files exist, so I assume the ingestion is ok). I conclude therefore that the 24/7 calendar works properly during ingestion.
When I try to execute with:
I get:
Could you please help me?
Thanks a lot.
The text was updated successfully, but these errors were encountered: