{"action":"created","comment":{"url":"https://api.github.com/repos/quantopian/zipline/pulls/comments/39308200","id":39308200,"diff_hunk":"@@ -259,6 +259,10 @@ def _retrieve_futures_contract(self, sid):\n                 data['expiration_date'] = pd.Timestamp(\n                     data['expiration_date'], tz='UTC')\n \n+            if data['auto_close_date']:\n+                data['auto_close_date'] = pd.Timestamp(\n+                    data['auto_close_date'], tz='UTC')\n+","path":"zipline/assets/assets.py","position":7,"original_position":7,"commit_id":"a6ce1e5e8de4f586b4c0bd6a8a923a66b814b53a","original_commit_id":"a6ce1e5e8de4f586b4c0bd6a8a923a66b814b53a","user":{"login":"StewartDouglas","id":5628197,"avatar_url":"https://avatars.githubusercontent.com/u/5628197?v=3","gravatar_id":"","url":"https://api.github.com/users/StewartDouglas","html_url":"https://github.com/StewartDouglas","followers_url":"https://api.github.com/users/StewartDouglas/followers","following_url":"https://api.github.com/users/StewartDouglas/following{/other_user}","gists_url":"https://api.github.com/users/StewartDouglas/gists{/gist_id}","starred_url":"https://api.github.com/users/StewartDouglas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StewartDouglas/subscriptions","organizations_url":"https://api.github.com/users/StewartDouglas/orgs","repos_url":"https://api.github.com/users/StewartDouglas/repos","events_url":"https://api.github.com/users/StewartDouglas/events{/privacy}","received_events_url":"https://api.github.com/users/StewartDouglas/received_events","type":"User","site_admin":false},"body":"maybe doesn't belong in this PR, but we could collapse the above logic to the following:\r\n```python\r\n date_strs = ['start_date', 'end_date', 'first_traded',\r\n             'notice_date', 'expiration_date', 'auto_close_date']\r\nfor param in date_strs:\r\n    if param in data:\r\n        data[param] = pd.Timestamp(data[param], tz='UTC')\r\n```","created_at":"2015-09-11T19:31:09Z","updated_at":"2015-09-11T19:31:09Z","html_url":"https://github.com/quantopian/zipline/pull/676#discussion_r39308200","pull_request_url":"https://api.github.com/repos/quantopian/zipline/pulls/676","_links":{"self":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/comments/39308200"},"html":{"href":"https://github.com/quantopian/zipline/pull/676#discussion_r39308200"},"pull_request":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/676"}}},"pull_request":{"url":"https://api.github.com/repos/quantopian/zipline/pulls/676","id":42355245,"html_url":"https://github.com/quantopian/zipline/pull/676","diff_url":"https://github.com/quantopian/zipline/pull/676.diff","patch_url":"https://github.com/quantopian/zipline/pull/676.patch","issue_url":"https://api.github.com/repos/quantopian/zipline/issues/676","number":676,"state":"open","locked":false,"title":"ENH: Adds auto_close_date field to Future objects","user":{"login":"jfkirk","id":10326791,"avatar_url":"https://avatars.githubusercontent.com/u/10326791?v=3","gravatar_id":"","url":"https://api.github.com/users/jfkirk","html_url":"https://github.com/jfkirk","followers_url":"https://api.github.com/users/jfkirk/followers","following_url":"https://api.github.com/users/jfkirk/following{/other_user}","gists_url":"https://api.github.com/users/jfkirk/gists{/gist_id}","starred_url":"https://api.github.com/users/jfkirk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfkirk/subscriptions","organizations_url":"https://api.github.com/users/jfkirk/orgs","repos_url":"https://api.github.com/users/jfkirk/repos","events_url":"https://api.github.com/users/jfkirk/events{/privacy}","received_events_url":"https://api.github.com/users/jfkirk/received_events","type":"User","site_admin":false},"body":"This commit adds the auto_close_date property to Future objects, and it is calculated as the earliest of either the notice_date or expiration_date, or None if both of those dates are None.\r\n\r\n@yankees714 This PR does not impact the AssetFinder's future chain logic at all. It may be appropriate for us to put in those changes in this PR once we figure out how we want it to look.","created_at":"2015-08-13T14:16:47Z","updated_at":"2015-09-11T19:31:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cb3b90e1f12cbd643307bb6880ff6be869f1b39d","assignee":{"login":"jfkirk","id":10326791,"avatar_url":"https://avatars.githubusercontent.com/u/10326791?v=3","gravatar_id":"","url":"https://api.github.com/users/jfkirk","html_url":"https://github.com/jfkirk","followers_url":"https://api.github.com/users/jfkirk/followers","following_url":"https://api.github.com/users/jfkirk/following{/other_user}","gists_url":"https://api.github.com/users/jfkirk/gists{/gist_id}","starred_url":"https://api.github.com/users/jfkirk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfkirk/subscriptions","organizations_url":"https://api.github.com/users/jfkirk/orgs","repos_url":"https://api.github.com/users/jfkirk/repos","events_url":"https://api.github.com/users/jfkirk/events{/privacy}","received_events_url":"https://api.github.com/users/jfkirk/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/quantopian/zipline/pulls/676/commits","review_comments_url":"https://api.github.com/repos/quantopian/zipline/pulls/676/comments","review_comment_url":"https://api.github.com/repos/quantopian/zipline/pulls/comments{/number}","comments_url":"https://api.github.com/repos/quantopian/zipline/issues/676/comments","statuses_url":"https://api.github.com/repos/quantopian/zipline/statuses/a6ce1e5e8de4f586b4c0bd6a8a923a66b814b53a","head":{"label":"quantopian:futures-auto-close-timing","ref":"futures-auto-close-timing","sha":"a6ce1e5e8de4f586b4c0bd6a8a923a66b814b53a","user":{"login":"quantopian","id":1393215,"avatar_url":"https://avatars.githubusercontent.com/u/1393215?v=3","gravatar_id":"","url":"https://api.github.com/users/quantopian","html_url":"https://github.com/quantopian","followers_url":"https://api.github.com/users/quantopian/followers","following_url":"https://api.github.com/users/quantopian/following{/other_user}","gists_url":"https://api.github.com/users/quantopian/gists{/gist_id}","starred_url":"https://api.github.com/users/quantopian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quantopian/subscriptions","organizations_url":"https://api.github.com/users/quantopian/orgs","repos_url":"https://api.github.com/users/quantopian/repos","events_url":"https://api.github.com/users/quantopian/events{/privacy}","received_events_url":"https://api.github.com/users/quantopian/received_events","type":"Organization","site_admin":false},"repo":{"id":6297520,"name":"zipline","full_name":"quantopian/zipline","owner":{"login":"quantopian","id":1393215,"avatar_url":"https://avatars.githubusercontent.com/u/1393215?v=3","gravatar_id":"","url":"https://api.github.com/users/quantopian","html_url":"https://github.com/quantopian","followers_url":"https://api.github.com/users/quantopian/followers","following_url":"https://api.github.com/users/quantopian/following{/other_user}","gists_url":"https://api.github.com/users/quantopian/gists{/gist_id}","starred_url":"https://api.github.com/users/quantopian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quantopian/subscriptions","organizations_url":"https://api.github.com/users/quantopian/orgs","repos_url":"https://api.github.com/users/quantopian/repos","events_url":"https://api.github.com/users/quantopian/events{/privacy}","received_events_url":"https://api.github.com/users/quantopian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/quantopian/zipline","description":"Zipline, a Pythonic Algorithmic Trading Library","fork":false,"url":"https://api.github.com/repos/quantopian/zipline","forks_url":"https://api.github.com/repos/quantopian/zipline/forks","keys_url":"https://api.github.com/repos/quantopian/zipline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quantopian/zipline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quantopian/zipline/teams","hooks_url":"https://api.github.com/repos/quantopian/zipline/hooks","issue_events_url":"https://api.github.com/repos/quantopian/zipline/issues/events{/number}","events_url":"https://api.github.com/repos/quantopian/zipline/events","assignees_url":"https://api.github.com/repos/quantopian/zipline/assignees{/user}","branches_url":"https://api.github.com/repos/quantopian/zipline/branches{/branch}","tags_url":"https://api.github.com/repos/quantopian/zipline/tags","blobs_url":"https://api.github.com/repos/quantopian/zipline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quantopian/zipline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quantopian/zipline/git/refs{/sha}","trees_url":"https://api.github.com/repos/quantopian/zipline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quantopian/zipline/statuses/{sha}","languages_url":"https://api.github.com/repos/quantopian/zipline/languages","stargazers_url":"https://api.github.com/repos/quantopian/zipline/stargazers","contributors_url":"https://api.github.com/repos/quantopian/zipline/contributors","subscribers_url":"https://api.github.com/repos/quantopian/zipline/subscribers","subscription_url":"https://api.github.com/repos/quantopian/zipline/subscription","commits_url":"https://api.github.com/repos/quantopian/zipline/commits{/sha}","git_commits_url":"https://api.github.com/repos/quantopian/zipline/git/commits{/sha}","comments_url":"https://api.github.com/repos/quantopian/zipline/comments{/number}","issue_comment_url":"https://api.github.com/repos/quantopian/zipline/issues/comments{/number}","contents_url":"https://api.github.com/repos/quantopian/zipline/contents/{+path}","compare_url":"https://api.github.com/repos/quantopian/zipline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quantopian/zipline/merges","archive_url":"https://api.github.com/repos/quantopian/zipline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quantopian/zipline/downloads","issues_url":"https://api.github.com/repos/quantopian/zipline/issues{/number}","pulls_url":"https://api.github.com/repos/quantopian/zipline/pulls{/number}","milestones_url":"https://api.github.com/repos/quantopian/zipline/milestones{/number}","notifications_url":"https://api.github.com/repos/quantopian/zipline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quantopian/zipline/labels{/name}","releases_url":"https://api.github.com/repos/quantopian/zipline/releases{/id}","created_at":"2012-10-19T15:50:29Z","updated_at":"2015-09-11T15:14:25Z","pushed_at":"2015-09-11T18:08:09Z","git_url":"git://github.com/quantopian/zipline.git","ssh_url":"git@github.com:quantopian/zipline.git","clone_url":"https://github.com/quantopian/zipline.git","svn_url":"https://github.com/quantopian/zipline","homepage":"","size":22528,"stargazers_count":2535,"watchers_count":2535,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":683,"mirror_url":null,"open_issues_count":143,"forks":683,"open_issues":143,"watchers":2535,"default_branch":"master"}},"base":{"label":"quantopian:master","ref":"master","sha":"29321af1b472d72b759a71c9f5ba341109fc0e6d","user":{"login":"quantopian","id":1393215,"avatar_url":"https://avatars.githubusercontent.com/u/1393215?v=3","gravatar_id":"","url":"https://api.github.com/users/quantopian","html_url":"https://github.com/quantopian","followers_url":"https://api.github.com/users/quantopian/followers","following_url":"https://api.github.com/users/quantopian/following{/other_user}","gists_url":"https://api.github.com/users/quantopian/gists{/gist_id}","starred_url":"https://api.github.com/users/quantopian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quantopian/subscriptions","organizations_url":"https://api.github.com/users/quantopian/orgs","repos_url":"https://api.github.com/users/quantopian/repos","events_url":"https://api.github.com/users/quantopian/events{/privacy}","received_events_url":"https://api.github.com/users/quantopian/received_events","type":"Organization","site_admin":false},"repo":{"id":6297520,"name":"zipline","full_name":"quantopian/zipline","owner":{"login":"quantopian","id":1393215,"avatar_url":"https://avatars.githubusercontent.com/u/1393215?v=3","gravatar_id":"","url":"https://api.github.com/users/quantopian","html_url":"https://github.com/quantopian","followers_url":"https://api.github.com/users/quantopian/followers","following_url":"https://api.github.com/users/quantopian/following{/other_user}","gists_url":"https://api.github.com/users/quantopian/gists{/gist_id}","starred_url":"https://api.github.com/users/quantopian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quantopian/subscriptions","organizations_url":"https://api.github.com/users/quantopian/orgs","repos_url":"https://api.github.com/users/quantopian/repos","events_url":"https://api.github.com/users/quantopian/events{/privacy}","received_events_url":"https://api.github.com/users/quantopian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/quantopian/zipline","description":"Zipline, a Pythonic Algorithmic Trading Library","fork":false,"url":"https://api.github.com/repos/quantopian/zipline","forks_url":"https://api.github.com/repos/quantopian/zipline/forks","keys_url":"https://api.github.com/repos/quantopian/zipline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quantopian/zipline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quantopian/zipline/teams","hooks_url":"https://api.github.com/repos/quantopian/zipline/hooks","issue_events_url":"https://api.github.com/repos/quantopian/zipline/issues/events{/number}","events_url":"https://api.github.com/repos/quantopian/zipline/events","assignees_url":"https://api.github.com/repos/quantopian/zipline/assignees{/user}","branches_url":"https://api.github.com/repos/quantopian/zipline/branches{/branch}","tags_url":"https://api.github.com/repos/quantopian/zipline/tags","blobs_url":"https://api.github.com/repos/quantopian/zipline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quantopian/zipline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quantopian/zipline/git/refs{/sha}","trees_url":"https://api.github.com/repos/quantopian/zipline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quantopian/zipline/statuses/{sha}","languages_url":"https://api.github.com/repos/quantopian/zipline/languages","stargazers_url":"https://api.github.com/repos/quantopian/zipline/stargazers","contributors_url":"https://api.github.com/repos/quantopian/zipline/contributors","subscribers_url":"https://api.github.com/repos/quantopian/zipline/subscribers","subscription_url":"https://api.github.com/repos/quantopian/zipline/subscription","commits_url":"https://api.github.com/repos/quantopian/zipline/commits{/sha}","git_commits_url":"https://api.github.com/repos/quantopian/zipline/git/commits{/sha}","comments_url":"https://api.github.com/repos/quantopian/zipline/comments{/number}","issue_comment_url":"https://api.github.com/repos/quantopian/zipline/issues/comments{/number}","contents_url":"https://api.github.com/repos/quantopian/zipline/contents/{+path}","compare_url":"https://api.github.com/repos/quantopian/zipline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quantopian/zipline/merges","archive_url":"https://api.github.com/repos/quantopian/zipline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quantopian/zipline/downloads","issues_url":"https://api.github.com/repos/quantopian/zipline/issues{/number}","pulls_url":"https://api.github.com/repos/quantopian/zipline/pulls{/number}","milestones_url":"https://api.github.com/repos/quantopian/zipline/milestones{/number}","notifications_url":"https://api.github.com/repos/quantopian/zipline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quantopian/zipline/labels{/name}","releases_url":"https://api.github.com/repos/quantopian/zipline/releases{/id}","created_at":"2012-10-19T15:50:29Z","updated_at":"2015-09-11T15:14:25Z","pushed_at":"2015-09-11T18:08:09Z","git_url":"git://github.com/quantopian/zipline.git","ssh_url":"git@github.com:quantopian/zipline.git","clone_url":"https://github.com/quantopian/zipline.git","svn_url":"https://github.com/quantopian/zipline","homepage":"","size":22528,"stargazers_count":2535,"watchers_count":2535,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":683,"mirror_url":null,"open_issues_count":143,"forks":683,"open_issues":143,"watchers":2535,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/676"},"html":{"href":"https://github.com/quantopian/zipline/pull/676"},"issue":{"href":"https://api.github.com/repos/quantopian/zipline/issues/676"},"comments":{"href":"https://api.github.com/repos/quantopian/zipline/issues/676/comments"},"review_comments":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/676/comments"},"review_comment":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/676/commits"},"statuses":{"href":"https://api.github.com/repos/quantopian/zipline/statuses/a6ce1e5e8de4f586b4c0bd6a8a923a66b814b53a"}}}}