{"action":"created","issue":{"url":"https://api.github.com/repos/QuantConnect/Lean/issues/184","labels_url":"https://api.github.com/repos/QuantConnect/Lean/issues/184/labels{/name}","comments_url":"https://api.github.com/repos/QuantConnect/Lean/issues/184/comments","events_url":"https://api.github.com/repos/QuantConnect/Lean/issues/184/events","html_url":"https://github.com/QuantConnect/Lean/issues/184","id":110172928,"number":184,"title":"Backtest gives number overflow from PortfolioStatistics","user":{"login":"chrisdk2015","id":14743041,"avatar_url":"https://avatars.githubusercontent.com/u/14743041?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisdk2015","html_url":"https://github.com/chrisdk2015","followers_url":"https://api.github.com/users/chrisdk2015/followers","following_url":"https://api.github.com/users/chrisdk2015/following{/other_user}","gists_url":"https://api.github.com/users/chrisdk2015/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisdk2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisdk2015/subscriptions","organizations_url":"https://api.github.com/users/chrisdk2015/orgs","repos_url":"https://api.github.com/users/chrisdk2015/repos","events_url":"https://api.github.com/users/chrisdk2015/events{/privacy}","received_events_url":"https://api.github.com/users/chrisdk2015/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-07T08:14:36Z","updated_at":"2015-10-24T22:36:08Z","closed_at":"2015-10-24T22:36:08Z","body":"Possibly a mono/Linux issue.\r\n\r\nIn https://github.com/QuantConnect/Lean/blob/master/Common/Statistics/PortfolioStatistics.cs#L178 I placed a breakpoint.\r\n\r\nOn my machine using the attached algorithm the code enters line 178 twice. Once with correct values, next time fractionOfYears becomes zero and you get number overflow because of divide by zero later on.\r\n\r\nAlgorithm:\r\n\r\nhttps://drive.google.com/file/d/0B95K6AyeZ37SNUtJejdqcUlVbm8/view?usp=sharing\r\n\r\ndata file:\r\n\r\nhttps://drive.google.com/file/d/0B95K6AyeZ37SdzhLYjVDN292SG8/view?usp=sharing\r\n\r\na daily equity usa file\r\n\r\nNot sure why it enters the code twice, also not sure why fractionOfYears becomes zero second time.\r\n"},"comment":{"url":"https://api.github.com/repos/QuantConnect/Lean/issues/comments/150862809","html_url":"https://github.com/QuantConnect/Lean/issues/184#issuecomment-150862809","issue_url":"https://api.github.com/repos/QuantConnect/Lean/issues/184","id":150862809,"user":{"login":"mchandschuh","id":531416,"avatar_url":"https://avatars.githubusercontent.com/u/531416?v=3","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},"created_at":"2015-10-24T22:36:08Z","updated_at":"2015-10-24T22:36:08Z","body":"Merged in https://github.com/QuantConnect/Lean/commit/52dfe34b867558256b455203a2c5ec07251d2ff9"}}