Wednesday, May 28, 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.

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!

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.

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!

Sunday, April 20, 2008

8 Recommended Sites for Economic Research

I am happy to have my guest blogger Heather Johnson write about economics again. (I hope to emerge from my hiatus soon after finishing the final draft of my book on quantitative trading.)


=====================================

8 Recommended Sites for Economic Research

By Heather Johnson

Without the proper research, your trading strategies are just a shot in the dark. Don't rely on soundbites and headlines to tell you how the economy is doing. A wise investor will be following trends and analyzing his or her own collected data. Below are eight recommended sites for economic research that traders should find very useful.

  1. AEI Research - The American Enterprise Institute (AEI) for Public Policy Research is a non-profit group that is dedicated to educating people on economics, as well as politics, government and social welfare. You can find economic policy reports here that may influence your trading.
  2. BEA – The U.S. Bureau of Economic Analysis (BEA) provides economic data in a timely and unbiased manner. This service to the public helps people to gather a more accurate view of the U.S. economy. Reports are categorized by region and industry.
  3. CIBC World Markets – This organization is the corporate banking department of CIBC, one of the largest North American financial institutions. The global economic data provided by CIBC World Markets is considered to be amongst the most reliable sources for economic indicators.
  4. FedStats – This site offers the full range of economic statistics provided by the U.S. federal government. It also gathers data and trends from over 100 agency Websites.
  5. Federal Reserve – A trader should always be interested in what is going on with the Fed. Here, the institution provides regularly updated bulletins and data.
  6. The Financial Forecast Center – While this isn't a virtual crystal ball, it does offer third-party, objective economic data and forecasts. Compiled by artificial intelligence and available in a free subscription, everything found on this site is completely quantitative.
  7. Free Lunch – Ah, and you thought there was no such thing. This source of economic data and analysis begs the question, "Why pay anything?"
  8. Bloomberg.com Economic Calendar – This helpful calendar is brought to you by one of the most well-known names in finance. A day trader will find this calendar most useful when trying to determine how the market will move.

Although the list above is far from exhaustive, it should give you plenty of information to chew on for a while. Whether you are trying to forecast today's market or the market over the next six months, you will need to conduct some serious research beforehand.

=====================

Heather Johnson is a freelance finance and economics writer, as well as a regular contributor for CurrencyTrading.net, a site for currency trading and forex trading information. Heather welcomes comments and freelancing job inquiries at her email address heatherjohnson2323@gmail.com .

Thursday, March 20, 2008

5 Steps to Managing Risk as a Microfinancier

It might surprise some of you that lending money to middle-class American home owners to buy houses may be much riskier than lending money to Bangladeshi farmers to buy their first cellphones. (The beauty of diversification at work here?)

I have invited guest blogger Heather Johnson to explain microfinancing, and the quantitative risk management tools available if you want to do it yourself.

====

5 Steps to Managing Risk as a Microfinancier

By Heather Johnson

Microfinancing is a growing trend among investors, as it offers low-risk money opportunities and a way to bring social change to poverty-stricken communities. "Low-risk" doesn't equal "no risk," of course, so many potential microlenders are keen to learn the ins and outs of credit risk management in this arena. After all, most microborrowers have poor credit or no credit at all. A villager who needs $200 for starting a third-world chicken farm isn't going to fare well in that department, as you can imagine.

The good news is, even in the event of a loan delinquency, you won't be losing a substantial amount of money. Most microloans range from a few hundred to a few thousand dollars. Any losses are unfortunate, though, so you will want to manage your microlending risks and keep loan delinquencies to a minimum.

Here are five steps to managing your risk as a microfinancier:

  1. Research Your Borrower – If you're lending through a site, such as Prosper, then you will have access to your borrower's profile and credit reports. However, don’t be afraid to ask more questions if you have any doubts about this person's ability to repay the loan. If you are lending the money through other channels, definitely start with the credit reports and interview the borrower.
  2. Lend With a Group – Though this won't make your borrower any more likely to repay a loan, lending with a group will help to spread out the cost and share responsibility. In other words, you will be risking less money and will have other people with the same interests to consult with.
  3. Use Analytical Tools – Third-party applications can help you determine what is working best with your microlending. Both seasoned microlenders and newcomers are highly encouraged to use such tools. Microfinance sites that come with excellent built-in tools include Trickle Up, Opportunity International and Heifer International.
  4. Provide Incentives – Consider an incentive program for those who pay on time. A small, inexpensive gift will be very appreciated by those living in third-world countries. Lenders have used food, such as rice or corn meal, as a bonus.
  5. Be Proactive in Collecting – This doesn't mean you should harass your borrowers. However, you should research your delinquent accounts as soon as payments are late, rather than letting them go into default. There could be a simple breakdown in communication or an emergency on the borrower's end.

