Wednesday, November 04, 2009

In praise of ETF's

I have learned some years ago that ETF's are strange and wonderful creatures. Simple, long-only mean-reverting strategies that work very well on ETF's, won't work on their component stocks. (Check out a nice collection of these strategies in Larry Connors' book "High Probability ETF Trading". He has also packaged these strategies into a single indicator, the ETF Power Ratings, on tradingmarkets.com.) Simple pair trading strategies like the one I discussed in my book, also work much more poorly on stocks than on ETF's. Why is that?

Well, one obvious reason is that, as Larry mentioned in his book, ETF's are not likely to go bankrupt (with the notable exception of the triple-leveraged ETF's, as I explained previously), because a whole sector or country is not likely to go bankrupt. So you can pretty much count on mean-reversion if you are on the long side.

Another obvious reason is that though there are news which will affect the valuation of a whole sector or country, these aren't as frequent or as devastating as news affecting individual stocks. And believe me, news is the biggest enemy of mean-reversion.

But finally, I believe that the capital weightings of the component stocks also play a part in promoting mean-reversion. Typically, weighting of a component stock increases with its market capitalization, though not necessarily linearly. Perhaps large-cap stocks are more prone to mean-reversion than small-cap stocks? But more intriguingly, can we not construct a basket of stocks, with custom-designed weightings, with the objective of optimizing its short-term mean-reversion property? I (and others before me) have done something similar in constructing a basket of stocks that cointegrate best with an index. Can we not construct a basket that is simply stationary (with perhaps a constant drift)?

Now, perhaps you will agree with me that ETF's are strange and wonderful creatures.

49 comments:

Anonymous said...

It sounds interesting.

How about pairs between one big ETF and a basket of smaller ETFs, for example, between iyf and/or vfh and kbe,kie,kce, etc?

Anonymous said...

Is there a suggested pair of ETFs to look at using the R Test for Cointegration from the earlier post?

Anonymous said...

Hi Ernie

Thanks for your book and this blog!

I have a few general questions about pairs trading:

1) What hedge ratio do you use, is it from the levels regression of one stock on another ? Or from the ECM equation?
2) What do you do with the intercept of the equation, which represents mean difference between the two, - do you include in spread calculation?

Thanks!

Jez Liberty said...

ETFs can actually be very dangerous as they include an additional layer of risk (counterparty risk from the ETF issuer - remember how the AIG ETFs behaved last year!)

For your XLE strategy for example I would rather build and trade 2 baskets of stocks against each other (instead of one basket of shares and one index ETF).
I think this is one of the pitfalls of strat-arb: it works until a black swan shows up and destroys your account (ie picking up dimes in front of a bulldozer, etc.).

Moreover ETFs also suffer from fees which gradually eat into the returns.

Ernie Chan said...

Anonymous,
You can certainly create 2 different baskets of ETF's -- as long as they cointegrate!
Ernie

Ernie Chan said...

Anonymous,
You can try EWA-EWC.
Ernie

Ernie Chan said...

Anonymous,
1) Yes, level regression is what I used.
2) I set the intercept to zero, to reduce no. of parameters, and also I don't believe in the statistical significance of the intercept.
Ernie

Ernie Chan said...

Jez,
Yes, you can certainly build your own ETF's (baskets of stocks), as I have suggested. That way, certainly no counterparty risk, since there is no counterparty!

But for a short-term trader, fees is not a problem, since we sometimes short those ETF's too.
Ernie

Anonymous said...

Thanks for the EWA-EWC example. Running it in R I got:

Date range is 1996-04-01 to 2009-11-04
Assumed hedge ratio is 0.8127148
ADF p-value is 0.01
The spread is likely mean-reverting.


And further running plot(sprd) and plot(m) is of interest.

There was a warning that popped up in the code about the p-value which I need to learn about...

Anonymous said...

Here's a related question. When shorting an ETF, is it better to actually go short on the ETF or to buy an inverse ETF? For example, do you sell short UUP or buy UDN?

- Anon

Anonymous said...

Ernie,

Thanks for your reply regarding the regression and the intercept.

I am stil concerned about the intercept. It the stock price difference in nominal terms is very big, one is always higher than another in price, so you get a big and significant intercept. Why to ignore it?

