stock-scanner-mcp 1.17.0 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -7
- package/dist/{chunk-WRGE3BZV.js → chunk-HUVDITHX.js} +178 -0
- package/dist/index.js +3 -2
- package/dist/sidecar/index.js +3 -1
- package/docs/sidecar-openapi.json +82 -1
- package/package.json +3 -2
- package/skills/README.md +2 -0
- package/skills/TOOLS.md +30 -1
- package/skills/daily/market-close-recap/SKILL.md +11 -4
- package/skills/daily/morning-briefing/SKILL.md +13 -6
- package/skills/macro/macro-dashboard/SKILL.md +6 -3
- package/skills/macro/sector-rotation/SKILL.md +8 -3
- package/skills/market-data/SKILL.md +31 -15
- package/skills/risk/risk-check/SKILL.md +6 -1
- package/skills/workspace/workspace-morning-brief/SKILL.md +2 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
A modular MCP server for Claude Code and Claude Desktop that provides real-time access to stock and crypto market data. Scan markets, check technicals, monitor insider trades, track earnings, analyze options flow, and optionally save your own watchlists and thesis notes from one server.
|
|
8
8
|
|
|
9
|
-
**
|
|
9
|
+
**66 tools** across **14 modules** — 10 modules work with zero API keys, including an optional stateful Market Workspace.
|
|
10
10
|
|
|
11
11
|
## Quick Start
|
|
12
12
|
|
|
@@ -52,8 +52,19 @@ This gives you **46 tools** immediately with no API keys. API keys are optional
|
|
|
52
52
|
|
|
53
53
|
Restart Claude Desktop after saving. Claude Code picks up the config automatically.
|
|
54
54
|
|
|
55
|
+
> **Claude Code shortcut — install as a plugin instead of Steps 1 and 2.** If you use Claude Code, skip the manual config above and install everything with two commands:
|
|
56
|
+
> ```
|
|
57
|
+
> /plugin marketplace add yyordanov-tradu/stock-scanner-mcp
|
|
58
|
+
> /plugin install stock-scanner@tradu-marketplace
|
|
59
|
+
> ```
|
|
60
|
+
> Run `/reload-plugins`, then `/mcp` — you should see the `stock-scanner` server listed as connected. The first launch runs `npx -y stock-scanner-mcp`, which downloads the package once (then it is cached). The plugin enables the workspace by default (data is stored in `~/.stock-scanner-mcp`) and passes the optional API keys (`FINNHUB_API_KEY`, `ALPHA_VANTAGE_API_KEY`, `FRED_API_KEY`) through from your environment; modules without a key are skipped automatically.
|
|
61
|
+
>
|
|
62
|
+
> **The plugin already bundles the skills — do NOT run Step 2.** All 19 skills ship with the plugin and load under the `stock-scanner:` namespace, e.g. `/stock-scanner:analyze-stock AAPL`, `/stock-scanner:morning-briefing`, `/stock-scanner:setup-market-workspace`. Running the Step 2 installer as well copies a second, unprefixed set into `~/.claude/skills/`, and the two collide — Step 2 is only for the manual (non-plugin) install. After installing, go straight to Step 3, using the namespaced command: `/stock-scanner:setup-market-workspace`.
|
|
63
|
+
|
|
55
64
|
### Step 2 — Install the trading skills
|
|
56
65
|
|
|
66
|
+
> Skip this step if you installed via the plugin above — the plugin already bundles these skills (as `stock-scanner:<name>`). This step is only for the manual config in Step 1.
|
|
67
|
+
|
|
57
68
|
Run this command in your terminal:
|
|
58
69
|
|
|
59
70
|
```bash
|
|
@@ -97,7 +108,7 @@ Once answered, it saves your profile and creates a `core` watchlist:
|
|
|
97
108
|
|
|
98
109
|
You can also skip the skill and ask Claude directly: *"Set up my workspace — I'm a swing trader, create a core watchlist with MARA, HOOD, BTC, daily reviews."*
|
|
99
110
|
|
|
100
|
-
**That's it.** You now have
|
|
111
|
+
**That's it.** You now have 66 tools, 19 skills, and a personalized workspace. Try `/workspace-morning-brief` for your first tailored market scan.
|
|
101
112
|
|
|
102
113
|
## What You Can Do
|
|
103
114
|
|
|
@@ -229,6 +240,7 @@ For the full list of workspace tools, see the [tool reference](#workspace--perso
|
|
|
229
240
|
| sentiment | 2 | None | CNN Fear & Greed Index, Crypto Fear & Greed Index |
|
|
230
241
|
| frankfurter | 5 | None | Forex exchange rates — 31 currencies from ECB (daily reference rates) |
|
|
231
242
|
| reddit | 4 | None | Reddit trending tickers, mention tracking, sentiment, and batch watchlist scan from r/wallstreetbets, r/stocks, r/investing, r/options |
|
|
243
|
+
| market-breadth | 1 | None | Market breadth metrics (advance/decline ratio, SMA 50/200, 52-week highs/lows) |
|
|
232
244
|
| workspace | 7 | None | Optional stateful profile, watchlists, and thesis tracking for personalized workflows (`--enable-workspace`) |
|
|
233
245
|
| finnhub | 9 | `FINNHUB_API_KEY` | Quotes, news, earnings, analyst ratings, short interest |
|
|
234
246
|
| alpha-vantage | 5 | `ALPHA_VANTAGE_API_KEY` | Quotes, daily prices, fundamentals, earnings, dividends |
|
|
@@ -236,9 +248,9 @@ For the full list of workspace tools, see the [tool reference](#workspace--perso
|
|
|
236
248
|
|
|
237
249
|
Modules auto-enable when their API key is set. No-key modules are always enabled, except `workspace`, which requires `--enable-workspace`.
|
|
238
250
|
|
|
239
|
-
For a complete list of every tool with descriptions, see the [Full Tool Reference](#full-tool-reference-
|
|
251
|
+
For a complete list of every tool with descriptions, see the [Full Tool Reference](#full-tool-reference-66-tools) below.
|
|
240
252
|
|
|
241
|
-
## Full Tool Reference (
|
|
253
|
+
## Full Tool Reference (66 tools)
|
|
242
254
|
|
|
243
255
|
### TradingView — Stock Scanning (no API key)
|
|
244
256
|
|
|
@@ -325,6 +337,12 @@ For a complete list of every tool with descriptions, see the [Full Tool Referenc
|
|
|
325
337
|
| `reddit_sentiment` | Keyword-based sentiment analysis (bullish/bearish/neutral) for a ticker from Reddit discussions |
|
|
326
338
|
| `reddit_watchlist_scan` | Batch Reddit scan for a list of tickers in one pass (combined OR query, ceil(N/20)×4 requests) — per-ticker mentions, sentiment, top post, and a hot flag (≥5 mentions) |
|
|
327
339
|
|
|
340
|
+
### Market Breadth — Breadth Indicators (no API key)
|
|
341
|
+
|
|
342
|
+
| Tool | Description |
|
|
343
|
+
|------|-------------|
|
|
344
|
+
| `market_breadth` | Get market breadth statistics for US equities: advance/decline ratio, SMA 50/200 percent above, and 52-week new highs/lows |
|
|
345
|
+
|
|
328
346
|
### Workspace — Personalized Context (optional, no API key)
|
|
329
347
|
|
|
330
348
|
Enabled only when you start the server with `--enable-workspace`.
|
|
@@ -417,7 +435,7 @@ curl http://localhost:3200/openapi.json
|
|
|
417
435
|
|
|
418
436
|
See [Sidecar HTTP API](https://github.com/yyordanov-tradu/stock-scanner-mcp/wiki/Sidecar-HTTP-API) for endpoint details.
|
|
419
437
|
|
|
420
|
-
**
|
|
438
|
+
**66 tools** exposed as REST routes, including `/tradingview/quote`, `/options/chain`, `/workspace/profile`, and more.
|
|
421
439
|
|
|
422
440
|
## Rate Limits
|
|
423
441
|
|
|
@@ -439,8 +457,9 @@ All modules use in-memory TTL caching to minimize API calls.
|
|
|
439
457
|
|
|
440
458
|
```bash
|
|
441
459
|
npm install && npm run build && npm test
|
|
442
|
-
npm run lint
|
|
443
|
-
npm run validate-tools
|
|
460
|
+
npm run lint # TypeScript type checking
|
|
461
|
+
npm run validate-tools # Tool description quality check
|
|
462
|
+
npm run validate-doc-tools # Skill/command tool reference check
|
|
444
463
|
```
|
|
445
464
|
|
|
446
465
|
## Credibility Artifacts
|
|
@@ -4043,6 +4043,183 @@ function createWorkspaceModule(dataDir, defaultExchange = "NASDAQ") {
|
|
|
4043
4043
|
};
|
|
4044
4044
|
}
|
|
4045
4045
|
|
|
4046
|
+
// src/modules/market-breadth/index.ts
|
|
4047
|
+
import { z as z15 } from "zod";
|
|
4048
|
+
|
|
4049
|
+
// src/modules/market-breadth/client.ts
|
|
4050
|
+
var CACHE_TTL9 = 15 * 60 * 1e3;
|
|
4051
|
+
var cache9 = new TtlCache(CACHE_TTL9);
|
|
4052
|
+
function aggregateMarketBreadth(rows, options) {
|
|
4053
|
+
let advancers = 0;
|
|
4054
|
+
let decliners = 0;
|
|
4055
|
+
let unchanged = 0;
|
|
4056
|
+
let adDenominator = 0;
|
|
4057
|
+
let aboveSma50 = 0;
|
|
4058
|
+
let sma50Denominator = 0;
|
|
4059
|
+
let aboveSma200 = 0;
|
|
4060
|
+
let sma200Denominator = 0;
|
|
4061
|
+
let newHighs = 0;
|
|
4062
|
+
let newLows = 0;
|
|
4063
|
+
let hlDenominator = 0;
|
|
4064
|
+
const threshold = options.newHighLowThresholdPct;
|
|
4065
|
+
for (const row of rows) {
|
|
4066
|
+
const d = row.data;
|
|
4067
|
+
const close = d.close != null ? Number(d.close) : null;
|
|
4068
|
+
const change = d.change != null ? Number(d.change) : null;
|
|
4069
|
+
const high52 = d.price_52_week_high != null ? Number(d.price_52_week_high) : d["High.52Week"] != null ? Number(d["High.52Week"]) : d["High.52week"] != null ? Number(d["High.52week"]) : null;
|
|
4070
|
+
const low52 = d.price_52_week_low != null ? Number(d.price_52_week_low) : d["Low.52Week"] != null ? Number(d["Low.52Week"]) : d["Low.52week"] != null ? Number(d["Low.52week"]) : null;
|
|
4071
|
+
const sma50 = d.SMA50 != null ? Number(d.SMA50) : null;
|
|
4072
|
+
const sma200 = d.SMA200 != null ? Number(d.SMA200) : null;
|
|
4073
|
+
if (close !== null && change !== null && !isNaN(close) && !isNaN(change)) {
|
|
4074
|
+
adDenominator++;
|
|
4075
|
+
if (change > 0) {
|
|
4076
|
+
advancers++;
|
|
4077
|
+
} else if (change < 0) {
|
|
4078
|
+
decliners++;
|
|
4079
|
+
} else {
|
|
4080
|
+
unchanged++;
|
|
4081
|
+
}
|
|
4082
|
+
}
|
|
4083
|
+
if (close !== null && sma50 !== null && !isNaN(close) && !isNaN(sma50)) {
|
|
4084
|
+
sma50Denominator++;
|
|
4085
|
+
if (close > sma50) {
|
|
4086
|
+
aboveSma50++;
|
|
4087
|
+
}
|
|
4088
|
+
}
|
|
4089
|
+
if (close !== null && sma200 !== null && !isNaN(close) && !isNaN(sma200)) {
|
|
4090
|
+
sma200Denominator++;
|
|
4091
|
+
if (close > sma200) {
|
|
4092
|
+
aboveSma200++;
|
|
4093
|
+
}
|
|
4094
|
+
}
|
|
4095
|
+
if (close !== null && high52 !== null && low52 !== null && !isNaN(close) && !isNaN(high52) && !isNaN(low52)) {
|
|
4096
|
+
hlDenominator++;
|
|
4097
|
+
const highThreshold = high52 * (1 - threshold / 100);
|
|
4098
|
+
const lowThreshold = low52 * (1 + threshold / 100);
|
|
4099
|
+
if (close >= highThreshold) {
|
|
4100
|
+
newHighs++;
|
|
4101
|
+
}
|
|
4102
|
+
if (close <= lowThreshold) {
|
|
4103
|
+
newLows++;
|
|
4104
|
+
}
|
|
4105
|
+
}
|
|
4106
|
+
}
|
|
4107
|
+
const ratio = decliners > 0 ? Math.round(advancers / decliners * 100) / 100 : null;
|
|
4108
|
+
const advancePercent = adDenominator > 0 ? Math.round(advancers / adDenominator * 1e4) / 100 : 0;
|
|
4109
|
+
const declinePercent = adDenominator > 0 ? Math.round(decliners / adDenominator * 1e4) / 100 : 0;
|
|
4110
|
+
const aboveSma50Percent = sma50Denominator > 0 ? Math.round(aboveSma50 / sma50Denominator * 1e4) / 100 : 0;
|
|
4111
|
+
const aboveSma200Percent = sma200Denominator > 0 ? Math.round(aboveSma200 / sma200Denominator * 1e4) / 100 : 0;
|
|
4112
|
+
return {
|
|
4113
|
+
sampleSize: adDenominator,
|
|
4114
|
+
advanceDecline: {
|
|
4115
|
+
advancers,
|
|
4116
|
+
decliners,
|
|
4117
|
+
unchanged,
|
|
4118
|
+
ratio,
|
|
4119
|
+
advancePercent,
|
|
4120
|
+
declinePercent
|
|
4121
|
+
},
|
|
4122
|
+
movingAverages: {
|
|
4123
|
+
aboveSma50,
|
|
4124
|
+
sma50Denominator,
|
|
4125
|
+
aboveSma50Percent,
|
|
4126
|
+
aboveSma200,
|
|
4127
|
+
sma200Denominator,
|
|
4128
|
+
aboveSma200Percent
|
|
4129
|
+
},
|
|
4130
|
+
newHighsLows: {
|
|
4131
|
+
newHighs,
|
|
4132
|
+
newLows,
|
|
4133
|
+
thresholdPct: threshold,
|
|
4134
|
+
denominator: hlDenominator
|
|
4135
|
+
}
|
|
4136
|
+
};
|
|
4137
|
+
}
|
|
4138
|
+
async function getMarketBreadth(options = {}) {
|
|
4139
|
+
const universe = options.universe ?? "major_us";
|
|
4140
|
+
const limit = options.limit ?? 3e3;
|
|
4141
|
+
const threshold = options.newHighLowThresholdPct ?? 0.5;
|
|
4142
|
+
const cacheKey = `breadth:${universe}:${limit}:${threshold}`;
|
|
4143
|
+
const cached = cache9.get(cacheKey);
|
|
4144
|
+
if (cached) return cached;
|
|
4145
|
+
let exchanges = [];
|
|
4146
|
+
if (universe === "major_us") {
|
|
4147
|
+
exchanges = ["NYSE", "NASDAQ", "AMEX"];
|
|
4148
|
+
} else {
|
|
4149
|
+
exchanges = [universe];
|
|
4150
|
+
}
|
|
4151
|
+
const columns = ["close", "change", "SMA50", "SMA200", "price_52_week_high", "price_52_week_low", "type", "volume"];
|
|
4152
|
+
let mergedRows = [];
|
|
4153
|
+
for (const ex of exchanges) {
|
|
4154
|
+
try {
|
|
4155
|
+
const filters = [
|
|
4156
|
+
{ left: "type", operation: "equal", right: "stock" },
|
|
4157
|
+
{ left: "volume", operation: "greater", right: 1e4 },
|
|
4158
|
+
{ left: "exchange", operation: "equal", right: ex }
|
|
4159
|
+
];
|
|
4160
|
+
const rows = await scanStocks({
|
|
4161
|
+
exchange: ex,
|
|
4162
|
+
columns,
|
|
4163
|
+
filters,
|
|
4164
|
+
limit
|
|
4165
|
+
});
|
|
4166
|
+
mergedRows = mergedRows.concat(rows);
|
|
4167
|
+
} catch (e) {
|
|
4168
|
+
console.error(`Failed to scan breadth for exchange ${ex}:`, e);
|
|
4169
|
+
}
|
|
4170
|
+
}
|
|
4171
|
+
if (mergedRows.length === 0) {
|
|
4172
|
+
throw new Error(`Failed to fetch breadth data for universe: ${universe}`);
|
|
4173
|
+
}
|
|
4174
|
+
const aggregates = aggregateMarketBreadth(mergedRows, {
|
|
4175
|
+
universe,
|
|
4176
|
+
limit,
|
|
4177
|
+
newHighLowThresholdPct: threshold
|
|
4178
|
+
});
|
|
4179
|
+
const result = {
|
|
4180
|
+
universe,
|
|
4181
|
+
exchanges,
|
|
4182
|
+
...aggregates,
|
|
4183
|
+
metadata: {
|
|
4184
|
+
source: "tradingview",
|
|
4185
|
+
dataDelay: "15min",
|
|
4186
|
+
asOf: (/* @__PURE__ */ new Date()).toISOString()
|
|
4187
|
+
}
|
|
4188
|
+
};
|
|
4189
|
+
cache9.set(cacheKey, result);
|
|
4190
|
+
return result;
|
|
4191
|
+
}
|
|
4192
|
+
|
|
4193
|
+
// src/modules/market-breadth/index.ts
|
|
4194
|
+
function createMarketBreadthModule() {
|
|
4195
|
+
const metadata3 = { source: "tradingview", dataDelay: "15min" };
|
|
4196
|
+
return {
|
|
4197
|
+
name: "market-breadth",
|
|
4198
|
+
description: "Market breadth metrics aggregating advance/decline ratios, SMA alignment, and new 52-week highs/lows.",
|
|
4199
|
+
requiredEnvVars: [],
|
|
4200
|
+
tools: [
|
|
4201
|
+
{
|
|
4202
|
+
name: "market_breadth",
|
|
4203
|
+
description: "Get market breadth statistics for US equities (NYSE, NASDAQ, AMEX). Recommends default 'major_us' representing NYSE+NASDAQ+AMEX. Filters out ETFs, funds, and illiquid symbols (volume < 10k) by default to measure standard stock performance.",
|
|
4204
|
+
inputSchema: z15.object({
|
|
4205
|
+
universe: z15.enum(["major_us", "NYSE", "NASDAQ", "AMEX"]).default("major_us").describe("Stock exchange universe. major_us includes NYSE, NASDAQ, and AMEX. NYSE, NASDAQ, or AMEX queries single exchange."),
|
|
4206
|
+
limit: z15.number().int().min(100).max(1e4).default(3e3).describe("Max stocks to scan per exchange (default 3000)."),
|
|
4207
|
+
newHighLowThresholdPct: z15.number().min(0).max(5).default(0.5).describe("Proximity threshold to count new 52-week high or low (e.g. 0.5 means within 0.5% of high/low, default 0.5).")
|
|
4208
|
+
}),
|
|
4209
|
+
readOnly: true,
|
|
4210
|
+
handler: withMetadata(async (input) => {
|
|
4211
|
+
const result = await getMarketBreadth({
|
|
4212
|
+
universe: input.universe,
|
|
4213
|
+
limit: input.limit,
|
|
4214
|
+
newHighLowThresholdPct: input.newHighLowThresholdPct
|
|
4215
|
+
});
|
|
4216
|
+
return successResult(JSON.stringify(result, null, 2));
|
|
4217
|
+
}, metadata3)
|
|
4218
|
+
}
|
|
4219
|
+
]
|
|
4220
|
+
};
|
|
4221
|
+
}
|
|
4222
|
+
|
|
4046
4223
|
// src/registry.ts
|
|
4047
4224
|
import * as path2 from "path";
|
|
4048
4225
|
import * as os from "os";
|
|
@@ -4059,6 +4236,7 @@ var MODULE_CATALOG = [
|
|
|
4059
4236
|
{ name: "sentiment", envVar: null, toolCount: 2, factory: () => createSentimentModule() },
|
|
4060
4237
|
{ name: "frankfurter", envVar: null, toolCount: 5, factory: () => createFrankfurterModule() },
|
|
4061
4238
|
{ name: "reddit", envVar: null, toolCount: 4, factory: () => createRedditModule() },
|
|
4239
|
+
{ name: "market-breadth", envVar: null, toolCount: 1, factory: () => createMarketBreadthModule() },
|
|
4062
4240
|
{ name: "workspace", envVar: null, toolCount: 7, factory: (config) => config.enableWorkspace ? createWorkspaceModule(config.dataDir || path2.join(os.homedir(), ".stock-scanner-mcp"), config.defaultExchange) : null }
|
|
4063
4241
|
];
|
|
4064
4242
|
function resolveEnabledModules(allModules, env, filter) {
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
MODULE_CATALOG,
|
|
7
7
|
resolveEnabledModules
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HUVDITHX.js";
|
|
9
9
|
|
|
10
10
|
// src/index.ts
|
|
11
11
|
import { readFileSync } from "fs";
|
|
@@ -79,7 +79,7 @@ OPTIONS
|
|
|
79
79
|
--enable-workspace Enable stateful workspace (watchlists, theses, profile)
|
|
80
80
|
--data-dir <path> Directory for workspace storage (default: ~/.stock-scanner-mcp)
|
|
81
81
|
|
|
82
|
-
MODULES (
|
|
82
|
+
MODULES (66 tools total)
|
|
83
83
|
tradingview 10 tools Stock scanning, quotes, technicals (no key)
|
|
84
84
|
tradingview-crypto 4 tools Crypto pair scanning and technicals (no key)
|
|
85
85
|
sec-edgar 6 tools SEC filings, insider trades, holdings (no key)
|
|
@@ -89,6 +89,7 @@ MODULES (65 tools total)
|
|
|
89
89
|
sentiment 2 tools Market & crypto Fear & Greed sentiment (no key)
|
|
90
90
|
frankfurter 5 tools Forex exchange rates and conversion (no key)
|
|
91
91
|
reddit 4 tools Reddit trending, sentiment, watchlist scan (no key)
|
|
92
|
+
market-breadth 1 tool Advance/decline and SMA market breadth (no key)
|
|
92
93
|
workspace 7 tools Stateful watchlists, theses, and profile (no key)
|
|
93
94
|
finnhub 9 tools Quotes, profiles, peers, news, earnings (FINNHUB_API_KEY)
|
|
94
95
|
alpha-vantage 5 tools Stock quotes, fundamentals, dividends (ALPHA_VANTAGE_API_KEY)
|
package/dist/sidecar/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
MODULE_CATALOG,
|
|
4
4
|
resolveEnabledModules
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-HUVDITHX.js";
|
|
6
6
|
|
|
7
7
|
// src/sidecar/server.ts
|
|
8
8
|
import * as http from "http";
|
|
@@ -163,6 +163,8 @@ var SIDECAR_ROUTES = [
|
|
|
163
163
|
{ method: "POST", path: "/workspace/watchlists/update", tool: "workspace_update_watchlist" },
|
|
164
164
|
{ method: "GET", path: "/workspace/thesis", tool: "workspace_get_thesis" },
|
|
165
165
|
{ method: "POST", path: "/workspace/thesis", tool: "workspace_save_thesis" },
|
|
166
|
+
// Market Breadth
|
|
167
|
+
{ method: "GET", path: "/market-breadth", tool: "market_breadth" },
|
|
166
168
|
// CoinGecko
|
|
167
169
|
{ method: "GET", path: "/coingecko/coin", tool: "coingecko_coin" },
|
|
168
170
|
{ method: "GET", path: "/coingecko/trending", tool: "coingecko_trending" },
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Stock Scanner Sidecar API",
|
|
5
5
|
"description": "REST API for stock and crypto market data, SEC filings, and technical analysis. This is the HTTP sidecar for the stock-scanner-mcp server.",
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.18.0",
|
|
7
7
|
"contact": {
|
|
8
8
|
"name": "Yordan Yordanov",
|
|
9
9
|
"url": "https://github.com/yyordanov-tradu/stock-scanner-mcp"
|
|
@@ -4520,6 +4520,87 @@
|
|
|
4520
4520
|
}
|
|
4521
4521
|
}
|
|
4522
4522
|
},
|
|
4523
|
+
"/market-breadth": {
|
|
4524
|
+
"get": {
|
|
4525
|
+
"summary": "Get market breadth statistics for US equities (NYSE, NASDAQ, AMEX)",
|
|
4526
|
+
"description": "Get market breadth statistics for US equities (NYSE, NASDAQ, AMEX). Recommends default 'major_us' representing NYSE+NASDAQ+AMEX. Filters out ETFs, funds, and illiquid symbols (volume < 10k) by default to measure standard stock performance.",
|
|
4527
|
+
"responses": {
|
|
4528
|
+
"200": {
|
|
4529
|
+
"description": "Successful response",
|
|
4530
|
+
"content": {
|
|
4531
|
+
"application/json": {
|
|
4532
|
+
"schema": {
|
|
4533
|
+
"type": "object",
|
|
4534
|
+
"description": "Varies by tool"
|
|
4535
|
+
}
|
|
4536
|
+
}
|
|
4537
|
+
}
|
|
4538
|
+
},
|
|
4539
|
+
"400": {
|
|
4540
|
+
"description": "Invalid parameters",
|
|
4541
|
+
"content": {
|
|
4542
|
+
"application/json": {
|
|
4543
|
+
"schema": {
|
|
4544
|
+
"$ref": "#/components/schemas/Error"
|
|
4545
|
+
}
|
|
4546
|
+
}
|
|
4547
|
+
}
|
|
4548
|
+
},
|
|
4549
|
+
"404": {
|
|
4550
|
+
"description": "Tool not found or API key missing",
|
|
4551
|
+
"content": {
|
|
4552
|
+
"application/json": {
|
|
4553
|
+
"schema": {
|
|
4554
|
+
"$ref": "#/components/schemas/Error"
|
|
4555
|
+
}
|
|
4556
|
+
}
|
|
4557
|
+
}
|
|
4558
|
+
},
|
|
4559
|
+
"500": {
|
|
4560
|
+
"description": "Internal server error",
|
|
4561
|
+
"content": {
|
|
4562
|
+
"application/json": {
|
|
4563
|
+
"schema": {
|
|
4564
|
+
"$ref": "#/components/schemas/Error"
|
|
4565
|
+
}
|
|
4566
|
+
}
|
|
4567
|
+
}
|
|
4568
|
+
}
|
|
4569
|
+
},
|
|
4570
|
+
"parameters": [
|
|
4571
|
+
{
|
|
4572
|
+
"name": "universe",
|
|
4573
|
+
"in": "query",
|
|
4574
|
+
"required": false,
|
|
4575
|
+
"description": "Stock exchange universe. major_us includes NYSE, NASDAQ, and AMEX. NYSE, NASDAQ, or AMEX queries single exchange.",
|
|
4576
|
+
"schema": {
|
|
4577
|
+
"type": "string",
|
|
4578
|
+
"description": "Stock exchange universe. major_us includes NYSE, NASDAQ, and AMEX. NYSE, NASDAQ, or AMEX queries single exchange."
|
|
4579
|
+
}
|
|
4580
|
+
},
|
|
4581
|
+
{
|
|
4582
|
+
"name": "limit",
|
|
4583
|
+
"in": "query",
|
|
4584
|
+
"required": false,
|
|
4585
|
+
"description": "Max stocks to scan per exchange (default 3000).",
|
|
4586
|
+
"schema": {
|
|
4587
|
+
"type": "integer",
|
|
4588
|
+
"description": "Max stocks to scan per exchange (default 3000)."
|
|
4589
|
+
}
|
|
4590
|
+
},
|
|
4591
|
+
{
|
|
4592
|
+
"name": "newHighLowThresholdPct",
|
|
4593
|
+
"in": "query",
|
|
4594
|
+
"required": false,
|
|
4595
|
+
"description": "Proximity threshold to count new 52-week high or low (e.g. 0.5 means within 0.5% of high/low, default 0.5).",
|
|
4596
|
+
"schema": {
|
|
4597
|
+
"type": "number",
|
|
4598
|
+
"description": "Proximity threshold to count new 52-week high or low (e.g. 0.5 means within 0.5% of high/low, default 0.5)."
|
|
4599
|
+
}
|
|
4600
|
+
}
|
|
4601
|
+
]
|
|
4602
|
+
}
|
|
4603
|
+
},
|
|
4523
4604
|
"/coingecko/coin": {
|
|
4524
4605
|
"get": {
|
|
4525
4606
|
"summary": "Get detailed cryptocurrency info from CoinGecko",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stock-scanner-mcp",
|
|
3
3
|
"mcpName": "io.github.yyordanov-tradu/stock-scanner-mcp",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.18.0",
|
|
5
5
|
"description": "MCP server providing Claude Code with real-time stock and crypto market data, SEC filings, insider trades, and technical analysis",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"lint": "tsc --noEmit",
|
|
18
18
|
"generate-openapi": "tsx src/scripts/generate-sidecar-openapi.ts",
|
|
19
19
|
"validate-tools": "tsx src/scripts/validate-tools.ts",
|
|
20
|
+
"validate-doc-tools": "tsx src/scripts/validate-doc-tool-references.ts",
|
|
20
21
|
"validate-structure": "tsx src/scripts/validate-structure.ts",
|
|
21
22
|
"prepublishOnly": "npm run build && npm test"
|
|
22
23
|
},
|
|
@@ -87,7 +88,7 @@
|
|
|
87
88
|
"@emnapi/core": "^1.9.2",
|
|
88
89
|
"@emnapi/runtime": "^1.9.2",
|
|
89
90
|
"@emnapi/wasi-threads": "^2.0.0",
|
|
90
|
-
"@types/node": "^
|
|
91
|
+
"@types/node": "^26.0.1",
|
|
91
92
|
"@types/proper-lockfile": "^4.1.4",
|
|
92
93
|
"tsup": "^8.0.0",
|
|
93
94
|
"tsx": "^4.21.0",
|
package/skills/README.md
CHANGED
|
@@ -4,6 +4,8 @@ Ready-made trading workflows that orchestrate [stock-scanner-mcp](https://www.np
|
|
|
4
4
|
|
|
5
5
|
## Quick Start
|
|
6
6
|
|
|
7
|
+
> **Installed the Claude Code plugin?** You already have these skills — the plugin bundles them and loads them under the `stock-scanner:` namespace (e.g. `/stock-scanner:morning-briefing`). Skip the installer below; it is only for the manual MCP-server setup.
|
|
8
|
+
|
|
7
9
|
**Prerequisites:** stock-scanner-mcp configured as an MCP server in Claude Code.
|
|
8
10
|
|
|
9
11
|
```bash
|
package/skills/TOOLS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# stock-scanner-mcp Tool Reference
|
|
2
2
|
|
|
3
|
-
Quick reference for all
|
|
3
|
+
Quick reference for all 66 MCP tools available to trading skills.
|
|
4
4
|
|
|
5
5
|
## TradingView (10 tools)
|
|
6
6
|
|
|
@@ -110,3 +110,32 @@ Quick reference for all 54 MCP tools available to trading skills.
|
|
|
110
110
|
| `frankfurter_timeseries` | Daily rate history (max 90 days) | start_date, end_date, base, symbols |
|
|
111
111
|
| `frankfurter_convert` | Convert amount between currencies | amount, from, to |
|
|
112
112
|
| `frankfurter_currencies` | List all 31 supported currency codes | (none) |
|
|
113
|
+
|
|
114
|
+
## Reddit (4 tools)
|
|
115
|
+
|
|
116
|
+
| Tool | Purpose | Key Params |
|
|
117
|
+
|------|---------|------------|
|
|
118
|
+
| `reddit_trending` | Trending stock tickers from investing subreddits | subreddits, limit |
|
|
119
|
+
| `reddit_mentions` | Mentions and top posts for a ticker | symbol, period |
|
|
120
|
+
| `reddit_sentiment` | Keyword sentiment for a ticker | symbol, limit |
|
|
121
|
+
| `reddit_watchlist_scan` | Batch scan watchlist tickers in one pass | symbols, period |
|
|
122
|
+
|
|
123
|
+
## Market Breadth (1 tool)
|
|
124
|
+
|
|
125
|
+
| Tool | Purpose | Key Params |
|
|
126
|
+
|------|---------|------------|
|
|
127
|
+
| `market_breadth` | Advance/decline ratio, % above SMA50/SMA200, 52-week highs/lows | universe, limit, newHighLowThresholdPct |
|
|
128
|
+
|
|
129
|
+
## Workspace (7 tools)
|
|
130
|
+
|
|
131
|
+
Requires the MCP server to run with `--enable-workspace`.
|
|
132
|
+
|
|
133
|
+
| Tool | Purpose | Key Params |
|
|
134
|
+
|------|---------|------------|
|
|
135
|
+
| `workspace_get_profile` | Read saved trading profile and defaults | (none) |
|
|
136
|
+
| `workspace_update_profile` | Save trading style, asset focus, cadence | tradingStyle, assetFocus, workflowCadence |
|
|
137
|
+
| `workspace_list_watchlists` | List saved watchlists | (none) |
|
|
138
|
+
| `workspace_create_watchlist` | Create a named watchlist | name |
|
|
139
|
+
| `workspace_update_watchlist` | Replace watchlist symbols | name, symbols |
|
|
140
|
+
| `workspace_get_thesis` | Read saved thesis for a symbol | symbol |
|
|
141
|
+
| `workspace_save_thesis` | Save or update thesis for a symbol | symbol, summary, bullCase, bearCase, catalyst, timeframe |
|
|
@@ -7,9 +7,9 @@ description: Produce an end-of-day market recap covering index performance, sect
|
|
|
7
7
|
|
|
8
8
|
## Overview
|
|
9
9
|
|
|
10
|
-
Desk analyst closing the book. Collect final index prints, sector scores, top movers, volume anomalies, and late-day headlines in one parallel wave, then synthesize into a concise session narrative.
|
|
10
|
+
Desk analyst closing the book. Collect final index prints, market breadth, sector scores, top movers, volume anomalies, and late-day headlines in one parallel wave, then synthesize into a concise session narrative.
|
|
11
11
|
|
|
12
|
-
Announce at start: "Running market close recap -- collecting final prints, sectors, movers, and headlines."
|
|
12
|
+
Announce at start: "Running market close recap -- collecting final prints, breadth, sectors, movers, and headlines."
|
|
13
13
|
|
|
14
14
|
## Data Collection
|
|
15
15
|
|
|
@@ -18,6 +18,7 @@ Announce at start: "Running market close recap -- collecting final prints, secto
|
|
|
18
18
|
| Tool | Parameters | Priority |
|
|
19
19
|
|------|-----------|----------|
|
|
20
20
|
| `tradingview_market_indices` | (defaults) | REQUIRED |
|
|
21
|
+
| `market_breadth` | universe=major_us | REQUIRED |
|
|
21
22
|
| `sentiment_fear_greed` | (defaults) | REQUIRED |
|
|
22
23
|
| `tradingview_sector_performance` | (defaults) | REQUIRED |
|
|
23
24
|
| `tradingview_top_gainers` | limit=10 | REQUIRED |
|
|
@@ -36,8 +37,9 @@ DO NOT reproduce raw tool output. Synthesize a session narrative by answering:
|
|
|
36
37
|
1. **Session driver** -- What single theme or catalyst best explains today's price action? Name it explicitly.
|
|
37
38
|
2. **Sector leaders and laggards** -- Identify the top 2 and bottom 2 sectors. Explain WHY they led or lagged using news, earnings, or macro context.
|
|
38
39
|
3. **Index divergence** -- Did the major indices move in lockstep or diverge? If NASDAQ outperformed Dow (or vice versa), note the growth-vs-value implication.
|
|
39
|
-
4. **
|
|
40
|
-
5. **
|
|
40
|
+
4. **Breadth confirmation** -- Did advance/decline ratio, % above SMA50/SMA200, and new highs/lows confirm the index move or reveal narrow leadership?
|
|
41
|
+
5. **Unusual volume** -- Flag names with abnormal volume that are NOT already in the gainers/losers lists. These are tomorrow's watchlist candidates.
|
|
42
|
+
6. **Sentiment alignment** -- Does the Fear & Greed reading match the day's action and breadth, or is there a disconnect worth noting?
|
|
41
43
|
|
|
42
44
|
## Output Format
|
|
43
45
|
|
|
@@ -48,6 +50,10 @@ DO NOT reproduce raw tool output. Synthesize a session narrative by answering:
|
|
|
48
50
|
|
|
49
51
|
Include S&P 500, NASDAQ Composite, Dow Jones, VIX. Add a one-sentence narrative below the table.
|
|
50
52
|
|
|
53
|
+
### Market Breadth
|
|
54
|
+
|
|
55
|
+
Report advance/decline ratio, % above SMA50, % above SMA200, new highs, and new lows. Add a one-sentence breadth verdict: CONFIRMED / NARROW / DETERIORATING.
|
|
56
|
+
|
|
51
57
|
### Sector Scorecard
|
|
52
58
|
|
|
53
59
|
| Sector | Change % | Rank | Note |
|
|
@@ -85,4 +91,5 @@ Data from TradingView and Yahoo Finance is 15-minute delayed. CBOE and sentiment
|
|
|
85
91
|
- Restating every gainer and loser without identifying the common thread that connects them.
|
|
86
92
|
- Presenting sector data without explaining what drove the leaders and laggards.
|
|
87
93
|
- Omitting the VIX context -- a rising VIX on a green day is a critical signal.
|
|
94
|
+
- Calling a green index session risk-on when breadth is weak or new lows are expanding.
|
|
88
95
|
- Listing headlines without connecting them to observed price action.
|
|
@@ -7,9 +7,9 @@ description: Run a pre-market scan across indices, sectors, sentiment, and upcom
|
|
|
7
7
|
|
|
8
8
|
## Overview
|
|
9
9
|
|
|
10
|
-
Institutional pre-market desk analyst briefing. Collect broad market indices, sector performance, sentiment, top movers, and upcoming catalysts in a single parallel wave, then cross-reference to produce a directional bias.
|
|
10
|
+
Institutional pre-market desk analyst briefing. Collect broad market indices, sector performance, market breadth, sentiment, top movers, and upcoming catalysts in a single parallel wave, then cross-reference to produce a directional bias.
|
|
11
11
|
|
|
12
|
-
Announce at start: "Running pre-market briefing -- collecting indices, sectors, sentiment, movers, and catalysts."
|
|
12
|
+
Announce at start: "Running pre-market briefing -- collecting indices, sectors, breadth, sentiment, movers, and catalysts."
|
|
13
13
|
|
|
14
14
|
## Data Collection
|
|
15
15
|
|
|
@@ -21,6 +21,7 @@ Announce at start: "Running pre-market briefing -- collecting indices, sectors,
|
|
|
21
21
|
| `sentiment_fear_greed` | (defaults) | REQUIRED |
|
|
22
22
|
| `finnhub_market_status` | (defaults) | REQUIRED |
|
|
23
23
|
| `tradingview_sector_performance` | (defaults) | REQUIRED |
|
|
24
|
+
| `market_breadth` | universe=major_us | REQUIRED |
|
|
24
25
|
| `tradingview_top_gainers` | limit=10 | ENRICHMENT |
|
|
25
26
|
| `tradingview_top_losers` | limit=10 | ENRICHMENT |
|
|
26
27
|
| `tradingview_volume_breakout` | limit=10 | ENRICHMENT |
|
|
@@ -34,10 +35,11 @@ If any REQUIRED call fails, report the failure explicitly and proceed with avail
|
|
|
34
35
|
|
|
35
36
|
DO NOT reproduce raw tool output. Cross-reference the collected data to answer:
|
|
36
37
|
|
|
37
|
-
1. **Risk appetite agreement** -- Do index levels/futures direction and the Fear & Greed score point the same way? Flag any divergence as a caution signal.
|
|
38
|
-
2. **
|
|
39
|
-
3. **
|
|
40
|
-
4. **
|
|
38
|
+
1. **Risk appetite agreement** -- Do index levels/futures direction, market breadth, and the Fear & Greed score point the same way? Flag any divergence as a caution signal.
|
|
39
|
+
2. **Breadth confirmation** -- Are advancers/decliners, % above SMA50/SMA200, and new highs/lows confirming the index move or warning that leadership is narrow?
|
|
40
|
+
3. **Sector divergence** -- Which sectors diverge from the broad market direction? A defensive sector leading in a risk-on tape (or vice versa) is notable.
|
|
41
|
+
4. **Volume clustering** -- Do volume breakout names cluster in one or two sectors? Flag as a potential rotation signal and name the sectors.
|
|
42
|
+
5. **Catalyst check** -- Are any earnings or economic releases in the next 5 days likely to move the broad market or a specific sector? Highlight date, event, and expected impact.
|
|
41
43
|
|
|
42
44
|
## Output Format
|
|
43
45
|
|
|
@@ -52,6 +54,10 @@ Include VIX, S&P 500, NASDAQ Composite, Dow Jones. Note market session status (p
|
|
|
52
54
|
|
|
53
55
|
Single line: score, label (Extreme Fear / Fear / Neutral / Greed / Extreme Greed), and one-week trend direction.
|
|
54
56
|
|
|
57
|
+
### Market Breadth
|
|
58
|
+
|
|
59
|
+
Single line: advance/decline ratio, % above SMA50, % above SMA200, and whether new highs or new lows dominate.
|
|
60
|
+
|
|
55
61
|
### Sector Map
|
|
56
62
|
|
|
57
63
|
| Sector | Change % | Signal |
|
|
@@ -83,5 +89,6 @@ Data from TradingView and Yahoo Finance is 15-minute delayed. CBOE and sentiment
|
|
|
83
89
|
|
|
84
90
|
- Dumping raw JSON or full tool responses instead of synthesized tables.
|
|
85
91
|
- Ignoring divergences between sentiment score and index direction -- these are the most valuable signals.
|
|
92
|
+
- Ignoring weak breadth when indexes are green -- narrow leadership can invalidate a risk-on read.
|
|
86
93
|
- Listing movers without connecting them to sector rotation or catalysts.
|
|
87
94
|
- Stating a bias without citing the supporting data points that justify it.
|
|
@@ -7,11 +7,11 @@ description: Build a comprehensive macroeconomic dashboard covering rates, infla
|
|
|
7
7
|
|
|
8
8
|
## Overview
|
|
9
9
|
|
|
10
|
-
Act as a macro strategist. Collect key economic indicators, yield curve data, inflation metrics, labor market signals, and market sentiment to produce a unified macro picture. Cross-reference all data points to classify the current economic regime.
|
|
10
|
+
Act as a macro strategist. Collect key economic indicators, yield curve data, inflation metrics, labor market signals, market breadth, and market sentiment to produce a unified macro picture. Cross-reference all data points to classify the current economic regime.
|
|
11
11
|
|
|
12
12
|
**Prerequisite:** This skill requires FRED_API_KEY to be configured. Without it, only market indices and sentiment data are available.
|
|
13
13
|
|
|
14
|
-
Announce at start: "Building macro dashboard -- collecting economic indicators, yield curve, inflation, labor, and sentiment data."
|
|
14
|
+
Announce at start: "Building macro dashboard -- collecting economic indicators, yield curve, inflation, labor, breadth, and sentiment data."
|
|
15
15
|
|
|
16
16
|
## Data Collection
|
|
17
17
|
|
|
@@ -29,6 +29,7 @@ Announce at start: "Building macro dashboard -- collecting economic indicators,
|
|
|
29
29
|
| `fred_indicator` | series_id=initial_claims | ENRICHMENT |
|
|
30
30
|
| `fred_economic_calendar` | limit=15 | REQUIRED |
|
|
31
31
|
| `tradingview_market_indices` | (default) | REQUIRED |
|
|
32
|
+
| `market_breadth` | universe=major_us | ENRICHMENT |
|
|
32
33
|
| `sentiment_fear_greed` | (default) | ENRICHMENT |
|
|
33
34
|
|
|
34
35
|
DO NOT proceed to analysis until ALL REQUIRED calls return. ENRICHMENT failures are acceptable.
|
|
@@ -41,7 +42,7 @@ Cross-reference the collected data across five dimensions:
|
|
|
41
42
|
2. **Inflation Trajectory** -- Compare CPI and Core PCE to the Fed's 2% target. Determine if inflation is accelerating, decelerating, or anchored.
|
|
42
43
|
3. **Labor Market Health** -- Assess unemployment rate direction and initial claims trend. Rising claims with rising unemployment = deterioration.
|
|
43
44
|
4. **Fed Policy Stance** -- Current Fed Funds rate vs inflation readings. Is policy restrictive (rate > inflation) or accommodative?
|
|
44
|
-
5. **Market Pricing of Risk** -- Extract VIX from market indices. Combine with Fear & Greed score. Elevated VIX (>25) with extreme fear = stress.
|
|
45
|
+
5. **Market Pricing of Risk** -- Extract VIX from market indices. Combine with Fear & Greed score and breadth. Elevated VIX (>25) with extreme fear and weak breadth = stress.
|
|
45
46
|
|
|
46
47
|
Synthesize all five dimensions into a single macro regime classification.
|
|
47
48
|
|
|
@@ -75,6 +76,7 @@ DO NOT reproduce raw tool output. Synthesize and interpret.
|
|
|
75
76
|
### Market Risk Gauges
|
|
76
77
|
- VIX level and interpretation
|
|
77
78
|
- Fear & Greed score and classification
|
|
79
|
+
- Market breadth: advance/decline ratio, % above SMA50/SMA200, and new highs/lows if available
|
|
78
80
|
|
|
79
81
|
### Upcoming Releases (Next 2 Weeks)
|
|
80
82
|
List the most market-moving releases from the economic calendar with dates.
|
|
@@ -95,3 +97,4 @@ Data from TradingView and Yahoo Finance is 15-minute delayed. CBOE and sentiment
|
|
|
95
97
|
- Forgetting to compute the yield curve spread (just listing 2Y and 10Y separately)
|
|
96
98
|
- Classifying regime based on a single indicator instead of cross-referencing all five dimensions
|
|
97
99
|
- Ignoring the direction/trend of indicators and only reporting the latest snapshot value
|
|
100
|
+
- Ignoring market breadth when market indices and sentiment disagree
|
|
@@ -7,9 +7,9 @@ description: Analyze sector performance across timeframes, detect risk-on vs ris
|
|
|
7
7
|
|
|
8
8
|
## Overview
|
|
9
9
|
|
|
10
|
-
Act as a sector strategist. Collect sector performance data across multiple timeframes, overlay technical signals on leaders and laggards, and determine whether capital is rotating toward risk-on or risk-off sectors. Produce actionable sector allocation guidance.
|
|
10
|
+
Act as a sector strategist. Collect sector performance data across multiple timeframes, overlay market breadth and technical signals on leaders and laggards, and determine whether capital is rotating toward risk-on or risk-off sectors. Produce actionable sector allocation guidance.
|
|
11
11
|
|
|
12
|
-
Announce at start: "Running sector rotation analysis -- collecting sector performance, market indices, and technical signals."
|
|
12
|
+
Announce at start: "Running sector rotation analysis -- collecting sector performance, breadth, market indices, and technical signals."
|
|
13
13
|
|
|
14
14
|
## Data Collection
|
|
15
15
|
|
|
@@ -19,6 +19,7 @@ Announce at start: "Running sector rotation analysis -- collecting sector perfor
|
|
|
19
19
|
|------------------------------|-----------------------|-------------|
|
|
20
20
|
| `tradingview_sector_performance` | (default) | REQUIRED |
|
|
21
21
|
| `tradingview_market_indices` | (default) | REQUIRED |
|
|
22
|
+
| `market_breadth` | universe=major_us | ENRICHMENT |
|
|
22
23
|
| `sentiment_fear_greed` | (default) | ENRICHMENT |
|
|
23
24
|
| `fred_indicator` | series_id=treasury_10y | ENRICHMENT |
|
|
24
25
|
|
|
@@ -39,7 +40,7 @@ DO NOT proceed to analysis until ALL REQUIRED calls return. ENRICHMENT failures
|
|
|
39
40
|
Cross-reference the collected data across four dimensions:
|
|
40
41
|
|
|
41
42
|
1. **Timeframe Divergence** -- Compare 1-day vs 1-week vs 1-month vs YTD performance for each sector. Short-term moves diverging from longer-term trends signal emerging rotation.
|
|
42
|
-
2. **Risk Appetite** -- Defensive sectors (XLU, XLP, XLV) outperforming cyclicals (XLY, XLI, XLF) = RISK-OFF. Cyclicals outperforming defensives = RISK-ON. Mixed leadership = no clear signal.
|
|
43
|
+
2. **Risk Appetite** -- Defensive sectors (XLU, XLP, XLV) outperforming cyclicals (XLY, XLI, XLF) = RISK-OFF. Cyclicals outperforming defensives = RISK-ON. Mixed leadership = no clear signal. Use breadth as confirmation: strong breadth confirms broad risk-on rotation; weak breadth implies narrow leadership.
|
|
43
44
|
3. **Rate Sensitivity** -- Compare rate-sensitive sectors (XLU, XLRE) performance to 10Y yield direction. Rising yields should pressure these sectors. Outperformance despite rising yields is a strong signal.
|
|
44
45
|
4. **Technical Confirmation** -- Use RSI and trend data from Wave 2 to confirm or contradict the rotation signal. Overbought leaders (RSI >70) may reverse. Oversold laggards (RSI <30) may bounce.
|
|
45
46
|
|
|
@@ -72,6 +73,9 @@ DO NOT reproduce raw tool output. Synthesize and interpret.
|
|
|
72
73
|
### Rate Sensitivity
|
|
73
74
|
Note how rate-sensitive sectors (XLU, XLRE) are behaving relative to the current 10Y yield direction. Flag any divergence.
|
|
74
75
|
|
|
76
|
+
### Breadth Confirmation
|
|
77
|
+
State whether market breadth confirms or contradicts the sector rotation signal. Reference advance/decline ratio, % above SMA50/SMA200, and new highs/lows when available.
|
|
78
|
+
|
|
75
79
|
### Sector Picks
|
|
76
80
|
|
|
77
81
|
**Overweight (top 2):**
|
|
@@ -90,3 +94,4 @@ Data from TradingView and Yahoo Finance is 15-minute delayed. CBOE and sentiment
|
|
|
90
94
|
- Classifying rotation signal without comparing defensive vs cyclical sector groups explicitly
|
|
91
95
|
- Skipping Wave 2 technicals and making sector picks without RSI or trend confirmation
|
|
92
96
|
- Ignoring interest rate direction when assessing rate-sensitive sectors like Utilities and Real Estate
|
|
97
|
+
- Treating leadership in one or two sectors as broad risk-on rotation without checking market breadth
|
|
@@ -8,29 +8,42 @@ description: Guidance on using stock and crypto market data tools effectively --
|
|
|
8
8
|
## Available Tool Categories
|
|
9
9
|
|
|
10
10
|
### Stock Technical Analysis (TradingView)
|
|
11
|
-
- `
|
|
11
|
+
- `tradingview_scan` -- custom stock scanner with filters and columns
|
|
12
|
+
- `tradingview_quote` -- delayed quote for one or more tickers
|
|
13
|
+
- `tradingview_technicals` -- RSI, MACD, moving averages, pivots, and ratings
|
|
14
|
+
- `tradingview_market_indices` -- VIX, S&P 500, NASDAQ, Dow, and related index context
|
|
15
|
+
- `tradingview_sector_performance` -- 11 sector ETFs across multiple timeframes
|
|
12
16
|
- `tradingview_top_gainers` / `tradingview_top_losers` -- market movers
|
|
17
|
+
- `tradingview_top_volume` -- highest volume stocks
|
|
13
18
|
- `tradingview_volume_breakout` -- unusual volume detection
|
|
14
|
-
- `
|
|
19
|
+
- Use `tradingview_scan` filters and columns for rating-based stock screens
|
|
20
|
+
- `market_breadth` -- advance/decline ratio, % above SMA50/SMA200, and new highs/lows
|
|
15
21
|
|
|
16
22
|
### Crypto Technical Analysis (TradingView Crypto)
|
|
17
|
-
- `
|
|
18
|
-
- `
|
|
19
|
-
- `
|
|
23
|
+
- `crypto_scan` -- custom crypto scanner with filters and columns
|
|
24
|
+
- `crypto_quote` -- quote and 24h change for crypto pairs
|
|
25
|
+
- `crypto_technicals` -- RSI, MACD, moving averages, pivots, and ratings
|
|
26
|
+
- `crypto_top_gainers` -- top gaining crypto pairs
|
|
20
27
|
|
|
21
28
|
### News & Events
|
|
22
29
|
- `finnhub_company_news` -- recent company news (7-day lookback)
|
|
23
30
|
- `finnhub_earnings_calendar` -- upcoming/recent earnings
|
|
24
|
-
- `
|
|
25
|
-
- `
|
|
31
|
+
- `edgar_search` -- search SEC filings by keyword, form, ticker, and date range
|
|
32
|
+
- `edgar_company_filings` -- recent company filings
|
|
26
33
|
|
|
27
34
|
### Prices & Fundamentals
|
|
28
|
-
- `
|
|
29
|
-
- `
|
|
30
|
-
- `
|
|
35
|
+
- `alphavantage_quote` -- current price, volume, change
|
|
36
|
+
- `alphavantage_daily` -- daily OHLCV history
|
|
37
|
+
- `alphavantage_overview` -- PE, EPS, market cap, sector
|
|
38
|
+
|
|
39
|
+
### Social Sentiment
|
|
40
|
+
- `reddit_trending` -- trending tickers from investing subreddits
|
|
41
|
+
- `reddit_mentions` -- mentions and top posts for a ticker
|
|
42
|
+
- `reddit_sentiment` -- keyword sentiment for a ticker
|
|
43
|
+
- `reddit_watchlist_scan` -- batch scan watchlist tickers
|
|
31
44
|
|
|
32
45
|
### Crypto Market Data
|
|
33
|
-
- `
|
|
46
|
+
- `coingecko_coin` -- price, market cap, 24h volume
|
|
34
47
|
- `coingecko_trending` -- trending coins
|
|
35
48
|
- `coingecko_global` -- total market cap, BTC dominance
|
|
36
49
|
|
|
@@ -38,11 +51,14 @@ description: Guidance on using stock and crypto market data tools effectively --
|
|
|
38
51
|
|
|
39
52
|
| User Question | Tools to Use |
|
|
40
53
|
|---|---|
|
|
41
|
-
| "What do the charts say about AAPL?" | `
|
|
54
|
+
| "What do the charts say about AAPL?" | `tradingview_technicals`, `tradingview_quote` |
|
|
42
55
|
| "What's moving today?" | `tradingview_top_gainers`, `tradingview_top_losers`, `tradingview_volume_breakout` |
|
|
43
|
-
| "
|
|
44
|
-
| "
|
|
45
|
-
| "
|
|
56
|
+
| "How broad is this rally?" | `market_breadth`, `tradingview_market_indices` |
|
|
57
|
+
| "What's the market regime?" | `tradingview_market_indices`, `market_breadth`, `sentiment_fear_greed`, `tradingview_sector_performance` |
|
|
58
|
+
| "Any news on TSLA?" | `finnhub_company_news`, `edgar_company_filings` |
|
|
59
|
+
| "Is MSFT fairly valued?" | `alphavantage_overview`, `alphavantage_quote` |
|
|
60
|
+
| "How's crypto doing?" | `coingecko_global`, `coingecko_trending`, `crypto_top_gainers`, `crypto_quote` |
|
|
61
|
+
| "What is Reddit focused on?" | `reddit_trending`, `reddit_mentions`, `reddit_sentiment` |
|
|
46
62
|
| "Full analysis of AAPL" | All stock tools in parallel |
|
|
47
63
|
|
|
48
64
|
## Key Principles
|
|
@@ -34,6 +34,7 @@ Normalize ticker to uppercase. Set `ticker` variable.
|
|
|
34
34
|
| `options_implied_move` | symbol=ticker | REQUIRED |
|
|
35
35
|
| `finnhub_short_interest` | symbol=ticker | REQUIRED |
|
|
36
36
|
| `finnhub_earnings_calendar` | from=today, to=today+14, symbol=ticker | REQUIRED |
|
|
37
|
+
| `market_breadth` | universe=major_us | ENRICHMENT |
|
|
37
38
|
| `tradingview_sector_performance` | | ENRICHMENT |
|
|
38
39
|
| `sentiment_fear_greed` | | ENRICHMENT |
|
|
39
40
|
| `options_max_pain` | symbol=ticker | ENRICHMENT |
|
|
@@ -71,6 +72,8 @@ After scoring, derive key levels:
|
|
|
71
72
|
- Max pain: options max pain strike (if available)
|
|
72
73
|
- Suggested stop: below nearest support level, or 2-3% below entry for a standard risk tolerance
|
|
73
74
|
|
|
75
|
+
Use market breadth as qualitative context, not as a ninth flag. Weak breadth, low % above SMA50/SMA200, or expanding new lows should make sizing commentary more conservative when the flag score is already MODERATE or worse.
|
|
76
|
+
|
|
74
77
|
## Output Format
|
|
75
78
|
|
|
76
79
|
### [TICKER] -- Pre-Trade Risk Assessment
|
|
@@ -97,7 +100,7 @@ PASS = flag NOT triggered (favorable). FAIL = flag triggered (risk present).
|
|
|
97
100
|
**Risk Score: X / 8 flags -- [LEVEL]**
|
|
98
101
|
|
|
99
102
|
**Market Context**
|
|
100
|
-
VIX level and trend, Fear & Greed index value and label, broad market direction.
|
|
103
|
+
VIX level and trend, Fear & Greed index value and label, broad market direction, and breadth confirmation if available.
|
|
101
104
|
|
|
102
105
|
**Sector Context**
|
|
103
106
|
Stock's sector, sector rank today, top and bottom 3 sectors.
|
|
@@ -132,3 +135,5 @@ Data from TradingView and Yahoo Finance is 15-minute delayed. CBOE and sentiment
|
|
|
132
135
|
see VIX=23.5 (PASS), not just PASS.
|
|
133
136
|
- DO NOT give position sizing advice without referencing the flag count. Every
|
|
134
137
|
sizing recommendation MUST tie back to the risk score.
|
|
138
|
+
- DO NOT add market breadth as a ninth scored flag. Use it to qualify the
|
|
139
|
+
market context and sizing language only.
|
|
@@ -24,13 +24,14 @@ Based ONLY on the symbols found in the user's workspace, fetch relevant data usi
|
|
|
24
24
|
- **Crypto Exposure Check:** If the watchlist contains crypto-exposed equities (e.g., MARA, CIFR, COIN) or Bitcoin, you MUST fetch the current price and 24h change of BTC (using `tradingview_quote` for `BINANCE:BTCUSDT`). Evaluate the correlation and note if the stocks are tracking or diverging from the BTC move.
|
|
25
25
|
- **Event Risk Check:** For active equity names (e.g., HOOD, SOFI), check for upcoming earnings today using `finnhub_earnings_calendar` and recent news using `finnhub_company_news`.
|
|
26
26
|
- **Risk Tone Check:** If the watchlist contains Gold or Silver (or proxies like GLD/SLV), fetch their current prices. Note any sharp moves that might change the overall market risk tone.
|
|
27
|
-
- **Market Pulse:** Fetch a basic S&P 500 / VIX quote (`tradingview_quote` for `SPY` and `VIX`) to establish the baseline market direction.
|
|
27
|
+
- **Market Pulse:** Fetch a basic S&P 500 / VIX quote (`tradingview_quote` for `SPY` and `VIX`) plus `market_breadth` with universe=major_us to establish whether the baseline market direction is broad or narrow.
|
|
28
28
|
|
|
29
29
|
### STEP 3: SYNTHESIZE THE BRIEF
|
|
30
30
|
Do NOT give a generic, broad market recap. Structure your response to answer the following questions specifically about the user's watchlist:
|
|
31
31
|
|
|
32
32
|
#### 1. What Matters Today
|
|
33
33
|
Highlight the overarching theme for the user's specific portfolio (e.g., "Crypto proxies are leading the market today," or "A defensive risk-off tone driven by a drop in Gold").
|
|
34
|
+
Include whether broad-market breadth supports or contradicts that theme when it affects the user's saved names.
|
|
34
35
|
|
|
35
36
|
#### 2. Active Names & Event Risk
|
|
36
37
|
List the tickers from the watchlist that are moving significantly (pre-market or early trading) or have an immediate catalyst (Earnings, News, Options Flow).
|