Data Trends for Investment Professionals


A Quant’s Approach to Building Trading Strategies: Part Two

This is the second part of our interview with a senior quantitative portfolio manager at a large hedge fund. In the first part, we covered the theoretical phase of creating a quantitative trading strategy. In this part, we cover the transition into “production.” We’ve also published a third part with answers to readers’ questions.

You can read the first part of the interview here.
You can read the third part of the interview here.

What does moving into production entail?

For starters, I now have to worry about the “real world” — nuances like day-count conventions, settlement dates and holidays. When calibrating on historical data, you can get away with approximations for these. But when it comes to individual live trades, you can’t be sloppy; you have to be exact.

Another aspect of production is that speed is critical. I can’t fit my model to market data in real time (gradient descent is slow!) so instead, I have to reduce everything to linear approximations of changes. This entails a lot of matrix manipulation.

I usually build an execution prototype that does everything “correctly” but inefficiently. I then hand that over to my engineering colleagues who build a performant version in Python or even C, using the market libraries they’ve built over the years. And that version pipes its output into my trading station, for me to actually start executing on this strategy.

And then, hopefully, I start making money.

How long does this entire process take?

It typically takes months of work to bring a new strategy from drawing-board to production – and that’s for the strategies that actually work. Most don’t. And even the successful strategies have a shelf-life of a couple of years before they get arbitraged away, so the above process repeats itself all the time. I have to reinvent my approach to trading every few years.

Are you ever worried that the model-based opportunities you strive to capture will disappear for good?

Of course. In my experience all opportunities eventually go away. And indeed one of the biggest challenges in the type of modelling I do is knowing when a live model is obsolete. All models lose money on some days and weeks. And it is very difficult to recognize when losses are part of a model that is still working and when those losses are signalling the death of the model.

Where do you get ideas for new models or trading strategies?

Anywhere I can! But I have a few avenues I resort to pretty consistently.

First, data. If you have a new or obscure source of data which anticipates the market in some way, that’s the easiest way to generate alpha. These days especially there are a ton of interesting new data sources out there: startups collecting new datasets; analytics firms with predictive indicators; large corporations with “data exhaust” that we can mine; and aggregators like Quandl to bring them all together. I’m always on the lookout for interesting, unusual and predictive datasets.

Second, the markets themselves. Bankers are always inventing new instruments, and they typically foster new inefficiencies. If you keep your finger on the pulse of the market, it’s pretty easy to find model-driven opportunities that less sophisticated participants might miss.

Third, global patterns. History may not repeat but it certainly rhymes. For instance, if you want to trade the US interest curve, the Japanese market is a rich source of ideas; Japan went through zero interest rates years before the US. In fact, I built some very successful models of the US Treasury market based purely on the behavior of JGBs a decade previously.

Fourth, analogies. Some of the best trades occur because I apply thinking from regime A within regime B. Different asset classes have differing degrees of sophistication; you can arbitrage this difference.

Fifth, I just keep my eyes and ears open. The world is a pretty inefficient place; if you’re inquisitive and keep asking “why? / why not?”, you will always find opportunities.

It sounds like you use a lot of tools – Mathematica, Matlab, Python, Excel, C.  Is that deliberate?

Absolutely. Different stages in the pipeline require different tools. I’d be an idiot to build real-time performant systems in Excel, or do symbolic manipulation in Python. Not that that can’t be done, but there are other tools that are better for those tasks.

How do you manage the data flow for all these stages and tools?

In the early days, I’m still working on proof of concept, so stylized data is fine. But as the model gets closer and closer to production, the more granular and “real” the data has to become. There’s a whole separate infrastructure around getting high quality data and maintaining it – Quandl helps here – which I haven’t talked about, but the truth is, it’s critical. The best model in the world will fail if the data inputs are incorrect. No amount of skill can make up for bad data.

(We received so many excellent questions from readers that we published a third part of this series.) 

For a playful take on common errors made by quants, read The Seven Deadly Sins of Quantitative Data Analysts.

