# Build and backtest your first strategy

> A ten-minute walkthrough: open a starter pattern, read its backtest, change one rule, check the honest numbers, and save your own copy.

This walkthrough takes about ten minutes. You'll open a starter pattern, read
its backtest, change one rule, and save your own copy. By the end you'll know
your way around the builder and have seen, first-hand, the most important
lesson in backtesting.

## 1. Open the builder

Go to [the builder](https://tactfolio.com/builder). You don't need an account to look around. Under
**Start from a pattern** are four starter patterns, each with its last ten
years next to simply holding QQQ, a fund that tracks the Nasdaq-100:

| Pattern | What it does | Rules |
| --- | --- | --- |
| **Trend following** | Ride a risk-balanced growth basket while the trend holds, and step aside when it breaks. | QQQ over its 200-day average → SPY and QQQ by inverse volatility; otherwise an RSI(10) dip buy, else GLD and IEF. |
| **Buy the dip** | Hold a risk-balanced core and concentrate into a short-term pullback. | QQQ RSI(10) below 30 → QQQ; otherwise SPY, QQQ and GLD by inverse volatility, daily with a 5% drift threshold. |
| **Momentum rotation** | Rank whole baskets against each other and hold whichever is strongest. | Top 1 of QQQ, a SPY and QQQ basket, GLD, and BIL by 3-month return, monthly. |
| **Static allocation** | Spread across index, growth and gold so each contributes similar risk. | SPY, QQQ and GLD, inverse-volatility weighted, monthly with a 10% drift threshold. |

They are deliberately simple, and each was checked on two separate decades
before we put it here. They're starting points to learn from, not
recommendations.

## 2. Read a pattern's card

Each card shows three numbers:

- **Max DD** (maximum drawdown): the biggest drop from a peak. −20% means that,
  at its worst, the strategy was 20% below its previous high.
- **Sharpe**: return per unit of ups and downs. Higher means a smoother ride for
  the return you got.
- **CAGR** (compound annual growth rate): the average yearly growth.

The chart shows how $1 would have grown, and the grey line is QQQ. Look at the
drawdown first: a strategy you abandon in its worst year earns you nothing.
[Reading a backtest](https://tactfolio.com/docs/concepts/reading-a-backtest.md) explains each number in
more detail.

## 3. Use a template

Choose **Use this template** on Trend following. This step needs an account,
and creating one is free: you'll pick a public handle, the name that appears
on anything you publish later (a pseudonym is fine). Tactfolio then makes a
private copy that only you can see and opens it in the editor.

## 4. Find your way around the editor

The editor has two halves. **The tree**, on the left, holds the rules. This is
the Trend following tree:

Strategy "Trend following", which runs daily and rebalances every run:

- Weight: Equal
  - If: current price of QQQ is above 200d moving average of QQQ
    - Then:
      - Weight: Inverse vol 63d
        - **SPY**
        - **QQQ**
    - Otherwise:
      - Weight: Equal
        - If: 10d RSI of QQQ is below 30
          - Then:
            - Weight: Equal
              - **QQQ**
          - Otherwise:
            - Weight: Inverse vol 63d
              - **GLD**
              - **IEF**

In words: if QQQ is above its 200-day moving average, hold SPY and QQQ, sized
so each carries a similar amount of risk. Otherwise, if QQQ has just fallen
hard (its 10-day RSI is below 30), buy the dip in QQQ. Otherwise, wait it out
in gold (GLD) and Treasury bonds (IEF). The rules run every trading day.

Select any block to change it.

**The backtest**, on the right, reruns whenever the rules change. It shows how
the strategy grew, its drawdowns, what it held over time, and what it would
hold today. It starts with all the history available; to compare it with the
card you just saw, open the **Window** menu and choose **10Y**.

## 5. Change one thing

Find the condition that compares QQQ with its 200-day moving average. Change
200 to 150 and watch the backtest update. Did the drawdown get better or
worse? Try 100 and 250.

You'll probably find a number that looks better than 200. Before you keep it,
switch the window between **5Y**, **10Y**, and **Max**, and notice that the
best number moves. That's the lesson: on any one stretch of history, some
setting always looks best, and much of its lead is luck.
[Why past results mislead](https://tactfolio.com/docs/concepts/why-past-results-mislead.md) explains
why, and what to do about it.

## 6. Look at the honest numbers

Under the chart, the **Reality checks** table asks three uncomfortable
questions:

- **Next-day open**: what if you couldn't trade at the close, and traded the
  next morning instead? If this line is far from the main one, the strategy
  depends on precise timing.
- **Costs at 20 and 40 bps**: what if trading cost more than the default
  0.05%? If the result falls apart, it depends on cheap trading.
- **QQQ at same risk** (named after your benchmark): what if you had simply
  held the benchmark, scaled to the strategy's level of ups and downs? If this
  beats the strategy, the rules aren't adding much.

A strategy worth keeping survives all three.

## 7. Save

Choose **Save**. Each save is kept as a revision, so you can keep experimenting
without losing what worked, and go back to any earlier one. Your strategies are
listed in your [workspace](https://tactfolio.com/workspace).

On the Free plan, every strategy you save is shared with the community on
[Discover](https://tactfolio.com/strategies), so the first save asks for a description and publishes
the strategy (**Save and share**). Free builds five strategies a day, and each
one you built that day can be backtested and saved again as often as you like.
Plus and Pro save privately and build without a daily limit.

## 8. Share it, if you want to

On Plus and Pro, your strategy stays private unless you publish it. Once
published, it gets a public page with its rules and backtest, and a place in
the [Discover](https://tactfolio.com/strategies), the list of everyone's published strategies.
[Publishing and sharing](https://tactfolio.com/docs/sharing.md) covers
what that means and what can't be undone.

## Next steps

- [Builder guide](https://tactfolio.com/docs/builder.md): every block and setting.
- [Common patterns](https://tactfolio.com/docs/patterns.md): how trend filters, momentum, canaries,
  and risk balancing are built.
- [Use Tactfolio from your AI assistant](https://tactfolio.com/docs/mcp.md): describe a rule in a
  sentence and let an assistant build and test it.

## Learn the ideas behind it

- [What is an ETF](https://tactfolio.com/learn/what-is-an-etf.md): An ETF is a fund that trades like a stock. Learn how ETFs work, what they cost, the main types, and the risks, with SEC sources.
- [Backtesting](https://tactfolio.com/learn/backtesting-explained.md): What backtesting is, how to backtest a trading strategy step by step, the biases that fool people, and why out-of-sample testing matters.
- [Backtest a portfolio](https://tactfolio.com/trading-tools/backtest-portfolio.md): Backtest a portfolio of US stocks and ETFs. Enter tickers and shares, pick when to rebalance, and get the results with a link to share.
