PEP RSI(7) Threshold Backtest

HISTORICAL BACKTEST · PEP DAILY

What this backtest found

2017-12-20 to 2026-10-01 · $10,000.00 USD starting capital · costs as specified below

The strategy returned -15.75% over the full test period, compared with 5.97% for buy and hold. It underperformed that benchmark on total return. Its largest decline from a previous equity high was 26.46%.

Modify this strategy
Total return-15.75%
Profit factor0.82
Longest losing streak3 trades
Best closed trade7.62%
Worst closed trade-8.4%
Longest drawdown duration2402 calendar days
Ending equity$8,425.07
Closed trades40
Win rate50%
Average winner3.23%
Average loser-3.73%
Average holding period12.5 sessions
Time invested22.94% of sessions

CAGR is the equivalent compounded yearly return across these dates, not the return earned in every year. Drawdown measures the largest fall from a previous daily equity high. Ending equity includes any open position marked to the final close.

How this strategy works

PEP is tested on daily bars with one long position at a time. Entry conditions are combined using AND: every condition must match. A close signal executes at the next session’s open.

  • Entry: RSI(7) below 25.
  • Indicator exit: RSI(7) above 65. It executes at the next open.

RSI: Wilder’s smoothed average gains and losses produce an oscillator from 0 to 100. Each RSI period and threshold comes from the rules above. “Below 30” tests the current reading; “crosses above 30” requires a move from 30 or below to above 30. RSI can remain near extreme readings for extended periods; a threshold does not guarantee a reversal.

5% fixed stop: measured from the raw entry open, before execution slippage and fees. Opening gaps fill at open; otherwise daily high/low touches determine fills. A stop takes priority when both stop and target touch in one daily bar.

Holding limit: queue an exit after 15 invested sessions and execute at the next available open. Entry and exit sessions count toward the displayed holding period.

Strategy versus buy and hold

Both curves start with $10,000.00 USD and use the same historical dates. Buy and hold returned 5.97% (0.66% annualized), with 35.89% maximum drawdown.

● Strategy ● Buy and hold

Drawdowns over time

● Strategy ● Buy and hold

Annual performance

YearStrategyBuy and holdClosed tradesWorst ongoing drawdown
2017 (partial)0%1.06%00%
2018-1.14%-7.87%57.15%
20195.94%23.71%34.76%
2020-7.26%8.51%318.73%
20211.87%17.13%316.76%
2022-2.32%4%519.5%
2023-8.31%-5.99%622.71%
2024-1.4%-10.47%623.69%
2025-0.17%-5.62%526.46%
2026 (partial)-3.42%-12.39%424.69%

Annual returns use the previous year’s final equity, or initial capital for the first year. Ongoing drawdown retains the previous all-time peak, including peaks in earlier years.

Execution risk observed in this test

A 5% stop did not cap every loss: the trade exiting on 2020-03-12 lost 8.4% after opening beyond the stop. Daily gaps can bypass the intended exit level.

What these results mean

The strategy’s -1.93% annualized return was 2.59 percentage points below the long buy-and-hold benchmark’s 0.66%. Its worst daily peak-to-trough decline was smaller by 9.43 percentage points. That is a return/drawdown trade-off, not proof of better risk-adjusted performance. It held a position during 22.94% of sessions; cash earned no interest in this simulation.

Across 40 closed trades, 50% were profitable. The average winner was 3.23% and the average loser was -3.73%. Profit factor was 0.82: $0.82 of positive closed-trade P&L for each $1 of losses. The longest losing run was 3 trades. Win rate alone does not capture the size of wins and losses.

The weakest displayed calendar period was 2023 at -8.31%. First and last years may be partial. A full-period average can hide substantial variation.

The longest observed drawdown lasted 2402 calendar days, with 1653 underwater sessions, from 2020-03-04 to 2026-10-01. It was still unrecovered at the end of the test; its eventual duration is unknown.

Best closed trade: 7.62% · 2025-01-13 to 2025-01-28, exiting because of indicator exit.

Worst closed trade: -8.4% · 2020-02-28 to 2020-03-12, exiting because of gap below stop.

Fees and slippage are 0% and 0% per side. This is a zero-cost simulation; adding execution costs can reduce results. This report contains no out-of-sample validation or parameter robustness study, so it does not establish that these rules generalize.

Price, trades and active exit levels

● Daily close ● Fixed stop (5%)

RSI

● RSI(7)

Price circles show executed entries and exits; select a circle to open its trade. Triangles mark individual crossover conditions, not executed orders: other conditions and the existing position can prevent execution. Dashed exit levels apply only while a position is held. All charts share the same date range. Zoom in/out, select a year, or pan on any chart to update them together.

Trade history

