Rules and systems

Algorithmic trading and quant strategies, explained as plain rules

Written by

Reviewed by

Arpit AgarwalCharvi AgarwalThe Amaltash Team

Updated · Published

The short answer. Algorithmic trading means a computer follows fixed rules to decide when, where and how to trade. Quant funds use it to run strategies such as momentum, trend following, mean reversion, pairs trading and value. Each one is a rule. Each one also has a known way to fail.

How much gain does a loss need to recover?

-%
%

Leave blank to skip. No return is assumed for you.

Gain needed to get back to even
+42.9%
-10% loss needs+11.1%
-20% loss needs+25.0%
-30% loss needs+42.9%
-50% loss needs+100.0%

Hypothetical illustration based on your inputs. Not a prediction, a recommendation, or the performance of any Amaltash strategy.

Turn this into a rule

Each month, compare SPY, QQQ and GLD by their 12-month price change. Hold the one with the highest change, but only if it is above its 200-day moving average; otherwise hold T-Bills.
Turn this into a rule

Opens the Strategy Builder with this rule filled in. It starts building after a 3-second countdown; type to stop it. Nothing trades until you deploy.

What is algorithmic trading?

Algorithmic trading is trading done by a computer that follows set rules. SEC staff wrote in an August 5, 2020 report that algorithms decide “when, where, and how to trade.”

There are two main kinds of algorithmic trading. Execution algorithms split a big order into small pieces over time, so it moves the price less. Strategy algorithms decide what to buy or sell in the first place.

This page is about the second kind. Quant hedge funds run many of these rules at once. Some public funds work this way too. Investor.gov says quant funds pick holdings with “numerical methods like quantitative analysis or algorithms.”

Big quant funds also have tools most people lack. They can short, borrow, trade futures, trade very fast and buy costly data. But the core ideas fit in one sentence each.

Quantitative hedge fund strategies, as plain rules

Each row is a simple version of a well-studied idea. Real funds add many more details. The “how it fails” column matters as much as the rule. For the wider picture, see these hedge fund strategies.

Quant strategy families: the rule, and how it fails

Strategy The rule in plain English How it typically fails
Cross-sectional momentum Rank assets by their past 12-month return. Hold the top group; avoid or short the bottom. Sharp reversals after a market bottom, when past losers bounce fastest
Trend following (time-series momentum) Hold an asset while its price is above its long-term average; step aside when below. Whipsaw in sideways markets; late at turning points
Mean reversion Buy after an unusually big drop; sell after an unusually big rise. The move was the start of a new trend, not noise
Pairs trading (statistical arbitrage) When two related stocks drift apart, buy the cheaper one and short the pricier one until they meet. The link between them breaks; crowded exits
Value Hold stocks that are cheap compared with their earnings or book value. Cheap stocks stay cheap, or get cheaper, for years
Carry Hold assets that pay a higher yield than they cost to hold. Sudden reversals when markets panic
Risk parity and volatility targeting Size each holding so each adds similar risk; cut size when price swings grow. Assets fall together; borrowed money makes losses bigger

Source: Jegadeesh and Titman (1993); Fama and French (1993); Moskowitz, Ooi and Pedersen (2012); Daniel and Moskowitz (2016); Khandani and Lo (2007).

What is a momentum strategy?

A momentum strategy buys what has been rising and avoids or sells what has been falling. It bets that recent winners keep winning for a while.

There are two kinds. Cross-sectional momentum compares assets with each other. Jegadeesh and Titman (1993) studied stocks ranked this way and held for 3 to 12 months. Time-series momentum looks at each asset on its own, which is trend following.

Moskowitz, Ooi and Pedersen (2012) found time-series momentum in each of the 58 markets they studied. These were futures on stock indexes, currencies, commodities and bonds.

Momentum’s known weak spot is the crash. Daniel and Moskowitz (2016) found momentum crashes come in “panic” states. That means after markets fall, when prices swing wildly, and as markets rebound. It is often right after a stock market crash, when past losers bounce back first.

What is a mean reversion strategy?

A mean reversion strategy bets that a price that moved too far will move back toward its average. “Mean” just means average. The rule buys after an unusually big drop and sells after an unusually big rise.

Here is a made-up example rule. Buy a stock fund when it falls 10% below its 20-day average. Sell when the price gets back to that average.