Yona said...

Hello,

First of all kudos to Ernie for his website. I am an great fan (and book owner) who hopes to start trading soon :-)

As for the question on inverse ETFs, I saw a very good explanation on a blog but cannot find it so I will try to quickly summarize it here. Inverse ETFs don't follow the long term trend of the index they replicate.

Imagine an index that goes from 100 to 110, then 121 and back to 100..that's two 10% increases and a 18% decrease (around). Now do the same for the inverse ETF...start at a 100 and go down 10% twice and up 18% once. Do you get back to 100? Not, you don't. The returns may be the same but as you can see the more you stay on this ETF the more your long term return is different from shorting the real index.

Hope this helps, if somebody got the link to the original article please post it 9I don't remember if I got it here or somewhere in Alphaville).

Anonymous said...

Thanks Yona for the explanation. I understand there may be significant differences in long term. However, I am more interested in short-term trading. For short-term, is there any difference between shorting an ETF and buying an inverse ETF? Perhaps, transaction cost may be a more important factor.

- Anon

Ernie Chan said...

Anonymous,
When I set the intercept to zero, I am dealing with ETF pairs. I see no reason why 2 cointegrated ETF's won't go to zero at the same time. For stock pairs, you may be justified to have a non-zero intercept.
Ernie

Ernie Chan said...

Yona,
Thanks for your kind words, and I appreciate your fine explanation of inverse ETF's.
Ernie

Yona said...

Hi Ernie,

Thanks for the appraisal but to be fair I used a post I had seen somewhere else. I couldn't find it then but after some research I did find it and recommend everybody to give it a read:

http://blog.leehudsonteslik.com/2009/11/04/more-caution-on-leveraged-etfs/

Anonymous said...

Hi Ernie

How often should the hedge ratio (beta from the ols function) be recalculated?

In your book I see an example where it's calculated over 252 days and then used to calcuate the spread over the next 252 days (example 3.6).

But in your subscription area I see an example where you calculate it for the first 90 days and then use it for the next 162 days.

Any feel for the 'best' timeframe?

Thanks

Matt

Anonymous said...

10% increase means multiplication by 1.1. The inverse of 10% increase, therefore, is division by 1.1 --- which is about 9% decrease, not 10% decrease. I find it very hard to believe that the people issuing inverse ETFs don't know this simple fact.

- Anon

Ernie Chan said...

Matt,
The time frame to re-calculate the hedge ratio can be the same as the one you choose for calculating moving averages and standard deviations. Those in turn depend on what your ideal holding period is, and your return-risk preference, and the half-life of mean-reversion for the pair. All these can be optimized in backtest.
Ernie

Ernie Chan said...

Anon,
The issuers of inverse ETF's no doubt know that arithmetic. But these ETF's are really meant for short-term hedging/trading, and there is no simpler way to construct them than the current way via swaps or futures. So the divergence from a true short position over the long term is deemed tolerable.
Ernie

Anonymous said...

I was testing the GLD-GLX pair using the methodology outlined in your book and it didn't seem to be profitable over the test periods 1/2007-11/2009.

From your experience, how has this pair behaved over this period? I just want to make sure I haven't coded something incorrectly.

I'm using daily closing prices for the signal generation and for simplicity assume execution at the closing price.

Ernie Chan said...

Anonymous,
GLD-GDX is one of those pairs that have lost cointegration in the past year or so. It would not be profitable unless your strategy has a very short timeframe.
Ernie

Nizar said...

Great post, I agree wholly.

I'm a fan of ETFs if not for any other reason then for their massive liquidity.

I'm actually in the middle of designing a mean-reversion system for ETFs when I came across another purpose.

I think something like BGZ can be used to hedge against a longterm long-only portfolio.

Maybe allocate 10% of your cash in buying and holding BGZ and the other 90% in stocks.

The only problem then is how often do we rebalance the 90/10 weighting.

Thoughts?

Anonymous said...

Dear Ernie,

if you do not include the intercept in your regression, then what's the type of the test you apply to residuals? ADF for RW with drift? 'cause residuals without the intercept are non-zero on average.

Anonymous said...

To Nizar:

Massive liquidity? LMAO.

