Thursday, April 26, 2012

First, an iPad version of this blog has been launched, so if you are reading this on an iPad, the look will be different. If you want to go back to the old look, just hit Page Turn in the bottom left corner and choose the option there. Any comments or suggestions on this new look are most welcome!

Second, and this is probably irrelevant to most of you reading this blog, a Chinese translation of my book Quantitative Trading is now available.

Third, and most interesting, Larry Connors will be hosting a webinar on "How to Trade High Probability Stock Gaps" on Tuesday, May 1, 2:00pm ET. (Click on link to register.) It is sheer coincidence that I was just writing about stock gaps in my previous post! I have always found Larry's strategies to be clear, concise, and simple - exactly the ingredients for out-of-sample as opposed to in-sample returns!

If a trader could make money with the methods he is teaching then (a) he would not have time to teach (b) he would not reveal his edge.

No rational trader will ever teach a method that works. People that teach trading methods are either irrational or do not trade. There may be another class that deceives traders purposely with losing methods and takes the opposite side, just like market makers do. This is speculation from my part.

I expect the counterarguments and I tell you that teaching trading is not like teaching math. Math is a positive sum game whereas trading is a negative sum game.

I used to work at banks and hedge funds as their prop trader. We are not allowed to discuss our strategies even with colleagues in another group. The result: I never made a dime for my employers, nor do I know of any colleagues that have done so consistently.

Once I started to write my blog and discuss bits and pieces of my strategies, and further teach classes on the basics of these strategies, I have learned far more from my readers and "students", so much so that I have no problem coming up with live trading profits anymore. Most of my strategies come from ideas that are triggered by readers' comments or emails. (An example was in my previous post's comment section.)

As I emphasized in my book, nobody will disclose a profitable strategy in its entirety to you. But books and classes are still valuable because they serve as inspirations for your own ideas, and they teach basic techniques that are valuable to any strategy.

Professional traders are often on the phone many times a day with colleagues in another institution. Do you think their colleagues will spill all their secrets to them? If not, what do they talk about? The weather? No, the sum of information increases between the communicating parties, at the expense of traders who do not communicate. So while it is a zero-sum game, it is our own loss if we don't give and take from other traders.

I have a couple of back-tested only strategies on the SP emini that I am not sure whether to continue investigating as I am new to quantitative trading. The holding periods would vary from a few minutes to a few hours. Both rely on tick data.

Both enter at a price target and exit at a count of ticks. The first has a shorter holding period, and the average profit per trade is 1 tick before costs and slippage. It has a unlevered Sharpe ratio of 4. It is based upon tick bars of 5000.The second has an average profit per trade of 2 ticks, and an unlevered Sharpe ratio of 3. It is based upon tick bars of 25000.

Given your experience, are either of these worth pursuing further?

I am concerned that the profit per trade will be very tight, if it would exist at all, after I take into account the bid/ask spread, slippage, and commissions.

I have used TickData for historical data, and suppose if I did proceed would need to begin by finding a live data feed from a brokerage house (like IB) whose data is a relatively close match to TickData's.

Hi millman,If your ES strategy can be implemented with limit orders, then 1 tick round trip profit is reasonable. But we don't know what opportunity cost you will incur. The only way to find out for sure is to paper trade it, or even better, trade it live with small size.Ernie

Hi M chan,Based on your book and blog, you seel to use co-integration in pair trading. Does you coming book treat the problem of co-integrated systems with more than two variables. You have talked before about methods closed to the one of avellaneda and lee. Have you got any chance with other methods to build such systems? Do you mention these methods in your next book? In particular I have two problems with their method: 1/ They use a single linear equation with ADF test instead of a VAR/VECM approach with johansen test. 2/ They use all the stocks (series) to build their model which results in high transaction costs.

One simple way to go about the second problem would be to use best subset, forward-backawrd selection or least angle regression to select the best model.(All these based on a co-integration statistic) Any thought on that?