Pairs trading is mean reversion between two stocks. When two related stocks drift apart, the rule bets they will come back together.

It fails when the move was not noise. Sometimes a big drop is the start of a new trend. Or the link between two stocks breaks for good. Momentum and mean reversion bet on opposite things, so know which one your rule is.

What is factor investing?

Factor investing picks stocks by a shared trait, called a factor. A factor is a trait some believe makes stocks do better or worse than the market. Investor.gov lists value, dividends and quality as common factors.

The idea goes back to research like Fama and French (1993). They described stock returns with three factors: the whole market, company size and value.

Public “smart beta” funds use factors too. Investor.gov notes they typically cost more than traditional index funds. It adds that they may not even keep up with the market.

Be careful with famous factors. Researchers have tested hundreds of them, so some are flukes. Harvey, Liu and Zhu (2016) argue a new factor should pass a much tougher test. Their bar is a statistics score, called a t-ratio, above 3.0.

Why every quant strategy has a bad stretch

A strategy that earns money takes a risk others avoid, or uses a habit others have. Both can turn against it. Momentum has crashed when markets rebounded sharply. Value has gone through long stretches of lagging the broad market.

Crowding adds a second risk. When many funds hold the same trades, one forced sale can push prices against all of them. Khandani and Lo studied one such week, starting August 6, 2007. Many quant stock funds lost money at once as similar trades were sold together.

Patterns found in old data can weaken once they are published and more money trades on them. Papers also often ignore costs a real fund pays. So treat any famous pattern as an idea to test. Read what is backtesting before you trust a test.

That is why drawdown depth and recovery time matter more than an average. A drawdown is a fall from a high. The calculator on this page shows how much a portfolio must gain to get back to even.

Writing a quant idea as your own rule

Simple algorithmic trading does not need a hedge fund. In Amaltash’s Strategy Builder, you describe a rule in plain English for US stocks or ETFs. The engine writes exact rules for buying, selling and sizing, with guardrails such as stop-losses and drawdown limits. You can read the rules, backtest them on past data and paper trade them.

Nothing trades until you deploy. But keep two limits in mind.

One sentence can be turned into rules in more than one way, so check the rules carefully. Some ideas above need short selling, borrowed money or many securities at once. A simple long-only rule will not capture those.

  1. Pick one idea and write it in one sentence.
  2. Write its failure mode next to it, from the table above.
  3. Add a guardrail aimed at that failure mode, such as a drawdown limit.
  4. Test on data you did not use to design the rule, then paper trade.

Risks and limits

  • Overfitting: quant rules tuned on historical data can capture noise, and many published factors may not persist.
  • Look-ahead bias: research or backtests that use data not available at the time overstate what a strategy could have done.
  • Past results do not predict future results. Patterns weaken, markets change and crowded trades unwind together.
  • The model can be wrong: a rule may be encoded differently from the idea, and simple versions miss parts of the real strategy.
  • Guardrails reduce but cannot eliminate losses, and leverage or shorting can lose more than the amount invested. You can lose money.

Frequently asked questions

Is algorithmic trading legal?

Yes. Algorithms are broadly used across US stock and bond markets, an SEC staff report found in 2020. The usual securities rules still apply, and so do fraud laws.

Is algorithmic trading the same as automated trading?

Mostly, and people often use the two terms for the same thing. Both mean software places trades by set rules, without a person clicking each one.

What is a quantitative hedge fund?

A hedge fund that makes most decisions with computer models and set rules applied to data. A manager does not judge each trade case by case.

What is the difference between momentum and trend following?

Momentum compares assets with each other and holds the relative winners. Trend following looks at each asset on its own. It holds an asset only while its own price is rising.

Can individual investors use quant strategies?

Simple, long-only versions of some ideas can be written as rules. One example is trend following across a few ETFs. Strategies that need borrowed money, shorting or very fast trading are much harder to copy.

Do quant strategies still work?

No one can say a strategy will work in the future. Many patterns have weakened after they were published, and every family has had long or sharp losing stretches.

Sources

Share this article

Educational content published by Amaltash Advisors LLC. Nothing here is investment advice or a recommendation to buy or sell any security. All investing involves risk of loss, including loss of principal, and past performance does not guarantee future results.

Get started