Outside of perhaps a dozen ETFs liquidity is dire. Spreads are huge, ADV is tiny, and many aren't shortable in size and those which are have way higher borrowing fees than most stocks.

Yona said...

Hi Ernie,

What will be your answer to the following comment from Jerry Parker (one of the original Turtles)???:

"Mean reversion works almost all of the time. Then it stops and you're kind of out of business. The market is always reverting to the mean except when it doesn't. Who wants a system like we have, "40% winners, losing money almost all the time, always in a drawdown, making money on about 10% of your trades, the rest of them are sort of break even to losers, infrequent profits? I much prefer the mean reversion where I have 55% winners, 1% or 2% returns per month. "I'm always right!" I'm always getting positive feedback. Then, maybe in 8 years, you're kind of out of business, because when it doesn't revert to the mean, your philosophy loses."

Best,

Yona

Ernie Chan said...

Nizar,
If you are trading ETF short-term, then there is no capital allocation issues involved. If you are holding them long-term, optimal allocation can be obtained through Kelly's formula, as example 6.3 in my book shows.
Ernie

Ernie Chan said...

Anonymous,
ADF tests allow you to specify whether you want to include non-zero intercepts or not.
Ernie

Ernie Chan said...

Yona,
I am not exactly sure what Jerry Parker means.
The mean-reversion trade that I engage in are short-term bets. So if they stop working, it will be a gradual process, and it is unlikely be a catastrophic loss. As trading strategies start to lose their power, we will reduce their capital as per Kelly's formula, and find new strategies, whether mean-reverting or momentum. So I think Parker's comments apply to any strategies, not especially to mean-reverting strategies.
Ernie

Yona said...

Hi Ernie,

Thanks for your answer. I got the quote from Nizar's blog (the power of hyperlink), maybe he can give some more info on it.

I agree with you and that is why I wanted to see what counter arguments you had for this. I suppose the same could be said about momentum strategies (betting only on trend). Even with a stop loss on every trade you can still ruin yourself by betting the wrong way every time.

Thanks.

Anonymous said...

Hi Ernie,

As you mentioned you trade through Interactive Brokers. Are you able to use portfolio margin above Reg T. requirements because as of last year, the max leverage seems to be 2X?

I have talked to Customer Service, and they were not able to confirm or deny my claims, but they seem to have put the brakes on leverage above Reg. T regardless of the fact that I trade hedged ETFs pairs.

If yes, have you looked into other brokers and which ones.

Thanks,

David S.

Ernie Chan said...

Hi David,
Yes, IB seems to have restricted leverage to Reg T even for accounts with portfolio margin and with hedged instruments. I have engaged in detailed discussions with them, and all I got back is a big bunch of complicated risk management formula. I think the bottom line is that they have become severely risk averse after October 2008. I recommend switching to Lime Brokerage if you have $5M acct, or to a prop trading firm.
Ernie

Anonymous said...

Thanks Ernie for the quick response. Talking to Lime Brokerage, they have been evasive as well regarding portfolio margin. I'm assuming you're dealing with them now. If yes, would you mind sharing what level of leverage you are able to secure on ETFs and other instruments you are trading?

Regards,

David.

Yona said...

HISTORICAL DATA

Hello Ernie,

I have been looking at EODData.com for historical data. They offer what seems to be good quality EOD data at an affordeable price (50$ for 10 years of NYSE for instance).

I have signed up and paid for a couple of years in order to test it and share my results.

* For each year they give you a ZIP file with daily CSV data (or other if you prefer some vendor format).

* I have checked the prices Vs Bloomberg and they seem spot on (volumes may differ a little ie: 4500 vs 4505 on BBerg).

* Unfortunately I noticed that when a stock changes its ticker they keep the new one but not the old one. That means that if ABC becomes XYX on the 6/6/2009 you won't find ABC on the 6/5/2009 datafile. This is very silly and I am in contact with them to see if they can get that fixed!

I recommend you guys give it a try just because the more we are the better service they will provide. You don't need to pay as they have free EOD data from various exchanges.

I am not affiliated to them so there is nothing for me here other than trying to persuade them to provide better survivorship bias free data.

Ernie Chan said...

Hi David,
Portfolio margin of course depends on the exact nature of your portfolio (hedged? ETF or stocks?)
You can email me privately to discuss.
Ernie

