From c35a590413fa057c78a33b240fb90e28705734a5 Mon Sep 17 00:00:00 2001 From: AvishaiW Date: Sun, 22 Jul 2018 12:33:31 +0300 Subject: [PATCH 1/4] DOC: generalised the needs of a compiler to all windows users --- docs/source/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From fe741a609c677d2b5a672b684fbbf1d9bd8307ed Mon Sep 17 00:00:00 2001 From: lenak25 Date: Sun, 22 Jul 2018 15:31:06 +0300 Subject: [PATCH 2/4] BLD: update the parameter of the set_slippage function from spread to slippage --- catalyst/examples/mean_reversion_simple.py | 2 +- .../examples/mean_reversion_simple_custom_fees.py | 2 +- catalyst/exchange/exchange_algorithm.py | 13 +++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) 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..c93c552ca 100644 --- a/catalyst/exchange/exchange_algorithm.py +++ b/catalyst/exchange/exchange_algorithm.py @@ -153,17 +153,18 @@ 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): From ee85f7f08bcb945ce4770e8730904740a10b0635 Mon Sep 17 00:00:00 2001 From: lenak25 Date: Sun, 22 Jul 2018 15:33:00 +0300 Subject: [PATCH 3/4] DOC: release notes 0.5.18 --- docs/source/appendix.rst | 2 +- docs/source/releases.rst | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) 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/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 From d4afc50e17a12bdb2ef41bcec16b4436e9ad034d Mon Sep 17 00:00:00 2001 From: lenak25 Date: Sun, 22 Jul 2018 16:13:30 +0300 Subject: [PATCH 4/4] BLD: fix PEP8 errors --- catalyst/exchange/exchange_algorithm.py | 1 - 1 file changed, 1 deletion(-) diff --git a/catalyst/exchange/exchange_algorithm.py b/catalyst/exchange/exchange_algorithm.py index c93c552ca..b225d8b44 100644 --- a/catalyst/exchange/exchange_algorithm.py +++ b/catalyst/exchange/exchange_algorithm.py @@ -165,7 +165,6 @@ def set_slippage(self, slippage=None): 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): # Raises a ZiplineError if invalid parameters are detected.