Every US trading day, a handful of stocks jump 5%, 10%, 17% before the market even opens. Most of those moves fade. I wanted a machine that finds every one of them, works out why it moved, and then applies a strict trend test that says no far more often than yes.

It now runs twice a day and publishes to the Stock Analysis page on this site. This is how I built it, and what one week of honest results looks like.

2,970 Stocks Checked per Scan
30 Candidates in a Week
3 Passed the Trend Test
1 Pass Was a 20-Share Trade

The Idea

Living in Hong Kong, the US premarket happens during dinner. By the time I sit down to look, the interesting moves have already happened, and I am scrolling through lists of "top gappers" full of tiny, illiquid stocks.

So I wanted three things, every day, without lifting a finger:

  • Find every real company gapping up hard, filtered for size and volume so penny stocks never appear.
  • Explain each move with a real source — an earnings release, a filing, a deal — or admit there isn't one.
  • Judge it with one strict, mechanical trend rule, and show exactly why each stock passed or failed.

What I Actually Built

I built this one with Codex and the Longbridge market-data plugin, which gives the agent live quotes, minute-by-minute candles and company data for the US market. It runs as two scheduled jobs:

  • Premarket scan — 08:45 New York time, which is 20:45 in Hong Kong. Just in time for the evening.
  • Post-market scan — 20:45 New York time, which lands at 08:45 in Hong Kong. With breakfast.

Each run writes its results to a dated file, renders a report page, and publishes it to this site.

Step 1: The filters

Every scan checks the whole universe of US-listed stocks worth over a billion dollars — about 2,970 of them — and keeps only those that pass all four rules:

RuleThresholdWhy
Market cap> $1 billionReal companies, not micro-caps that move on a rumour
Gap> 5%A move big enough to mean something
Price> $3No penny stocks
Premarket volume> 50,000 sharesEnough real trading to trust the price

On a typical morning, around 2,500 of the 2,970 stocks have premarket trades at all, and between zero and nine pass every filter.

Step 2: Find out why it moved

For each candidate, the agent looks for the cause: a company announcement, an SEC filing, an exchange notice, or a reputable news story. Then it labels how sure it is. "Confirmed" means there is a source. If nothing reliable turns up, the report says so, and any guess is clearly marked as a guess.

That honesty matters more than it sounds. On October 2nd, two crypto-linked stocks gapped 5% with no news at all. The report did not invent a reason. It said no reliable catalyst was found, and that crypto-market sensitivity was a possible inference, not a confirmed cause.

Step 3: The trend test

Then every candidate goes through the same mechanical rule, a trend-breakout check called Trend Join Long. It has two parts, and a stock must pass both:

  • The daily test — the current price is above yesterday's high, and yesterday's close was above the 200-day moving average. In plain words: it is breaking out, and it was already in a long-term uptrend.
  • The intraday test — the current price is above the highest price of the premarket session so far. It is still pushing to new highs, not fading.

Every result comes with its reasons in plain English and Chinese, with the exact numbers, so I can check the logic myself.

One Week of Results

Across the first nine scans — five premarket and four post-market — 30 stocks passed the filters. Three passed the trend test.

ResultCountWhat it usually meant
fail_daily21A big jump in a stock that was already in a long-term downtrend
fail_intraday6Gapped up, but already fading below its premarket high
PASS3IOVA, SYNA, ARQT

The most common failure was the most instructive one. On October 1st, Accenture gapped up 17% after strong results and solid guidance — a confirmed, genuinely good story. It failed anyway: its previous close was below its 200-day average. A great day inside a long downtrend is still a downtrend. Most big gaps, it turns out, are exactly that.

The three passes

// IOVA · Sep 29 premarket

+9.6% after Iovance raised its full-year revenue guidance to $410–420 million. Above yesterday's high, well above its 200-day average, and above its premarket high. A clean pass with a confirmed reason.

// SYNA · Oct 1 post-market

+15% after onsemi revised its takeover to an all-cash $123 per share. Passed after hours — then failed the next morning's intraday test, because it was pinned just under the deal price. A takeover stock has a ceiling.

// ARQT · Oct 1 post-market

A mechanical pass with no news at all. The final price came from a single trade of 20 shares at 7:47pm. The report flagged it: the "gap" may just be one thin late print.

// The uncomfortable bit

A rule can pass something that a human would laugh at. ARQT met every number in the test, and the whole move rested on about five hundred dollars of stock changing hands after hours. Mechanical rules are great at saying no consistently. They are much worse at knowing when a yes is meaningless. That is why every result in the report carries its reasons, its source and its caveats, and why a PASS is a place to start reading, never a trade.

The Problems Nobody Warns You About

The trading logic was the easy part. Keeping a twice-daily job honest was harder.

// The scan that arrived 8 hours late

On the first Monday, the 08:30 job was delivered at 16:32 New York time, after the premarket had ended. Instead of quietly producing a report from stale data, it wrote an "operational failure" file explaining exactly why the scan could not be done under the rules. I would rather have no report than a wrong one.

// The data quota

Some days the minute-history request returns a quota error. The scanner falls back to the last 1,000 one-minute bars, checks that every completed premarket minute is covered, and says in the report that it did so.

// Running twice by accident

A scheduled job that fires twice can send two alerts and write two reports. Each run now takes a lock file for its date and time slot, and alert state is saved so the same hit is never announced twice.

// Changing the rules on day one

Right after the first run I added market cap and 20-day average volume to the candidate data. The first file no longer matched the new format, and the scanner refused to patch it up with partial data rather than compare apples with oranges.

What I Learned

Filter hard, then explain everything

Four simple thresholds turn 2,970 stocks into a handful. After that, the value is not in more filters but in explanation: why it moved, why it passed or failed, with numbers you can check.

Most gaps are bounces in downtrends

Twenty-one of thirty candidates failed because the stock was below its 200-day average before the gap. Good news on a weak chart is common. Good news on a strong chart is rare, and that rarity is the point of the rule.

"I don't know" is a valid output

The most trustworthy lines in the report are the ones that say no reliable catalyst was found. An agent that always has an explanation is an agent that sometimes makes one up.

Refuse to run rather than run wrong

Late schedules, quota errors and schema changes all happen in the first week. In each case, the right move was to stop, say why, and keep the data clean — not to produce a report that looks fine and isn't.

A pass is the start of reading, not a trade

SYNA passed and then hit a takeover ceiling. ARQT passed on a 20-share print. The scanner's job is to make the shortlist small and honest. The decision is still mine.

Was It Worth It?

Yes. Twice a day I get a short, sourced list of the real movers and a strict verdict on each, instead of a noisy list of gappers. Most days the answer is "nothing passed", and I have come to appreciate that — a scanner that rarely says yes is one whose yes I actually read.

You can see every report on the Stock Analysis page. It is research only: no trades are placed by the scanner, and none of it is investment advice.


Back to Blog