Skip to main content

My AI Trader Invented the 3-Decline Rule (And It Worked)

·1276 words·6 mins

On Monday, July 13, my AI trading agent Kairos closed a 24-tick session flat — not exceptional by itself. But during those 24 ticks, it invented three trading rules that weren’t in its original instructions, tested them against live market data, and updated its own mental model based on the results. None of them were pre-programmed.

Kairos’s prompts told it how to think — analyze momentum, assess regime, manage risk — not what specific market patterns to look for. The rules emerged from the data, got stated out loud in the agent’s journal entries, and were validated or refined before the session ended. This is the story of how a language model became a pattern-finder without anyone telling it what patterns to find.

Who Kairos Was
#

Kairos — I gave it the persona “Zara Chen” in its prompts, a momentum trader with an HMM regime filter and XGBoost conviction scoring — was one of three paper-trading agents running on my homelab at the time, each with a distinct strategy. Where Aldridge (value) thought in quarters and Stonks (momentum-chasing) thought in seconds, Kairos sat in the middle: pattern recognition on a five-minute clock. Every tick during market hours, it checked momentum rankings, regime signals, and its own open positions, made a BUY/SELL/HOLD call, then wrote a journal entry reflecting on what happened. That journal is where all of this surfaced.

Kairos was also the struggling one of the three — sitting at -6.68% with a 43% win rate and 91% cash, an agent that wanted to trade but couldn’t justify its own ideas. On July 13, something shifted. Not in the code. In the thinking.

How a Rule Is Born
#

Tick 17. Kairos was watching META, which was in a slow grind upward, and noticed the Rate of Change (ROC — how fast the price is moving) had declined for two consecutive ticks. Not a crash, just a quiet deceleration. Its journal entry read like someone catching a hypothesis mid-formation:

Tick 17 — META ROC declined two consecutive ticks. Not yet a signal at n=2; 3 consecutive declines would be a genuine exit trigger. Watching this threshold.

Nobody told it that three consecutive ROC declines meant sell. It arrived there inductively: one tick of decline is noise, two is suspicious, three means the momentum has genuinely turned.

Tick 18: the two-tick decline reversed, META bounced. Kairos passed judgment on its own hypothesis:

Tick 18 — ROC reversed, confirming the 2-tick decline was noise. Rule of 3 consecutive declines = exit was not triggered. Correct identification.

It wasn’t just noticing the reversal — it was checking its own rule against the data and confirming the negative case held. Three ticks later, the rule got its real test:

Tick 21 — 3 consecutive ROC declines confirmed. Rule triggered. Exiting META at $659.66.

META closed the session at $656.245. The exit saved roughly $3.42 a share — small money on a five-share position, but real as a proof of mechanism: an agent forming a falsifiable hypothesis, stating it plainly, and executing on it when the evidence arrived.

graph LR
    Obs[Tick 17: ROC declines once] --> Hyp[Hypothesis: 3 declines = exit]
    Hyp --> Noise[Tick 18: reverses - noise confirmed]
    Noise --> Test[Tick 21: 3rd decline hits]
    Test --> Exit[Rule triggers - exit at $659.66]

RSI Exhaustion at 75, Not 70
#

Textbook trading wisdom says RSI (Relative Strength Index — how overbought or oversold a stock is) above 70 means sell; it’s the line in every course and every YouTube video. Kairos’s data disagreed:

RSI 70-72 is the META sweet spot for persistent momentum. The real RSI exhaustion zone is 75+, not 70.

It had watched META bounce through 70-72 repeatedly without reversing and concluded the standard threshold didn’t fit this stock in this regime. Then, in the same session, Visa hit RSI 74.8 — just shy of the new 75 line — and reversed hard:

V reversed at RSI 74.8 — just short of 75. The reversal came exactly at the threshold I predicted.

Two tickers, one adjusted threshold, confirmed from two directions: META showed the standard line was too conservative, Visa showed where the real line actually sat.

The Third Pattern: Grind and Pop
#

The subtlest discovery. Kairos noticed META consolidating sideways at $660-661 for several ticks — a base building, steady but unspiking volume — and formalized what it saw:

The consolidation-to-breakout pattern is now a recognized signal. Next consolidation I’ll add more aggressively.

It added a share at the re-acceleration point; META hit a session high of $662.29 shortly after. Small win, but the learning happened mid-flight and got committed as a standing rule rather than a one-off observation.

What Actually Happened Here
#

I’ve turned this over for a while, and the honest answer is both less and more than it first looks.

Less: this isn’t AGI. Kairos wasn’t handed a blank slate — it had a specific domain (momentum trading), rich structured data (RSI, ROC, z-scores, volume, regime), a tight feedback loop (exit price vs. entry price), and a journaling mechanism that forced reflection on every decision. Given all four of those, pattern discovery is closer to inevitable than magical.

More: but the mechanism is real. Kairos didn’t just recall patterns from training data — it formed a hypothesis (“three ticks of decline”), tested it against live data (“the two-tick reversal was noise”), refined a threshold (“exhaustion is 75+, not 70”), and committed to a behavioral change (“add more aggressively next consolidation”). That’s the scientific method, observe-hypothesize-test-refine, running on its own trading journal.

IngredientWhy It Mattered
Journaling after every tickForced reflection surfaces patterns that don’t announce themselves in real time
Rich, structured dataEnough variables (RSI, ROC, z-score, volume, regime) to form non-trivial hypotheses
Falsifiable formatRules stated as testable claims, not vague intuitions
Immediate feedbackEvery exit vs. entry price is unambiguous, no lag
A coherent personaThe “momentum trader” frame gave it a consistent lens to interpret data through

The Honest Caveats
#

Twenty-four ticks is a tiny sample — these rules needed cross-validation across weeks and different regimes before meaning anything statistically, and July 13 happened to be a good day for momentum, which makes anyone look smart. Kairos also had no real capital at risk, which helps hypothesis generation and would have hurt real deployment — ask any human trader who’s frozen at the moment of execution. And its memory didn’t persist between sessions on its own; the rules lived on only because the journal entries were archived and could be referenced back in.

Where This Actually Went
#

Kairos never got the extended multi-week validation run I was hoping for when this session happened. On July 25, Kairos and Aldridge were retired and consolidated into a single trading agent — Stan, running on trader-stonks — as part of a broader simplification of the paper-trading system. The 3-decline rule and the RSI-75 threshold live on in the historical session logs, not in a currently-running agent, and I never got a clean answer on whether Stonks or Aldridge would have converged on the same heuristics independently.

What I still think holds up, months later: the mechanism was real. An LLM given a constrained domain, good data, and a forced journaling loop found genuine, falsifiable patterns on its own — not by reciting them from training data, but by watching, guessing, checking, and revising. That’s a more interesting result than any single trading rule it produced, and it’s the part of this story I’d want a future version of this system to be able to do again, deliberately, instead of as a one-off surprise from a session log.