Hi all,An update on Larry Connors' webinar on gap trading: it will happen next week. You can register here: http://presentations.tradingmarkets.com/1580186/special-presentation-to-ernie-chans-trading-group-connors-research-trading-strategy-series-w?utm_source=CREmailPartner&utm_campaign=None&utm_medium=EChan

Thanks for your answer,Weirdly enough while there are numerous papers on pair trading, I can't find any paper that uses johansen tests for mean reverting baskets (>2 securities). Do you have any reference?Z

I am following you blog with great interest, thanks for sharing your ideas! As being interested in the industry, i wonder how lucrative quant trading for the providers of the algorithms is. Say i managed a proprietary quant fund for one or more investors that generates 20% return per year. What percentage of that would i be able to keep as the algo provider? In other words, how is the return splitted between the providers and the investors?

For the record, I am not asking about your paycheck, more about what is common in the industry.

Hi Anon,For any markets, there is no reason to test for cointegration at any frequency other than daily. Higher frequency data does not give better test statistics, since the data would be serially correlated.Ernie

Hi,Does this mean that you don't trade pairs (based on cointegration) intraday or just that you don't test for cointegration intraday. While I theoreticaly agree with you about about concatenation, wouldn't this be the same problem for any model driven strategy?Z

Hi anon,You can certainly trade at different time scales. But cointegration is not the way to compute that. If a time series does not cointegrate in long time frame, it won't cointegrate even if you increase the sampling frequency. However, you can indeed test cointegration on this high frequency data one day at a time, without testing all these days together.Ernie

Hi Z,I certainly trade pairs intraday. I just would not use cointegration to test on the concatenated data set, since that is a meaningless procedure for my trading strategy.

I don't know what you mean by saying this is a common problem for any strategy. For strategies that hold overnight positions, it is obviously useful and important to test for cointegration on daily prices concatenated together.

Hi Ernie,What I meant is that if you concatenante the series of say 5mins bars of different days and build a model on price/return you will have a problem to fit a model to such series. The returns from close of the day to open of the next day will certainly not have the same agnitude as the returns from 5mins bars which could be seen as a deterministic heteroscedastic effect.

Completly unrelated, do you know good references (reviews are even better) on optimal order execution algorithms? I'm not thinking of very large orders but more optimaly sending orders for equity/futures quant trading. Z

Hi Z,I agree with exactly what you just said. If you are not trading FX which has data 24 hours a day, there is no sense to concatenate intraday data to test for cointegration. But that certainly does not prevent me from trading stock pairs intraday!E.

i found your blog very useful in getting knowledge about trading.i am a great fan of larry conner.i found your articles on quantitative trading very useful.your first book is remarkable. i am waiting for your second book so eagerly.

Hi Ernie,On a slightly unrelated topic, are the subfolders and util folder for your cadf function still available on your website? I purchased your book, and went on to the premium content page but couldn't find it there.

Hi Noah,I did not create the cadf function. You can get this function from the spatial-econometrics.com package. Remember to add ALL the subfolders of that package to your Matlab path in order to use any function!Ernie

Hi Thomas,No. Mean-reverting process is represented by an error-correction model. I.e. it is an autoregressive model of first differences, and not in the prices themselves. So you cannot obtain the half-life from an auto-regression of the prices.

See the documentation of the spatial-econometrics.com package for details.Ernie

Hi Noah,No, ols does not accept constraint. If you have Matlab's Statistics toolbox, you might be able to find a constrained regression function. I know they have, for example, stepwise regression.Ernie

Hi Jack,Yes, if you can use intraday prices to backtest, then it eliminates/reduces slippage as one source of transaction cost. But you can also use primary exchange closes to backtest: such closing prices can be achieved in reality with little slippage.Ernie

Let me first congrats & thank you for your wonderful post .sir my name is amit,from india, i am a NanoTech.professional,i also wanna to learn analytics for trading,please guide me how to start from scratch as i am novice in this field .your little guidance will change the life of many layman like me.