Files
catalyst/docs/source/whatsnew/1.0.0.txt
T
Joe Jevnik 59c8e371a2 ENH: Updates the cli, data bundles and extensions.
Adds the data bundle concept which makes it easy for users to register
loading functions to build out minute and daily data along with an
assets db and adjustments db. By default we have provided a `quandl`
bundle which pulls from the public domain WIKI dataset. Users may
register new bundles by decorating an ingest function with
`zipline.data.bundles.register(<name>)`. This also provides a
`yahoo_equities` function for creating an ingestion function that will
load a static set of assets from yahoo.

The cli is now structured as a couple of subcommands and has been
changed to `python -m zipline`. The old behavior of `run_algo.py` has
been moved to the `run` subcommand. This is almost entirely the same
except that it now takes the name of the data bundle to use, defaulting
to `quandl`.

The next subcommand is `ingest` which takes the name of
a data bundle to ingest. This will run the loading machinery and write
the data to a specified location that `run` can find.

There is also a `clean` subcommand which deletes the data that was
written with `ingest`.

Extensions have also been added to zipline. This is an experimental
feature where users can provide an extra set of python files to run at
the start of the process. These can be used to configure aspects of
zipline. Right now the only thing that is supported in an extension file
is the registration of a new data bundle.
2016-05-03 18:38:24 -04:00

128 lines
3.6 KiB
Plaintext

Development
-----------
:Release: 1.0.0
:Date: TBD
.. warning::
This release is still under active development. All changes listed are
subject to change at any time.
Highlights
~~~~~~~~~~
New Entry Points (:issue:`xxxx`)
````````````````````````````````
In order to make it easier to use zipline we have updated the entry points for
a backtest. The three supported ways to run a backtest are now:
1. :func:`zipline.run_algo`
2. ``$ python -m zipline run``
3. ``%zipline`` (IPython magic)
Data Bundles (:issue:`xxxx`)
````````````````````````````
1.0.0 introduces data bundles. Data bundles are groups of data that should be
preloaded and used to run backtests later. This allows users to not need to to
specify which tickers they are interested in each time they run an
algorithm. This also allows us to cache the data between runs.
By default, the ``quandl`` bundle will be used which pulls data from quandl's
`WIKI dataset <https://www.quandl.com/data/WIKI>`_. New bundles may be
registered with :func:`zipline.data.bundles.register` like:
.. code-block:: python
@zipline.data.bundles.register('my-new-bundle')
def my_new_bundle_ingest(environ,
asset_db_writer,
minute_bar_writer,
daily_bar_writer,
adjustment_writer,
calendar,
cache,
show_progress):
...
This function should retrieve the data it needs and then use the writers that
have been passed to write that data to disc in a location that zipline can find
later.
This data can be used in backtests by passing the name as the ``-b / --bundle``
argument to ``$ python -m zipline run`` or as the ``bundle`` argument to
:func:`zipline.run_algo`.
For more information see `Data Bundles`_ for more information.
Enhancements
~~~~~~~~~~~~
* Made the data loading classes have more consistent interfaces. This includes
the equity bar writers, adjustment writer, and asset db writer. The new
interface is that the resource to be written to is passed at construction time
and the data to write is provided later to the `write` method as
dataframes or some iterator of dataframes. This model allows us to pass these
writer objects around as a resource for other classes and functions to
consume (:issue:`1109` and :issue:`1149`).
* Added masking to :class:`zipline.pipeline.CustomFactor`.
Custom factors can now be passed a Filter upon instantiation. This tells the
factor to only compute over stocks for which the filter returns True, rather
than always computing over the entire universe of stocks. (:issue:`1095`)
* Added :class:`zipline.utils.cache.ExpiringCache`.
A cache which wraps entries in a :class:`zipline.utils.cache.CachedObject`,
which manages expiration of entries based on the `dt` supplied to the `get`
method. (:issue:`1130`)
* Implemented :class:`zipline.pipeline.factors.RecarrayField`, a new pipeline
term designed to be the output type of a CustomFactor with multiple outputs.
(:issue:`1119`)
* Added optional `outputs` parameter to :class:`zipline.pipeline.CustomFactor`.
Custom factors are now capable of computing and returning multiple outputs,
each of which are themselves a Factor. (:issue:`1119`)
Experimental Features
~~~~~~~~~~~~~~~~~~~~~
.. warning::
Experimental features are subject to change.
None
Bug Fixes
~~~~~~~~~
None
Performance
~~~~~~~~~~~
None
Maintenance and Refactorings
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
None
Build
~~~~~
None
Documentation
~~~~~~~~~~~~~
None
Miscellaneous
~~~~~~~~~~~~~
None