{"action":"closed","number":2315,"pull_request":{"url":"https://api.github.com/repos/QuantConnect/Lean/pulls/2315","id":203949003,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzOTQ5MDAz","html_url":"https://github.com/QuantConnect/Lean/pull/2315","diff_url":"https://github.com/QuantConnect/Lean/pull/2315.diff","patch_url":"https://github.com/QuantConnect/Lean/pull/2315.patch","issue_url":"https://api.github.com/repos/QuantConnect/Lean/issues/2315","number":2315,"state":"closed","locked":false,"title":"Adding smarter methods for PortfolioTargetCollection","user":{"login":"Martin-Molinero","id":18473240,"node_id":"MDQ6VXNlcjE4NDczMjQw","avatar_url":"https://avatars1.githubusercontent.com/u/18473240?v=4","gravatar_id":"","url":"https://api.github.com/users/Martin-Molinero","html_url":"https://github.com/Martin-Molinero","followers_url":"https://api.github.com/users/Martin-Molinero/followers","following_url":"https://api.github.com/users/Martin-Molinero/following{/other_user}","gists_url":"https://api.github.com/users/Martin-Molinero/gists{/gist_id}","starred_url":"https://api.github.com/users/Martin-Molinero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Martin-Molinero/subscriptions","organizations_url":"https://api.github.com/users/Martin-Molinero/orgs","repos_url":"https://api.github.com/users/Martin-Molinero/repos","events_url":"https://api.github.com/users/Martin-Molinero/events{/privacy}","received_events_url":"https://api.github.com/users/Martin-Molinero/received_events","type":"User","site_admin":false},"body":"<!--- Provide a general summary of your changes in the Title above -->\r\n\r\n#### Description\r\n<!--- Describe your changes in detail -->\r\n- `OrderByMarginImpact()`  from `PortfolioTargetCollection` will NOT return targets:\r\n    - For securities that have no data yet. Adding unit test.\r\n    - For which current holdings + open orders quantity, sum up to the target quantity. Adding unit test.\r\n- Adding `ClearFulfilled` which will remove targets when the target quantity holdings are reached, will ignore open orders. Adding unit test.\r\n- Adding other basic unit tests for `PortfolioTargetCollection`\r\n#### Related Issue\r\n<!--- This project only accepts pull requests related to open issues -->\r\n<!--- If suggesting a new feature or change, please discuss it in an issue first -->\r\n<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->\r\n<!--- Please link to the issue here: -->\r\nCloses https://github.com/QuantConnect/Lean/issues/2203\r\n#### Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\nExecution model doesn't perform the check of price\r\n#### Requires Documentation Change\r\n<!--- Please indicate if these changes will require updates to documentation, and if so, specify what changes are required -->\r\nN/A\r\n#### How Has This Been Tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to -->\r\n<!--- see how your change affects other areas of the code, etc. -->\r\nUnit and regression tests\r\n#### Types of changes\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [x] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Non-functional change (xml comments/documentation/etc)\r\n\r\n#### Checklist:\r\n<!--- The following is a checklist of items that MUST be completed before a PR is accepted -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [x] My code follows the code style of this project.\r\n- [x] I have read the **CONTRIBUTING** [document](https://github.com/QuantConnect/Lean/blob/master/CONTRIBUTING.md).\r\n- [x] I have added tests to cover my changes. <!--- If not applicable, please explain why -->\r\n- [x] All new and existing tests passed.\r\n- [x] My branch follows the naming convention `bug-<issue#>-<description` or `feature-<issue#>-<description>`\r\n\r\n<!--- Template inspired by https://www.talater.com/open-source-templates/#/page/99 -->","created_at":"2018-07-25T20:09:27Z","updated_at":"2018-07-27T21:13:25Z","closed_at":"2018-07-27T21:13:25Z","merged_at":"2018-07-27T21:13:24Z","merge_commit_sha":"914df2a236852d7380f60c660a5b1c982b799e91","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/QuantConnect/Lean/pulls/2315/commits","review_comments_url":"https://api.github.com/repos/QuantConnect/Lean/pulls/2315/comments","review_comment_url":"https://api.github.com/repos/QuantConnect/Lean/pulls/comments{/number}","comments_url":"https://api.github.com/repos/QuantConnect/Lean/issues/2315/comments","statuses_url":"https://api.github.com/repos/QuantConnect/Lean/statuses/c73b7bb62f0f5a77b359af5b3a913319cf59bebd","head":{"label":"Martin-Molinero:bug-2203-execution-models-dont-check-price-is-zero","ref":"bug-2203-execution-models-dont-check-price-is-zero","sha":"c73b7bb62f0f5a77b359af5b3a913319cf59bebd","user":{"login":"Martin-Molinero","id":18473240,"node_id":"MDQ6VXNlcjE4NDczMjQw","avatar_url":"https://avatars1.githubusercontent.com/u/18473240?v=4","gravatar_id":"","url":"https://api.github.com/users/Martin-Molinero","html_url":"https://github.com/Martin-Molinero","followers_url":"https://api.github.com/users/Martin-Molinero/followers","following_url":"https://api.github.com/users/Martin-Molinero/following{/other_user}","gists_url":"https://api.github.com/users/Martin-Molinero/gists{/gist_id}","starred_url":"https://api.github.com/users/Martin-Molinero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Martin-Molinero/subscriptions","organizations_url":"https://api.github.com/users/Martin-Molinero/orgs","repos_url":"https://api.github.com/users/Martin-Molinero/repos","events_url":"https://api.github.com/users/Martin-Molinero/events{/privacy}","received_events_url":"https://api.github.com/users/Martin-Molinero/received_events","type":"User","site_admin":false},"repo":{"id":102406163,"node_id":"MDEwOlJlcG9zaXRvcnkxMDI0MDYxNjM=","name":"Lean","full_name":"Martin-Molinero/Lean","owner":{"login":"Martin-Molinero","id":18473240,"node_id":"MDQ6VXNlcjE4NDczMjQw","avatar_url":"https://avatars1.githubusercontent.com/u/18473240?v=4","gravatar_id":"","url":"https://api.github.com/users/Martin-Molinero","html_url":"https://github.com/Martin-Molinero","followers_url":"https://api.github.com/users/Martin-Molinero/followers","following_url":"https://api.github.com/users/Martin-Molinero/following{/other_user}","gists_url":"https://api.github.com/users/Martin-Molinero/gists{/gist_id}","starred_url":"https://api.github.com/users/Martin-Molinero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Martin-Molinero/subscriptions","organizations_url":"https://api.github.com/users/Martin-Molinero/orgs","repos_url":"https://api.github.com/users/Martin-Molinero/repos","events_url":"https://api.github.com/users/Martin-Molinero/events{/privacy}","received_events_url":"https://api.github.com/users/Martin-Molinero/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Martin-Molinero/Lean","description":"Lean Algorithmic Trading Engine by QuantConnect (C#, Python, F#, VB, Java)","fork":true,"url":"https://api.github.com/repos/Martin-Molinero/Lean","forks_url":"https://api.github.com/repos/Martin-Molinero/Lean/forks","keys_url":"https://api.github.com/repos/Martin-Molinero/Lean/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Martin-Molinero/Lean/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Martin-Molinero/Lean/teams","hooks_url":"https://api.github.com/repos/Martin-Molinero/Lean/hooks","issue_events_url":"https://api.github.com/repos/Martin-Molinero/Lean/issues/events{/number}","events_url":"https://api.github.com/repos/Martin-Molinero/Lean/events","assignees_url":"https://api.github.com/repos/Martin-Molinero/Lean/assignees{/user}","branches_url":"https://api.github.com/repos/Martin-Molinero/Lean/branches{/branch}","tags_url":"https://api.github.com/repos/Martin-Molinero/Lean/tags","blobs_url":"https://api.github.com/repos/Martin-Molinero/Lean/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Martin-Molinero/Lean/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Martin-Molinero/Lean/git/refs{/sha}","trees_url":"https://api.github.com/repos/Martin-Molinero/Lean/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Martin-Molinero/Lean/statuses/{sha}","languages_url":"https://api.github.com/repos/Martin-Molinero/Lean/languages","stargazers_url":"https://api.github.com/repos/Martin-Molinero/Lean/stargazers","contributors_url":"https://api.github.com/repos/Martin-Molinero/Lean/contributors","subscribers_url":"https://api.github.com/repos/Martin-Molinero/Lean/subscribers","subscription_url":"https://api.github.com/repos/Martin-Molinero/Lean/subscription","commits_url":"https://api.github.com/repos/Martin-Molinero/Lean/commits{/sha}","git_commits_url":"https://api.github.com/repos/Martin-Molinero/Lean/git/commits{/sha}","comments_url":"https://api.github.com/repos/Martin-Molinero/Lean/comments{/number}","issue_comment_url":"https://api.github.com/repos/Martin-Molinero/Lean/issues/comments{/number}","contents_url":"https://api.github.com/repos/Martin-Molinero/Lean/contents/{+path}","compare_url":"https://api.github.com/repos/Martin-Molinero/Lean/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Martin-Molinero/Lean/merges","archive_url":"https://api.github.com/repos/Martin-Molinero/Lean/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Martin-Molinero/Lean/downloads","issues_url":"https://api.github.com/repos/Martin-Molinero/Lean/issues{/number}","pulls_url":"https://api.github.com/repos/Martin-Molinero/Lean/pulls{/number}","milestones_url":"https://api.github.com/repos/Martin-Molinero/Lean/milestones{/number}","notifications_url":"https://api.github.com/repos/Martin-Molinero/Lean/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Martin-Molinero/Lean/labels{/name}","releases_url":"https://api.github.com/repos/Martin-Molinero/Lean/releases{/id}","deployments_url":"https://api.github.com/repos/Martin-Molinero/Lean/deployments","created_at":"2017-09-04T22:02:34Z","updated_at":"2018-07-25T19:30:56Z","pushed_at":"2018-07-27T20:37:56Z","git_url":"git://github.com/Martin-Molinero/Lean.git","ssh_url":"git@github.com:Martin-Molinero/Lean.git","clone_url":"https://github.com/Martin-Molinero/Lean.git","svn_url":"https://github.com/Martin-Molinero/Lean","homepage":"https://lean.quantconnect.com","size":260597,"stargazers_count":1,"watchers_count":1,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"QuantConnect:master","ref":"master","sha":"d2bb02d78691a25003b1235f73436524cf482bee","user":{"login":"QuantConnect","id":3912814,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MTI4MTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3912814?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnkyNzI1MTQ2Mw==","name":"Lean","full_name":"QuantConnect/Lean","owner":{"login":"QuantConnect","id":3912814,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MTI4MTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3912814?v=4","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#)","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":"2018-07-27T21:11:23Z","pushed_at":"2018-07-27T21:13:24Z","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.io","size":260875,"stargazers_count":1807,"watchers_count":1807,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1022,"mirror_url":null,"archived":false,"open_issues_count":109,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1022,"open_issues":109,"watchers":1807,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/2315"},"html":{"href":"https://github.com/QuantConnect/Lean/pull/2315"},"issue":{"href":"https://api.github.com/repos/QuantConnect/Lean/issues/2315"},"comments":{"href":"https://api.github.com/repos/QuantConnect/Lean/issues/2315/comments"},"review_comments":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/2315/comments"},"review_comment":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/QuantConnect/Lean/pulls/2315/commits"},"statuses":{"href":"https://api.github.com/repos/QuantConnect/Lean/statuses/c73b7bb62f0f5a77b359af5b3a913319cf59bebd"}},"author_association":"COLLABORATOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"mchandschuh","id":531416,"node_id":"MDQ6VXNlcjUzMTQxNg==","avatar_url":"https://avatars2.githubusercontent.com/u/531416?v=4","gravatar_id":"","url":"https://api.github.com/users/mchandschuh","html_url":"https://github.com/mchandschuh","followers_url":"https://api.github.com/users/mchandschuh/followers","following_url":"https://api.github.com/users/mchandschuh/following{/other_user}","gists_url":"https://api.github.com/users/mchandschuh/gists{/gist_id}","starred_url":"https://api.github.com/users/mchandschuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mchandschuh/subscriptions","organizations_url":"https://api.github.com/users/mchandschuh/orgs","repos_url":"https://api.github.com/users/mchandschuh/repos","events_url":"https://api.github.com/users/mchandschuh/events{/privacy}","received_events_url":"https://api.github.com/users/mchandschuh/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":264,"deletions":47,"changed_files":12}}
{"actor":{"display_login":"mchandschuh"}}