Meanwhile, we welcome more of your questions! If you have any questions or comments, leave them below and our quant will respond to you. 


Leave a Reply

Your email address will not be published. Required fields are marked *

  • […] Quant’s Approach to Building Trading Strategies: Part One A Quant’s Approach to Building Trading Strategies: Part Two A Quant’s Approach to Building Trading Strategies: Part […]

  • John Doe says:

    Hi, so I’ve actually just started a prop firm and fortunately I’m running what have been very successful models (live and BT). That said, I am relatively green to the industry and have had very limited opportunity to talk candidly about much of anything with “competitors”. Unsurprisingly most of my life is hammering away on new strategies and being stressed about current ones failing. It sounds like your backtests are generally only going back a few years (though clearly they are vetted as well as they can be given data constraints 🙂 and subsequently do occasionally bite the dust when market conditions change.

    So I guess my question is: how much correlation do you see between the length of a backtest and the trading life of the strategy? Do you guys have any models that have been profitable for 10+ years? My most profitable model is under fairly shitty constraints when it comes to historical data; obviously it has been well-vetted and extremely profitable live, but I’d be under a lot less stress (well, slightly less…) to hear something along the lines of “oh, when we have a profitable model with a solid 5-year backtest, it will almost always work for the next 1-2 at least” or “when the likelihood of this model being profitable given its backtest is X% (and it has been consistent with expected profitability in live trading) it should remain so for at least T period of time”. Obviously there will be a high standard deviation here, but at least a general estimate would be hugely appreciated.

    Awesome article, and all the best!

  • […] first part, she discussed the theoretical phase of creating a quantitative trading strategy. In the second part, she described the transition into “production.” This interview received so many excellent […]

  • […] interviewt. Das Gespräch zeigt auf, auf welch dünnem Eis einige Fonds unterwegs sind ( Link zum Interview […]

  • Max Muller says:

    Thanks for the interesting article!

    Do you have any advice for someone who just started as a quant at a systematic hedge fund? How do I become really good at this? What differentiates the ones who succeed from those who do not?

    Many thanks!

    • Original Poster says:

      In a nutshell: intellectual discipline. By which I mean a combination of procedural rigour, lack of self-deception, and humility in the face of data.

      Quants tend to get enamored of their models and stick to them at all costs; the intellectual satistfaction of a beautiful model or technology is seductive. It’s even worse if the model is successful: in addition to emotional attachment, you have to contend with hubris. Then one day it all comes crashing down around you.

      The reason I’ve been successful in this industry over decades is that I have a keen sense of my own ignorance, and I’m not afraid of appearing a fool. I ask dumb questions, I question everything, I constantly re-examine my own assumptions. This helps me re-invent myself as the market changes.

      (BTW: the best quant trader I know is an arrogant p**** who is utterly convinced of his rightness on all things. So clearly my answer is not the only way to make money!)

  • Shawn says:

    Thanks for the interesting interview.
    I’d also be interested to learn more about how you determine which models are dead. I know of a few methods, such as using a runs test and z-statistic, wins rate, t-test, chi-squared, etc. However, all of these require systems with high win rate percentages, and in addition stationarity needs to holding which it usually isnt when the system is going through rough periods. And, thus it’s usually bloody hard to know if the system is truly dead. So there might not be anything wrong with the system, except that it’s out of sync. As we cant determine when it might come back in sync, taking it offline may result in losses through lost opportunity cost of having the system turned off when it gets back in sync. So how do you determine if the model is dead or just having a bad time? Do you ever get back in again with a model you’ve turned off? Do you know of any useful predictive regime change filters? (I dont ask much, do I?!)

    • Original Poster says:

      So many fascinating points in this question – it truly deserves a mini essay in response. I will put together some thoughts and maybe publish them as “Part 3” of the original post series.

  • Bibi says:

    Can you comment more on the scale of these automated trading schemes?
    How much gain per transaction would be considered a good model? and on what time scale is it trading? What range of timescales are used in your industry? How much money can there be poured into a successful scheme, is this limited by how much money your fund has available or are there typically limits on the trading scheme itself?

    • Original Poster says:

      I have a few rules of thumb which I try to follow.

      For a market micro-structure trade, where there’s very little risk of a catastrophic blowup but the upside is similarly limited, I’d like to make 10x the bid-ask over a horizon of less than a month. If bid-ask is 0.5bp, I want to make 5bps with a high probability of success (after financing costs). The binding constraint on these trades is usually balance sheet: I need to make sure that the trade pays a decent return on capital locked up.

      For a more macro/thematic trade, I choose my size based on max loss and PL targets for the year. Bid-ask and balance sheet are less relevant here; it’s all about how much can I afford to lose, and how long can I hold on to the position. Obviously I use very fat tails and unit correlations in my prognosis.

      Incidentally, optimal scale changes over time. I know some of the LTCM folks, and they used to make full points of arbitrage profit on Treasuries, over a span of weeks. A decade later, that same trade would make mere ticks: a 30-fold compression in opportunity. You have to be aware of and adapt to structural changes in the market, as knowledge diffuses.

      Re time horizons: I personally am comfortable on time scales from a few weeks to a few months. The two best trades of my career were held for two years each. (They blew up, I scaled in aggressively, then rode convergence all the way back to fair value). My partner on the trading desk trades the same instruments and strategies as I do, but holds them for a few hours to a few days at most. So it’s all a matter of personal style and risk preference.

      Re capital deployment: I work for a large-ish fund, and the constraint has almost always been the market itself. (Even when the market is as large and liquid as say US Treasuries.). There’s only so much you can repo, only so many bids you can hit, before you start moving the market aggressively against you.

      Thanks for the great question btw!

      • Will says:

        Thanks for all your posts and replies so far, it’s been a very interesting discussion. I was wondering how to interpret

        “My partner on the trading desk trades the same instruments and strategies as I do, but holds them for a few hours to a few days at most”

        Is it fair to say that you are running quant strategies but that the execution / positioning / rebalancing are done on a discretionary basis? (aka some form of quant screens?) Or do you mean that he is calibrating his models such that they take trades in tighter neighbourhoods around an equilibrium value but also have tighter stop outs? I’m just a bit unclear how he could be running similar models but have significantly different holding horizons?

  • […] can read the second part of the interview here. In it, we discuss how production is a whole new ball game, and where to get ideas for new […]

  • Scott G. says:

    Model deaths seem to last a period of years then come back better than ever sometimes.
    Do you keep tracking “dead” models and will you bring them back after a “revival”?

    • Original Poster says:

      Absolutely, and this is a great point. Models do come back from the dead. US T-note futures versus cash is a classic example: it cycled between “easy money”, “completely arbitraged out”, and “blowup central” three times in my trading career. Same science in each case; all that changed was the market’s risk appetite. So I never say goodbye to a model forever; I have a huge back catalog of ideas whose time may come again.

  • Sakis Parry says:

    Thanks for sharing your insights. You mention “death of a model”, can you suggest methods for illustrating when a model is close to death as opposed to a usual drawdown?

    • Original Poster says:

      This is a hard question to answer. (See also my reply to Shawn below). I will write up some thoughts on this and publish them separately.

  • JohnOS says:

    What kind of turnaround time do you expect from the engineering colleagues coding up your strategy in C or Python? Both for the first cut implementation, and then fixes & enhancements?

    • Original Poster says:

      Depends on the strategy. I’d say the median is 4-5 weeks for the first cut, and maybe another 2-3 weeks for fixes and tweaks. Some strategies are simpler and can be brought live in a matter of days; on the other hand I remember one particular strategy that took several months to instantiate. It turned out to be super profitable so in that case it was worth it, but in general I’d want to move a lot faster than that.

      Make no mistake; once you’ve found a new source of alpha, the clock is ticking. You’re in a race to extract as much PL as possible before the opportunity fades away.

  • […] 1. A Quant’s Approach to Building Trading Strategies: Part One 2. A Quant’s Approach to Building Trading Strategies: Part Two […]

Fix This
Created with Sketch.