Skip to content

Commit

Permalink
DOC: Removed remaining mentions of add_history
Browse files Browse the repository at this point in the history
which is no longer necessary and was removed from the api already.
  • Loading branch information
richafrank committed Jun 17, 2016
1 parent 3d9daf9 commit 9b87119
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 23 deletions.
5 changes: 0 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
9 changes: 2 additions & 7 deletions docs/notebooks/tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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:"
]
},
{
Expand Down Expand Up @@ -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",
Expand Down
14 changes: 3 additions & 11 deletions docs/source/beginner-tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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:
`Quantopian docs <https://www.quantopian.com/help#ide-history>`__.
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
Expand Down

0 comments on commit 9b87119

Please sign in to comment.