# 🧭 What a Quant Strategy Actually Needs

By Anh Le

## Where This Lesson Sits

This is the very first step of the course. Before you write a single line of code or download a single price file, you need a clear picture of what you are actually building. By the end of the course you will have your own strategy, tested end to end. The word "strategy" gets used loosely in trading content, so this lesson pins down exactly what it means and what it needs to work.

After this lesson you should be able to:

- Say in one sentence what a quantitative strategy is, without jargon
- Name the three inputs every testable strategy needs: data, rules, and costs
- Tell the difference between a rule a computer can run and an opinion it cannot
- List the hidden costs that make a backtest look better than reality
- Write a short strategy spec in plain words, which you will build on later

## What a Quantitative Strategy Really Is

A quantitative strategy is a fixed set of rules that takes market data in and produces trading decisions out, with no human judgment at the moment of the trade. The word "quantitative" simply means the decisions are counted, measured, and repeatable.

Compare two statements:

- "I buy tech stocks when I feel like they have momentum."
- "I buy when the 20-day average closing price is above the 50-day average closing price, and I sell when it drops below."

The first is an opinion. You cannot test it, because "feel like" is not a number. The second is a procedure. Anyone can run it on the same data and get the same answer.

Here is the loop every strategy runs, over and over:

```mermaid
flowchart TD
  Data["📊<br/>Price data"] --> Rules["📐<br/>Rules"]
  Rules --> Signal["⚡<br/>Signal"]
  Signal --> Order["📤<br/>Order"]
  Order --> Fill["💰<br/>Fill price"]
  Fill --> PnL["📈<br/>Return"]
  Costs["🧾<br/>Costs"] --> Fill
  PnL --> Costs
```

> **Note:** 
> A strategy is not a prediction. It is a procedure that has been tested on history and might still fail tomorrow. Your job is to build a procedure that is honest about its costs and its uncertainty.

## The Three Inputs Every Strategy Needs

| Input | What it is | What breaks without it |
| --- | --- | --- |
| Data | Price and volume history, adjusted for splits and dividends | Signals fire on fake jumps, returns are wrong |
| Rules | Universe, entry, exit, timing, position size | You cannot rerun the test or trust the result |
| Costs | Commission, spread, slippage, financing | The backtest reports profit that you could never collect |

**Data.** You need prices over a long enough window to see different market conditions, and they must be clean. A stock split makes a raw price drop by half overnight. If you feed that to a rule, the rule sees a crash that never happened. The next lesson handles this properly.

**Rules.** A complete rule set answers four questions: what can I trade (the **universe**), when do I enter, when do I exit, and how much do I buy? Leave out any one of them and the strategy is not a strategy, it is half an idea.

**Costs.** Every trade costs money. Commission is the broker fee. The spread is the gap between the buy price and the sell price. Slippage is the difference between the price you assumed and the price you actually get. None of these appear on a price chart, and all of them come out of your return.

In plain words, you can fill in these blanks:

> On each day, look at _____ for my _____ of assets. If my entry rule is true, buy a size set by my sizing rule at the _____. If my exit rule is true, sell. Subtract _____ from every trade.

### Quick practice

For each statement, decide whether it is a testable rule or an opinion.

1. "Only buy stocks above $10."
2. "Only buy stocks that look strong."
3. "Exit when the price falls 8% below my entry."
4. "Avoid companies with bad management."

**Click to reveal the answers**

1. Testable. $10 is a number and can be checked in data.
2. Opinion. "Strong" has no definition until you attach a measurement to it.
3. Testable. Entry price and 8% are both computable.
4. Opinion as written. If you replaced "bad management" with a measurable number, say a falling earnings trend, it would become testable.

## Making It Actually Testable

A rule is testable only if a computer can evaluate it using information that existed **before** the trade. That second condition is where beginners lose the most money without noticing.

**Lookahead bias** means using information you could not have had at the time. For example: "Buy at today's open if today's close is higher than today's open." At the open, you do not yet know the close. The rule is impossible to trade, but a naive backtest will happily report profits from it.

To avoid it, always state the timing explicitly. A safe pattern is: measure the signal using today's close, then trade at tomorrow's open. That is a sequence a real person could have followed.

**Position sizing** belongs in the rules too. "Buy some shares" is not testable. "Put 10% of the portfolio into each position" is. Later in the course you will refine this, but decide something now so your first test is runnable.

### Quick practice

Find the problem in each rule.

1. "Sell the day before the stock reports bad earnings."
2. "Enter at tomorrow's open when the 20-day average crosses above the 50-day average using today's close."

**Click to reveal the answers**

1. You cannot know earnings are bad before they are reported. This is lookahead bias dressed up as foresight. A testable version would react to the earnings after the announcement.
2. This one is sound. The signal uses information available at the close, and the trade happens at the next open.

## Costs: The Part Beginners Skip

Costs are small per trade and enormous across many trades. Suppose your strategy trades once a day and each round trip costs 0.05% of the position. That is 0.05% × roughly 250 trading days, about **12.5% per year** in costs alone. A strategy with a 6% annual edge before costs is a losing strategy after them.

The practical rule of thumb: the more often a strategy trades, the larger its edge per trade must be. Slow strategies can survive on thin edges. Fast strategies cannot.

### Quick practice

Your first backtest shows a strategy that trades 200 times a year, with a 9% annual return before costs and 0.06% cost per round trip. Roughly what is the return after costs, and what should you do next?

**Click to reveal the answer**

Costs are about 0.06% × 200 = 12%, which is larger than the 9% edge. The strategy loses money after costs. Do not throw the idea away immediately. Instead, test a slower version with fewer trades to see whether the edge survives.

