14 / Ventures & FinanceStock Market
Dendrite Financial
An AI engine that reads financial news, scores it and trades on it · Founder · May 2025 – Oct 2026
- 3Engine generations, from a cloud LLM to a local model scoring news around the clock
- 130,000Articles collected across the three engines
- +8.4%Overnight move against the S&P 500 for top-scored news (792 events, t-stat 4.5)
- 76%Of that move already in the price by the time scoring finished
Project overview
Material company news, such as a drug approval, a large contract or a financing, moves small and mid-cap stocks sharply. Dendrite was built to trade that: a system that reads every article as it appears, uses a language model to score how material it is, and buys the strongest catalysts.
I founded Dendrite Financial and built it myself between May 2025 and October 2026: the scrapers, the LLM pipeline, the broker integrations, a web portal with a question-answering agent, and finally the survivorship-free backtest of the whole idea.
That backtest gave a clear result. The model ranks news correctly, and the market prices a public headline within minutes. The constraint is speed, not judgment, so the signal is not tradable after costs from a pipeline that takes one to four minutes. This page covers both the system and that result.
The company is no longer active and trading is paused. Scoring prompts, thresholds and trading rules are not shown.
System components
- Web scraping
Scrapers and feed clients
Scrapers and feed clients that pulled headlines and full articles from a news aggregator, three press-release wires and a push news feed, de-duplicated them and stamped every stage with a time.
- AI analysis
Multi-step LLM scoring
A multi-step LLM pipeline that classifies each article, finds every company in it, matches each one to a ticker and scores it from −10 to +10 with a written reason.
- Trading
Broker order routing
Order code against the Interactive Brokers and Schwab APIs: timed entries, same-day exits, trailing stops and streaming quotes. Run on paper, then live with small capital in 2025.
- Agentic RAG
Database question answering
A tool-calling agent that answers questions about companies, sectors and the market by searching the scored-news database itself, checking each article for relevance and citing its sources.
Pipeline stages by engine generation
The demo shows articles moving through the engine. Switching between the three generations shows how the stages, the models and the latency changed with each rebuild.
01 · Scrape
News aggregator, polled every 15 s before the open
02 · Read
Waiting for a headline
03 · Score
–
04 · Trade
Illustration only: fictional companies, tickers, headlines, scores and orders. The stage names, models and latency figures for each engine are real. Only the first engine sent orders; the second and third stored scores and never traded.
News collection methods
The first two engines scraped a financial news aggregator: fetch the page, parse the headline table, diff it against the previous snapshot, then download each new article from its publisher and extract the body text. It was free and broad, covering about 170 publishers, but second-hand. About 21% of article fetches failed on paywalls and bot blocks, and the aggregator kept no true publish time.
The third engine read the sources directly: conditional-GET polling of three press-release wires every 5 to 10 seconds and a push news feed over a websocket, in a single asyncio process with eight parallel fetchers. Every article carries four timestamps (published, received, body fetched, scored), so latency is measured, not estimated.
| Engine | Active | Source | Poll | Models | Storage | Latency | Traded |
|---|---|---|---|---|---|---|---|
| Engine 1 | Jun – Oct 2025 | News aggregator, pre-market only | 15 s | Gemini 2.5 Flash gate, Gemini 2.5 Pro score | CSV and text logs | 1 – 4 min | Paper and live |
| Engine 2 · Nyx | Nov – Dec 2025 | Aggregator stock and market feeds, 24 hours | 60 s | Local gpt-oss:20b, then Gemini 2.5 Flash | CSV database, REST API | 24 s median | No |
| Engine 3 · Nyx v3 | Oct 2026 | Three press-release wires and a push news feed | 5 – 10 s | Local gemma4 | SQLite | 3.1 s median | No |
Once received, the engine needed a median 3.1 s to fetch, resolve tickers and score (90th percentile 17.8 s).
Collected data volumes
- Engine 1 article texts
- 26,111
- Engine 1 LLM analyses
- 23,571
- Engine 2 database rows
- 29,312
- Engine 2 publishers seen
- 170
- Engine 2 company scores
- 42,464
- Engine 3 articles collected
- 74,781
- One-minute price files, all US tickers
- 87 days
- Daily price rows in the backtest
- 1.65 million
- De-duplication
Duplicate article handling
Engine 3 de-duplicates by URL or by normalized title within 48 hours, and records every extra sighting with its source and time, which shows which feed was first.
- Ticker resolution
Ticker extraction sources
Symbols come from the feed’s own tags (27,796 articles), exchange tags in the wire text (12,281) or the body (2,023), each validated against a list of real symbols. 32,676 articles with no US ticker were skipped.
- Spam filter
Law-firm “investor alert” filter
10.5% of ticker-resolved wire articles were law-firm solicitations. They score very negative (−5.9 on average against +0.94 for the rest) without being news, so a tested filter flags them.
Scoring rubric and pipeline steps
Every score is a zero-shot judgment from a prompted, pretrained LLM. The rubric asks three things: how material the news is, with ±10 reserved for events on the scale of a merger, a bankruptcy or a first drug approval; a separate score for each company in the article, so a product launch can be positive for one firm and negative for its competitor; and timeliness, with recaps of old news scored zero.
The second engine split the work into four steps to control cost. A local 20-billion-parameter model classified each article as stock, sector or market news, extracted up to three companies and verified their tickers, escalating to the cloud only when its own confidence was low (2.8% of articles). Only the final analysis went to Gemini 2.5 Flash. Of 29,312 articles it sorted 24,121 as stock news, 2,802 as market news and 2,389 as sector news across 31 sectors.
- 01
Classify
Stock, sector or market. Local model, first 5,000 characters.
- 02
Extract
The top three companies, or the sector, from 10,000 characters.
- 03
Verify tickers
Known map, exact match, fuzzy match over the top 50 candidates, then an LLM judge.
- 04
Analyze and score
Up to 30,000 characters read; one score and one written reason per company.
Local model calibration against the cloud model
Before building the third engine I ran a calibration to test whether a free local model could replace the cloud one: 791 articles the cloud model had already scored, re-scored by five local models on one consumer GPU. Each was compared with the cloud scores and, more importantly, with the stock’s subsequent return.
| Model | Seconds per article | Agreement | Market fit | Difference, 95% interval | AUC, large up-move |
|---|---|---|---|---|---|
| Gemini 2.5 Flash (cloud reference) | – | 1 | 0.142 | – | 0.616 |
| gemma4:26b (chosen) | 1.53 | 0.913 | 0.152 | −0.050 to +0.062 | 0.616 |
| gemma4:12b | 1.15 | 0.889 | 0.159 | −0.044 to +0.078 | 0.639 |
| qwen3.6:35b | 2.19 | 0.888 | 0.175 | −0.039 to +0.095 | 0.627 |
| qwen3.5:9b | 1.20 | 0.883 | 0.122 | −0.074 to +0.028 | 0.606 |
| gpt-oss:20b | 1.03 | 0.856 | 0.124 | −0.065 to +0.029 | 0.589 |
- 0.913Rank agreement between the chosen local model and Gemini 2.5 Flash
- ≥ 99.9%Of local-model responses were valid JSON against the schema
- 95 – 97%Of scores within ±1 when the same articles were re-scored: the run-to-run noise
- 9×Slower with the model’s reasoning mode on, for no significant gain in market fit
Tool-calling retrieval agent
To make the scored database queryable, I built a retrieval-augmented agent on Gemini 2.5 Pro with function calling for the investor-relations portal. The model is not handed a fixed set of search results. It decides which tool to call and with what arguments, reads what comes back, and can call again, up to five loops per question.
Retrieval has a second model in the loop. The search tool filters the database by date, category, sentiment and ticker, then a local “inspector” model reads each candidate article and returns match or reject against the question’s criteria, so only verified documents reach the reasoning model. Select a question to follow the trace.
Example questions
- Reasoning model
- Gemini 2.5 Pro, temperature 0
- Tools
- search_database, get_market_stats
- Tool loops
- Up to 5 per question
- Inspector
- Local gpt-oss:20b, one article at a time
- Per search
- 30 articles by default, 60 at most
Illustration only: fictional questions, companies, articles, scores and answers.
Order execution and broker integration
The first engine ran as seven cooperating processes connected by queues: a producer watching the feed, four analysis workers, a trading worker and a logger. When an article’s score cleared the bar and its ticker was verified, the signal went to the trading worker, which checked available cash, a live quote and a minimum share price before sending an order.
I wrote execution against two brokers. On Interactive Brokers, through the Trader Workstation API: limit orders before the open, market-on-close exits, pegged orders and trailing stops, first on a paper account and then live. On Schwab, through the Trader API: OAuth, REST orders, scheduled liquidation and a Level-1 quote stream for every signal ticker. A Discord bot posted every analysis and a high-catalyst alert for each signal.
Event study results
In October 2026 I tested every score the engines had produced with an event study: for each signal, the stock’s return minus the S&P 500 ETF over the same window, from the overnight gap out to six months. Select a score bucket.
- Engine 1 · Jun – Oct 2025
- Engine 2 · Nov – Dec 2025
Score-10 news shows a large positive overnight gap, no significant open-to-close move, and a reversal over six months.
Show this as a table
| Bucket | Sample | n | Overnight gap | Open to close | 5 sessions | 21 sessions | 63 sessions | 126 sessions |
|---|---|---|---|---|---|---|---|---|
| Score 10 | Engine 1 | 792–798 | +8.4% (t 4.5) | -0.3% (t -0.4) | +0.4% | -0.7% | -3.8% (t -1.8) | -11.1% (t -4.8) |
| Score 10 | Engine 2 | 55 | +4.3% (t 3.2) | +0.8% (t 0.4) | +3.9% | -2.0% | -5.1% | -10.0% (t -2) |
| Scores 9 – 10 | Engine 1 | 1,101–1,108 | +7.4% (t 5.4) | 0.0% (t -0.1) | -0.2% | -0.7% | -2.5% (t -1.3) | -9.6% (t -4.3) |
| Scores 9 – 10 | Engine 2 | 362–363 | +3.8% (t 3.5) | -0.2% (t -0.6) | -0.5% | -0.3% | +0.6% | +6.4% (t 1.3) |
| Scores −8 to −10 | Engine 1 | 313 | -2.9% (t -3) | 0.0% | +2.2% (t 1.9) | +3.7% (t 2.5) | +6.4% (t 1.9) | +6.7% |
| Scores −8 to −10 | Engine 2 | 589–594 | -0.7% (t -1.4) | +1.1% | -1.5% (t -2.4) | -1.4% | -7.1% (t -4.3) | -5.8% (t -3.4) |
| Control: −2 to +2 | Engine 1 | 2,072 | 0.0% | 0.0% | -0.1% | +0.7% | +0.6% | -0.2% |
| Control: −2 to +2 | Engine 2 | 3,673 | +0.1% | +0.2% | +0.3% | +1.6% (t 3.3) | +1.0% | -0.9% |
Backtest. Mean return minus SPY over the identical window, first signal per ticker per day. The overnight gap runs from the prior close to the next open; every other horizon starts at that open. The gap is not tradable on news that arrives before the open: it is the move the score describes. Labels show values with a date-clustered t-statistic of at least 2 in size.
Intraday price path around the score
One-minute bars for the first engine’s pre-market signals show when the move occurs. The chart is the average price of a score-10 stock, relative to the prior close, around the moment its score was ready.
Remaining move by entry point
Already in the price+7.4%
Remaining to the open−0.6 pts
Remaining to the close−1.4 pts
Backtest on one-minute bars: 802 score-10 signals from the first engine. Mean return against the prior close; “remaining” is the difference between two points on that average path, in percentage points, before any trading cost. In the same data, buying the first pre-market print after the score and selling at the open returned −0.47% on average for 9 – 10 names before costs.


