Borsa Zekâ
<div align="center">
<img src="plugin/.claude-plugin/icon.png" width="96" alt="Borsa Zekâ logo" />
# Borsa Zekâ
**Turn Claude Code into a Borsa Istanbul analyst.**
Live BIST data, 15 MCP tools, and a multi-agent investment committee, right in your terminal.
[](https://github.com/Havali55/borsa-zeka/actions/workflows/ci.yml)
[](LICENSE)
[](#install-in-30-seconds)
[](#the-tools)
**English** · [Türkçe](README.tr.md)
</div>
---
```
/plugin marketplace add Havali55/borsa-zeka
/plugin install borsa@borsa-zeka
```
Then ask Claude Code anything about the Turkish stock market, or run the committee:
<p align="center">
<img src="docs/images/komite-terminal.png" width="760" alt="/borsa:komite TUPRS — four specialist subagents analyze in parallel, the chair reconciles them into a verdict with confidence, scenarios and a trading plan" />
</p>
> Real output from `/borsa:komite TUPRS`. Four specialist subagents (technical, fundamental, news, risk) ran **in parallel** with live data and finished in 2.5 minutes. The chair weighed their disagreement ("the thesis is sound, the timing isn't confirmed yet") and wrote a sized trading plan. [Read the full report →](docs/examples/TUPRS-yatirim-komitesi.md)
## Why
Ask a general-purpose model about a Borsa Istanbul stock and you get stale numbers or made-up ones. Borsa Zekâ gives Claude **real tools and a method**:
- **No hallucinated numbers.** Every price, indicator and headline comes from a tool call (Yahoo Finance quotes and fundamentals, Google News incl. KAP disclosures).
- **A real analysis engine.** 16 indicators (Wilder RSI, MACD, ADX/DMI, Bollinger, Stochastic, MFI, CCI, Williams %R, ATR, Supertrend, OBV…), a composite −100…+100 score, support/resistance clustering, beta, VaR, Sharpe and Sortino, with indicators unit-tested against reference values.
- **An honest backtester.** Signals fire on the close and trades fill on the next open (no look-ahead), with commission, stop/target, and buy-and-hold comparison.
- **Multi-agent judgment.** A risk manager subagent deliberately argues the bear case; the chair has to reconcile it.
- **It knows you.** Your portfolio, watchlist and investor profile persist across sessions, and every session starts with market context.
- **No API key.** Claude Code is the brain; the plugin is a self-contained bundle (no `npm install`).
> The plugin speaks **Turkish**: commands, tool descriptions and answers. Built for investors in Turkey, and a working reference for anyone building a domain-expert Claude Code plugin.
## Install in 30 seconds
Requirements: [Claude Code](https://claude.com/claude-code) and Node.js 20+.
```
/plugin marketplace add Havali55/borsa-zeka
/plugin install borsa@borsa-zeka
```
Restart Claude Code (or `/reload-plugins`). Optional extras:
```
/borsa:durum-satiri # live BIST ticker in Claude Code's status line
/borsa:profil # your risk profile → personalized sizing
/output-style Borsa Analisti # make every answer analyst-grade
```
<p align="center"><img src="docs/images/statusline.png" width="760" alt="Status line: BIST100, USD/TRY, EUR/TRY, gold, session state" /></p>
### Claude Desktop
Download [`borsa-zeka.mcpb`](https://github.com/Havali55/borsa-zeka/releases/latest/download/borsa-zeka.mcpb) and double-click it (or drag it into Settings → Extensions). The same 15 tools, no setup.
### Any MCP client
```json
{ "mcpServers": { "borsa": { "command": "node", "args": ["/path/to/borsa-zeka/plugin/server/server.mjs"] } } }
```
## Commands
| Command | What it does |
|---|---|
| `/borsa:komite THYAO` | **Investment committee.** Technical, fundamental, news and risk subagents run in parallel; the chair produces a verdict with confidence, bull/bear scenarios, a sized trading plan, catalysts and dissent, saved as Markdown. |
| `/borsa:brifing` | Morning market brief: indices, FX, breadth, sector rotation, technical leaders/laggards, headlines, your positions. |
| `/borsa:hisse ASELS` | Fast, complete single-stock read with a terminal chart. |
| `/borsa:tara aşırı satımdaki bankalar` | Natural-language screening ("oversold banks") across ~120 BIST stocks; top picks re-verified. |
| `/borsa:portfoy 100 THYAO 290'dan aldım` | Record trades in plain language; risk, concentration, weakest links, rebalancing ideas. |
| `/borsa:strateji TUPRS` | Strategy lab: 7 strategies, parameter sweeps, 2y vs 5y robustness, overfitting check. |
| `/borsa:karsilastir AKBNK GARAN YKBNK` | Side-by-side: score, valuation, return/risk, correlation. |
You don't need commands. Plain questions work too ("ASELS alınır mı?", "Bugün hangi sektörler güçlü?"), and Claude picks the tools.
## How it works
```mermaid
flowchart LR
U[You in Claude Code] -->|/borsa:komite THYAO| C[Chair: main agent]
C --> T[teknik-analist]
C --> F[temel-analist]
C --> N[haber-analisti]
C --> R[risk-yoneticisi]
T & F & N & R --> M[(borsa MCP server<br/>15 tools)]
M --> E[Analysis engine<br/>indicators · score · backtest · scanner]
E --> Y[Yahoo Finance]
E --> G[Google News / KAP]
M <--> S[(~/.borsa-zeka<br/>portfolio · watchlist · profile)]
W[Web app] <--> S
W --> E
```
### The tools
`piyasa_ozeti` market overview · `anlik_fiyat` quotes · `hisse_analizi` full technical + fundamental analysis · `terminal_grafik` Unicode price chart · `fiyat_gecmisi` OHLCV · `piyasa_tarama` screener · `sektor_gorunumu` sector health · `strateji_testi` backtest · `strateji_karsilastir` all strategies · `hisse_karsilastir` return/risk/correlation · `haberler` Turkish news · `portfoy_analizi` / `portfoy_guncelle` portfolio · `izleme_listesi` watchlist · `yatirimci_profili` investor profile
## The web app (optional visual companion)
Same engine, same portfolio. Add a trade in Claude Code and it shows up on the web.
```bash
git clone https://github.com/Havali55/borsa-zeka.git && cd borsa-zeka
npm install && npm run dev # http://localhost:3000
```
| Stock page | Market heatmap |
|---|---|
|  |  |
| **Screener** | **Strategy test** |
|  |  |
Stock pages link back to Claude Code with copyable commands, and `hisse_analizi` returns a link to the interactive chart.
## FAQ
**Do I need an Anthropic API key?** No. Claude Code is the model. (The web app's optional built-in chat uses `ANTHROPIC_API_KEY`.)
**Where does the data come from?** Yahoo Finance (≈15 min delayed) and Google News RSS. Free sources, so occasionally incomplete. For companies reporting in USD (e.g. THY), price ratios are FX-corrected and absurd P/E values are hidden.
**Does it trade?** No. It analyzes; it never places orders.
**Where is my data stored?** Only on your machine: `~/.borsa-zeka/kullanici.json`.
## Contributing
New indicators, data sources, subagents, commands and translations are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md). Development: `npm test` · `npm run mcp:build && node mcp/test-client.mjs` · `claude --plugin-dir ./plugin`.
If Borsa Zekâ is useful to you, a ⭐ helps others find it.
## Disclaimer
Borsa Zekâ is an informational and educational tool. **It is not investment advice.** Scores, signals and committee verdicts are generated from delayed public data and may be wrong. Markets involve risk of loss. Make your own decisions or consult a licensed advisor.
<sub>MIT © Havali55 · Not affiliated with Borsa Istanbul, Yahoo or Anthropic.</sub>
TDQS
Scored across 15 tools
Tools mostly target distinct resources and actions: market overview, instant quotes, stock analysis, screening, sector view, backtesting, comparison, news, portfolio, and profile. Some overlap exists between anlik_fiyat, izleme_listesi, and hisse_analizi for price-related questions, and between strateji_testi and strateji_karsilastir, but descriptions make the intended use reasonably clear.
The tool set uses consistent snake_case Turkish names and generally follows a domain_object pattern such as piyasa_ozeti, hisse_analizi, portfoy_analizi, and yatirimci_profili. A few names use verb forms like portfoy_guncelle, strateji_karsilastir, and hisse_karsilastir, which is a minor deviation but still predictable.
With 15 tools, the server is well-scoped for a BIST-focused market and portfolio assistant. Each tool covers a meaningful capability such as screening, sector analysis, backtesting, portfolio management, or investor profiling without obvious filler.
The surface covers the core lifecycle for market research and portfolio support: market overview, quotes, history, analysis, screening, sectors, strategy testing, comparisons, news, portfolio updates, and investor profile. Minor gaps such as dedicated macro/economic calendar tools or watchlist alerts exist, but agents can work around them.