Use case · Claude Code
A screener that ranks stocks by your rules, written for you.
Ready-made screeners rank by someone else's idea of strong. Ask Claude Code for yours: it reads each stock's chart through Kaairos, pulls the price history, writes a script that scores them the way you describe and saves the ranking as a CSV and a chart. The script stays in your folder, so next week it's one command.

The session
What it made

The scoring is Claude Code's own, from the words “trend and momentum”, and it said so: trend is five moving-average checks worth 20 points each (price above the 20, 50 and 200-day averages, the 20-day above the 50-day, the 50-day above the 200-day); momentum ranks the 6, 3 and 1-month returns against the other seven, weighted 40/30/30, with a small bonus for a positive MACD histogram. Tell it different rules and the script changes.
A useful cross-check came for free. The screener computes RSI itself from the price files, and its numbers match the reads Kaairos returned: AAPL 53.2, NVDA 19.6. Two independent calculations agreeing is a good sign the data is right.
Why do it this way
Your rules, written down
The ranking logic is a short Python file you can read, change and keep, not a black box on a website.
Eight reads at once
Claude Code asked Kaairos for all eight charts in parallel; each came back with the same set of indicators, computed the same way.
Real data underneath
Prices come from your own Alpaca connection, adjusted for splits and dividends, as of the last close.
See any chart for yourself
Ask Claude Code to show a stock in Kaairos and it opens in the Markets tab with its averages, RSI and MACD.
Ideas to try
- “Screen the 11 sector ETFs every Monday and tell me which three lead on 3-month momentum.”
- “Rank my watchlist by distance from the 52-week high, and flag anything with RSI under 30.”
- “Add a volatility filter: drop anything whose ATR is more than 6% of its price.”
- “Compare the top three of this screener with SPY over the last year.”
Set it up
- In Kaairos, connect Alpaca in Settings › Trading. A paper account is free and uses real market prices.
- In Settings › Claude Code, click Add Kaairos.
- Start a new Claude Code session in your project folder and ask in plain words. Type
/mcpif you want to see Kaairos listed first.
Kaairos and Claude Code report what the data shows. Neither gives investment advice, and a backtest describes the past, not the future. The paper account uses practice money.
Limits
- A relative ranking only says who looks best among the names you gave it, not that any of them is strong.
- Weights and rules are a choice. Change them and the middle of the table can reorder.
- US stocks, ETFs and crypto pairs that Alpaca covers.
Fair questions
Can I keep the screener?
Yes. screener.py stays in your project; run it again and it reads fresh prices if you ask Claude Code to pull them first.
How many stocks can it screen?
As many as you name. Kaairos answers chart reads in parallel; the price files are small (a year of daily bars is about 14 KB).
Does it trade?
No. Screening only reads. A trade needs a separate request and your OK in Kaairos.
Download and go
Your AI agent, already set up.
One button to set up. Its own private AI, free. Claude, ChatGPT or Gemini when you want more.
A Mac with Apple silicon (M1 or later), macOS 15 Sequoia or later. 14-day refund.