- 76%Median share of the gap already printed at the score, for 9 – 10 names gapping over 3%
- 70%Already printed even for articles the feed listed as two minutes old or less
- −0.04%Mean open-to-close return against SPY for 9 – 10 names (1,108 events)
- 66%Of score-10 names would hit a 2% stop, mostly in the first minutes of trading
Backtest design
- Data
Survivorship-free price data
Daily prices include delisted companies, 2.1% of all signals. A symbol resolver catches renamed tickers and symbols later reused by a different company, checking the company name on every match.
- Timing
Look-ahead prevention
Every signal maps to the first open or close after the moment its score existed, enforced by assertions in the code. The signal time is the end of the model call, not the headline time.
- Statistics
Uncertainty estimation
Standard errors clustered by date, 95% intervals from a 2,000-draw bootstrap over dates, and a permutation test that shuffles scores within each day 1,000 times.
- Simulator
Simulator validation
The event-driven portfolio simulator must reproduce buy-and-hold SPY to nine decimal places before any strategy result is accepted.
- Costs
Costs and capacity
10 basis points per side and 5% a year to borrow shorts. Median daily turnover of the top-scored names was $46 million.
- Discipline
Multiple-testing disclosure
Roughly 33 portfolio cells, 55 event cells per period, a 16-row stop grid and a 36-row pre-market grid were run, so every t-statistic is reported as descriptive, not as proof.
Project timeline
- May 2025
First article logs from the first engine.
- Jul 2025
First live trades with small capital through Interactive Brokers.
- Aug – Sep 2025
Paper account: 2,186 executions over 13 trading days. Schwab integration with streaming quotes.
- Nov 2025
Nyx goes live: 24-hour collection, a four-step hybrid LLM pipeline, a REST API, a web portal and the RAG agent.
- Dec 2025
Nyx stopped after 29,312 scored articles.
- Oct 2026
Survivorship-free backtest and minute-bar study. Nyx v3 built on direct wires and a local model, chosen by calibration.
Everything ran on one workstation: an Intel i9-14900K, an NVIDIA RTX 5070 Ti with 16 GB and 96 GB of memory. Backtest and simulated figures are labelled as such. Past performance does not predict future results. Nothing here is investment advice.