SignalQuarryGitHub
← Strategy library

Code examples · Code example

SMA trend demo

A small example of a moving-average allocation rule, provided to demonstrate the strategy contract.

SPYDailyAs configured

The idea

How it works

Checks whether SPY closed above its 200-session average before setting a target exposure.

Why it might work

Long trends sometimes persist after the moving average is crossed.

When it invests

A completed close above the average targets SPY exposure.

When it exits

A close below the average targets cash.

What can go wrong

  • Moving averages can respond slowly after a sudden decline.

Selected research result

Evidence is still being prepared

No historical result is cleared for public display for this strategy.

This entry has no published historical backtest.

Research history

Variants and recorded runs

Repeated and diagnostic runs remain accessible under their tested variant. No run is selected by highest return.

No historical results are visible for this strategy.