Show 40 closed trades
EntryExitEntry $Exit $ReturnReason
2018-02-062018-02-28112.44111.00-1.28%Holding limit
2018-03-232018-04-16108.15109.751.48%Holding limit
2018-04-232018-05-02102.5597.42-5%Stop
2018-05-032018-05-2497.59100.312.79%Indicator exit
2018-10-032018-10-22109.21110.090.81%Indicator exit
2018-12-202019-01-14110.20107.85-2.13%Holding limit
2019-08-062019-08-20124.85132.806.37%Indicator exit
2019-11-112019-11-27133.03135.732.03%Indicator exit
2020-02-282020-03-12133.31122.11-8.4%Gap below stop
2020-03-132020-03-16120.68114.65-5%Stop
2020-10-292020-11-11133.62142.406.57%Indicator exit
2021-01-252021-02-16138.02134.21-2.76%Holding limit
2021-02-262021-03-19130.67132.411.33%Holding limit
2021-09-292021-10-08151.44156.573.39%Indicator exit
2022-01-272022-02-17170.97166.00-2.91%Holding limit
2022-02-252022-03-10164.42155.60-5.36%Gap below stop
2022-03-112022-03-23155.21164.335.88%Indicator exit
2022-06-142022-06-27160.30166.123.63%Indicator exit
2022-08-312022-09-22173.81168.40-3.11%Holding limit
2023-01-062023-01-19178.70169.77-5%Stop
2023-01-202023-02-10168.29173.553.13%Holding limit
2023-05-232023-06-14186.49182.00-2.41%Holding limit
2023-08-182023-09-11178.90176.99-1.07%Holding limit
2023-09-272023-10-05172.17163.56-5%Stop
2023-10-062023-10-27158.78162.022.04%Holding limit
2024-03-062024-03-19162.23171.105.47%Indicator exit
2024-05-302024-06-12171.40162.83-5%Stop
2024-06-132024-07-08162.32163.060.46%Holding limit
2024-09-232024-10-14170.87174.962.39%Indicator exit
2024-10-302024-11-15166.99158.64-5%Stop
2024-11-182024-12-10159.28158.97-0.19%Holding limit
2024-12-202025-01-10150.70143.17-5%Stop
2025-01-132025-01-28142.79153.677.62%Indicator exit
2025-04-092025-04-25140.25133.24-5%Stop
2025-05-072025-05-29130.94130.86-0.06%Holding limit
2025-11-072025-11-19142.98148.383.78%Indicator exit
2026-01-052026-01-15141.66146.033.08%Indicator exit
2026-03-192026-04-10153.96157.162.08%Holding limit
2026-06-022026-06-24141.54142.020.34%Holding limit
2026-09-172026-09-21134.77128.03-5%Stop

Exact rules and methodology

Read the strategy-specific explanation above.

  • Signals use completed daily bars; entries and indicator/holding exits execute at the next session open. Indicators warm up using earlier history; no pre-range entry signal is carried in.
  • Opening stop/target gaps execute at open. Otherwise a scheduled indicator/holding exit executes at open; within a bar, stop takes priority if both stop and target touch.
  • Initial capital $10,000.00 USD; one fully allocated fractional position, no pyramiding or leverage. Fees and adverse slippage apply to entry and exit. Buy-and-hold benchmark is always long.
  • Open positions are marked at the last close without an assumed final sale fee. Cash interest and dividends are excluded.

Results are calculated on the supplied daily prices. Dividends and cash interest are excluded.

Calculated: 2026-10-03 22:16:23 UTC. Engine: 3.1. Data: PEP, 2017-12-20–2026-10-01.

Dataset fingerprint0e9e2e97257bc4fad118c506eb5412a95b65216eeed44a5f7b4e3a2bffb5ff6c

Related backtests

These are separate saved tests. Compare dates and costs before comparing results.

Understand the metrics

What is CAGR?

The equivalent compounded yearly growth across the test’s elapsed calendar dates. It is not the return earned in each year.

What are drawdown and drawdown duration?

Drawdown is the percentage decline from a previous daily equity peak. Longest drawdown duration is the longest observed calendar time from a peak until that equity level is regained, or until the test ends. Underwater sessions count daily closes below the peak and exclude the recovery close. This duration need not belong to the deepest drawdown. “Unrecovered at test end” means the recovery date is unknown.

How is profit factor calculated?

Gross positive dollar profit divided by the absolute sum of negative dollar profit across closed trades, after configured costs. It excludes open positions. Because capital compounds, later trades can have greater dollar weight. Legacy reports without saved dollar P&L use reconstructed amounts from rounded trade returns and are labeled approximate. No losses gives “No losing trades,” not a finite ratio.

What are best/worst trade and losing streak?

Best and worst rank closed trades by percentage return. Longest losing streak counts consecutive closed trades with negative returns; a zero-return or positive trade breaks the streak. These statistics do not forecast future outcomes.

How are holding period and time invested measured?

Holding periods count sessions inclusively, including entry and exit sessions. Time invested is the share of sessions with a position at any point; it does not measure intraday hours. Average winners and losers use closed-trade percentage returns.

Educational historical simulation, not investment advice.

As an Amazon Associate I earn from qualifying purchases.