Explore more topics
Fundamentals

How to build a trading strategy with fundamentals

Build a fundamentals strategy step by step, worked through a real backtest against SPY: Cheap S&P 500 cash generators.

Jump to a section

Cheap S&P 500 cash generators

Value (%)

Cheap S&P 500 cash generators against SPY, percent from the first day, Oct 2021 – Sep 202699.8%-16.9%2021-10-012026-09-30
Strategy 2026-09-30
82.36%
SPY 2026-09-30
88.51%
StrategySPYHistorical simulation
Test window
Oct 2021 – Sep 2026
Starting balance
$100,000
Fee per trade
0.1%
Benchmark
SPY

This is the result. The four steps below show how the strategy was built and tested.

1. Describe the idea to Aurora

A prompt like this one describes the strategy in plain English.

“Build a portfolio that follows these rules. Universe: S&P 500 members. Keep stocks with P/E between 0 and 20. Keep stocks with positive free cash flow. Hold the 20 with the highest free cash flow relative to market cap. Equal weight, rebalanced monthly. Backtest it between Oct 1, 2021 and Sep 30, 2026 with $100,000 to start, a 0.1% fee on each trade, SPY as the benchmark.”

2. Check the rules Aurora writes

These are the exact rules the backtest ran.

  1. Rule 1

    Universe: S&P 500 members.

  2. Rule 2

    Keep stocks with P/E between 0 and 20.

  3. Rule 3

    Keep stocks with positive free cash flow.

  4. Rule 4

    Hold the 20 with the highest free cash flow relative to market cap.

  5. Rule 5

    Equal weight, rebalanced monthly.

3. Backtest it against SPY after fees

147 different stocks were held over the five years.

Strategy return
+82.4%
SPY return
+88.5%
Largest fall
−24.6%
Sharpe ratio
0.72
Closed trades
1,271
Fees paid
$5,403

4. Test it on dates it never saw

Next, run a walk-forward test, which freezes the rules and checks them on later dates they never saw. See a walk-forward test on unseen dates

The results describe historical observations. They do not establish live trading performance.

Continue exploring