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.
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.
Three models and a search over past trades
Makes the trade decision, based on the labeled signal and similar trades from the database.
Steps in when qwen doesn't answer in time and handles helper queries: judging the state of the market and sanity-checking a decision.
Looks at chart screenshots: recognizes patterns and confirms order blocks, fair value gaps (FVG) and liquidity sweeps.
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.
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.
A dry run on 100 signals, with no real money
slightly above the planned 60–75%: the system drops even more weak signals than intended
every check passed: position size, stop-loss and correlation with open positions stayed within limits
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.
Related cases
A sales-figures bot: six metrics, with the arithmetic checked by AI agents
A Telegram bot reports sales by country, year, product and US state through one shared metrics core. All the…
An AI assistant for company knowledge in Telegram
The bot answers from work chats, email, voice notes and documents, and quotes its sources in every answer…
Autonomous bots and backtesting: how to make them reliable
Ten services make decisions from a stream of external events. Data arrives over WebSocket the moment an event…
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