{"action":"created","issue":{"url":"https://api.github.com/repos/quantopian/zipline/issues/1748","repository_url":"https://api.github.com/repos/quantopian/zipline","labels_url":"https://api.github.com/repos/quantopian/zipline/issues/1748/labels{/name}","comments_url":"https://api.github.com/repos/quantopian/zipline/issues/1748/comments","events_url":"https://api.github.com/repos/quantopian/zipline/issues/1748/events","html_url":"https://github.com/quantopian/zipline/pull/1748","id":220987857,"number":1748,"title":"Add slippage and commission models for futures","user":{"login":"dmichalowicz","id":13137798,"avatar_url":"https://avatars0.githubusercontent.com/u/13137798?v=3","gravatar_id":"","url":"https://api.github.com/users/dmichalowicz","html_url":"https://github.com/dmichalowicz","followers_url":"https://api.github.com/users/dmichalowicz/followers","following_url":"https://api.github.com/users/dmichalowicz/following{/other_user}","gists_url":"https://api.github.com/users/dmichalowicz/gists{/gist_id}","starred_url":"https://api.github.com/users/dmichalowicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmichalowicz/subscriptions","organizations_url":"https://api.github.com/users/dmichalowicz/orgs","repos_url":"https://api.github.com/users/dmichalowicz/repos","events_url":"https://api.github.com/users/dmichalowicz/events{/privacy}","received_events_url":"https://api.github.com/users/dmichalowicz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-04-11T15:20:23Z","updated_at":"2017-04-13T14:35:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/quantopian/zipline/pulls/1748","html_url":"https://github.com/quantopian/zipline/pull/1748","diff_url":"https://github.com/quantopian/zipline/pull/1748.diff","patch_url":"https://github.com/quantopian/zipline/pull/1748.patch"},"body":"WIP: still need to add tests.\r\n\r\nThis PR adds the actual slippage and commissions models for futures, taking advantage of the infrastructure built [here](https://github.com/quantopian/zipline/pull/1738).\r\n\r\nIn terms of the API, the `set_slippage` and `set_commission` functions now accept an `equities` argument and a `futures` argument for setting two different models according to the type of asset being traded. Furthermore, the `SlippageModel` and `CommissionModel` classes have been broken out into Equity and Future subclasses. This is to help enforce that the models passed to these new parameters are of the correct type. For example, the `equities` parameter for `set_slippage` must inherit from `EquitySlippageModel`, while the `futures` parameter must inherit from `FutureSlippageModel`.\r\n\r\nFor futures commissions, we use `PerContract` by default, which is essentially the equivalent of `PerShare` for the number of contracts traded. Unlike `PerShare` however, the commission for each different root symbol can be toggled by passing a dictionary mapping root symbol to its respective commission cost."},"comment":{"url":"https://api.github.com/repos/quantopian/zipline/issues/comments/293913624","html_url":"https://github.com/quantopian/zipline/pull/1748#issuecomment-293913624","issue_url":"https://api.github.com/repos/quantopian/zipline/issues/1748","id":293913624,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars2.githubusercontent.com/u/2354108?v=3","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2017-04-13T14:35:40Z","updated_at":"2017-04-13T14:35:40Z","body":"\n[![Coverage Status](https://coveralls.io/builds/11073122/badge)](https://coveralls.io/builds/11073122)\n\nCoverage increased (+0.1%) to 87.643% when pulling **afb95f7575c5d64f4fac3c09b0a81dca97d4a346 on slippage-futures-api** into **4f6dd9bca8208cd819790f904c92db7d436f2943 on master**.\n"}}
{"actor":{"display_login":"coveralls"}}