{"action":"created","issue":{"url":"https://api.github.com/repos/quantopian/zipline/issues/1539","repository_url":"https://api.github.com/repos/quantopian/zipline","labels_url":"https://api.github.com/repos/quantopian/zipline/issues/1539/labels{/name}","comments_url":"https://api.github.com/repos/quantopian/zipline/issues/1539/comments","events_url":"https://api.github.com/repos/quantopian/zipline/issues/1539/events","html_url":"https://github.com/quantopian/zipline/pull/1539","id":183155212,"number":1539,"title":"ENH: Add history for continuous futures.","user":{"login":"ehebert","id":185744,"avatar_url":"https://avatars.githubusercontent.com/u/185744?v=3","gravatar_id":"","url":"https://api.github.com/users/ehebert","html_url":"https://github.com/ehebert","followers_url":"https://api.github.com/users/ehebert/followers","following_url":"https://api.github.com/users/ehebert/following{/other_user}","gists_url":"https://api.github.com/users/ehebert/gists{/gist_id}","starred_url":"https://api.github.com/users/ehebert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehebert/subscriptions","organizations_url":"https://api.github.com/users/ehebert/orgs","repos_url":"https://api.github.com/users/ehebert/repos","events_url":"https://api.github.com/users/ehebert/events{/privacy}","received_events_url":"https://api.github.com/users/ehebert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-14T21:33:35Z","updated_at":"2016-10-14T21:36:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/quantopian/zipline/pulls/1539","html_url":"https://github.com/quantopian/zipline/pull/1539","diff_url":"https://github.com/quantopian/zipline/pull/1539.diff","patch_url":"https://github.com/quantopian/zipline/pull/1539.patch"},"body":"Enable unadjusted history for continuous futures.\r\n\r\nThe history array is filled by the values for the underlying contracts,\r\nwhere the contract used changes based on rolls.\r\n\r\ne.g., if a `1d` history window was over the range\r\n`2016-01-20` -> `2016-02-29` with contracts with a suffix of `F16` that\r\nrolls at the beginning of the session on `2016-01-26`, `G16` on\r\n`2016-02-26`, and `H16` on `2016-03-26`. The `2016-01-20` ->\r\n`2016-01-25` portion would use the values for `F16', the `2016-01-26` ->\r\n`2016-02-25` portion would use `G16` and the `2016-02-26` ->\r\n`2016-02-29` portion would use `H16`.\r\n\r\nUsing the same contracts as above, a `1m` history window over the range\r\n(using a timezone of US/Eastern) `2016-01-25 4:00PM` -> `2016-01-25\r\n7:00PM` would fill the `4:00PM` -> `6:00PM` portion with data for `F16`\r\nand the `6:01PM` -> `7:00PM` portion with data for `G16`, since the\r\nbeginning of the `2016-01-26` session is `2016-01-25 6:01PM`.\r\n\r\nSupports `1d` and `1m`.\r\n\r\nAlso adds the `sid` field to `history` to assist in showing the active\r\ncontract at each dt in the window."},"comment":{"url":"https://api.github.com/repos/quantopian/zipline/issues/comments/253925578","html_url":"https://github.com/quantopian/zipline/pull/1539#issuecomment-253925578","issue_url":"https://api.github.com/repos/quantopian/zipline/issues/1539","id":253925578,"user":{"login":"ehebert","id":185744,"avatar_url":"https://avatars.githubusercontent.com/u/185744?v=3","gravatar_id":"","url":"https://api.github.com/users/ehebert","html_url":"https://github.com/ehebert","followers_url":"https://api.github.com/users/ehebert/followers","following_url":"https://api.github.com/users/ehebert/following{/other_user}","gists_url":"https://api.github.com/users/ehebert/gists{/gist_id}","starred_url":"https://api.github.com/users/ehebert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehebert/subscriptions","organizations_url":"https://api.github.com/users/ehebert/orgs","repos_url":"https://api.github.com/users/ehebert/repos","events_url":"https://api.github.com/users/ehebert/events{/privacy}","received_events_url":"https://api.github.com/users/ehebert/received_events","type":"User","site_admin":false},"created_at":"2016-10-14T21:36:11Z","updated_at":"2016-10-14T21:36:11Z","body":"Has some duplication with the continuous readers which can be factored out.\r\nAlso, should tune up how the window type switches to int or float based on being `sid` or `volume`, or not.\r\n\r\nHowever, this gets to a place where we can build on top of this to add continuous futures adjustments.\r\nSo would defer refactoring to clean up those points I mentioned, until after getting adjustments to work."}}
{"actor":{"display_login":"ehebert"}}