Athena Capital

Quantitative Trading

Tom Tang Thu Sep 28 2023

Fallacy of Binary Choices

A trade appears to be a binary buy/sell choice. We all know binary choices are 50/50 odds if we ignore all other complexities. But a trade is both an entry and exit. A way to think about this is to examine possible decisions at every moment in time.

For each time interval, if there’s no active position, there are 3 possible decisions: enter-long, enter-short, or do nothing. If there’s an active position, there are two possibilities: hold position or exit position. Assuming an equal percentage of time in position as out of position, we get 3(0.5) + 2(0.5) possibilities = 2.5 possibilities. If we assume an equal distribution of outcomes between win and loss, the probability of winning randomly is 0.4. These odds are worse than playing roulette (red/black) at the casino = 0.47.

By the same logic, if you are almost always in a position, assume around 90% of the time, then the 3(0.1) + 2(0.9) possibilities = 2.1 possibilities. Again, if we assume an equal distribution of outcomes, the probability of winning randomly is 0.47, which is exactly equal to red/black at roulette but still less than 50%, which guarantees total loss on enough trades.

Theory of Winning

There are two proven market “inefficiencies” to exploit for trading. One is momentum, the other is statistical arbitrage. A popular trading strategy is a reversal or regression to the mean. In practice, reversal strategies are high-return but low probability, the expected value fluctuates from positive to negative. With mean expected value in the negative for long durations (hundreds of trades over more than 1 year). Both momentum and stat-arb rely on time-delay inefficiencies in the market.

Confounding Factors

In quantitative trading, your algo is as good as your backtesting. The backtest is the training ground for your algo. Information leak from the future is your enemy. Let’s start with a definition of the trading algorithm.

An algorithm is a function that takes in a time series X as input along with a parameter (theta) and outputs a decision: f(X, theta). For any given algorithm, it must adapt to regime changes where the conditions of the market change, and a profitable strategy is no longer effective without adjustment to the free parameters. Theta is the free parameter and must be updated over time. Let’s switch gears and explain in an example.

So you have an algorithm, you have a static theta that you’ve been tuning, and in your backtesting, you’ve shown that your theta generates immense profits. You deploy, and you start to lose money. Why?

Through fine-tuning your theta, you have leaked information from the future (you have the entire historical backtest data) that you’ve applied to the past as theta. The real future is unknowable, and therefore, a static theta cannot represent realistic profits.

So then you create a tunable theta, and in your backtesting, you tune the theta as you would in production and get a profit. This gives you a more realistic profit, but you’re likely now looking at low single-digit profits averaged across many years. In addition, the cost of running backtests is now 1000x (assuming 100x iterations of tuning per day and a 10-day lookback for tuning). This is no longer capable of running on your local machine, you’re now using cloud infrastructure.

Now you have to look at the drawdowns and ask yourself if you can stomach a 50% loss or if you would rather just put money into index funds. If you think that you are clever and simply turn off the algo when it’s not making money, then you have just introduced another layer of complexity. How to decide when to turn on or off? That introduces more difficulty in backtesting and more potential for future information leaks.

Of course, no business venture is guaranteed, risk/rewards and all that, so there will be winners, and there will be losers. The winners will talk about how great it is, and the losers will quietly exit the business of algo trading for themselves, having slowly donated their hard-earned money to the Quant Hedge-Fund du jour.

Taking your Robot to the Casino

Risk management is a fancy term for knowing when to stop. Be greedy enough to chase profits, but not so greedy that you lose too much money. At the end of the day, having an algo trade or stopping it is discretionary and up to your own personal preferences and psychological state. The algorithms and automated systems add layers of abstraction but don’t insulate you from making the big decisions: which strategy, how long to run it for, and how much money to allocate.