DOC: Adding the no-benchmark setting for the initial run in the readme so that the first run by end users doesn't fail

This commit is contained in:
samatix 2020-04-20 14:29:28 +02:00
parent 96a6b826c0
commit 14a03a0b73
3 changed files with 4 additions and 3 deletions

View file

@ -99,7 +99,7 @@ Once you have your key, run the following from the command line:
.. code:: bash
$ QUANDL_API_KEY=<yourkey> zipline ingest -b quandl
$ zipline run -f dual_moving_average.py --start 2014-1-1 --end 2018-1-1 -o dma.pickle
$ zipline run -f dual_moving_average.py --start 2014-1-1 --end 2018-1-1 -o dma.pickle --no-benchmark
This will download asset pricing data data from `quandl`, and stream it through the algorithm
over the specified time range. Then, the resulting performance DataFrame is saved in `dma.pickle`, which you

View file

@ -162,6 +162,9 @@ on OSX):
--benchmark-symbol The instrument's symbol to be used as
a benchmark.
(should exist in the ingested bundle)
--benchmark-sid The sid of the instrument to be used as a
benchmark.
(should exist in the ingested bundle)
--no-benchmark This flag is used to set the benchmark to
zero. Alpha, beta and benchmark metrics
are not calculated

View file

@ -536,8 +536,6 @@ class TradingAlgorithm(object):
raise ValueError("Must specify either benchmark_sid "
"or benchmark_returns.")
benchmark_asset = None
# get benchmark info from trading environment, which defaults to
# downloading data from IEX Trading.
benchmark_returns = self.benchmark_returns
return BenchmarkSource(
benchmark_asset=benchmark_asset,