tag:blogger.com,1999:blog-35364652.post5933365541814525630..comments2024-03-22T10:29:59.088-04:00Comments on Quantitative Trading: How Useful is Order Flow and VPIN?Ernie Chanhttp://www.blogger.com/profile/02747099358519893177noreply@blogger.comBlogger31125tag:blogger.com,1999:blog-35364652.post-89268091690856006752017-07-13T09:01:01.532-04:002017-07-13T09:01:01.532-04:00Hi Francois,
Actually the Intraday Trading chapter...Hi Francois,<br />Actually the Intraday Trading chapter of my new book Machine Trading has a complete implementation of a trading strategy using VPIN. Have you taken a look?<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-25049896889538087672017-07-13T06:53:54.801-04:002017-07-13T06:53:54.801-04:00This boils down to adverse selection and the proba...This boils down to adverse selection and the probability of informed trading (PIN) and subsequently how to skew prices and quantities. Any good documents/papers on this topics that have had some practical uses? Especially on the last bit which is about integrating the PIN into a strategy (I have already a good estimate of my PIN). Francois Laurentnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-44494419451723412432016-10-22T07:17:20.949-04:002016-10-22T07:17:20.949-04:00Hi Sunnycalif,
The best way to compute order flow...Hi Sunnycalif,<br /><br />The best way to compute order flow accurately is if the data feed has an aggressor flag to determine if a trade is buy or sell-side initiated. But such data feed is very expensive. So for a less accurate estimate, we can use the VPIN method, which only requires the volume and the last trade prices of bars. Any brokers' data feed would provide that. The method to compute order flow using just bar data is given in the papers I cited in the article above.<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-48946660889764460712016-10-21T22:26:21.068-04:002016-10-21T22:26:21.068-04:00Hi Ernie..i think Volume is the heart beat of the ...Hi Ernie..i think Volume is the heart beat of the market. I am retail and do not have sophisticated platforms available to Quants. However I have been studying Speed in the markets and it is Volume & Speed which turns the markets. Have been doing some indicator with sub-second precision on retail platform such as Tradestation for number of years.<br />Recently came across the concept of VPIN and I decided to also look into your thoughts.<br />The topic of VPIN interests me quite a bit as it involves balance/imbalance and Speed and study of Volume. I would like to know if you have any development recommendation of VPIN using retail platforms such as Ninjatrader which is coded using C# >Net. And how can I try and pursue this. Any insights will be appreciated. I did see you on a previous post mention probably of an associate and hence thought of checking.sunnycalifhttps://www.blogger.com/profile/05925235491084049337noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-10531039240639888512015-03-20T19:03:31.659-04:002015-03-20T19:03:31.659-04:00I would take the other side to all of you fools. Y...I would take the other side to all of you fools. You're always looking at the wrong thing in the wrong places. Vpin, computer models. Who programs the models you mupets. Trading. Proper trading is done by people. There is your bigest and only clue... Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-48722236558597957292013-12-08T19:04:23.866-05:002013-12-08T19:04:23.866-05:00Hi J,
My associate does work on such projects. Ple...Hi J,<br />My associate does work on such projects. Please email me so I can connect you both.<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-51032387208329185842013-12-08T18:41:04.394-05:002013-12-08T18:41:04.394-05:00Hi Ernie,
I have a trading system based on some te...Hi Ernie,<br />I have a trading system based on some technical indicators and I would now like to setup an quantitative trading algorithm for it so it can trade faster. Would you suggest someone I can work with?<br /><br />JAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-12573057099872731392013-11-14T20:37:17.099-05:002013-11-14T20:37:17.099-05:00Hi Anon,
Actually, I don't believe IB will let...Hi Anon,<br />Actually, I don't believe IB will let you download primary exchange data. I am not sure setting exchange=NYSE will work for historical data.<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-71884024720194454762013-11-14T18:12:17.116-05:002013-11-14T18:12:17.116-05:00hi Ernie,
In IB, when we download historical stoc...hi Ernie,<br /><br />In IB, when we download historical stock data, we can choose "Primary Exchange" instead of "SMART" in contract. <br />Does that mean we can get historical 1 minute bars directly from "NYSE" or "NASDAQ"?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-36925122299042322902013-11-14T09:51:22.145-05:002013-11-14T09:51:22.145-05:00Hi Anon,
I personally have not used IQFeed, so I d...Hi Anon,<br />I personally have not used IQFeed, so I don't know if they provide primary exchange data. If they do, I am sure that it should be available both for 1-min bars and EOD prices.<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-43756052104450591772013-11-14T09:17:44.469-05:002013-11-14T09:17:44.469-05:00Hi Ernie,
In your book, you mentioned "Prima...Hi Ernie,<br /><br />In your book, you mentioned "Primary vs. Consolidated stock prices." <br /><br />Could we get historical prices from the primary exchanges from IQfeed?<br /><br />I guess it shall be ok for tick data because they usually have "Exchange column."<br /><br />I wonder if it is ok for 1 minute bars or end-of-day.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-91338543588741445412013-11-13T08:13:29.279-05:002013-11-13T08:13:29.279-05:00Hi Anon,
Even in Kalman Filter, you still need a s...Hi Anon,<br />Even in Kalman Filter, you still need a separate training set for parameters that define the initial distributions for the state and observed variables.<br /><br />Cross-validation is a different way to separate training and test data, since it involves dividing the data into many subsets and picking each subset as the test data in turn. This method is not particularly suitable for Kalman Filter because the time series won't be the same if you introduce gaps into the sequence of prices.<br /><br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-72710559219601322852013-11-13T02:12:03.869-05:002013-11-13T02:12:03.869-05:00hi Ernie,
Do you do cross validation?
For Kalman...hi Ernie,<br /><br />Do you do cross validation?<br /><br />For Kalman filter, as you mentioned before, there is no need to separate the data into "training" and "test" sets. Therefore, how do we do cross validation?<br /><br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-82677939321191093862013-11-08T18:38:45.047-05:002013-11-08T18:38:45.047-05:00Hi Anon,
I have been told that IQFeed is a good on...Hi Anon,<br />I have been told that IQFeed is a good one.<br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-11612282927179677302013-11-08T17:40:33.289-05:002013-11-08T17:40:33.289-05:00hi Ernie,
In your new book,you mention about &quo...hi Ernie,<br /><br />In your new book,you mention about "Danger of Data errors."<br /><br />You said that broker's data feed cause some losing trades, so you switched data feed to a third-party provider. <br />May I ask which is this 3rd party provider? Which real-time data feed is stable and cheap?<br />I think I cannot afford Bloomberg now.<br /><br />I guess the broker you mentioned here is IB.<br /><br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-84738953413673718842013-11-08T07:40:12.665-05:002013-11-08T07:40:12.665-05:00Hi Anon,
IB's portfolio margin is based on the...Hi Anon,<br />IB's portfolio margin is based on the exact composition of your portfolio. So yes, it is theoretically possible to get x6 intraday and/or overnight leverage with very safe constituents (e.g. long-short large cap ETF). But it all depends on running their risk model on your specific portfolio.<br /><br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-11480274441421054022013-11-08T03:43:09.452-05:002013-11-08T03:43:09.452-05:00hi Ernie,
If we get portfolio margin in IB, and t...hi Ernie,<br /><br />If we get portfolio margin in IB, and trade long/short ETFs, could we get about 6 times leverage for overnight positions?<br /><br />Or if we trade intraday long/short ETFs, could we get even higher leverage?<br /><br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-24472847093426430952013-10-29T17:07:09.025-04:002013-10-29T17:07:09.025-04:00Thank you again Ernie!
I think that if I would li...Thank you again Ernie!<br /><br />I think that if I would like to gain profits with order flow I must transform bid ask spread from a center of cost to a center of profit. Or, maybe, try to be neutral to bid-ask spread (that's to say when I open the position I can use market orders (directly hitting bid or ask on limit order book), but when I close the original opened position I must use limit orders - in this way I'll be neutral to bid-ask spread, because first time): in this way, if I'm able to statistically forecast the short term direction of price movement, gaining profit only from 1 tick price movement, if this 1 tick price movement is higher than commissions + exchange fee + regulatory fee I can have success in this kind of trading strategy.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-15708252203302043692013-10-29T15:27:13.412-04:002013-10-29T15:27:13.412-04:00Anon,
The main transaction cost is the bid-ask spr...Anon,<br />The main transaction cost is the bid-ask spread, which for ES is about 2 bps for a round trip. Commissions, exchange fee, regulatory fee totals about 0.3 bps one way for a retail account. So you need a profit per trade of about 1.3 bps.<br /><br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-11456263673362616942013-10-29T13:11:04.210-04:002013-10-29T13:11:04.210-04:00Ernie, thanks for your reply.
I would like to ask...Ernie, thanks for your reply.<br /><br />I would like to ask you one more thing: how much you estimate a sufficient gross profit (in terms of basis point) before transaction costs per trading cycle (that's so say open buy\sell and then close sell\buy), in order to make profitable a trading rule based on order flow? Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-27891961258135707632013-10-29T09:24:46.678-04:002013-10-29T09:24:46.678-04:00Hi Anon,
Thanks for your input!
HFT is able to ta...Hi Anon,<br />Thanks for your input!<br /><br />HFT is able to take advantage of order flow plus "exploratory trading" to exploit short term returns. Please google: Clark-Joseph, 2013 “Exploratory Trading”.<br /><br />Actually, many traders know of using volume bars instead of time bars prior to this paper, but I agree this may be a better way to backtest many strategies.<br /><br />Ernie<br />Ernie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-64328778654689863002013-10-28T17:59:10.470-04:002013-10-28T17:59:10.470-04:00Hi Ernie,
thank you very much for sharing your co...Hi Ernie,<br /><br />thank you very much for sharing your comments on this interesting topic on which, in Italy, me and other academics are working since the mid of 2000s (an example it's the "quite old" working paper published in 2010 <br />http://www.eea-esem.com/files/papers/eea-esem/2011/885/Mosconi_Carlini_Manzoni_Oslo.pdf).<br /><br />I really appreciate the fact that you point out the impossibility to generate profits net of transaction costs, considering that if you are able to gain, from a complete trading cycle, a gross profit equal to the sum of the bid ask spread plus one tick movement of the price, you are really skilled.<br /><br />But I'm still doubtful on a specific evidence: if you say that a trading rule based on order imbalance is not able to generate profits because gross profits are lower than transaction costs, in which way do high frequency traders gain profits generated by their activity of arbitrage obtained from same financial products traded on different venues? I don't think that high frequency traders, making profits from this type of arbitrage trading activity, are able to generate gross profits higher than bid ask spread + one tick of price movement. Moreover I'm not really sure that the estimation of transaction costs could be easily generalized, because it depends on the characteristics of each market operator.<br /><br />I would like also to share another point: actually, no one in academic literature has showed that the main intuitions of Easley, De Prado and O'Hara are not based on VPIN indicator (that is quite similar to simple indicators based on order imbalance used by other authors in the recent past), but on the innovative intuition of discretize high frequency data using volume buckets rather than clock time: the bucketing algorithm choice is the main explanation of why order imbalance hardly improves its predictive capabilities on financial returns Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-87731809449909896552013-10-28T09:38:10.247-04:002013-10-28T09:38:10.247-04:00 experquisite:
Yes, I do agree that returns based ... experquisite:<br />Yes, I do agree that returns based on volume bars are more normally distributed than those based on time bars. <br />ErnieErnie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-22927910710533755012013-10-28T09:36:45.102-04:002013-10-28T09:36:45.102-04:00Hi all,
Hat tip to a reader Mark who has shared wi...Hi all,<br />Hat tip to a reader Mark who has shared with us these 2 papers:<br /><br />http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1881731<br /><br />http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2062450<br /><br />Ernie<br />Ernie Chanhttps://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-72455873889553065862013-10-25T19:36:01.469-04:002013-10-25T19:36:01.469-04:00The HFT shops that have good predictive models (i....The HFT shops that have good predictive models (i.e. are frequently trading in a directional way) are way more sophisticated than VPIN. They do trade on order flow (among other things), but in a deeply complex derived from massive datasets, tons of computing power and state of the art machine learning techniques.<br /><br />The hope of a simple indicator like VPIN beating this is pretty small. I'd expect you could find some evidence that it works well pre-2007, but I highly doubt there'd be any alpha left in any market of reasonable liquidity.<br />DRhttps://www.blogger.com/profile/07395057401348319239noreply@blogger.com