REL: 1.0.1.

Update docs, whatsnew, and stub files for the release.
This commit is contained in:
Scott Sanderson
2016-05-27 16:41:47 -04:00
parent 05ac438c3c
commit 24f30803bd
4 changed files with 65 additions and 48 deletions
+11 -2
View File
@@ -117,14 +117,25 @@ bugs that could cause undesirable behavior when trading with real money.
Simulation Parameters
`````````````````````
.. autofunction:: zipline.api.set_benchmark
Commission Models
'''''''''''''''''
.. autofunction:: zipline.api.set_commission
.. autoclass:: zipline.finance.commission.CommissionModel
:members:
.. autoclass:: zipline.finance.commission.PerShare
.. autoclass:: zipline.finance.commission.PerTrade
.. autoclass:: zipline.finance.commission.PerDollar
Slippage Models
'''''''''''''''
.. autofunction:: zipline.api.set_slippage
.. autoclass:: zipline.finance.slippage.SlippageModel
@@ -134,8 +145,6 @@ Simulation Parameters
.. autoclass:: zipline.finance.slippage.VolumeShareSlippage
.. autofunction:: zipline.api.set_benchmark
Pipeline
````````
+32 -37
View File
@@ -1,59 +1,54 @@
Development
-----------
Release 1.0.1
-------------
:Release: 1.0.1
:Date: TBD
:Date: May 27, 2016
.. warning::
This release is still under active development. All changes listed are
subject to change at any time.
Highlights
~~~~~~~~~~
None
This is a minor bug-fix release from 1.0.0 and includes a small number of bug
fixes and documentation improvements.
Enhancements
~~~~~~~~~~~~
None
- Added support for user-defined commission models. See the
:class:`zipline.finance.commission.CommissionModel` class for more details on
implementing a commision model. (:issue:`1213`)
Experimental Features
~~~~~~~~~~~~~~~~~~~~~
.. warning::
Experimental features are subject to change.
None
- Added support for non-float columns to Blaze-backed Pipeline
datasets (:issue:`1201`).
Bug Fixes
~~~~~~~~~
None
- Fixed a bug where Pipeline loaders were not properly initialized by
:func:`zipline.run_algorithm`. This also affected invocations of ``zipline
run`` from the CLI.
Performance
~~~~~~~~~~~
- Fixed a bug that caused the ``%%zipline`` IPython cell magic to fail
(:commit:`533233fae43c7ff74abfb0044f046978817cb4e4`).
None
- Fixed a bug in the :class:`~zipline.finance.commission.PerTrade` commission
model where commissions were incorrectly applied to each partial-fill of an
order rather than on the order itself, resulting in algorithms being charged
too much in commissions when placing large orders.
Maintenance and Refactorings
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:class:`~zipline.finance.commission.PerTrade` now correctly applies
commissions on a per-order basis (:issue:`1213`).
None
- Attribute accesses on :class:`CustomFactors <zipline.pipeline.CustomFactor>`
defining multiple outputs will now correctly return an output slice when the
output is also the name of a :class:`~zipline.pipeline.factors.Factor` method
(:issue:`1214`).
Build
~~~~~
- Replaced deprecated usage of ``pandas.io.data`` with ``pandas_datareader``
(:issue:`1218`).
None
- Fixed an issue where ``.pyi`` stub files for :mod:`zipline.api` were
accidentally excluded from the PyPI source distribution. Conda users should
be unaffected (:issue:`1230`).
Documentation
~~~~~~~~~~~~~
None
Miscellaneous
~~~~~~~~~~~~~
None
- Added a new example, :mod:`zipline.examples.momentum_pipeline`, which
exercises the Pipeline API (:issue:`1230`).
+2 -2
View File
@@ -557,11 +557,11 @@ def set_cancel_policy(cancel_policy):
"""
def set_commission(commission):
"""Sets the commision model for the simulation.
"""Sets the commission model for the simulation.
Parameters
----------
commission : PerShare, PerTrade, or PerDollar
commission : CommissionModel
The commission model to use.
See Also
+20 -7
View File
@@ -24,25 +24,38 @@ DEFAULT_MINIMUM_COST_PER_TRADE = 1.0 # $1 per trade
class CommissionModel(with_metaclass(abc.ABCMeta)):
"""
Abstract commission model interface.
Commission models are responsible for accepting order/transaction pairs and
calculating how much commission should be charged to an algorithm's account
on each transaction.
"""
@abstractmethod
def calculate(self, order, transaction):
"""
Calculate the amount of commission to charge on ``order`` as a result
of ``transaction``.
Parameters
----------
order: the order whose transaction we are processing. Its `commission`
field is up to date with how much commission has been attributed
to this order so far.
order : zipline.finance.order.Order
The order being processed.
transaction: the transaction we are processing.
The ``commission`` field of ``order`` is a float indicating the
amount of commission already charged on this order.
transaction : zipline.finance.transaction.Transaction
The transaction being processed. A single order may generate
multiple transactions if there isn't enough volume in a given bar
to fill the full amount requested in the order.
Returns
-------
float: The additional commission, in dollars, that we should attribute
to this order.
amount_charged : float
The additional commission, in dollars, that we should attribute to
this order.
"""
pass
raise NotImplementedError('calculate')
class PerShare(CommissionModel):