## Beginner Traps and Rules of Thumb

- **If you cannot write the rule as an if/then sentence with numbers in it, it is not a rule yet.** Rewrite it until it is.
- **Always write down the timing.** Signal at the close, trade at the next open, is the safest default for a beginner.
- **Never test a strategy without costs.** A cost-free backtest is a fantasy, and it will teach you the wrong lesson.
- **One idea per strategy.** If your rules contain three unrelated reasons to buy, you will never learn which one worked.
- **Expect to be wrong.** The point of the first backtest is to learn, not to get rich.

A complete rule set specifies the _____, entry, exit, and _____.
The gap between the price you assumed and the price you actually got is _____.

## Review Deck

Front: In one sentence, what is a quantitative strategy?
Back: A precise, repeatable set of rules that turns market data into trading decisions without human judgment at decision time.

Front: What three inputs does every testable strategy need?
Back: Data, rules, and costs.

Front: What makes a trading rule testable?
Back: A computer can evaluate it using only information available before the trade.

Front: What is lookahead bias?
Back: Using information in a rule that did not yet exist when the trade would have happened.

Front: What four things must a complete rule set specify?
Back: Universe, entry, exit, and position size.

Front: What is the universe of a strategy?
Back: The fixed list of assets the strategy is allowed to trade.

Front: What is the bid-ask spread cost?
Back: You buy at the higher ask and sell at the lower bid, so each round trip loses the spread.

Front: What is slippage?
Back: The gap between the price the backtest assumed and the price the order actually fills at.

Front: Why do fast strategies need larger edges per trade?
Back: Costs are paid per trade, so many trades multiply total cost and can erase a thin edge.

Front: What timing pattern is the safe default for beginners?
Back: Measure the signal at today's close and execute at the next open.

Front: Why is a strategy not a prediction?
Back: It is a tested procedure that may still lose money in the future.

Front: Why must price data be adjusted for splits and dividends?
Back: Raw prices jump on corporate actions, which creates fake signals and fake returns.

Front: Why is 'buy stocks that look strong' not a strategy?
Back: 'Strong' is undefined, so a computer cannot evaluate it and the test cannot be rerun.

## Taking Stock Before the Data Work

You now have the shape of the whole project. A quantitative strategy is rules plus data plus costs, and it only counts as testable when a computer could have run it in real time without peeking at the future.

Three things to carry into the rest of Module 1:

- Rules must be written as if/then statements with numbers.
- Timing is part of the rule, not an afterthought.
- Costs belong in the test from day one.

Your capstone in Module 3 will need all of this. For now, try writing your strategy idea as four sentences: universe, entry, exit, and position size.

Next up: **Getting and Cleaning Price Data**, where you will pull real prices and fix the splits, gaps, and messy rows that would otherwise quietly corrupt everything you build on top of them.

---

## Contents

Part of [📊 Quantitative Trading for Beginners: Build and Backtest a Strategy](https://everwise.study/courses/quantitative-trading-for-beginners-build-and-backtest-a-strategy.md)

- **📈 Market Data and Return Statistics**
  - [🧭 What a Quant Strategy Actually Needs](https://everwise.study/courses/quantitative-trading-for-beginners-build-and-backtest-a-strategy/what-a-quant-strategy-needs.md) — this lesson
  - [🗂️ Getting and Cleaning Price Data](https://everwise.study/courses/quantitative-trading-for-beginners-build-and-backtest-a-strategy/getting-and-cleaning-price-data.md) (sign-in required)
  - [📉 Returns, Volatility, and Time Series Basics](https://everwise.study/courses/quantitative-trading-for-beginners-build-and-backtest-a-strategy/returns-volatility-and-time-series-basics.md)
  - [✅ Checkpoint: Market Data and Statistics](https://everwise.study/courses/quantitative-trading-for-beginners-build-and-backtest-a-strategy/checkpoint-market-data-and-statistics.md)
- **🧪 Strategy Design and Backtesting**
  - [📝 From Idea to Testable Trading Rules](https://everwise.study/courses/quantitative-trading-for-beginners-build-and-backtest-a-strategy/from-idea-to-testable-trading-rules.md)
  - [🧮 Building the Backtest: Fills, Slippage, and Fees](https://everwise.study/courses/quantitative-trading-for-beginners-build-and-backtest-a-strategy/building-backtest-fills-slippage-and-fees.md)
  - [🔍 Reading Results and Avoiding Overfitting](https://everwise.study/courses/quantitative-trading-for-beginners-build-and-backtest-a-strategy/reading-results-and-avoiding-overfitting.md)
  - [✅ Checkpoint: Strategy Design and Backtesting](https://everwise.study/courses/quantitative-trading-for-beginners-build-and-backtest-a-strategy/checkpoint-strategy-design-and-backtesting.md)
- **🛡️ Risk Control and Capstone Build**
  - [⚖️ Position Sizing and Core Risk Metrics](https://everwise.study/courses/quantitative-trading-for-beginners-build-and-backtest-a-strategy/position-sizing-and-core-risk-metrics.md)
  - [🏗️ Capstone: Build and Backtest Your Own Strategy](https://everwise.study/courses/quantitative-trading-for-beginners-build-and-backtest-a-strategy/capstone-build-and-backtest-your-strategy.md) (premium content)
  - [✅ Checkpoint: Risk and Capstone](https://everwise.study/courses/quantitative-trading-for-beginners-build-and-backtest-a-strategy/checkpoint-risk-and-capstone.md) (premium content)
- [Course cheatsheet](https://everwise.study/courses/quantitative-trading-for-beginners-build-and-backtest-a-strategy/cheatsheet.md) (premium content)
