{"action":"created","issue":{"url":"https://api.github.com/repos/quantopian/pyfolio/issues/58","labels_url":"https://api.github.com/repos/quantopian/pyfolio/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/quantopian/pyfolio/issues/58/comments","events_url":"https://api.github.com/repos/quantopian/pyfolio/issues/58/events","html_url":"https://github.com/quantopian/pyfolio/issues/58","id":95249508,"number":58,"title":"[PERF] Rolling Regressions ","user":{"login":"humdings","id":4993812,"avatar_url":"https://avatars.githubusercontent.com/u/4993812?v=3","gravatar_id":"","url":"https://api.github.com/users/humdings","html_url":"https://github.com/humdings","followers_url":"https://api.github.com/users/humdings/followers","following_url":"https://api.github.com/users/humdings/following{/other_user}","gists_url":"https://api.github.com/users/humdings/gists{/gist_id}","starred_url":"https://api.github.com/users/humdings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/humdings/subscriptions","organizations_url":"https://api.github.com/users/humdings/orgs","repos_url":"https://api.github.com/users/humdings/repos","events_url":"https://api.github.com/users/humdings/events{/privacy}","received_events_url":"https://api.github.com/users/humdings/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-15T17:39:14Z","updated_at":"2015-07-15T18:51:27Z","closed_at":null,"body":"I'd like to suggest we use Pandas implementation for rolling regressions. \r\nhttps://github.com/pydata/pandas/blob/master/pandas/stats/ols.py\r\n\r\nThe performance difference is huge.\r\n\r\nFor a single factor\r\n* rolling_beta: 1 loops, best of 3: 4.26 s per loop\r\n* pd.ols: 1 loops, best of 3: 275 ms per loop\r\n\r\nFor multiple factors\r\n* rolling_multifactor_beta: 1 loops, best of 3: 15.2 s per loop\r\n* pd.ols: 1 loops, best of 3: 265 ms per loop\r\n\r\nPandas uses some sophisticated caching methods that make their implementation really fast. I'm slightly suspect of the differences between the results of the two implementations as well, I know the pandas method takes takes takes float precision into account.\r\n\r\nIf there are no arguments against this I can swap it out and submit a PR.\r\n"},"comment":{"url":"https://api.github.com/repos/quantopian/pyfolio/issues/comments/121710783","html_url":"https://github.com/quantopian/pyfolio/issues/58#issuecomment-121710783","issue_url":"https://api.github.com/repos/quantopian/pyfolio/issues/58","id":121710783,"user":{"login":"gusgordon","id":1934957,"avatar_url":"https://avatars.githubusercontent.com/u/1934957?v=3","gravatar_id":"","url":"https://api.github.com/users/gusgordon","html_url":"https://github.com/gusgordon","followers_url":"https://api.github.com/users/gusgordon/followers","following_url":"https://api.github.com/users/gusgordon/following{/other_user}","gists_url":"https://api.github.com/users/gusgordon/gists{/gist_id}","starred_url":"https://api.github.com/users/gusgordon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gusgordon/subscriptions","organizations_url":"https://api.github.com/users/gusgordon/orgs","repos_url":"https://api.github.com/users/gusgordon/repos","events_url":"https://api.github.com/users/gusgordon/events{/privacy}","received_events_url":"https://api.github.com/users/gusgordon/received_events","type":"User","site_admin":false},"created_at":"2015-07-15T18:51:27Z","updated_at":"2015-07-15T18:51:27Z","body":"Yeah that sounds great! I am only concerned about the differences. How significant are they? May just be different methods of compounding returns or something."}}