Saturday, October 31, 2009

Halloween—two images, one film

I guess yesterday was “mischief night” for the markets. So happy Halloween. For those who can’t do risk by the numbers (or who can, but find images powerful) here are two.



(the second image is compliments of Hack the Market)

And I can’t let Halloween go by without a very belated movie recommendation. If you haven’t seen Pi—Faith in Chaos (1998) and if you have some time away from normal social relations (trust me, unless you have the weirdest friends in the world, they wouldn’t sit through more than ten minutes of this film and would worry about your sanity for ever subjecting them to it), rent the film. I watched it not long before I saw A Beautiful Mind, and I considered the Hollywood blockbuster a faint echo of the independent film. It’s a horrific, haunting tale of Wall Street’s search for the holy grail and of our addiction to kabbalistic (or Fibonacci) mathematics.

Friday, October 30, 2009

Stock Trader’s Almanac, 2010

Every year about this time I have to make a major executive decision—what kind of calendars and appointment book(s) I want for next year. You may guffaw, but this decision is not inconsequential. It defines how I plan to frame my time and what I consider to be noteworthy events in my life. I of course have an online “appointment book,” but its main function is to record upcoming economic reports so I don’t get caught unaware. I also get innumerable wall calendars; I hang up a couple and never look at them except when I flip the month and see a new nature picture. But I always need some kind of calendar I can touch and write on.

The Stock Trader’s Almanac by Jeffrey A. Hirsch and Yale Hirsch (Wiley, 2009) fills the bill perfectly. It’s a spiral-bound hardcover, which means that once opened it lies flat. The calendar section of the almanac (about 2/3 of the book) has on facing pages historical data on market performance (verso) and a week’s worth of calendar entries (recto). Each trading day’s entry also includes the probability, based on a 21-year lookback period, that the Dow, S&P, and Nasdaq will rise. Particularly favorable trading days (based on the performance of the S&P) are flagged with a bull icon; particularly unfavorable trading days get the bear icon. A witch icon appears on options expiration days. At the bottom of each entry is a quotation. There’s about a five-square-inch space in which to write.

Published every year for over forty years, the Stock Trader’s Almanac is a handy source for a wealth of statistical information. It records intraday performance, day of the week performance, and monthly performance. It highlights the ten best and worst days, weeks, months, quarters, and years for the major averages. It continues to update the January barometer, devised by Yale Hirsch in 1972, and looks at the correlations between politics and markets. And on and on.

Seasonal trading strategies have taken a hit recently, but they’re in good company. Moreover, the track record for most of these strategies is detailed, so we can see if and when they broke and perhaps, in light of this information, devise alternatives.

Whatever the rationale for owning this almanac, I consider it indulgence on the cheap. And unlike the chocolates I buy for the Halloweeners who never come (and admittedly often devour before Halloween, trusting that the outlier won’t happen) this almanac not only gets you through a whole year but remains a valuable reference work long into the future.

Thursday, October 29, 2009

Northington, Volatility-Based Technical Analysis

Kirk Northington’s Volatility-Based Technical Analysis: Strategies for Trading the Invisible (Wiley, 2009) is a 450-page infomercial for his MetaStock add-on. Although he purports to offer both MetaStock and Trade Station formulas unique to his system, all but the most basic MetaStock fomulas have proprietary components and hence are useless. He seems to have been a bit more generous with his Trade Station coding. Looking at the MetaStock charts that are chosen to demonstrate the potency of his indicators, I’m not wowed. And since, despite his system building, he claims to be a discretionary trader, there are virtually no backtests, no statistics, to lend credibility to all those entry and exit symbols on his charts.

Now that I’ve vented, let me look at this book more constructively. The basic premise is sound: volatility is a critical descriptor of market movement and hence should not be ignored in constructing a trading system. Of course, volatility is not a univocal concept. Historical volatility is easily described by traditional technical analysis software; implied volatility is captured only by options software (which usually includes historical volatility indicators as well). Writing a trading system for equities that successfully incorporates both elements is not for the faint of heart or the mathematically challenged. Northington does not undertake this task, though he offers an “equalizer,” what he calls projected implied volatility. For the most part he focuses on the usual suspects in the indicator world—standard deviation, average true range, linear regression, and R squared.

