{"action":"created","comment":{"url":"https://api.github.com/repos/QuantConnect/Lean/pulls/comments/52218490","id":52218490,"diff_hunk":"@@ -0,0 +1,78 @@\n+﻿/*\n+ * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.\n+ * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.\n+ * \n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); \n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n+ * \n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+*/\n+\n+using QuantConnect.Orders;\n+\n+namespace QuantConnect.Securities.Equity\n+{\n+    /// <summary>\n+    /// Represents a simple margining model where margin/leverage depends on market state (open or close).\n+    /// During regular market hours, leverage is 4x, otherwise 2x\n+    /// </summary>\n+    public class PatternDayTradingMarginModel : SecurityMarginModel\n+    {","path":"Common/Securities/Equity/PatternDayTraderMarginModel.cs","position":25,"original_position":25,"commit_id":"8ce10f5e1e38f946466ead6d8d746d2678ca64f6","original_commit_id":"8ce10f5e1e38f946466ead6d8d746d2678ca64f6","user":{"login":"AlexCatarino","id":6889033,"avatar_url":"https://avatars.githubusercontent.com/u/6889033?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexCatarino","html_url":"https://github.com/AlexCatarino","followers_url":"https://api.github.com/users/AlexCatarino/followers","following_url":"https://api.github.com/users/AlexCatarino/following{/other_user}","gists_url":"https://api.github.com/users/AlexCatarino/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexCatarino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexCatarino/subscriptions","organizations_url":"https://api.github.com/users/AlexCatarino/orgs","repos_url":"https://api.github.com/users/AlexCatarino/repos","events_url":"https://api.github.com/users/AlexCatarino/events{/privacy}","received_events_url":"https://api.github.com/users/AlexCatarino/received_events","type":"User","site_admin":false},"body":"I guess, I'm looking into it. After Jared's comment on maintenance margin. ","created_at":"2016-02-08T20:13:40Z","updated_at":"2016-02-08T20:13:40Z","html_url":"https://github.com/QuantConnect/Lean/pull/276#discussion_r52218490","pull_request_url":"https://api.github.com/repos/QuantConnect/Lean/pulls/276","_links":{"self":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/comments/52218490"},"html":{"href":"https://github.com/QuantConnect/Lean/pull/276#discussion_r52218490"},"pull_request":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/276"}}},"pull_request":{"url":"https://api.github.com/repos/QuantConnect/Lean/pulls/276","id":58639728,"html_url":"https://github.com/QuantConnect/Lean/pull/276","diff_url":"https://github.com/QuantConnect/Lean/pull/276.diff","patch_url":"https://github.com/QuantConnect/Lean/pull/276.patch","issue_url":"https://api.github.com/repos/QuantConnect/Lean/issues/276","number":276,"state":"open","locked":false,"title":"Issue108: Implement PatternDayTraderMarginModel and its Unit Test","user":{"login":"AlexCatarino","id":6889033,"avatar_url":"https://avatars.githubusercontent.com/u/6889033?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexCatarino","html_url":"https://github.com/AlexCatarino","followers_url":"https://api.github.com/users/AlexCatarino/followers","following_url":"https://api.github.com/users/AlexCatarino/following{/other_user}","gists_url":"https://api.github.com/users/AlexCatarino/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexCatarino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexCatarino/subscriptions","organizations_url":"https://api.github.com/users/AlexCatarino/orgs","repos_url":"https://api.github.com/users/AlexCatarino/repos","events_url":"https://api.github.com/users/AlexCatarino/events{/privacy}","received_events_url":"https://api.github.com/users/AlexCatarino/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-08T17:22:15Z","updated_at":"2016-02-08T20:13:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f52157e3020b334e686b68bae0da079d8a0a4432","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/QuantConnect/Lean/pulls/276/commits","review_comments_url":"https://api.github.com/repos/QuantConnect/Lean/pulls/276/comments","review_comment_url":"https://api.github.com/repos/QuantConnect/Lean/pulls/comments{/number}","comments_url":"https://api.github.com/repos/QuantConnect/Lean/issues/276/comments","statuses_url":"https://api.github.com/repos/QuantConnect/Lean/statuses/8ce10f5e1e38f946466ead6d8d746d2678ca64f6","head":{"label":"AlexCatarino:issue108","ref":"issue108","sha":"8ce10f5e1e38f946466ead6d8d746d2678ca64f6","user":{"login":"AlexCatarino","id":6889033,"avatar_url":"https://avatars.githubusercontent.com/u/6889033?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexCatarino","html_url":"https://github.com/AlexCatarino","followers_url":"https://api.github.com/users/AlexCatarino/followers","following_url":"https://api.github.com/users/AlexCatarino/following{/other_user}","gists_url":"https://api.github.com/users/AlexCatarino/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexCatarino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexCatarino/subscriptions","organizations_url":"https://api.github.com/users/AlexCatarino/orgs","repos_url":"https://api.github.com/users/AlexCatarino/repos","events_url":"https://api.github.com/users/AlexCatarino/events{/privacy}","received_events_url":"https://api.github.com/users/AlexCatarino/received_events","type":"User","site_admin":false},"repo":{"id":38850137,"name":"Lean","full_name":"AlexCatarino/Lean","owner":{"login":"AlexCatarino","id":6889033,"avatar_url":"https://avatars.githubusercontent.com/u/6889033?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexCatarino","html_url":"https://github.com/AlexCatarino","followers_url":"https://api.github.com/users/AlexCatarino/followers","following_url":"https://api.github.com/users/AlexCatarino/following{/other_user}","gists_url":"https://api.github.com/users/AlexCatarino/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexCatarino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexCatarino/subscriptions","organizations_url":"https://api.github.com/users/AlexCatarino/orgs","repos_url":"https://api.github.com/users/AlexCatarino/repos","events_url":"https://api.github.com/users/AlexCatarino/events{/privacy}","received_events_url":"https://api.github.com/users/AlexCatarino/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AlexCatarino/Lean","description":"Lean Algorithmic Trading Engine by QuantConnect (C#, Python, F#, VB, Java)","fork":true,"url":"https://api.github.com/repos/AlexCatarino/Lean","forks_url":"https://api.github.com/repos/AlexCatarino/Lean/forks","keys_url":"https://api.github.com/repos/AlexCatarino/Lean/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AlexCatarino/Lean/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AlexCatarino/Lean/teams","hooks_url":"https://api.github.com/repos/AlexCatarino/Lean/hooks","issue_events_url":"https://api.github.com/repos/AlexCatarino/Lean/issues/events{/number}","events_url":"https://api.github.com/repos/AlexCatarino/Lean/events","assignees_url":"https://api.github.com/repos/AlexCatarino/Lean/assignees{/user}","branches_url":"https://api.github.com/repos/AlexCatarino/Lean/branches{/branch}","tags_url":"https://api.github.com/repos/AlexCatarino/Lean/tags","blobs_url":"https://api.github.com/repos/AlexCatarino/Lean/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AlexCatarino/Lean/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AlexCatarino/Lean/git/refs{/sha}","trees_url":"https://api.github.com/repos/AlexCatarino/Lean/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AlexCatarino/Lean/statuses/{sha}","languages_url":"https://api.github.com/repos/AlexCatarino/Lean/languages","stargazers_url":"https://api.github.com/repos/AlexCatarino/Lean/stargazers","contributors_url":"https://api.github.com/repos/AlexCatarino/Lean/contributors","subscribers_url":"https://api.github.com/repos/AlexCatarino/Lean/subscribers","subscription_url":"https://api.github.com/repos/AlexCatarino/Lean/subscription","commits_url":"https://api.github.com/repos/AlexCatarino/Lean/commits{/sha}","git_commits_url":"https://api.github.com/repos/AlexCatarino/Lean/git/commits{/sha}","comments_url":"https://api.github.com/repos/AlexCatarino/Lean/comments{/number}","issue_comment_url":"https://api.github.com/repos/AlexCatarino/Lean/issues/comments{/number}","contents_url":"https://api.github.com/repos/AlexCatarino/Lean/contents/{+path}","compare_url":"https://api.github.com/repos/AlexCatarino/Lean/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AlexCatarino/Lean/merges","archive_url":"https://api.github.com/repos/AlexCatarino/Lean/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AlexCatarino/Lean/downloads","issues_url":"https://api.github.com/repos/AlexCatarino/Lean/issues{/number}","pulls_url":"https://api.github.com/repos/AlexCatarino/Lean/pulls{/number}","milestones_url":"https://api.github.com/repos/AlexCatarino/Lean/milestones{/number}","notifications_url":"https://api.github.com/repos/AlexCatarino/Lean/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AlexCatarino/Lean/labels{/name}","releases_url":"https://api.github.com/repos/AlexCatarino/Lean/releases{/id}","deployments_url":"https://api.github.com/repos/AlexCatarino/Lean/deployments","created_at":"2015-07-09T23:20:16Z","updated_at":"2016-02-04T11:28:43Z","pushed_at":"2016-02-08T17:27:03Z","git_url":"git://github.com/AlexCatarino/Lean.git","ssh_url":"git@github.com:AlexCatarino/Lean.git","clone_url":"https://github.com/AlexCatarino/Lean.git","svn_url":"https://github.com/AlexCatarino/Lean","homepage":"https://lean.quantconnect.com","size":74234,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"QuantConnect:master","ref":"master","sha":"33c931e48f33af1c7a882756cdf74a612424e656","user":{"login":"QuantConnect","id":3912814,"avatar_url":"https://avatars.githubusercontent.com/u/3912814?v=3","gravatar_id":"","url":"https://api.github.com/users/QuantConnect","html_url":"https://github.com/QuantConnect","followers_url":"https://api.github.com/users/QuantConnect/followers","following_url":"https://api.github.com/users/QuantConnect/following{/other_user}","gists_url":"https://api.github.com/users/QuantConnect/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantConnect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantConnect/subscriptions","organizations_url":"https://api.github.com/users/QuantConnect/orgs","repos_url":"https://api.github.com/users/QuantConnect/repos","events_url":"https://api.github.com/users/QuantConnect/events{/privacy}","received_events_url":"https://api.github.com/users/QuantConnect/received_events","type":"Organization","site_admin":false},"repo":{"id":27251463,"name":"Lean","full_name":"QuantConnect/Lean","owner":{"login":"QuantConnect","id":3912814,"avatar_url":"https://avatars.githubusercontent.com/u/3912814?v=3","gravatar_id":"","url":"https://api.github.com/users/QuantConnect","html_url":"https://github.com/QuantConnect","followers_url":"https://api.github.com/users/QuantConnect/followers","following_url":"https://api.github.com/users/QuantConnect/following{/other_user}","gists_url":"https://api.github.com/users/QuantConnect/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantConnect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantConnect/subscriptions","organizations_url":"https://api.github.com/users/QuantConnect/orgs","repos_url":"https://api.github.com/users/QuantConnect/repos","events_url":"https://api.github.com/users/QuantConnect/events{/privacy}","received_events_url":"https://api.github.com/users/QuantConnect/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/QuantConnect/Lean","description":"Lean Algorithmic Trading Engine by QuantConnect (C#, Python, F#, VB, Java)","fork":false,"url":"https://api.github.com/repos/QuantConnect/Lean","forks_url":"https://api.github.com/repos/QuantConnect/Lean/forks","keys_url":"https://api.github.com/repos/QuantConnect/Lean/keys{/key_id}","collaborators_url":"https://api.github.com/repos/QuantConnect/Lean/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/QuantConnect/Lean/teams","hooks_url":"https://api.github.com/repos/QuantConnect/Lean/hooks","issue_events_url":"https://api.github.com/repos/QuantConnect/Lean/issues/events{/number}","events_url":"https://api.github.com/repos/QuantConnect/Lean/events","assignees_url":"https://api.github.com/repos/QuantConnect/Lean/assignees{/user}","branches_url":"https://api.github.com/repos/QuantConnect/Lean/branches{/branch}","tags_url":"https://api.github.com/repos/QuantConnect/Lean/tags","blobs_url":"https://api.github.com/repos/QuantConnect/Lean/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/QuantConnect/Lean/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/QuantConnect/Lean/git/refs{/sha}","trees_url":"https://api.github.com/repos/QuantConnect/Lean/git/trees{/sha}","statuses_url":"https://api.github.com/repos/QuantConnect/Lean/statuses/{sha}","languages_url":"https://api.github.com/repos/QuantConnect/Lean/languages","stargazers_url":"https://api.github.com/repos/QuantConnect/Lean/stargazers","contributors_url":"https://api.github.com/repos/QuantConnect/Lean/contributors","subscribers_url":"https://api.github.com/repos/QuantConnect/Lean/subscribers","subscription_url":"https://api.github.com/repos/QuantConnect/Lean/subscription","commits_url":"https://api.github.com/repos/QuantConnect/Lean/commits{/sha}","git_commits_url":"https://api.github.com/repos/QuantConnect/Lean/git/commits{/sha}","comments_url":"https://api.github.com/repos/QuantConnect/Lean/comments{/number}","issue_comment_url":"https://api.github.com/repos/QuantConnect/Lean/issues/comments{/number}","contents_url":"https://api.github.com/repos/QuantConnect/Lean/contents/{+path}","compare_url":"https://api.github.com/repos/QuantConnect/Lean/compare/{base}...{head}","merges_url":"https://api.github.com/repos/QuantConnect/Lean/merges","archive_url":"https://api.github.com/repos/QuantConnect/Lean/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/QuantConnect/Lean/downloads","issues_url":"https://api.github.com/repos/QuantConnect/Lean/issues{/number}","pulls_url":"https://api.github.com/repos/QuantConnect/Lean/pulls{/number}","milestones_url":"https://api.github.com/repos/QuantConnect/Lean/milestones{/number}","notifications_url":"https://api.github.com/repos/QuantConnect/Lean/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/QuantConnect/Lean/labels{/name}","releases_url":"https://api.github.com/repos/QuantConnect/Lean/releases{/id}","deployments_url":"https://api.github.com/repos/QuantConnect/Lean/deployments","created_at":"2014-11-28T04:20:19Z","updated_at":"2016-02-08T16:07:25Z","pushed_at":"2016-02-08T19:54:34Z","git_url":"git://github.com/QuantConnect/Lean.git","ssh_url":"git@github.com:QuantConnect/Lean.git","clone_url":"https://github.com/QuantConnect/Lean.git","svn_url":"https://github.com/QuantConnect/Lean","homepage":"https://lean.quantconnect.com","size":76699,"stargazers_count":384,"watchers_count":384,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":273,"mirror_url":null,"open_issues_count":28,"forks":273,"open_issues":28,"watchers":384,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/276"},"html":{"href":"https://github.com/QuantConnect/Lean/pull/276"},"issue":{"href":"https://api.github.com/repos/QuantConnect/Lean/issues/276"},"comments":{"href":"https://api.github.com/repos/QuantConnect/Lean/issues/276/comments"},"review_comments":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/276/comments"},"review_comment":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/276/commits"},"statuses":{"href":"https://api.github.com/repos/QuantConnect/Lean/statuses/8ce10f5e1e38f946466ead6d8d746d2678ca64f6"}}}}