Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
lenak25 committed Jul 22, 2018
2 parents 0dceff2 + d4afc50 commit 6d40a3b
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion catalyst/examples/mean_reversion_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion catalyst/examples/mean_reversion_simple_custom_fees.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
12 changes: 6 additions & 6 deletions catalyst/exchange/exchange_algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion docs/source/appendix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Commission Models
Slippage Models
'''''''''''''''

.. .. autofunction:: catalyst.api.set_slippage
.. autofunction:: catalyst.api.set_slippage

.. autoclass:: catalyst.finance.slippage.SlippageModel
:members:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
<windows>` section and come back here.

For instructions on how to install ``conda``, see the `Conda Installation
Expand Down
9 changes: 9 additions & 0 deletions docs/source/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6d40a3b

Please sign in to comment.