Ernie Chan said...

Hi Yona,
Thanks for your info.

I am not worried about symbol changes. But do they provide historical for stocks which have been delisted?

Ernie

Yona said...

Well, that seems to be their main issue. I am studying the data in detail and no, they don't seem to have it. But that doesn't mean they should be able to offer that since they obviously (I suppose) save all their past data.

That's quite sad as I like their "no-frills" concept (I welcome you guys to email them and ask for better historical data, maybe some pressure will make them change). The only other provider I have found is JustData.com. Any suggestions Ernie??? (I know you give some on your book but things like this change all the time).

Ernie Chan said...

Yona,
For survivorship-bias-free data, I only know of Factset and crsp.com. Their cost is of course > $10000.
Ernie

Anonymous said...

Re: surviorship bias free data, you could also use Bloomberg which retains price histories for delisted stocks (albeit with a different ticker) and provides a full history of index changes. Admittedly a rather tedious and manual task initially, but less so going forward.

Steve said...

Thank you for your great post, where can we find potential ETF pairs to do cointegration test? Is there a good list or web site for this?

Ernie Chan said...

Steve,
You can backtest every possible pairs trading on AMEX. (See list of ETF's on amex.com).
Ernie

Anonymous said...

Ernie,
Enjoy your essays and blog. Question about leveraged investing, is there ever a time a 2x leveraged fund is appropriate for long term investing (closer to Kelly factor of 1.8 that you mentioned)? If the market is alwys trending upwards would buying for eg SSO after a major market declie and holding for a few years be a good idea. Thanks.

Ernie Chan said...

Anonymous,
If you buy after a big decline, do you sell after a big increase? If so, you are not holding ETF for the long term and the Kelly ratio will be different from that of long-term holding. It may well be over 2. However, traders typically leverage at half-Kelly level, hence you would need a Kelly of 4 in order to trade this ETF strategy.
Ernie

PC Wei said...

Ernie, I hope you monitor comments on your older blogs. I'm interested in pairs trading ETFs. I'd like to know which brokerage is best for this type of trading. Fidelity brokerage doesn't have some of the ETFs I'm interested in ready for shorting. I'd have to phone them and have them go out and borrow these ETFs. The ETFs I'm interested in have been screened for liquidity though not for if they are widely held. Still, one would think that Fidelity would hold these ETFs and be ready to lend a few percent of the daily volume.

Ernie Chan said...

PC Wei,
Actually Fidelity has the best supply of stock for borrow. However, for automated trading, you can use Interactive Brokers instead, where stock loan is automatic.
Ernie

PC Wei said...

Hi, Erine, thanks for responding. Yes, after several 30-minute-plus phone calls with Fidelity, I did find that they have certain ETFs for loan. However, the discovery process is very manual. I'd have to first enter a symbol and then click on short to see if any shares are available.

The Fidelity representative told me that there is a faster way to screen all ETFs for short availability on the Active Trader Pro tool. Still, I'd like my R ETF screening program to have access to short availability information so that it can be used as a screen. So far, my attempt to use the short ratio parameter s7 on download.finance.yahoo have not yielded any useful result. For instance, I know that GLD has shares available for shorting on Fidelity, but when I queried download.finance.yahoo on the same day during market hours, I got a NA on s7 for GLD.

I looked at Interactive Broker's API monthly fees for S-corps, and I can't afford it with my trading volume, so I think I'll stick with Fidelity until I can justify IB's API fees.

Ernie Chan said...

PC Wei,
I am a bit confused by "IB's API fees". As far as I know, I have never paid IB for the use of their API. Could you please post the link so we can see exactly what those fees are?
Thanks,
Ernie

PC Wei said...

Ernie,

I can see why blogging is useful. It's like having an Internet full of QA for my thought processes and mistakes.

I may have misread the connection minimums tab here http://www.interactivebrokers.com/en/p.php?f=minimumDeposits and thought that to use the IB API, I'd need spend $500/month minimum just to connect to their servers.

Ernie Chan said...

PC Wei,
$500 is the minimum only if you insists on connecting through Extranet (via Radianz etc.) If you are just connecting via the internet like most retail traders, the monthly fee is $10.
Ernie