mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-15 11:22:18 +08:00
DOC: Removed remaining mentions of add_history
which is no longer necessary and was removed from the api already.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user