One of the biggest draws of microfinancing is the relatively low risk involved. However, that doesn't mean that you will have a 100% success rate. The best way to get your feet wet is to start with a small loan. Something as low as $100 will let you learn the process and allow you to become more comfortable with the system. Microfinancing isn't for everyone, but you may just find your niche with this kind of investment.

====

Heather Johnson is a freelance finance and economics writer, as well as a regular contributor for CurrencyTrading.net, a site for currency trading and forex trading information. Heather welcomes comments and freelancing job inquiries at her email address heatherjohnson2323@gmail.com .

Monday, March 03, 2008

Upcoming seminar on subprime mortgage crisis

For readers who live in the New York area, here is an interesting upcoming seminar at Columbia University:

The subprime mortgage crisis of 2007: Anatomy of a market failure

Date: 03-10-2008
Start Time: 6:00pm
End Time: 7:30pm
Speaker: Kenneth A. Posner, Morgan Stanley
Location: 412 Schapiro CEPSR, Davis Auditorium


ABSTRACT

As home prices soared in 2004-5, consumers, realtors, mortgage lenders,
homebuilders, and investment banks all benefited. But few thought the good
times would last -- after all, everyone had learned to recognize a bubble
when they saw one. If that's the case, how did mortgage losses turn out so
large, and why do we find ourselves today confronting a major financial
crisis? This presentation will survey the damage resulting from the
subprime mortgage crash and provide a possible explanation for the magnitude
of the surprise which may be relevant to investors and risk managers in
other markets.


BIO

Kenneth Posner is a managing director and head of the mortgage finance and
specialty finance equity research team. Prior to joining the Equity Research
department in 1995, Ken worked in Morgan Stanley's investment banking group,
where he focused on commercial real estate transactions. He previously
served as a captain of infantry in the US Army, and was airborne and ranger
qualified. Ken earned a B.A. from Yale University in 1985 and an M.B.A. with
honors from the University of Chicago Graduate School of Business in 1991.
He is a Certified Public Accountant and holds the Chartered Financial
Analyst and Financial Risk Manager designations

Friday, February 22, 2008

Had it been really that bad?

According to Eurekahedge Hedge Fund Index, hedge funds had the worst performance in eight years during this past January. And long-short equity funds had the poorest performance among them all.

Tuesday, February 19, 2008

Looking for momentum? Check outside the US

Momentum vs. mean-reversion has been a perennial theme in investing, not least quantitative investing. My contention has always been that momentum strategies are generally less reliable than mean-reversal strategies. (See here or here.) My reader Mr. J. Rigg told me about a recent article in the Financial Times suggesting that momentum strategies are alive and well, according to the research by Prof. Elroy Dimson et al at the London Business School. The strategy is very simple: buy the stocks with the highest returns in, say, the last 12 months, short the ones with the lowest returns, and hold for, say, 1 month. If you run this strategy for the top 100 UK stocks from 1900 to 2007, the average annualized return before costs is about 10%.

There are, however, a number of caveats worth noting in this study:

First, it is very transaction-costly to implement momentum strategies for small or even mid-cap stocks. If you factor in costs, 10% can easily become 5% -- not an impressive number even for a dollar-neutral strategy. (Though one should note that the infrequent rebalancing renders transaction costs consideration less important.)

Second, the drawdown durations are quite lengthy -- sometimes exceeding 2 years. This is not acceptable performance for many hedge funds. Such lengthy drawdowns have been a common feature of many momentum strategies that I have personally studied and traded.

Third, and most interestingly, in the period 2001-2007, this momentum strategy has stopped working altogether for the US market, while continuing to deliver positive returns in other markets!

What may be the reason for this dichotomy between US and international markets? Momentum strategies generally derive their power from the slow diffusion and analysis of information: if all investors are simultaneously aware of all the relevant financial information about a company and can analyze the significance of the information instantaneously, they will have come to a consensus fair market value instantaneously and no momentum in the price will result. Hence perhaps the disappearance of momentum in the US equity market means what most people know already: that it is the most efficient equity market of all.

Sunday, January 27, 2008

Are quant strategies in trouble yet again?

There were reports that quant strategies have been suffering again in January, given the market turmoil generated partly by the Societe Generale scandal. Mr. Matthew Rothman of Lehman Brothers pinned the blame on momentum strategies (Hat tip: 1440 Wall Street). I partly agree with that assessment, but the full picture is more nuanced.

As I have written in my previous post, December has been a disastrous month for value (or mean-reverting) strategies, based on both public commentaries and personal experience. Yet, as always, mean-reverting strategies bounced back in January and all the pain is gone. In fact, the Societe Generale scandal and the subsequent 1/22 Fed bailout has been a huge bonanza to mean-reversion traders, just like the August disaster had been. (Remember: mean-reversion traders profit from providing liquidity during market panic.) Meanwhile, though December has been a good month for momentum strategies, January has become increasingly inhospitable to them. But one should not be surprised at all. As I have explained before, momentum strategies generally tend to be more unstable and have lower Sharpe ratios than reversal strategies. Any wise quantitative portfolio managers would always allocate a lower proportion of capital to momentum strategies than to reversal strategies. Hence it is no excuse at all to say that a quant portfolio has been hurt by losses in momentum trading -- they are to be expected quite frequently!

