
'optimization' or 'search'?
We’ve been looking at how a strategy container might view and implement a variety of modes for strategies it will launch and contain. Last time I documented a uniform initialization process for many of them, including a posited walk-forward parameter optimization mode. I’ve implemented an initial version of this that I’ll illustrate through a screencast (first ever – be gentle) below, but before continuing want to raise a couple of cautionary notes about the slope we’re traversing here.
From the very first post on this blog I’ve tried to underline the danger that over ‘optimization’ poses in view of the simple unalterable fact that if you look at enough random junk, you are bound to see things that look impossibly good. Doesn’t mean they’re actually good. In the context of trading strategy development, this is a particular danger as strategy parameter optimizers are easy to come by and can be very misleading if employed naively. I think this is in part due to the term ‘optimization’ which is really a stretch for what these tools do. They’re better described as search tools as they are really searching through a tuple-space of possible parameter combinations that you’ve specified, and then ranking them by some criteria you specify.
They’re still useful, but less as ‘optimizers’ and more as tools for judging the sensitivity of the strategy to different parameterizations. If the strategy demonstrates good performance and stability over a variety of market conditions and parameterizations, you may just have found yourself a winner…
Anyway, I felt that had to be said…
Read more…
One of my favorite tools for strategy development is the distribution of returns a strategy will generate. As I’ve discussed before (and here and here), it’s an easily quantifiable characterization of a strategy’s “underlying nature” and can be used to engineer strategies that fit appropriate markets.
Given the enduring value of return distributions, I found this morning’s post in ft.com/alphaville especially interesting. They cite a Dresdner study examining the distribution of returns for Goldman Sachs’ prop trading in 2003 and 2008. Eye opening stuff.

normal

not so much
A friend recently asked me what I considered to be the “axioms” of alpha-seeking trading strategies. I think there are a few, but probably the one that seems to me most important is that the atomic element of a trading strategy should always be a portfolio as opposed to a single instrument.
In a scenario of perfect knowledge, this wouldn’t be true. If you somehow *know* with certainty that crude will go up or that Citigroup will go down, then concentrating all of your resources into a position based on that belief might be reasonable. But knowledge seldom comes in such a neat package (and will frequently be illegal to act upon when it does!).
Instead, knowledge will typically come in more conditional and less certain forms: “commodities tend to rise during periods of FUD [Fear-Uncertainty-Doubt]” or “companies who announce stadium naming rights deals tend to under-perform.” In some cases, perhaps the knowledge on which you’ll base your strategy can be quantified probabilistically.
Depending on the nature and quality of the knowledge or hypothesis that forms the basis for a given strategy, one can adapt one’s portfolio construction/optimization based on customized relationships amongst the potential portfolio constituents. But one doesn’t need to be so fancy to see the concrete benefits of our first axiom. Below I detail a simple strategy I’ve put together to explore the forces involved.
Read more…

I’ve been trading an increasing amount at the open and close of the equity markets using market-on-open (MOO) and market-on-close (MOC) order types and have found that the quality of executions varies enormously between the two types and have spent a bit of time analyzing the differences which I share below.
The quick scoop is that MOC orders almost invariably fill at the exchange’s published closing price, while MOOs vary very substantially from the published open price. Below I quantify my findings in a bit greater depth.
Read more…

While doing some research on the quality and volume of executions at the open and close of US equity markets, I came across two topical research reports by Celent, a finance consultancy. The first report is a detailed look at execution quality on nasdaq issues while the second addresses the same topic for the nyse. An abstract of the first report can be found here and of the second here. Both are interesting enough on their own, though I’ve yet to acquire the full reports.
Read more…

I mentioned several weeks ago that I’ve been developing and trading a strategy that’s proven to be quite interesting and profitable. In that post, I described how I’d tried to improve the strategy through the use of a dynamic hedge. The results of that crude hedge were quite good, but just as no worthwhile software project is ever really complete, trading strategies demand constant iterative development.
Below I describe some of the steps I’ve taken to incrementally improve this strategy, discarding the relatively expensive hedge I’d developed earlier in favor of a complementary strategy. We see that when you combine two positive and uncorrelated results, you end up with a product that is literally better than the sum of its parts.
Read more…

I’ve recently been working-on and trading an equity strategy that has some great characteristics and some interesting challenges. The great characteristics revolve around its profitability, volatility and simplicity. The challenges start with the fact that the strategy generates alpha on the short side – thus, you are intrinsically swimming against the tide and can conceivably be ruined in a hurry. Your broker might also be unable to find inventory to short. Other challenges include the native capacity of the strategy – it’s not fundamentally scalable as a strategy and only a relatively small amount of money could be put against it without incurring increasingly onerous costs and risks. In any case, it’s been a fun strategy to develop as it’s an interesting puzzle and it makes money.
Discussing the strategy recently with a potential client, they observed that such a strategy wouldn’t be acceptable within their environment (apart the capacity issues) as their risk management practices required all strategies to maintain dollar neutrality – for any dollar of x that they used to buy something, they needed to sell a dollar of y. This led to an interesting experiment for me, the results of which I share with you below.
Read more…
I recently had a pretty visceral encounter with the forces of friction. No, I didn’t fall off my bike – I’m talking about the friction inherent in trading activities. I’ve mentioned Andrew Lo‘s market-neutral long-short algorithm before and it sees service as my blogging muse once again. I’ve modified his original algorithm such that it behaves reasonably well though, as he observes, it’s a strategy in long term decline. My recollection was that one might expect 15-20% from an unlevered deployment of the strategy.
Recently, I went to play with it and to my shock and horror it had become a wretched loser. In fact, an incredible loser. What had happened? I looked throughout my code and couldn’t find changes; this was corroborated by my CVS repository – no changes had been made to the strategy in a long while. Any coder is familiar with the natural entropy of software systems known pejoratively as “code rot” but this seemed an especially extreme case.
Read more…
He didn’t look like much, but old Rocky Marciano put his back into every awkward punch he threw. More remarkably, he remains the only heavyweight champion to have ever been smart enough to get out of the game on top. He was that rarest of characters – a winner who knew when to engage and when to step away.
I’ve written a good deal about losers and ideas that might not yield the results one’s looking (hoping) for, but I haven’t written too much about life’s winners. This, of course, is absolutely par for the course amongst traders. People aren’t in the habit of giving away trade secrets, leaving sums of money on the sidewalk or revealing their trading strategies. When they do (or claim to) is likely a good time to keep an especially watchful eye on your possessions…
Read more…

This past week I had the opportunity to see MIT’s Professor Andrew Lo present his paper “What Happened to the Quants In August 2007?” as part of the seminar series on quantitative finance presented by NYU and Columbia and sponsored by BlackRock and other relevant institutions. If you’re in the NYC area and interested in such things, I recommend attending any lectures which might capture your fancy.
I had read his paper some time back and implemented, within the Puppetmaster environment, the mean-reversion trading strategy he used as a microscope into what transpired last August. I was interested to see him speak as he’s a seminal thinker on hedge funds and quantitative finance, but also because the strategy he described works pretty well and I thought he might hint at various improvements.
I’ve stolen a line from his paper to serve as the title of this post as it captures one of the central dilemmas faced by algorithmic traders.
Read more…