diff --git a/catalyst/examples/mean_reversion_simple.py b/catalyst/examples/mean_reversion_simple.py index 6eaac9290..6b552cd1a 100644 --- a/catalyst/examples/mean_reversion_simple.py +++ b/catalyst/examples/mean_reversion_simple.py @@ -44,7 +44,7 @@ def initialize(context): context.start_time = time.time() context.set_commission(maker=0.001, taker=0.002) - context.set_slippage(spread=0.001) + context.set_slippage(slippage=0.001) def handle_data(context, data): diff --git a/catalyst/examples/mean_reversion_simple_custom_fees.py b/catalyst/examples/mean_reversion_simple_custom_fees.py index 710a1c23f..54068bd10 100644 --- a/catalyst/examples/mean_reversion_simple_custom_fees.py +++ b/catalyst/examples/mean_reversion_simple_custom_fees.py @@ -44,7 +44,7 @@ def initialize(context): context.start_time = time.time() context.set_commission(maker=0.001, taker=0.002) - # context.set_slippage(spread=0.001) + # context.set_slippage(slippage=0.001) def handle_data(context, data): diff --git a/catalyst/exchange/exchange_algorithm.py b/catalyst/exchange/exchange_algorithm.py index e2fa21edf..b225d8b44 100644 --- a/catalyst/exchange/exchange_algorithm.py +++ b/catalyst/exchange/exchange_algorithm.py @@ -153,17 +153,17 @@ def set_commission(self, maker=None, taker=None): self.blotter.commission_models[key].taker = taker @api_method - def set_slippage(self, spread=None): - """Set the spread of the slippage model for the simulation. + def set_slippage(self, slippage=None): + """Set the slippage of the fixed slippage model used by the simulation. Parameters ---------- - spread : float - The spread to be set. + slippage : float + The slippage to be set. """ key = list(self.blotter.slippage_models.keys())[0] - if spread is not None: - self.blotter.slippage_models[key].spread = spread + if slippage is not None: + self.blotter.slippage_models[key].slippage = slippage def _calculate_order(self, asset, amount, limit_price=None, stop_price=None, style=None): diff --git a/docs/source/appendix.rst b/docs/source/appendix.rst index 81e1a1b84..4e859e50e 100644 --- a/docs/source/appendix.rst +++ b/docs/source/appendix.rst @@ -134,7 +134,7 @@ Commission Models Slippage Models ''''''''''''''' -.. .. autofunction:: catalyst.api.set_slippage +.. autofunction:: catalyst.api.set_slippage .. autoclass:: catalyst.finance.slippage.SlippageModel :members: diff --git a/docs/source/install.rst b/docs/source/install.rst index e763bed65..1b1b220bc 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -38,7 +38,7 @@ dependencies without requiring the use of a second tool to acquire Catalyst's non-Python dependencies. For Windows, you will first need to install the *Microsoft Visual C++ - Compiler for Python 2.7*. Follow the instructions on the :ref:`Windows + Compiler for Python*. Follow the instructions on the :ref:`Windows ` section and come back here. For instructions on how to install ``conda``, see the `Conda Installation diff --git a/docs/source/releases.rst b/docs/source/releases.rst index 585e37208..a58b8251c 100644 --- a/docs/source/releases.rst +++ b/docs/source/releases.rst @@ -2,6 +2,15 @@ Release Notes ============= +Version 0.5.18 +^^^^^^^^^^^^^^ +**Release Date**: 2018-07-22 + +Build +~~~~~ +- The parameter of the `set_slippage` API function was updated from spread to + slippage to better describe its purpose in the fixed slippage model. + Version 0.5.17 ^^^^^^^^^^^^^^ **Release Date**: 2018-07-19