Archive

Archive for the ‘books’ Category

Shannon’s Demon

March 3rd, 2009

During some recent travels, I read William Poundstone’s ramblingly entertaining Fortune’s Formula.  It had been sitting on my shelf after I’d originally gotten it, perused it and offhandedly discarded it as yet another of these science-is-fun-and-full-of-wacky-characters books for the butch humanities student.  My initial impression was a bit harsh as the book proved entertaining and covered a lot of ground including significant coverage of Ed Thorp and his stat arb alchemy (see here for his own papers on the topic).

One of the more compelling segments of the book relates Claude Shannon’s demon which is a nice thought-experiment / trading-strategy which illustrates the tractability of the problem of trading on a random walk market with fixed properties.  I wrote the above applet to explore the impacts of applying friction and otherwise modifying the behaviors of the market and the demon.

The original demon posited a world with no friction in which the market contains one instrument which doubled or halved in value each day.  Shannon’s demon looks to take advantage of this volatility by maintaining a portfolio which was rebalanced each day to ensure a 50/50 split between cash and the market.  The applet implements a very simple monte-carlo test-bed for Shannon’s Demon.  You can configure the demon and the marketplace along a variety of parameters, and then run many instances of the demon, each on its own self-contained random-walk market.

Although Shannon’s demon is a highly “stylized” case in the sense that it operates on a very synthetic, unrealistic and favorable formulation of a random-walk marketplace, it has spawned a great deal of interest and serious research.

Most of all, it’s a revealing illustration of the kind of reasoning one must embrace in order to address stat arb strategy development.  Enjoy.


Updated: March 4th - made price axis logarithmic to better reveal mc paths.

books, dereferenced, monte-carlo methods, strategy development

Every sunken ship’s got a room full of charts

November 12th, 2008

I came across this gem of a quote in a comment on the big picture and it reminded me, somewhat circuitously, of another one of the things I view as axiomatic about algorithmic trading.

In The Alchemy of Finance, George Soros observed that one of his advantages as a trader was that while he held beliefs strongly, he was also capable of abandoning or even reversing them quickly as conditions evolved.  An algorithmic trader needs something like this but more so - an automated trader is best served free of opinions entirely.

I think this is why the sunken ship quote made me think of this.  While charts are an effective means of quickly communicating potentially a great deal of information to a human viewer, the cult of chart technicians and the endless supply of books, lecture series and training materials they actually make their money on might convince you that you can form your opinions based on chart patterns…

Read more…

books, strategy development

entrepreneur’s inspiration

October 6th, 2008

looks like a hoodie to me...

I was looking for a couple of books on amazon today and came across this offering of a hoodie (pictured above) which reads: “I helped bailout the banking system and all I got was this lousy tee shirt!” which I’d (admittedly more rancorously) suggested only a few days ago

Just as curious, the search that revealed this gem was meant to find books similar to one I’ve recently read by Dr. Andrew Lo, “Hedge Funds: an Analytic Perspective” (pictured left) and which, like all of his work, I found interesting and informative. I’m not sure exactly how Amazon matched these two products together, but it’s funny to imagine that the same people buying the one are also buying the other!

books, dereferenced, our managed markets

When Hedge Funds Blow

April 26th, 2008
boom I’m very pleased to present our first guest blogger to this space - Scott Johnston. Scott’s an experienced hedge fund exec who’s currently a PM and principal at the Belstar Group, an asset allocator and fund-of-funds. This post has been excerpted, with permission, from his monthly newsletter. Contact him at sjohnston {AT} belstargroup [DOT] com.
The biggest single impediment I see for investors contemplating an investment into hedge funds is “blow up” risk. How can they think otherwise, with all the hype? The media enjoy little more than the self-immolation of a hedge fund - Rich Guys Get Theirs! Blow-ups score a 10 on the CNBC schadenfreude scale. (Note: for institutional investors, blow up risk translates more specifically into “headline risk,” which is basically the risk of losing one’s job if a hedge fund you invested in ends up in the papers for the wrong reason.)
How common are hedge fund blow-ups? How often do they happen? What do they do to returns? These are questions I wanted to get to the bottom of.
Fishing around, I found surprisingly little research on the subject, so I thought it might be useful to conduct a survey of our own. Specifically, we will look at hedge fund blow-ups through the years to see what kind of conclusions we can draw. For the sake of argument, we will call anything greater than a 50% loss a blow-up.

Read more…

books, guests, hedge funds, portfolio management

laughter in the dark

February 26th, 2008

