Dear Zipline Maintainers,
Before I tell you about my issue, let me describe my environment:
$ uname --all)$ python --3.4$ python -c 'import math, sys;print(int(math.log(sys.maxsize + 1, 2) + 1))'$ pip freeze or $ conda listNow that you know a little about me, let me tell you about the issue I am
having:
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
context.benchmark='iShares_MSCI_Europe_UCITS_ETF_Acc'
set_benchmark(symbol(context.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:
1.
2.
3.
...
...
...
Sincerely,
$ whoami
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.
Most helpful comment
This is a hack, but what I do is ignore the benchmark by changing
benchmark.pyto
which just sets all benchmark returns to zero. This works on a custom bundle. This assumes the calendar for the bundle is NYSE.