If-then signals

How if-then signal rules work in rules-based strategies, the common condition types, how rules nest into decision trees, and how to keep them robust.

The basic rule

An if-then signal checks a condition and picks a holding:

IF condition is true THEN hold A ELSE hold B

For example: IF the S&P 500 is above its 200-day average THEN hold stocks ELSE hold short-term bonds.

Common conditions

Type Example
Level 10-day RSI of SPY is below 30
Compare Price of QQQ is above its 200-day average
Relative 20-day return of stocks is higher than bonds
Fundamental Forward PEG is below 1.5

Decision trees

Rules can nest: the THEN or ELSE branch can itself be another if-then. TQQQ For The Long Term (FTLT) is a well-known example with several levels.

Keeping rules robust

  • Fewer branches. Every extra condition is another chance to fit noise.
  • Round numbers. A rule that only works at an RSI of exactly 27 is fragile; test 25 and 30 too.
  • A reason. Each condition should make economic sense before you test it.
  • Unseen data. See Out-of-sample testing.

On this site, Strategies are built around fundamental conditions, with market signals available as context.

See also

Last updated September 30, 2026. Education only, not investment advice.