Lips (Heure de l'Observatoire) - Man Ray

Professor DeLong points out that Emanuel Derman has begun posting lecture notes to classes he’s teaching as part of the Columbia Master’s of Financial Engineering. If you’re even remotely interested in financial engineering or algorithmic trading, then you should read Dr. Derman’s engrossing book “My Life as a Quant” as it gives a unique and personal perspective on the explosion of engineering as a discipline within finance. I haven’t studied his notes carefully yet but a cursory examination suggests they look very worthwhile.

I recently found in my inbox an invitation to study for a Certificate in Quantitative Finance which is, I’m sure, a great program. But it’s pretty pricey and any quant should be aware of costs! Laughing in the dark might be a reasonable alternative to shelling out for a more structured offering…

books, dereferenced, options pricing

A trading strategy is an option

October 10th, 2007

options, options, ...

The best way to reason about a trading strategy’s performance, that is valuing it, is as an option.

Or perhaps as a collection or portfolio of them.

I have to assume that people reading this have a working idea of what an option is, so I’m not going to provide definitions that can be readily found elsewhere. I will note that my favorite book on the trading of options is by Allen Jan Baird.

Let’s consider the three illustrative trading strategies we’ve looked at up until now. The trend-following strategy suffered many little losses and then enjoyed a big win. Sounds like buying options. The mean-reverting strategy made lots of little profits and then risked getting clobbered with a big loss. Sounds like someone who’s writing options. And the first strategy we looked at, the morning range breakout, had a payoff which looked like a long straddle or strangle where the break-evens were near the observed high and lows for the session (where we set our entry stops).

straddle payoff

Now, there’s obvious differences between the trading strategies’ payoff structures as compared to the similar options strategies. There’s no premium, for instance, and that’s clearly significant. The morning range breakout seems to exhibit a sort of knockout effect when a position has been entered but then the market reverses and you’re “knocked-out” of your position. You just take a loss and do not collect even if the market turns back in your direction. With a straddle you don’t have this behavior. There are differences and they are worth keeping in mind. But the reasons for viewing trading strategies as options portfolios are many and compelling.

The superficial reason, as I mentioned, is that the basic payout structures are potentially similar. The deep reason is that ultimately the problems are the same - how to value complex instruments with engineered payouts. And the pragmatic reason is that many many very smart people have applied their considerable brains and diverse skill-sets to advancing options pricing techniques. There’s also a great deal of high quality software available out there which can be used to adapt these time-proven techniques to your own algorithmic trading strategy valuations.

The techniques which we’ve seen up until now, back-testing and parameter optimization, are sort of weak cousins of a family of techniques long used for options pricing: Monte-Carlo (MC) methods. MC simulation can clearly be used to assess a trading strategy’s performance.

In subsequent posts, we’ll talk about some of the details of each of these techniques and about some of their respective trade-offs. That should keep my pump primed for a bit, but in the meanwhile I leave you with a parting inquiry: what other options pricing techniques might we apply to our algorithmic trading practices?

back-testing, books, monte-carlo methods, open-source software, options pricing, performance analysis, strategy development, technology

distribution

October 5th, 2007

misleading, eh?I’ll make a few more comments on the last strategy we looked at before we move on. Although I’ve panned it, it’s actually a nice strategy for consideration as it’s very simple to implement, efficient to run, has a plausible-ish sounding premise and can be permuted in many directions. It has the unfortunate characteristic of being a loser, but nothing is perfect. It might offset that characteristic by providing us with a means of seeing interesting phenomena or learning. For example, all of the futures exchanges I ran it against - ICE, CME and NYX performed very well. Might be something there. Or not. If we look at the distribution of the *best* performing of each of the 4 strategies we ran by instrument, we get a pretty clear picture:

gimme an R-...

Read more…

back-testing, books, performance analysis, strategy development

Sucker punch! (an example)

September 26th, 2007

To illustrate what I was talking about last time, I introduce a simple example: the morning breakout strategy. Variations on this strategy have been discussed in a variety of sources from Perry Kaufman’s encyclopedic tome to a recent copy of Futures Magazine.

The rationale behind this strategy is based on the premise that the first n minutes of a trading session will frequently see the entire movement for the session and that thus breakouts from this range will prove to be decisive for the day. One can take this basic idea and create a bewildering array of strategies by adding pre-trade filters and all sorts of exits.

They all have the same basic feature: they’re losers.

Sucker punch!

We’ll stay simple and assume that our strategy will set stops at the observed max & min of the session after n minutes of the session have passed. At the end of the day, we’ll exit any position the strategy has
initiated. And for maximal simplicity (and perhaps some psychological sense of “safety”) we’ll allow the stops to stay in the market all day so they act as stop-losses for each other when positions are entered.

Thus our strategy has two optimizable parameters: what to trade and when to set the stops. The first is of type contract and the second is an integer. Finally, we have some fixed parameters (i.e., it doesn’t make sense to try to optimize them) denoting when the session starts and how much money to risk or how many shares or contracts to trade.

If we do a parameter optimization on this strategy using, say, the s&p 500 components as values for the first parameter and setting the n breakout range to values { 20, 40, 60, 80 } we end up with 500 X 4 distinct strategies which each get back-tested to produce our results.

In the next post, we’ll review the results and consider how to reason about them.

back-testing, books, performance analysis, strategy development