diff --git a/README.rst b/README.rst index 2701aec3..8d584d27 100644 --- a/README.rst +++ b/README.rst @@ -119,7 +119,6 @@ The following code implements a simple dual moving average algorithm. .. code:: python from zipline.api import ( - add_history, history, order_target, record, @@ -128,10 +127,6 @@ The following code implements a simple dual moving average algorithm. def initialize(context): - # Register 2 histories that track daily prices, - # one with a 100 window and one with a 300 day window - add_history(100, '1d', 'price') - add_history(300, '1d', 'price') context.i = 0 diff --git a/docs/notebooks/tutorial.ipynb b/docs/notebooks/tutorial.ipynb index ec3c7958..0b99896e 100644 --- a/docs/notebooks/tutorial.ipynb +++ b/docs/notebooks/tutorial.ipynb @@ -838,7 +838,7 @@ "\n", "As we need to have access to previous prices to implement this strategy we need a new concept: History\n", "\n", - "`history()` is a convenience function that keeps a rolling window of data for you. The first argument is the number of bars you want to collect, the second argument is the unit (either `'1d'` for `'1m'` but note that you need to have minute-level data for using `1m`). For a more detailed description `history()`'s features, see the [Quantopian docs](https://www.quantopian.com/help#ide-history). While you can directly use the `history()` function on Quantopian, in `zipline` you have to register each history container you want to use with `add_history()` and pass it the same arguments as the history function below. Lets look at the strategy which should make this clear:" + "`history()` is a convenience function that keeps a rolling window of data for you. The first argument is the number of bars you want to collect, the second argument is the unit (either `'1d'` for `'1m'` but note that you need to have minute-level data for using `1m`). For a more detailed description `history()`'s features, see the [Quantopian docs](https://www.quantopian.com/help#ide-history). Let's look at the strategy which should make this clear:" ] }, { @@ -870,15 +870,10 @@ "%%zipline --start 2000-1-1 --end 2014-1-1 --symbols AAPL -o perf_dma\n", "\n", "\n", - "from zipline.api import order_target, record, symbol, history, add_history\n", + "from zipline.api import order_target, record, symbol, history\n", "import numpy as np\n", "\n", "def initialize(context):\n", - " # Register 2 histories that track daily prices,\n", - " # one with a 100 window and one with a 300 day window\n", - " add_history(100, '1d', 'price')\n", - " add_history(300, '1d', 'price')\n", - "\n", " context.i = 0\n", "\n", "\n", diff --git a/docs/source/beginner-tutorial.rst b/docs/source/beginner-tutorial.rst index 07d0927a..e6897ac3 100644 --- a/docs/source/beginner-tutorial.rst +++ b/docs/source/beginner-tutorial.rst @@ -629,26 +629,18 @@ data for you. The first argument is the number of bars you want to collect, the second argument is the unit (either ``'1d'`` for ``'1m'`` but note that you need to have minute-level data for using ``1m``). For a more detailed description ``history()``'s features, see the -`Quantopian docs `__. While -you can directly use the ``history()`` function on Quantopian, in -``zipline`` you have to register each history container you want to use -with ``add_history()`` and pass it the same arguments as the history -function below. Lets look at the strategy which should make this clear: +`Quantopian docs `__. +Let's look at the strategy which should make this clear: .. code-block:: python %%zipline --start 2000-1-1 --end 2014-1-1 -o perf_dma - from zipline.api import order_target, record, symbol, history, add_history + from zipline.api import order_target, record, symbol, history import numpy as np def initialize(context): - # Register 2 histories that track daily prices, - # one with a 100 window and one with a 300 day window - add_history(100, '1d', 'price') - add_history(300, '1d', 'price') - context.i = 0