Skip to content

Allow this site to count your visits with Yandex Metrica? Metrica will store cookies in your browser to do this. How the site uses cookies

VC
Case 13 of 22 · Local AI · Everything runs on one computer

Language models analyze trading signals right on a laptop

Several models make the decision, and all the computing happens on the laptop itself. The models run in Ollama, a program for running language models on your own computer. qwen2.5:14b is the main model, llama3.1:8b is the backup, and LLaVA:7b reads chart screenshots. ChromaDB stores the trade history. Before answering, the system looks up similar past cases in it (this approach is called RAG). There is nothing to pay outside services. The data, the model instructions and the decision logic stay on the owner's computer.

Type
Decision engine on local models
Hardware
MacBook Air M3 · 24 GB unified memory
Technology
Ollama · qwen2.5:14b · LLaVA:7b · ChromaDB
Outcome
0 rule violations, 76% of signals skipped
01 · Problem

Why the model has to run on your own computer

The first reason is cost. A cloud model charges $0.01–0.10 per signal. At 1,000 signals a day, that comes to as much as $100 a day for computing alone. The second is keeping the strategy private. The trading rules are written into the model's instructions, and they are the most valuable part of the whole system. I'd rather not send them to an outside service.

So I needed a system that runs entirely on one computer. It takes signals based on Smart Money Concepts (for example BHM-3BP, iFVG, IMPULSIVE, REVERSAL) and checks how many factors line up at once: the direction on the higher timeframe, a strong impulse move and a liquidity sweep. The output is a decision (buy, sell or stay out of the trade) and a confidence score.

02 · Technology

Three models and a search over past trades

Main model · 14.8B parameters
qwen2.5:14b
9.0 GB · answers in 4–11 seconds

Makes the trade decision, based on the labeled signal and similar trades from the database.

Backup · 8B parameters
llama3.1:8b
4.9 GB · answers in 7–10 seconds

Steps in when qwen doesn't answer in time and handles helper queries: judging the state of the market and sanity-checking a decision.

Vision · 7B parameters
LLaVA:7b
4.7 GB · image analysis

Looks at chart screenshots: recognizes patterns and confirms order blocks, fair value gaps (FVG) and liquidity sweeps.

Knowledge base
ChromaDB · RAG
search for similar cases by meaning

Stores past trades with their outcome and the market conditions. For a new signal it finds the 5–10 most similar trades and passes them to the model as context.

03 · How it decides

How the confidence score is calculated

For each incoming signal (for example BHM-3BP, iFVG, SM-OB-CONT or SM-ASIA-SWEEP), the system takes into account:

  • the signal's class (A, B, C or D), which sets the starting confidence: from 0.45 to 0.65;
  • bonuses for matching factors: higher-timeframe direction (+0.05), impulse (+0.03), liquidity sweep (+0.02);
  • a correction from history: the system finds 5–10 similar trades and works out what share of them won;
  • timing: hour of the day, trading session (Asia, London, New York), seasonality.

The model gives the final confidence and the decision: buy, sell or stay out. The threshold is 0.70: anything below it is dropped as borderline. Separate checks in the code watch the position size, the distance to take-profit and stop-loss, and the correlation with positions already open.

Example (SM-OB-CONT signal, New York session)
Starting confidence (class B): 0.58
Bonus for all three factors: +0.10 (higher timeframe + impulse + liquidity)
Correction from history: +0.04 (58% of similar trades won)
Final confidence: 0.72 ≥ 0.70 → SELL
04 · Results

A dry run on 100 signals, with no real money

Signals skipped
76%

slightly above the planned 60–75%: the system drops even more weak signals than intended

Rule violations
0

every check passed: position size, stop-loss and correlation with open positions stayed within limits

Cloud fees
$0

a cloud model would cost up to $100 a day at 1,000 signals a day

Who this is useful for. Models on your own computer suit organizations where data must not leave the company: healthcare (personal data under Russia's personal data law, 152-FZ), banking, defense companies, corporate security and legal services. An M2 or M3 Mac mini is enough, and it uses little electricity. Apple processors with unified memory handle 14-billion-parameter models at a comfortable speed.

I can set up the same approach in your company. Search over your documents, a backup model in case the main one fails, and all the computing on your own hardware. Your know-how stays with you.

Ready to start?

Start with the 5,000 ₽ audit: a written report and a payback estimate

I'll tell you what to automate first, when it will pay for itself and whether your task needs AI at all. Sometimes it doesn't.

Or just ask a question. During business hours I reply within 2 hours