One theme that runs throughout the book is the power of combining and compounding. This, I think, may have some merit. At least, it’s something I might play with a bit. Here are two examples. First, create a composite security from two related securities. The chart of the composite security is sometimes clearer than that of either of the individual securities. When your system signals an entry on the chart of the composite security, split your order equally between the two securities. Second, compound indicators to highlight extremes. This is important for Northington because, he argues, “money is to be made at the extremes.” (p. 16) For example, multiply a normalized value of the distance of price from its x-period moving average by its average true range. “When both values are at extremes, the calculated value will be truly magnified.” (p. 72) In its simplest form, using MetaStock coding, the function would be (((C – Mov(C, 40, E)) / C) * 100) * ((ATR(14) / C) * 100). Northington tweaks this function, looking at highs and lows instead of closes, overlaying standard deviation bands, and optimizing values, but the basic idea remains intact.

Another point, not original but nonetheless important enough to keep repeating, is that a critical step in system building is breaking the system. Every strategy has its blind spot, and when a developer breaks his system he discovers its vulnerability. He can then decide how to address this vulnerability—whether to hedge, whether to diversify, whether to cut back on position size, whether to keep a tighter stop, or whether simply to throw the damned thing out!

A final idea that deserves a brief paragraph occurs in the subtitle of the book: trading the invisible. In some ways, of course, it’s merely a catchy phrase, a bit too cute. But Northington’s point is that the eye tricks us into seeing patterns that aren’t there and missing patterns that are. To study a chart and then trade based solely on what we see is to trade the visible but perhaps the illusory.

Wednesday, October 28, 2009

Howe, Crowdsourcing

I was driving back from the grocery store listening to
CT public radio when I heard a pitch (pun intended) for a proposed crowd-managed baseball team. One of the guests on the show was Jeff Howe, author of Crowdsourcing: Why the Power of the Crowd Is Driving the Future of Business (Crown Business, 2008). So, naturally, I had to add this book to my series on crowds. For those of you who are sick to death of the theme, this will be my last post on crowds, at least for the foreseeable future. Of course, my foresight isn’t any better than anyone else’s.

Perhaps the best known instance of crowdsourcing was the Netflix Prize, awarded last month. For $1 million Netflix in effect hired groups of Ph.D.s for a dollar an hour to improve its movie recommendation system. The winning team of seven was made up of statisticians, machine-learning experts, and computer engineers from four countries.

Howe, a contributing editor at Wired magazine, takes the reader on a quick crowdsourcing journey from T-shirt company Threadless, iStockphoto, and open source software to P&G’s Connect and Develop initiative (responsible for Swiffer). He highlights the national bird counts coordinated by the Cornell Lab of Ornithology, the world of the citizen journalist, and of course Wikipedia. And just as Page cited Surowiecki, Howe cites Page. (You see, I could have sequenced my reading simply by date of publication instead of my more complicated heuristic that reached the same end.)

Today I’m going to focus on the trading crowdsourcing model at Marketocracy, where investors can open a virtual portfolio of $1 million and join the more than 85,000 virtual fund managers on the site. Marketocracy then monitors these portfolios in search of ideas for its own Masters 100 mutual fund, launched in 2001. Initially, the fund followed a simple model, weighting its positions to match those of the top hundred portfolios. The model was effective. By the end of its first year of operation it beat the S&P 500 by 14%. In both bear and bull markets the model outperformed. But then came 2004 when the market became choppy. The Masters 100 began to underperform its benchmark dramatically; as investors fled, its assets under management withered from $100 million to $50 million in just over a year.

The problem was not only a changing market but that old demon--herding. “As the top investors got to know one another, they started conferring on their positions.” (p. 175) In response the Marketocracy team introduced changes, among which was one that made it impossible for members to see each other’s trades. The team also decided that its pool of 100 was too small (and probably insufficiently diverse) and its algorithm too simplistic. For instance, it was overlooking the specialists—those who, though they didn’t perform brilliantly overall, had unique expertise.

This hybrid model flagged an oil-shipping company called Knightsbridge Tanker whose stock a sub-set of the Marketocracy traders (none in the top 100) was buying aggressively. Intrigued, the management at Marketocracy sent e-mails to these traders to find out why they were loading up on the stock. It turned out that the company had a lot of tankers about to be scrapped. How did the traders know this? Someone checked in Singapore where the tankers were registered. “The conventional wisdom is that when a tanker reaches the end of its life, it’s worth zero. But the price of steel started to go through the roof in the interim, and all that was about to be returned to investors as dividends. Marketocracy made a killing.” (p. 176)

Marketocracy took a good idea, found flaws in it, improved on it, and I’m sure continues to improve. But it’s not a poster child for crowdsourcing. It has only a two-star Morningstar rating and assets under management of less than $20 million (last year it lost a whopping 46%). So far this year it is beating the S&P 500 handily (28% vs. 20% as of October 23) but trailing the S&P MidCap 400 against which Morningstar benchmarks it; MID is up 30%.

