Wednesday, May 28, 2008
Pre-order my book from Amazon.com
A reader told me that he can now pre-order my book "Quantitative Trading: How to Build Your Own Algorithmic Trading Business" from Amazon.com. The scheduled publication date is November 24, 2008.
Tuesday, May 27, 2008
Parameterless trading models
A portfolio manager that I used to work for like to pronounce that his trading models have "no free parameters". As is customary in our secretive industry, he would not elaborate further on his technique.
Lately, I begin to understand what a trading model with no free parameter means. It doesn't mean that it does not contain any lookback period for calculating trends, or thresholds for entry or exit. I think that would be impossible. It just means that all such parameters are dynamically optimized in a moving lookback window. This way, if you ask: "Does the model have a fixed profit cap?", the trader can honestly reply: "No, profit cap is not an input parameter. It is determined by the model itself."
The advantage of a parameterless trading model is that it minimizes the danger of overfitting the model to multiple input parameters. (The so-called "data-snooping bias".) So the backtest performance should be much closer to the actual forward performance.
Now, it is quite computationally challenging to optimize all these parameters just-in-time for your next order, but it is often even more difficult to do that in a backtest, given that a multidimensional optimization need to be performed for each historical bar. As a result, I personally have seldom traded parameterless models, until I get to research my regime-switching model. That model is almost parameterless (I left out a few parameters from optimization because of a lack of time, not because of any technical difficulties).
The reason backtest optimization can now be done within a few minutes is due to my use of Alphacet Discovery's server-based optimization engine. There may be other optimization software out there that performs similar functions efficiently -- I welcome comments from the reader.
Lately, I begin to understand what a trading model with no free parameter means. It doesn't mean that it does not contain any lookback period for calculating trends, or thresholds for entry or exit. I think that would be impossible. It just means that all such parameters are dynamically optimized in a moving lookback window. This way, if you ask: "Does the model have a fixed profit cap?", the trader can honestly reply: "No, profit cap is not an input parameter. It is determined by the model itself."
The advantage of a parameterless trading model is that it minimizes the danger of overfitting the model to multiple input parameters. (The so-called "data-snooping bias".) So the backtest performance should be much closer to the actual forward performance.
Now, it is quite computationally challenging to optimize all these parameters just-in-time for your next order, but it is often even more difficult to do that in a backtest, given that a multidimensional optimization need to be performed for each historical bar. As a result, I personally have seldom traded parameterless models, until I get to research my regime-switching model. That model is almost parameterless (I left out a few parameters from optimization because of a lack of time, not because of any technical difficulties).
The reason backtest optimization can now be done within a few minutes is due to my use of Alphacet Discovery's server-based optimization engine. There may be other optimization software out there that performs similar functions efficiently -- I welcome comments from the reader.
Monday, May 26, 2008
Regime switching paper
A preprint version of my Regime Switching and Machine Learning article can be found on my premium content area.
Friday, May 23, 2008
Machine Learning + Regime Switching = Profitability?
My article on a trading strategy based on regime switching and machine learning techniques is now available on Automated Trader magazine (subscription required). The software I used to research this model is Alphacet Discovery, an industrial-strength backtesting, optimization, and execution platform.
Monday, May 12, 2008
Are high oil prices due to hedge fund speculation?
The economist Paul Krugman advances an interesting argument today in the New York Times against the idea that high oil prices are due to hedge fund speculation.
He believes that speculative buying can lead to persistent high prices (which has been the case for the last few years) only if there is physical hoarding. Yet oil inventory level has been normal for this period.
Indeed, I have been trying to find a mean-reverting strategy to trade oil and oil-related assets for some time now. So far, none have outperformed (even on a risk-adjusted basis) just buy-and-hold energy stocks for the long term!
He believes that speculative buying can lead to persistent high prices (which has been the case for the last few years) only if there is physical hoarding. Yet oil inventory level has been normal for this period.
Indeed, I have been trying to find a mean-reverting strategy to trade oil and oil-related assets for some time now. So far, none have outperformed (even on a risk-adjusted basis) just buy-and-hold energy stocks for the long term!
Saturday, May 10, 2008
5%: an important number for real estate investors
Equity investors like to check out a company's price/earnings ratio before they invest in its stock. Likewise, real estate investors should do the same before buying a house. The equivalent of price/earnings ratio for real estate is the price/rent ratio, or inversely, the rent/price yield.
What is a reasonable rent/price yield for US residential real estate? According to Morris Davis of the University of Wisconsin-Madison, and Andreas Lehnert and Robert Martin of the Fed, the long-term average is 5% (i.e. the annual rent of a house should be about 5% of its market value). As the Economist magazine has reported, at the height of the US housing boom, this figure dropped to as low as 3.5%.
Currently, this ratio is at about 4.3%, which implies that average US housing price has to drop another 14% in order to return to its historical fair value.
Can quantitative traders profit from this prediction? Well, we can always short the S&P/Case-Shiller Home Price Indices futures at the Chicago Mercantile Exchange.
What is a reasonable rent/price yield for US residential real estate? According to Morris Davis of the University of Wisconsin-Madison, and Andreas Lehnert and Robert Martin of the Fed, the long-term average is 5% (i.e. the annual rent of a house should be about 5% of its market value). As the Economist magazine has reported, at the height of the US housing boom, this figure dropped to as low as 3.5%.
Currently, this ratio is at about 4.3%, which implies that average US housing price has to drop another 14% in order to return to its historical fair value.
Can quantitative traders profit from this prediction? Well, we can always short the S&P/Case-Shiller Home Price Indices futures at the Chicago Mercantile Exchange.
Sunday, May 04, 2008
A combination momentum and mean reversal model based on earnings annoucements
Mark Hulbert of the New York Times just discussed 2 momentum strategies investigated by professors David Aboody, Brett Trueman and Reuven Lehavy.
Strategy A: pick stocks in the top percentile of 12-month returns. Buy them (individually) 5 days before their earnings announcements and sell them just before the announcement.
Strategy B: pick stocks in the top percentile of 12-month returns. Buy them (individually) 5 days immediately after their earnings announcements and hold them for 5 days.
Strategy A is very profitable: the annualized excess return is 47% before costs. (To be taken with a grain of salt due to the large transaction costs associated with trading momentum strategies, especially if small-cap stocks are involved.) Strategy B is very unprofitable: the annualized excess return is -43% before costs.
So what are the ways we can make best use of this research?
Naturally, instead of buying the top percentile after the earnings announcements, we should have shorted the stocks, thus making Strategy B a reversal strategy instead.
Furthermore, what about the bottom percentile of stocks? Should we have shorted them prior to the announcements, and bought them after the announcements? If so, we would have a very nice dollar-strategy for you statistical arbitrageurs out there!
Strategy A: pick stocks in the top percentile of 12-month returns. Buy them (individually) 5 days before their earnings announcements and sell them just before the announcement.
Strategy B: pick stocks in the top percentile of 12-month returns. Buy them (individually) 5 days immediately after their earnings announcements and hold them for 5 days.
Strategy A is very profitable: the annualized excess return is 47% before costs. (To be taken with a grain of salt due to the large transaction costs associated with trading momentum strategies, especially if small-cap stocks are involved.) Strategy B is very unprofitable: the annualized excess return is -43% before costs.
So what are the ways we can make best use of this research?
Naturally, instead of buying the top percentile after the earnings announcements, we should have shorted the stocks, thus making Strategy B a reversal strategy instead.
Furthermore, what about the bottom percentile of stocks? Should we have shorted them prior to the announcements, and bought them after the announcements? If so, we would have a very nice dollar-strategy for you statistical arbitrageurs out there!