{"action":"created","issue":{"url":"https://api.github.com/repos/mhallsmoore/qstrader/issues/103","repository_url":"https://api.github.com/repos/mhallsmoore/qstrader","labels_url":"https://api.github.com/repos/mhallsmoore/qstrader/issues/103/labels{/name}","comments_url":"https://api.github.com/repos/mhallsmoore/qstrader/issues/103/comments","events_url":"https://api.github.com/repos/mhallsmoore/qstrader/issues/103/events","html_url":"https://github.com/mhallsmoore/qstrader/pull/103","id":167187469,"number":103,"title":"Price Iterator, Pandas BarEvent TickEvent Iterator (for DataFrame and Panel) ","user":{"login":"femtotrader","id":5049737,"avatar_url":"https://avatars.githubusercontent.com/u/5049737?v=3","gravatar_id":"","url":"https://api.github.com/users/femtotrader","html_url":"https://github.com/femtotrader","followers_url":"https://api.github.com/users/femtotrader/followers","following_url":"https://api.github.com/users/femtotrader/following{/other_user}","gists_url":"https://api.github.com/users/femtotrader/gists{/gist_id}","starred_url":"https://api.github.com/users/femtotrader/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/femtotrader/subscriptions","organizations_url":"https://api.github.com/users/femtotrader/orgs","repos_url":"https://api.github.com/users/femtotrader/repos","events_url":"https://api.github.com/users/femtotrader/events{/privacy}","received_events_url":"https://api.github.com/users/femtotrader/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-07-23T14:52:20Z","updated_at":"2016-07-28T16:30:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mhallsmoore/qstrader/pulls/103","html_url":"https://github.com/mhallsmoore/qstrader/pull/103","diff_url":"https://github.com/mhallsmoore/qstrader/pull/103.diff","patch_url":"https://github.com/mhallsmoore/qstrader/pull/103.patch"},"body":"and **Generic Price Handler**\r\n\r\n\r\nThis is a quite big PR.\r\n\r\nCloses #58\r\nShould also help #101 \r\n\r\nBecause it's now much easier to create your own price data source for backtesting\r\n\r\nIt separates 2 roles :\r\n - Price Event Iterator\r\n - Price Handler (put `TickEvent` or `BarEvent` to event queue)\r\n\r\nA price event iterator simply need to return a `TickEvent` or a `BarEvent` at `next` call.\r\nPrice Handler can be generic - a generic price handler just need a price event iterator (inherited from `AbstractTickEventIterator` or `AbstractBarEventIterator`)\r\n\r\n4 new price event iterators are given\r\n- Input : Pandas DataFrame with OLCV columns and datetime as index for ONE ticker - output `BarEvent`\r\n- Input : Pandas Panel with OLCV as items axis, datetime as major_axis axis and tickers as minor_axis axis - output `BarEvent`\r\n- Input : Pandas DataFrame with Bid/Ask columns and datetime as index for ONE ticker (so for several tickers) - output `BarEvent`\r\n- Input : Pandas Panel with Bid/Ask as items axis, datetime as major_axis axis and tickers as minor_axis axis (so for several tickers) - output `BarEvent`\r\n\r\nThese iterators are just examples, there is no need to put data into Pandas... iterators are the way to follow.\r\n\r\n\r\nOne big advantage of this is that anyone can easily test his price iterator by just doing\r\n\r\n    price_event_iterator = MyNewIterator()\r\n    for event in price_event_iterator:\r\n        print(event)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mhallsmoore/qstrader/issues/comments/235949699","html_url":"https://github.com/mhallsmoore/qstrader/pull/103#issuecomment-235949699","issue_url":"https://api.github.com/repos/mhallsmoore/qstrader/issues/103","id":235949699,"user":{"login":"femtotrader","id":5049737,"avatar_url":"https://avatars.githubusercontent.com/u/5049737?v=3","gravatar_id":"","url":"https://api.github.com/users/femtotrader","html_url":"https://github.com/femtotrader","followers_url":"https://api.github.com/users/femtotrader/followers","following_url":"https://api.github.com/users/femtotrader/following{/other_user}","gists_url":"https://api.github.com/users/femtotrader/gists{/gist_id}","starred_url":"https://api.github.com/users/femtotrader/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/femtotrader/subscriptions","organizations_url":"https://api.github.com/users/femtotrader/orgs","repos_url":"https://api.github.com/users/femtotrader/repos","events_url":"https://api.github.com/users/femtotrader/events{/privacy}","received_events_url":"https://api.github.com/users/femtotrader/received_events","type":"User","site_admin":false},"created_at":"2016-07-28T16:30:40Z","updated_at":"2016-07-28T16:30:40Z","body":"I'm not native english speaker so writing doc is not my best skill ;-)\r\n\r\nAnyway maybe this PR is not the best way to perform the task of being able to use Pandas DataFrame and Pandas Panel as price/volume provider.\r\nMaybe the idea to separate price iterator and price handler is over-engineered... in such a case we should merge the two roles and use multiple inheritance.\r\n\r\nSo this abstraction will be out of \"users\" eyes."}}
{"actor":{"display_login":"femtotrader"}}