NVDA Two Key Turn: an open-source trading model for NVIDIA
A long-or-short NVIDIA model built by Claude Fable 5.2: a trend key and a rates key, the backtest, the filters that failed, and the risks.
Michael Wolf
TickerDB provides market data for AI agents. We use the latest AI models to research and develop trading models. Each model is open sourced under the MIT license.
This model trades NVIDIA (NVDA). It's called NVDA Two Key Turn, and Claude Fable 5.2 built it. It's open source and free to run.
In our benchmarks, an AI agent doing research and building models like this one was 6.2x faster with TickerDB and used 55% fewer tokens than with a standard market data API.
modelNVDA
NVDA Two Key Turn returned +12,351% over the backtest, outperforming NVDA's +3,641% and ending 3.3× its result.
$10,000 in the model (white) against $10,000 of NVDA bought and held (purple), July 2019 to November 2026.
The rules
The model is always in NVDA, long or short. It decides once a day at the close and trades at the next open. It watches two keys:
Trend key: NVDA's 100-day average has stopped rising.
Rates key: the 2-year Treasury yield is above its level 126 sessions (about six months) earlier.
While at most one key has turned, the model holds NVDA. When both turn, it sells and goes short. When either key clears, it covers and buys NVDA back. That's the name: a sale takes two keys turning at once.
NVDA daily bars and trend fields, and the 2-year Treasury yield, from TickerDB, point in time
Signals
At the close, using only data up to that close
Fills
Next open
Costs
0.10% per side; shorts pay no borrow fee and earn no interest
Position
100% of the balance, long or short
Benchmark
NVDA bought and held
Results
NVDA's worst fall since 2019 was 66%, most of it in 2022. That year the Fed raised rates fast and NVDA's trend broke at the same time. A trend rule alone sells NVDA too often: most dips recover. Waiting for rates to rise as well filters out most of those dips and kept the big one.
Stats
model
124.5×
NVDA
37.4×
stat
NVDA
model
$374,077
$1,245,113
+3,641%
+12,351%
+63%
+92%
-66%
-38%
NVDA Two Key Turn grew faster than NVDA (+92% vs +63% a year), with a shallower worst fall (−38% vs −66%).
What $10,000 grew to in each.
Model
NVDA held
Growth
124.5x
37.4x
CAGR
+92%
+63%
Max drawdown
-38%
-66%
Sharpe ratio
1.62
1.22
Closed trades
29
1
Win rate
62%
Average trade
+26%
Time short
14%
0%
Sharpe ratio from daily returns, annualized over 252 days, with no risk-free rate. A short has been open since November 5, 2026.
What we tested
Fable 5.2 started with trend rules alone, then looked for a second key: something outside NVDA's chart that confirms a broken trend is worth selling. It tested 656 band values from the TickerDB API this way. Here is a sample, each paired with the 100-day trend key and run with today's rules (short when both turn).
Second key
Growth
CAGR
Max DD
Sharpe
Switches
2-year yield rising (live)
120.4x
+92%
-38%
1.61
29
Fed tightening
132.6x
+94%
-38%
1.63
11
Chip sector trend falling
78.2x
+81%
-40%
1.48
15
Inflation heating
58.6x
+74%
-44%
1.37
10
NVDA volatility extreme
52.1x
+71%
-52%
1.32
15
SPY below its 200-day average
36.7x
+63%
-49%
1.26
16
Market in bear or correction
36.3x
+63%
-44%
1.24
26
P/E above 80
33.1x
+61%
-66%
1.19
4
Credit tightening
32.1x
+60%
-56%
1.19
14
Revenue growth slowing
17.4x
+47%
-65%
1.02
10
These tables come from our research replay of the rules. It books trades the same way as the model page, and its live row lands within 2% of the page's figures.
Rates are the key that works. The Fed-tightening band did slightly better than the 2-year yield here. It's another measure of the same thing, rising rates; the model uses the 2-year yield, the measure chosen in the original research. Market and credit filters added little. Valuation and revenue growth did worst: they rarely lined up with NVDA's falls.
Neither key works alone, and the short only pays because both keys must agree.
Rule
Growth
CAGR
Max DD
Sharpe
NVDA bought and held
38.4x
+64%
-66%
1.23
Trend key alone, short
37.0x
+63%
-38%
1.27
Trend key alone, cash
44.1x
+67%
-38%
1.39
Rates key alone, short
6.9x
+30%
-90%
0.74
Both keys, cash
78.7x
+81%
-38%
1.53
Both keys, half-size short
99.7x
+87%
-38%
1.59
Both keys, short (live)
120.4x
+92%
-38%
1.61
The first version of the model went to cash (a T-bill fund) when both keys turned. Shorting instead added about 11 points of CAGR with the same max drawdown, so the live model shorts.
The trade that made the backtest
NVDA longshort100-day averageOct 2021 to Oct 2023
$10$20$50NovMarJulNovMarJulsell and short $26.73long +87%cover and buy $16.10short +40%
In early April 2022 the 100-day average turned down while the 2-year yield was climbing fast. On April 4 the model sold NVDA at $26.73 (split-adjusted), up 87% on that long, and went short at the same open.
NVDA fell for most of the year. On November 23 its 100-day average turned up again and the model covered at $16.10, up 40% on the short. NVDA held fell 50% in 2022. The model made 59%.
The rest of the shorts are small. The model was short only 14% of the time, and many of those stretches lasted a few days.
Robustness
The model was ahead of NVDA bought and held on 85% of days.
Edge
model beats NVDA by
3.33×
stat
edge
3.33×
0.82×
85% of days
+18%
NVDA Two Key Turn beat NVDA by 3.3× and was ahead 85% of the time.
The model's balance divided by NVDA's, day by day. Above 1x, the model was ahead.
The settings sit on a plateau for the rates key, but not for the trend key. A 100-day average works; 50 and 200 days do much worse.
Setting
Growth
CAGR
Max DD
Switches
Trend: 20-day average
13.6x
+43%
-70%
67
Trend: 50-day average
27.4x
+57%
-60%
35
Trend: 100-day (live)
120.4x
+92%
-38%
29
Trend: 200-day average
29.4x
+58%
-69%
7
Rates: 21 sessions
65.0x
+76%
-44%
35
Rates: 63 sessions
104.8x
+88%
-38%
25
Rates: 126 sessions (live)
120.4x
+92%
-38%
29
Rates: 252 sessions
123.3x
+92%
-38%
13
Each row changes one setting and keeps the other at its live value.
Two checks outside the sample:
NVDA before 2019. From October 2015 to December 2018, years the rules were not chosen on, the same rules made 14.4x against 4.9x for NVDA held, with a 32% max drawdown instead of 56%. TickerDB's macro rows start in 2019, so this test uses a stand-in for the rates key: a 1-3 year Treasury fund below its price six months earlier.
Other tech stocks. On 21 other tech and chip stocks since July 2019, the rules beat buying and holding on CAGR in 14 and on Sharpe ratio in 14.
Risks
A few shorts carry the edge. Most of the gain over NVDA comes from three shorts: 2022, spring 2025 and November 2026. Going to cash instead of shorting still beats holding NVDA, but by less.
CAGR
Model, long or short
+92%
Same keys, cash instead of short
+81%
NVDA bought and held
+63%
It lags in strong years. In 2021 and 2023 the model trailed NVDA by 33 and 107 points. Short stretches in a rising market cost money.
Yearly ROI
modelNVDA
avg +90%
avg +84%
'19
'20
'21
'22
'23
'24
'25
'26
year
NVDA
model
2026
-19%
+3.8%
2025
+39%
+91%
2024
+171%
+171%
2023
+239%
+133%
2022
-50%
+59%
2021
+125%
+92%
2020
+122%
+122%
2019
+45%
+47%
NVDA Two Key Turn beat NVDA in 4 of 8 years; its best year was 2024 at +171%.
Calendar-year returns. 2019 and 2026 are part years.
In-sample. The rules and settings were chosen on 2019 to 2026 data. Expect weaker live results.
Shorts have no stop. A short loses for as long as the stock rises. On Super Micro (SMCI), one of the other stocks tested, a short lost more than the whole balance.
Whipsaws. When the 100-day average hovers around flat, the model can flip every few days. In March and April 2021 it switched 12 times in five weeks, at a small loss.
Crashes without a rate rise. The March 2020 drop was not rate-driven, so the model held through it. That's the 38% max drawdown.
Costs. The backtest charges 0.1% per side and no borrow fee. Real short costs can be higher.
Run it for free
The code is open source on GitHub under the MIT license: the rules, the backtest, the tests and every trade.
You don't need to write code to run it. Open it in Claude or ChatGPT. Your assistant sets it up, checks the model every day and tells you when it trades. One daily check fits in TickerDB's Free plan.