Open ikfdarba opened 7 years ago
I am facing the same issue
I am facing the same issue either. isnt there any solution yet?
I am facing the same issue. If benchmark can be turned off, that is the best.
This is a hack, but what I do is ignore the benchmark by changing benchmark.py
to
import pandas as pd
from trading_calendars import get_calendar
def get_benchmark_returns(symbol, first_date, last_date):
cal = get_calendar('NYSE')
dates = cal.sessions_in_range(first_date, last_date)
data = pd.DataFrame(index=dates, columns=['Close'])
return data.sort_index().pct_change(1).iloc[0:]
which just sets all benchmark returns to zero. This works on a custom bundle. This assumes the calendar for the bundle is NYSE.
Dear Zipline Maintainers,
Before I tell you about my issue, let me describe my environment:
Environment
$ uname --all
)$ python --3.4
$ python -c 'import math, sys;print(int(math.log(sys.maxsize + 1, 2) + 1))'
$ pip freeze
or$ conda list
Now that you know a little about me, let me tell you about the issue I am having:
Description of Issue
I try to set a custom benchmark using the custom_benchmark() commmand. I tried to first set a benchmark from the default (quantopian-quandl) and seems to work fine:
set_benchmark(symbol("AAPL"))
however when i now make a custom bundle and try to set the benchmark
where the symbol iShares_MSCI_Europe_UCITS_ETF_Acc is in the data and i can trade it, i get:
Here is how you can reproduce this issue on your machine:
Reproduction Steps
1. 2. 3. ...
What steps have you taken to resolve this already?
...
Anything else?
...
Sincerely,
$ whoami