Test My Legs Guides

How to backtest a put credit spread for free

A put credit spread sells one put and buys a cheaper put below it: you collect money up front, and the put you bought limits what you can lose. Here is one put credit spread on SPX backtested by hand, on the real option prices of June 2024, in Test My Legs — free, with no broker account.

1. Start a test on a past day

In the Test panel press + New test, pick the day and the starting cash. This example starts on Monday 3 June 2024 with $100,000; SPX stood at 5,268.70 that day.

2. Open the Credit spread ticket

Press +Strat → Credit spread and type SPX. The app solves the spread from its starting values: puts, the expiry nearest 45 days out, the sold put near 30 delta and the bought put near 20 delta. Switch to calls, or change any strike or delta, if you want something else.

The Credit spread ticket for SPX on 3 June 2024: sell the 5185 put, buy the 5105 put, expiry 19 July 2024
The ticket on 3 June 2024: expiry 19 July 2024 (46 days), 80 points wide, net credit 15.05 at mid.
LegStrikeDeltaBid – ask
Sell put5,18529.946.40 – 46.80
Buy put5,10520.131.40 – 31.70

Preview showed a maximum loss of $8,000 (the 80-point width; the app shows the full width, before the credit), $8,000 of margin and about $2.17 of commission. Execute filled it: sold the 5185 put at 46.55, bought the 5105 put at 31.60 — a credit of 14.95, or $1,495, filed as the group CS-1.

3. Step through the days

Each Next day moves the prices to the next trading day's recorded values:

DaySPX5185 put (sold)5105 put (bought)Spread P&L
Mon 3 Jun 20245,268.7046.6031.55−$10
Mon 10 Jun5,356.3123.4015.30+$685
Mon 17 Jun5,482.469.606.80+$1,215
Tue 25 Jun5,466.617.054.70+$1,260
The account on 25 June 2024 with the CS-1 put credit spread showing each leg's price and the group's profit and loss
25 June 2024: the spread's two legs, each with its own P&L, and the group's total.

4. Close it

Tick the two legs and press Close → Preview → Execute. This example was closed on 25 June 2024; after commissions the account stood at $101,240.74, so this spread made $1,240.74.

What this example shows

This example is one real run in Test My Legs on the recorded SPX option prices of June 2024. It is a backtest: it shows what happened on those days, not what will happen next.

Try it on another date yourself. Test My Legs is free: pick a past day and step through it.

Start now