Tuesday, October 27, 2009

Problem-solving traps

I first saw a reference to Michael Shermer’s book Why People Believe Weird Things in David Aronson’s Evidence-Based Technical Analysis. The Shermer book isn’t particularly revelatory; in fact, today’s takeaway comes not from Shermer himself but from a 1981 study by Singer and Abell that he cites. Again, not groundbreaking, but worth repeating.

When people are asked to select the right answer to a problem after a series of guesses and positive or negative feedback from the investigator, they regularly fall into dangerous traps. First, they form a hypothesis and look only for confirmation of the hypothesis, not for evidence to disprove it. Second, they are very slow to change the hypothesis even when it’s obviously wrong. Third, in the face of complex data, they adopt overly-simple hypotheses or strategies to solve the problem. Finally, they always find causality, even if the investigator’s “right or wrong” feedback was given randomly.

Traders and investors fall into the same problem-solving traps as the rest of the population but they often pay a higher price. Perhaps it would be time to have a checklist to accompany each investing or trading hypothesis. (1) What would qualify as evidence against this hypothesis? (2) When should I throw in the towel? (3) Is my strategy adequate to the problem? With certain kinds of investments and trades you might add: (4) Am I mistaking correlation for causality?

The checklist won’t guarantee profits, but it might dampen losses.

Sunday, October 25, 2009

Sornette, Why Stock Markets Crash, part 2--Herding and Minority Games

Game theory, an analytical tool in support of Adam Smith’s “invisible hand,” maintains that all the decisions we make are optimization problems. Didier Sornette disputes this claim. People, he argues, “have natural intuitive mechanisms—mind modules that serve them well in daily interchanges—enabling them to ‘read’ situations and the intentions and likely reactions of others without deep, tutored, cognitive analysis.” (Why Stock Markets Crash, p. 84) Even the ill informed and error prone may converge over time to Smith’s general equilibrium, where everything works out for the best. Then again, equilibrium may be upset.

One way to upset equilibrium is through herding. Sornette distinguishes multiple types of herding, but the most interesting is the informational cascade. An informational cascade occurs when “the existing aggregate information becomes so overwhelming that an individual’s single piece of private information is not strong enough to reverse the decision of the crowd. Therefore, the individual chooses to mimic the action of the crowd.” Sornette continues: “The two crucial ingredients for an informational cascade to develop are: (i) sequential decisions with subsequent actors observing decisions (not information) of previous actors; and (ii) a limited action space.” (p. 95) In the Internet bubble it was irrelevant to know that a particular business model was doomed (I still use my pets.com mousepad); the crowd was buying the stock, so the only sensible thing to do was to go along for the ride.

Since herding is such a prevalent phenomenon in markets (from analysts’ recommendations to momentum trading), if a trader lacks information it is optimal for her to imitate. She should look to the crowd, in essence “polling the members” to analyze how likely they are to behave in the future. Mathematically, she is taking part in an infinitely iterative loop. “The opinion si at time t of an agent i is a function of all the opinions of the other ‘neighboring’ agents at the previous time t – 1, which themselves depend on the opinion of the agent i at time t – 2, and so on.” (p. 103)

The problem with following the herd is that investors cannot all win at the same time, so here and there they have to take a minority view. In the simplest terms the investor would want to be in the minority when buying but in the majority during the holding period of the investment. Therefore, the relative impact of contrarian behavior on majority behavior is the ratio of the entry time to the holding time. Sornette speculates about the impact of this ratio on the intraday trader. “The large amount of works on minority games . . . suggests that changing one’s strategy often may be profitable in that situation. It also suggests that only when the information complexifies or when the number of traders decreases will the traders be able to make consistent profits. In contrast, the buy-and-hold strategies profit as long as the information remains simple, such as when a trend remains strong. The problem then boils down to exit/reverse before or at the reversal of the trend.” (p. 119) Sornette oversimplifies the profile of the intraday trader and overlooks the existence of intraday trends, but you get the idea.

Okay, intraday traders, you now have a new project—to learn about minority games, abstractions of the famous El-Farol Bar problem. Although I don’t understand why the total number of traders is relevant to the profitability of individual traders, my projects right now are out of control!

Friday, October 23, 2009

Behavioral finance links

The other day I linked to a paper by Richard Thaler. There's a lot more where that came from on his Booth School of Business, University of Chicago page.

And if you really want a feast, here's the Behavioural Finance website.