Saturday, December 15, 2007

A sea of pain

This Economist Magazine article confirms my personal experience that value investing is in a sea of pain at the moment. The reasons are quite different from the last time (during the dotcom era) when value investing was in the doldrums. This time around, people are not full of euphoria about the prospects of growth stocks -- they are just getting increasingly gloomy of value stocks which seem to be getting cheaper by the minute.

Friday, November 23, 2007

Seasonal trades in stocks

Readers of this blog have seen my discussions of various seasonal trades in commodities futures (e.g. see this article). Recently, Mark Hulbert of the NYTimes drew our attention to a seasonal trade in stocks. The strategy is very simple: each month, buy a number of stocks that performed the best in the same month a year earlier, and short the same number of stocks that performed poorest in that month a year earlier. The average annual return is more than 13% before transaction costs, and since it is market neutral, this already considerable return can be leveraged to 2 or 3 times higher. Also, since it turns over the stocks only once a month, transaction costs should not be a major problem. The strategy was developed by Profs. Steven Heston and Ronnie Sadka, and details can be found online here. Besides its simplicity, the strategy is not as affected by survivorship bias in the data set as a mean-reverting strategy, since survivorship bias would tend to lower its backtest performance by excluding very poorly performing stocks that we would short. All in all, it seems to be a market neutral strategy made for retail trading!

Saturday, October 27, 2007

Economist article on quant funds

The media seems to have an endless fascination with quant funds. Here is the latest article from the Economist magazine, summarizing the postmortem published by several researchers. (Hat tip, once again, to reader Mr. J. Rigg.)

The key points are as follows:

1) Quant funds are now becoming the primary market makers in many securities, which normally would provide liquidity and decrease volatility.

2) Unlike ordinary market makers, however, quant funds are highly leveraged.

3) Because of the high leverage, in the face of large losses these market-making quant funds are forced to liquidate their assets instead of buying them, thus behaving in a way opposite to ordinary market makers just when the need for liquidity is direst.

4) Thus quant funds are actually contributing to instability of the market despite their apparent market-making function.

Fortunately, when all else has gone wrong, there is alway Mr. Bernanke to count on ...

Sunday, October 07, 2007

Emerging markets stocks vs. natural resource stocks

Emerging market stocks have been reaching new highs almost everyday (see this article in the Economist magazine), and the natural resource sector has been on a tear as well. Given the giddy valuations of both sectors, which one is a better relative buy at this point? For those of you who have been following the IGE-EEM spread that I proposed before, its value is at an all-time-low these days -- it was at -6.77 standard deviations. Given their historical cointegration, I wouldn't be surprised if it will revert to a more sane value in the near future.

Saturday, October 06, 2007

How a mean-reversion strategy performed in August

Prof. Andrew Lo and Mr. Amir Khandani at MIT recently wrote a paper on "What Happened To The Quants In August 2007?" (Hat tip to my reader Mr. J. Rigg for the article). Most of their conclusions confirm what many observers already suspected: that the loss is likely due to the simultaneous forced liquidation of portfolios holding similar positions by various quantitative funds. What is noteworthy, however, is that they constructed a mean-reversion strategy and observed what happened to it during August. This strategy is very simple: buy the stocks with the worst previous 1-day returns, and short the ones with the best previous 1-day returns. Despite its utter simplicity, this strategy has had great performance since 1995, ignoring transaction costs. The Sharpe ratio was an astounding 53.87 in 1995, gradually decreasing to 4.47 in 2006. However, the strategy also had a disastrous few days on August 7-9, suffering a cumulative (arithmetic) return of -6.85% in those 3 days. Then on August 10, it rebounded, like the rest of the quant funds, with a return of 5.92%, almost reversing all of its previous losses. For me, this experiment reveals three interesting points: 1) a simple price factor seems to capture most of the performance of the complex factor models run by the gigantic hedge funds; 2) even technical mean-reverting factors suffer losses, not just momentum (growth) factors based on fundamentals; and 3) if one wants to avoid disasters and enjoy spectacular returns, even a one-day holding period is too long. I haven't done the experiment myself yet, but I bet that if we were to liquidate the portfolio at market close each day, not only would we avoid the loss of -6.85% in those 3 days, but would probably end up with a positive return of a similar magnitude!

Thursday, September 20, 2007

So how much did quantitative strategies actually lose last quarter?

The numbers have started to come in: Morgan Stanley lost $480MM last quarter due to quantitative trading -- about 10% of operating profits.

Wednesday, September 19, 2007

Hedge fund replication

I wrote about how hedge fund returns can be replicated with simple factor models. I just learn that IndexIQ, a company in Rye Brook, NY, has just launched such products available to retail investors as managed accounts.