US Stock Gamma With moomoo
Use this skill to turn moomoo OpenD option data into an actionable gamma map and a plain-language trading note.
This public-safe skill is self-contained. Do not commit personal information, API keys, account data, private RAG files, or any Stocks folder contents to GitHub. It may use a user-specified private RAG folder during a session, but it must not store private source paths, personal positions, original strategy names, private person names/handles, proprietary labels, or private document titles. Generic market concepts such as gamma, GEX, dealer hedging, FVG, KDJ, MACD, RSI, VWAP, and Vegas may be retained.
Public And Private Versions
If both public and private versions of this skill exist, prefer the private version for local analysis when the user permits it. The private version may use local RAG indexes and user-specific study material.
When updating the skill, keep public and private versions in sync: write public-safe, generalized lessons to the public version; keep private labels, private paths, raw notes, screenshots, account data, and personal trade context only in the private version or private RAG index.
When preparing a GitHub upload or public release, use the public version only and run the repo-level release/privacy check from the repository root at shared/references/release-and-privacy.md. Never upload Stocks/, private RAG folders, .ftindex files, credentials, .env, personal data, screenshots, raw PDFs/PPTs, or private strategy labels.
Experience
Before deep analysis, read references/experience.md if it exists, but only Active Playbook and Compression Protocol unless the user explicitly asks for historical lessons. If a multi-turn correction produces a durable reusable lesson about gamma interpretation, option scenario handling, news/gamma interaction, or chart confirmation, update that file after answering. Generalize the lesson and strip private details.
Cross-skill calls are operational. When this workflow says to use another market skill, actually load that skill's SKILL.md and required references if the skill is installed or available as a sibling in this repository. Do not merely mention the other skill by name in the answer.
Required coordination: for US option/gamma analysis, use this skill as the positioning and option-structure entry point, and add supporting skills based on the analysis workflow, not only on the user's wording. If the analysis is about SPX, SPXW, SPY, QQQ, Nasdaq, Dow, Russell, VIX, Nikkei proxy gamma, or any broad index/ETF gamma map, load macro-news-check because index gamma cannot be read well without current macro and broad-market tape. If the analysis discusses news acceptance, theme crowding, risk-on/risk-off tone, forum/social sentiment, or leader/follower context, load stock-sentiment-analysis. If the final view depends on support/resistance, intraday timing, trend confirmation, failed breakout, or price-action validation, load stock-technical-analysis. Gamma is the positioning map; macro, sentiment, and chart structure decide whether the map is being accepted or rejected.
When official moomoo anomaly skills are installed, use them as an auxiliary scan layer, not as a replacement for the self-calculated gamma map. For user requests involving 异动, 大单, IV, PCR, 聪明钱, unusual options activity, option sentiment, or volatility anomaly, call moomoo-derivatives-anomaly alongside this skill by default. For U.S. stocks, do not request Hong Kong-only warrant / CBBC dimensions; use only U.S.-applicable option dimensions such as option_unusual, option_volatility, option_volume_price, option_sentiment, and option_comprehensive. A full scan can fail if it includes Hong Kong-only dimensions, so narrow the dimensions explicitly when needed.
If the analysis uses 1-minute K-line confirmation from moomoo OpenD, coordinate with stock-technical-analysis: let this skill fetch or compute the option/gamma map, then use the technical skill's framework to judge whether price action accepts, rejects, or only probes a wall, pit, or flip. If the user asks why a U.S. stock moved, whether earnings/guidance/news were accepted, or what explains a price move, route the evidence-gathering entry point to us-stock-move-reason first, then use this skill only for the option-positioning layer.
For ordinary U.S. stock move analysis, ChartExchange-style off-exchange/dark-pool data can be a secondary confirmation layer when price action or option positioning leaves an open question. Use it after confirmed news, macro/sector tape, price/volume, and option/gamma evidence. It is most useful for hidden-liquidity context around unusual volume, unexplained moves, failed news reactions, squeeze candidates, or repeated support/resistance at specific prices.
Mandatory Execution Gate
Before running scripts or writing the final answer, classify the request and load required sibling skills:
- Broad index / ETF gamma (
SPX, SPXW, SPY, QQQ, Nasdaq, Dow, Russell, VIX, Nikkei): load macro-news-check first or in parallel, then explicitly merge the macro tape with the gamma map. Do not answer index gamma from gamma data alone.
- 宏观 / 快讯 / rates / FX / commodities / geopolitics / Fed / yields: load
macro-news-check. Do not substitute ad hoc web search for this layer.
- 技术面 / intraday execution / "now" / support-resistance / "can it get through" / price action: load
stock-technical-analysis unless the user asks for a pure option-positioning dump. Use price action to decide whether a wall/pit is accepted, rejected, or only a battlefield.
- 官方 moomoo 期权异动 / 大单 / IV / PCR / 聪明钱: when
moomoo-derivatives-anomaly is available, run it as a parallel anomaly scan using U.S.-applicable option dimensions only; do not include Hong Kong warrant / CBBC dimensions for U.S. stocks.
- 情绪面 / news acceptance / crowding / risk-on or risk-off psychology / expectation gap: load
stock-sentiment-analysis when sentiment or expectation gap changes the interpretation.
- 新闻接受度 / 财报 / 指引 / 股价为何涨跌: use
us-stock-move-reason as the upstream catalyst workflow, then merge its evidence with this skill's gamma map.
- Dark pool / off-exchange / borrow / FTD / short-volume checks for U.S. stocks: use ChartExchange or the original FINRA/borrow-data source only as a secondary positioning layer. Do not use dark-pool prints or off-exchange share alone as a bullish/bearish signal.
- If a required sibling skill is unavailable, say so and provide a limited gamma-only read. If it is available but not needed, state the reason briefly.
Final answers for index gamma should include a compact 融合口径 line naming the layers used, for example: 自算 SPXW gamma + macro-news-check tape + stock-technical-analysis price action + stock-sentiment-analysis emotion/expectation gap. This makes skipped or missing skill fusion visible.
DTM SPX Reference
For SPX/SPXW context, first reference the canonical https://daytrading.monster/api/gamma/ interface documented in https://daytrading.monster/api-docs/gamma. Parse its text/plain body as JSON and check its session/update time. It provides current SPX structure, expiry summaries, selected strike levels, Camarilla, and 0DTE five-minute samples. Use price_trajectory.points (timestamp, index_value) to read all available SPX source prices in the returned session; these are price-only points, not interpolated or guaranteed tick-complete. It is a fixed SPX/SPXW reference, not a full strike grid or an arbitrary-ticker endpoint. Keep the existing moomoo collection and computation workflow for full-chain calculations, requested scenario/heatmap detail, and other stocks or ETFs; do not present a DTM snapshot as a local calculation. Reuse an applicable upstream snapshot instead of requesting it twice.
Environment Check
This skill requires moomoo OpenD, the moomoo Python SDK, and the separately installed moomooapi skill. The collectors import common.py from ~/.codex/skills/moomooapi/scripts/; this plugin does not bundle that dependency. In a cloud environment without these local dependencies, do not run the collectors or claim locally calculated GEX. Use the documented DTM SPX reference when applicable, or request a user-provided option-chain snapshot and clearly limit the analysis.
Run the commands below with the directory containing this SKILL.md as the working directory, resolved from the installed skill location. This supports both standalone skill and plugin-cache installations.
- First check whether OpenD is running and the
moomoo Python package imports. If not, guide the user to install or launch OpenD using the install-moomoo-opend skill.
- Tell the user OpenD must stay running in the background while querying quotes/options. Login may be required for permissioned data.
- Do not ask the user to unlock trading or input an encrypted private key unless they explicitly want trading functions. This skill only needs quote/option data.
- If moomoo cannot provide a live index snapshot, use available option chains plus a user-provided/live SPX, ES, CFD, or SPY anchor and state the anchor clearly.
- For live 1-minute K-line confirmation through OpenD, treat subscriptions as reusable runtime state, not as permanent skill state. Prefer reusing an existing
US.SPY SubType.K_1M subscription during a live OpenD session; if get_cur_kline(code, n, KLType.K_1M, AuType.QFQ) returns 请先订阅KL_1Min数据 or another stale-subscription/permission error, call subscribe([code], [SubType.K_1M], subscribe_push=False) and retry once. OpenD subscriptions may disappear after OpenD restart, reconnect, quota changes, permission changes, or context lifecycle changes, so do not write "currently subscribed" as a static fact into the skill or output.
Default Output
Route the request before choosing a script:
- Ordinary US stocks/ETFs: use
scripts/gamma_report.py, then interpret the output with the Single-Stock Directional Framework below before giving a bullish/bearish view.
- SPX / SPXW / SP500 / 标普500 / S&P 500 index gamma: do not use
gamma_report.py as the final workflow. Use scripts/spx_intraday_latest.py and references/spx-intraday.md: query US..SPX, keep SPX/SPXW strikes directly, infer the spot anchor from SPXW 0DTE put-call parity when the SPX index snapshot is unavailable, and treat SPY only as a sanity check or fallback.
After the U.S. options session closes, never retain an expired same-day SPXW chain in a forward chart or memo. Start from the next listed unexpired expiry; the script uses that front expiry in the existing 0DTE calculation bucket so its Flip, walls, range, and comparison logic remain front-expiry based. Label it as a next-expiry proxy after close, not as live 0DTE.
- Nikkei / 日经 / 日経 / NKY / Nikkei 225 index gamma: do not present raw EWJ ETF strikes as index levels, and do not use a current Nikkei anchor against a stale EWJ close. Use EWJ only as a proxy option book, then convert with a time-aligned bridge: EWJ quote-time value ->
NKDmain/Nikkei futures at that same time -> current NIYmain/Nikkei CFD or the user's current index anchor. Use scripts/proxy_index_gamma.py. The report must state every anchor, ratio, timestamp, and limitation.
Default to a concise chat/terminal text summary. Do not create files as part of this skill unless the user explicitly requests raw JSON export.
For ordinary US stocks/ETFs use scripts/gamma_report.py when the user asks for the ticker itself:
python3 scripts/gamma_report.py US.BA
python3 scripts/gamma_report.py US.MP
For SPX/SPXW intraday index gamma use:
python3 scripts/spx_intraday_latest.py
For SPX answers, default to the detailed index-gamma format. The answer should be detailed enough to explain claims such as “still negative gamma, 7450 starts neutralizing, 7500 becomes stronger positive gamma” from data. Include:
- SPX anchor and anchor method.
- 0DTE, Next2, Fri2w, and All-window net GEX, net VEX, flip, top walls, and top pits.
- A key-strike cross-section showing 0DTE / Next2 / Fri2w / All GEX and All VEX at nearby decision levels, especially current rounded strikes, major walls, major pits, and user-mentioned levels.
- A distinction between aggregate regime and local strike regime:
All still negative can coexist with 7450/7500 locally positive.
- A conclusion that says whether each level is downside acceleration, neutralization/repair threshold, or stronger positive-gamma pinning wall.
When the user asks about 未来几天 gamma, 未来几日 gamma, 后面几天 gamma, 按日期看 gamma, 哪天强哪天弱, or shares a multi-expiry gamma chart and wants the forward read, use the per-expiry report mode:
python3 scripts/spx_intraday_latest.py --by-expiry-report
When comparing against an earlier same-day SPX/SPXW snapshot, pass the previous JSON and any specific battlefield strikes the user cares about:
python3 scripts/spx_intraday_latest.py \
--compare-json /path/to/previous_spx_gamma.json \
--watch-strikes 7400,7425,7450
When the user asks to draw a current or forward multi-expiry SPX gamma chart, first export the current calculation JSON, then generate the theme-aware heatmap fragment:
python3 scripts/spx_intraday_latest.py \
--by-expiry-report --future-count 6 \
--json-output /tmp/current-spx-gamma.json
python3 scripts/render_spx_gamma_heatmap.py \
/tmp/current-spx-gamma.json /tmp/spx-gamma.html \
--smooth-radius 5 --smooth-sigma 2.25
Use only real listed expiries from the JSON. Each chart column, Flip, Call Wall, and Put Wall must use only contracts expiring on that column's date. The solid foreground/black line is each expiry's gamma flip, not a price forecast; the dashed line is the current SPX anchor. The left All GEX profile must mirror all selected-expiry Call-side GEX right of zero and absolute Put-side GEX left of zero on one shared scale; overlay the raw Net GEX as a thin line. The right heatmap remains Net GEX only. Call Wall is the strike with the largest call-side GEX for that expiry; Put Wall is the strike with the most negative put-side GEX. Do not substitute maximum all-strike OI, which can select far-OTM legacy positions with little current gamma. The heatmap may smooth the visual layer along strikes, but must preserve the raw GEX calculations, Flip, and Call/Put Wall values. Read references/gamma-heatmap-visualization.md before changing the range, smoothing, or chart semantics.
When no axis range is explicitly requested, render SPX from floor(spot / 100) * 100 - 300 through ceil(spot / 100) * 100 + 300. For example, an anchor of 7480 renders 7100–7800. Explicit --min-strike and --max-strike remain available for a user-requested audit range.
For Codex inline display, generate the fragment inside the thread-scoped visualization directory and emit ::codex-inline-vis{file="basename.html"} using only the file name. The fragment must use its generated unique root ID with document.getElementById, never document.currentScript. Show desktop CW and PW values on separate rows so adjacent expiry columns remain readable. Do not create or publish a website unless the user explicitly asks for one.
For Nikkei 225 proxy gamma using EWJ converted to a Nikkei CFD/index anchor use:
python3 scripts/proxy_index_gamma.py US.EWJ \
--index-name "日经225 / NKD-NIY proxy" \
--bridge-anchor-at-proxy-time 59920 --bridge-current 60110 --final-anchor 60080
The script:
- reads stock snapshot, option expirations, option chain, option snapshots, and daily K lines from moomoo OpenD;
- throttles
get_option_chain calls and retries once after OpenD frequency-limit errors, because moomoo can reject more than about 10 option-chain requests in 30 seconds;
- chooses the pricing anchor by U.S. session: regular
last_price, after-hours after_price, overnight overnight_price, pre-market pre_price, then bid/ask midpoint or regular last as fallback; label it as a pricing anchor, not guaranteed live tradable price;
- gathers option
OI, IV, delta, gamma, theta, vega, bid/ask, volume;
- calculates Black-Scholes vanna from live/anchor spot, strike, IV, and DTE because moomoo snapshots may not provide
option_vanna;
- selects option expiries by default as: all weeklies within the next 2 calendar weeks when available, plus monthly expiries for the current month and next 2 months; for high-frequency option names also include the next 2 trading-day/daily expiries when listed;
- calculates signed GEX with the common assumption
Call = +, Put = -;
- calculates signed VEX with the same directional convention, expressed as spot-equivalent delta-dollar change per 1 vol point IV move;
- calculates option delta exposure (
DEX) and approximate charm exposure by strike, plus call/put OI shelves and front-expiry IV smile/skew;
- prints a complete OpenD gamma data group by default: pricing anchor, VT/flip, gamma wall, call wall, put wall, distance to VT/CW/PW, net GEX, net VEX, net DEX, charm/day, gamma pits, vanna zones, DEX zones, charm zones, OI shelves, IV smile/skew, and a conclusion that explicitly combines these dimensions;
- recomputes gamma across a spot-price grid to estimate gamma wall, gamma trough, and gamma flip;
- when JSON output is requested, includes per-strike
gex_by_strike and vex_by_strike for each bucket so later runs can detect same-strike support/risk migration instead of only comparing top walls and pits;
- includes a
per_expiry section in JSON for each selected expiration date, so future-days gamma reads can say which exact date is weaker or stronger instead of only using Next2 / Fri2w aggregate buckets;
- includes per-expiry
call_wall and put_wall from side-specific GEX within that expiry; preserve null when no valid level exists;
- with
--by-expiry-report, prints a per-date forward gamma memo that names each selected expiry date, net GEX, flip, main downside risk zone, upper pressure/pinning zone, and a baseline/bearish/repair scenario; use this mode for single stocks too when the user shares or asks about multi-expiry vol-trigger/gamma-wall tables;
- with
--compare-json, compares the new snapshot with a prior JSON snapshot and highlights material strike-level changes, including positive-to-negative GEX flips where a prior support/wall has disappeared and become a pit or acceleration risk;
- prints a readable text memo by default; JSON export flags should be used only when the user explicitly asks for raw data.
For SPX 0DTE or quick trading questions, chat/terminal text is the default. Still compute or fetch the chain first when possible.
For short-dated option value scenarios, use scripts/option_scenario_table.py after fetching live IV/spot from moomoo:
python3 scripts/option_scenario_table.py \
--kind C --strike 7370 --iv 16.8 \
--asof 2026-05-13T02:30:00+09:00 --expiry 2026-05-13T05:00:00+09:00 \
--spots 7350,7360,7370,7380,7390
Read extra references only when the request needs them:
- For
.SPX, SPXW, SPY, ES, SpotGamma/TRACE heatmap, or intraday index judgment, read references/spx-intraday.md.
- For a continuous multi-expiry SPX gamma heatmap, visual smoothing, or same-session chart comparison, read
references/gamma-heatmap-visualization.md.
- For short-dated option value tables, account-recovery option targets, or “what is this call/put worth if price reaches X by time Y”, read
references/option-scenario-tables.md.
- For U.S. single-stock dark-pool/off-exchange, borrow-fee, short-volume, FTD, or ChartExchange confirmation, use the
Dark Pool / Short Data Layer section below.
Single-Stock Directional Framework
For ordinary U.S. stocks and ETFs, the default job is not only to calculate gamma; it is to convert option structure into a directional trading read. Use this framework whenever the user asks 看多还是看空, bullish or bearish, 能不能追, 支撑压力, 未来几天 gamma, or shares third-party gamma screenshots/tables.
Start with the shortest useful answer:
- State a direct bias:
偏多, 偏空, 中性偏多修复, 中性偏空防守, or 高波动战场.
- Name the current spot and the one or two levels that decide the bias.
- Say what changes the conclusion: reclaim/hold above an upper trigger, or lose a lower support/put wall.
Directional labels are incomplete without levels. Whenever using labels such as 中性偏多修复, 偏多钉扎, 中性钉扎, 偏空/高波动, or 高波动战场, immediately attach the price zone that makes the label actionable:
- Current spot / pricing anchor: state the current spot or pricing anchor before the directional label or in the same table row. A level is only actionable relative to spot; say whether spot is below, inside, or above the key zone. Example:
现价 198.18,偏多钉扎,钉扎区 200 附近.
- Pinning zone: name the exact strike or tight range being pinned, usually the nearest dominant
GW, CW, PW, or confirmed OI shelf near spot. Example: 偏多钉扎,钉扎区 200 附近.
- Repair / confirmation level: for repair labels, name the level that must be reclaimed or held, usually
VT/flip first, then the nearest GW/CW. Example: 中性偏多修复,站稳 295,突破 297.5 才打开上沿.
- Invalidation / downside risk: name the put wall, flip, or gamma pit whose loss invalidates the bullish/neutral read. Example:
跌破 290/284.6 则修复失败.
- Battlefield range: for mixed or high-volatility labels, give the actual range between the nearest support and pressure levels. Example:
高波动战场,260-350 是主战场,跌破 205 扩大下行.
Do not output a direction-only label when current spot, VT, GW, CW, PW, gamma pits, or OI shelves are available. If current spot or precise levels are unavailable, say 现价/关键点位不足 and lower confidence instead of presenting a clean directional label.
Always build the read from these layers, in this order:
- Spot vs vol trigger: treat the nearest major
vol trigger or gamma flip as the regime divider. Spot below the trigger means higher-volatility/negative-gamma risk unless price reclaims it. Spot above the trigger allows repair but still needs confirmation above the nearest wall.
- Spot vs gamma wall: gamma wall above spot is pressure, pinning, or a repair target; gamma wall below spot is support or a recapture zone. If spot is trapped between a put wall and a call wall, call it a battlefield instead of forcing a strong directional view.
- Call wall / put wall distance: nearest call wall is the first upside pressure or pinning reference; nearest put wall is the first downside support. A wide gap between walls allows trend movement; a tight gap implies chop/pinning.
- Per-expiry net GEX: identify which expiry actually dominates. Near-dated negative GEX can overpower longer-dated support and create squeeze/crash-style movement. Mixed positive and negative expiries mean conditional bias, not a clean all-in view.
- Open interest shelves: use absolute OI to confirm where real option interest clusters. Treat large OI shelves above as pressure/pinning references and below as support/risk zones; do not assume OI alone reveals buyer direction.
- IV smile and skew: high IV and steep downside skew strengthen the warning that the structure is defensive or volatility-seeking. A large vol smile with both call and put blocks often means long-vol/straddle/strangle positioning, not simple bullishness.
- Unusual option flow: classify prints as directional only when they are clean single-leg buys/sells and the bid/ask side is visible. Treat multi-leg, condor, butterfly, straddle, strangle, or paired call/put prints as volatility/range trades unless price action proves direction.
- Delta hedging exposure: use net delta-hedging pressure as a secondary force map. It can confirm where dealer hedging may add buying/selling, but it should not override spot vs trigger/wall structure.
Use the following directional rules:
- Bullish repair: spot is above the nearest vol trigger or reclaims it, holds above the nearest put wall/support, and has room to the next call wall. Wording:
站上 X 才算修复,第一目标 Y,突破 Y 才看 Z.
- Bearish pressure: spot is below the nearest vol trigger/gamma flip, near-dated net GEX is negative, and losing the nearest put wall opens a lower put wall or gamma trough. Wording:
跌破 X 转空,下一层看 Y/Z.
- Neutral battlefield: spot sits between a nearby put wall and call wall, or per-expiry GEX is mixed. Wording:
X-Y 是战场,不追单边;等站上 Y 或跌破 X.
- High-volatility warning: spot is below trigger with negative GEX, IV is high, and option flow shows large puts or long-vol structures. Wording:
不是单纯看空,是波动放大;方向等关键位确认.
- False bullish signal: do not call it bullish only because call wall is far above spot. A far call wall is potential upside/pinning only after spot reclaims trigger and nearby resistance.
- False bearish signal: do not call it bearish only because put OI is large. Put wall below spot can be support until it breaks; after it breaks, it becomes acceleration risk.
For third-party trigger/wall table interpretation, map fields this way:
| Field |
Read |
VOL TRIGGER |
regime divider / volatility trigger |
GAMMA WALL |
main gamma pinning, pressure, or support |
CALL WALL |
upside pressure, pinning, or breakout target |
PUT WALL |
downside support while held, acceleration risk after break |
NET GEX |
dealer hedging regime; negative amplifies trend, positive favors chop |
ABS OPEN INTEREST |
where open option interest is actually concentrated |
IV SMILE |
whether the market is pricing elevated tail/volatility risk |
| unusual flow table |
directional only if single-leg and bid/ask context is clear |
For a complete OpenD-generated gamma memo, include these dimensions when the data is available:
| Dimension |
What to report |
How to use in conclusion |
VT / Vol Trigger |
self-calculated gamma flip / volatility-regime divider |
Above = repair or pinning possible; below = high-volatility or defensive unless reclaimed |
GW / Gamma Wall |
strongest positive GEX / pinning or pressure level |
Wall above = first pressure/target; wall below = recapture/support zone |
CW / Call Wall |
largest call-side GEX/OI concentration |
Upside pressure, pinning, or breakout target |
PW / Put Wall |
largest put-side GEX/OI concentration |
Downside support while held; acceleration risk after break |
距VT / 距CW / 距PW |
percent distance from pricing anchor |
Shows whether the next decision point is close enough to matter |
Net GEX |
aggregate signed gamma exposure |
Positive favors chop/pinning; negative favors trend amplification |
Gamma pits |
strongest negative GEX strikes |
Potential fast-move / failed-support zones |
Net DEX |
option delta exposure map using option delta sign |
Secondary hedge-pressure map; dealer hedge may be opposite under customer-long assumptions |
VEX / Vanna zones |
vanna exposure by strike |
Interprets IV crush/expansion pressure; never standalone bullish/bearish |
Charm zones |
approximate delta decay exposure by strike |
Useful near expiry, especially 0DTE/weekly windows |
OI shelves |
largest call/put open-interest strikes |
Confirms where interest clusters; not direction by itself |
IV smile/skew |
ATM IV, downside-wing IV, upside-wing IV, skew |
Defensive skew or elevated wings warns of tail/volatility positioning |
Per-expiry rows |
each expiry's VT/GW/CW/PW, GEX, VEX, DEX, Charm |
The dominant near-dated expiry can override the all-expiry aggregate |
When the user asks only "看多还是空", answer in this compact structure:
结论: one line, e.g. 中性偏多修复,但不是确认多头.
关键位: 上方确认 X/Y, 下方失守 A/B.
为什么: three bullets maximum, using vol trigger, walls, and per-expiry GEX/flow.
交易口径: one sentence such as 不追,等站上 X;跌破 A 则按偏空处理.
Text Level Map And Session Memory
For SPX/SPXW and other index-style intraday gamma answers, expose the level work as text: short bullets, compact Markdown tables, and a direct bias line. Do not rely on visual-only interpretation.
For forward-looking requests such as 未来几天 gamma, 未来几日 gamma, 后面几天 gamma, 哪天强哪天弱, or a screenshot showing several expiry dates, do not answer only with 0DTE / Next2 / Fri2w tables. For SPX/SPXW use spx_intraday_latest.py --by-expiry-report; for ordinary stocks use gamma_report.py --by-expiry-report or otherwise compute per_expiry, then answer in this structure:
- Start with one sentence:
从“未来几天 gamma”角度看:... and say whether the next 1-3 days are repaired, weak, high-volatility, or pressure-first. Name the key repair zone.
- Add
按具体到期日看: and one short paragraph per expiry date, e.g. 2026-06-09 周二,当天到期, 2026-06-10 周三, 2026-06-11 周四, 2026-06-12 周五. For each date, state: weak/strong label, net GEX direction and rough size, flip, main downside put-gamma risk zones, upper call-gamma pressure/pinning zones, and what price must reclaim to improve.
- Add
我的推演: with exactly three scenario bullets: 基准情形, 偏空情形, and 修复情形. These scenarios should use dates and levels, not generic statements.
- End with a plain conclusion such as:
所以按日期结论是:周二最弱,周三/周四仍偏压制,周五有修复窗口但门槛在 7450。
For this mode, avoid dumping every strike or table row. The user wants the trading meaning: which date is structurally weak, where risk migrates, where repair starts, and what would invalidate the weak/strong read.
Key calculated levels:
- Prior-session pivot map: use the prior regular-session high/low/close when available.
PP = (H + L + C) / 3, BC = (H + L) / 2, TC = 2 * PP - BC, R1 = 2 * PP - L, S1 = 2 * PP - H, R2 = PP + (H - L), S2 = PP - (H - L). For Camarilla, use unit = 1.1 * (H - L) / 12, then H3 = C + 3 * unit, H4 = C + 4 * unit, H5 = C * H / L when stable, L3 = C - 3 * unit, L4 = C - 4 * unit, L5 = C - (H5 - C).
- CPR interpretation: narrow
TC-BC means a larger directional expansion is easier; wide CPR means more chop/mean reversion. Spot above TC is constructive, between TC/BC is a balance zone, and below BC is weaker unless reclaimed.
- Gamma map: wall above spot is pressure or pinning; wall below spot is support or a recapture zone; negative pit below spot is acceleration risk; flip or vol trigger is the regime divider. Say whether the current spot is above/below flip/trigger and whether GEX is strengthening or weakening.
- Vanna map: combine top positive/negative VEX zones with IV direction, spot versus flip, and price action. Do not describe VEX alone as bullish or bearish.
When the user runs this skill multiple times during the same trading day in the same conversation, use earlier same-day results as optional but important context. Compare the new result with the earlier answer when migration could change the judgment, when the user asks "now/again", or when spot is near a wall, pit, flip, or trigger: spot, net GEX, net VEX, flip, nearest wall, nearest pit, and CPR relationship. State what migrated and what strengthened/weakened. If a prior JSON snapshot exists or the user provides one, run
spx_intraday_latest.py --compare-json ...; if the user asks about a specific level such as 7400支撑还在吗, include it in --watch-strikes. Always check whether the same strike's GEX sign or magnitude changed materially across 0DTE, Next2, Fri2w, and All buckets, but do not mechanically dump same-strike change rows in the final answer. Translate the comparison into what it means and what it may foreshadow: support quality deteriorating or recovering, risk center migrating lower/higher, upper pinning weakening, reflexive selling/buying risk rising, or chop/pinning returning. Treat positive-to-negative GEX migration at an active battlefield strike as 支撑跑路/降级为加速风险, not merely as a lower wall ranking. Treat negative-to-positive migration as 支撑恢复/加速风险缓和, but still require price action to confirm. If no earlier same-day result exists in the conversation or user-provided notes, do not imply there is an internal time series.
Dark Pool / Short Data Layer
Use this layer only for U.S.-listed stocks and ETFs. Do not apply it to A-shares, Japanese stocks, or non-U.S. local listings.
When using ChartExchange, build the URL from both listing venue and ticker. The path shape is:
https://chartexchange.com/symbol/{exchange-lowercase}-{ticker-lowercase}/exchange-volume/dark-pool-levels/
Examples: nyse-anet, nasdaq-nvda, nyse-spy. SPY is a common exception where ChartExchange uses nyse-spy, so search the ticker on ChartExchange or a quote source first when the venue is uncertain, then use the matching venue in the URL. Do not reuse an ANET URL for other tickers without changing both ticker and venue.
Interpretation rules:
Off Exchange & Dark Pool %: compare today's share with the ticker's own average. A high off-exchange share is common in U.S. equities and is not bullish or bearish by itself.
Dark Pool Levels: treat high-volume price levels as hidden-liquidity reference zones. They become support/resistance only if later price action confirms acceptance, rejection, or repeated defense.
Dark Pool Prints: large prints near VWAP, gaps, prior highs/lows, or post-news levels are notable, but the data does not reveal whether the initiating side was accumulation, distribution, internalization, or a cross.
Short Volume: daily short-sale volume is not short interest and often includes market-maker activity. Use it for flow pressure only, not for outstanding short exposure.
Short Interest, Borrow Fee, Shares Available, and FTD: use these for squeeze risk. Stronger squeeze evidence is rising borrow fee, shrinking availability, elevated short interest/FTD, and price refusing to break down after heavy short/dark flow.
- Always combine this layer with news acceptance, live price/VWAP, volume, and option/gamma structure. If the conclusion depends on a dark-pool level becoming support/resistance, load
stock-technical-analysis and require price confirmation.
Optional User Knowledge Base
Do not read local research folders by default. If a user wants to incorporate their own study materials, ask them to specify a private RAG or index folder outside this public repository:
- keep raw PDFs, screenshots, notes, and proprietary indicators in a private local folder or private vector store;
- offer to create or update a lightweight local index for repeated use, with only user-approved aliases, topics, page/slide ranges, keywords, and public-safe summaries;
- extract only reusable, public-safe rules into this skill when the user explicitly asks to update the skill;
- strip private paths, account details, ticker-specific trade logs, original strategy names, private person names/handles, unique document labels, and memorable private labels;
- keep this skill functional even when that private RAG corpus is unavailable.
Required Interpretation Style
Write like a pre-market trading memo:
- 结论: direct bias first: bullish, bearish, neutral battlefield, or high-volatility watch. Do not bury the answer behind tables.
- 关键位: current spot, nearest vol trigger/flip, first call wall, first put wall, and the level that changes the view.
- 我会怎么做: concrete scenario handling, e.g. “do not chase until it holds X”, “treat X-Y as chop”, “above Z opens next target”.
- 什么情况说明我错了: exact invalidation levels.
- 怎么和技术确认配合: use gamma as the map, then confirm entries/exits with
stock-technical-analysis concepts such as KDJ, MACD, MA144/Vegas, FVG, volume, and price action.
Avoid only dumping tables. The user wants judgment, assumptions, and a clear action framework.
Multi-Stock Gamma Output Contract
When answering a batch request with multiple stocks, ETFs, or mixed tickers, every row must include both:
- Current spot / pricing anchor: the latest usable spot or anchor price used for option calculations, with the source/session caveat when relevant. Do not make the reader infer where price is relative to the levels.
- Gamma sign / regime: positive, negative, or mixed, with
Net GEX when available. This is the dealer-hedging/volatility map.
- Directional state / bias:
偏多修复, 中性钉扎, 中性偏空防守, 高波动战场, or another explicit long/short/neutral state derived from spot vs flip/walls/pits. This is the trading interpretation.
- Actionable key levels / zone: the exact pinning area, battlefield range, repair trigger, upside pressure, and/or downside invalidation that justifies the directional state. At minimum, include the nearest
VT/flip, GW/CW pressure or pinning reference, and PW/pit support or risk when those fields are available.
Do not let one replace the other. A stock can be 净 GEX 为正 but still 中性偏空/高波动 if spot is below the volatility trigger or trapped under a nearby wall; a stock can be locally positive gamma but still a poor long setup if it has not reclaimed the trigger. In tables, prefer columns like:
Ticker | Spot anchor | Gamma sign / Net GEX | Directional state | Key zone / pinning area | Flip/VT | Upside wall | Downside risk | What changes the view
For batch summaries, group names after the table by directional state, but keep the per-row spot, gamma sign, and key levels visible. If space is limited, abbreviate commentary first; do not omit the spot/anchor, gamma regime, direction, or actionable price zone.
For multi-expiry batch reports, each expiry row must show the date-specific levels, not only the all-expiry levels. Use the expiry's own VT, GW, CW, PW, net GEX, and pits when available. If describing 本周 and 下周, give both periods' gamma sign, directional state, and actionable zone separately because the same ticker can pin this week and become high-volatility next week.
When news or broad risk sentiment is driving the underlying or index, call macro-news-check only when current macro tape can plausibly change the gamma read, such as CPI/PCE/FOMC/central-bank events, Treasury yield shocks, USD moves, oil/gold/geopolitical headlines, index futures breaks, or sudden risk-on/risk-off tape. Use stock-sentiment-analysis if deeper emotion-cycle framing is needed, and add an expectation-gap check before relying on the gamma map: prior market expectation -> actual news -> above expectation / in line or merely landed / below expectation. Apply this to numeric headlines such as orders, CPI/FOMC data, earnings, guidance, and ETF flows, and to qualitative headlines such as regulatory wording, geopolitical tone, management confidence, timing, certainty, and whether the news solves the market's real concern. Gamma explains likely hedging pressure after price moves; it does not by itself explain whether the headline was accepted or rejected.
Gamma Reading Rules
gamma wall: a price where positive GEX is concentrated; price often slows, pins, or rejects there.
gamma flip: estimated transition between positive and negative gamma regimes.
vol trigger: treat as the practical gamma/volatility regime divider. Below it, expect more reflexive/high-volatility behavior; above it, expect repair or pinning if price also holds support.
call wall: upside pressure/pinning zone first, breakout target second. Do not treat a distant call wall as bullish confirmation until spot reclaims the nearest trigger/resistance.
put wall: downside support first, acceleration risk after it breaks. Do not treat large put OI as automatically bearish while spot is holding above the wall.
vanna: estimated change in option delta as IV changes. Moomoo usually provides enough inputs to compute it even when it does not provide a direct option_vanna field.
VEX: aggregate vanna exposure by strike. Use it to identify where IV crush/IV expansion can force meaningful delta adjustment; do not treat it as a standalone direction signal.
- Positive gamma: more chop/pinning/mean-reversion; avoid chasing into walls without confirmation.
- Negative g
…(truncated)
1---2name: us-stock-gamma-moomoo3description: Analyze US stock and ETF option gamma exposure with moomoo OpenD, plus .SPX/SPXW index-option structure using SPY/ES/CFD conversion when needed. Use when the user asks for gamma, GEX, gamma wall, gamma flip, SPX/SPY/ES intraday gamma, 0DTE option scenario value tables, option positioning, US-stock dark pool/off-exchange flow, borrow fee, FTD, short volume, or ChartExchange confirmation. Produces plain-language text conclusions from moomoo option chain, snapshots, Greeks, OI, IV, and pre-market/latest stock price; raw JSON is only for explicit export requests.4---56# US Stock Gamma With moomoo78Use this skill to turn moomoo OpenD option data into an actionable gamma map and a plain-language trading note.910This public-safe skill is self-contained. Do not commit personal information, API keys, account data, private RAG files, or any `Stocks` folder contents to GitHub. It may use a user-specified private RAG folder during a session, but it must not store private source paths, personal positions, original strategy names, private person names/handles, proprietary labels, or private document titles. Generic market concepts such as gamma, GEX, dealer hedging, FVG, KDJ, MACD, RSI, VWAP, and Vegas may be retained.111213## Public And Private Versions1415If both public and private versions of this skill exist, prefer the private version for local analysis when the user permits it. The private version may use local RAG indexes and user-specific study material.1617When updating the skill, keep public and private versions in sync: write public-safe, generalized lessons to the public version; keep private labels, private paths, raw notes, screenshots, account data, and personal trade context only in the private version or private RAG index.1819When preparing a GitHub upload or public release, use the public version only and run the repo-level release/privacy check from the repository root at `shared/references/release-and-privacy.md`. Never upload `Stocks/`, private RAG folders, `.ftindex` files, credentials, `.env`, personal data, screenshots, raw PDFs/PPTs, or private strategy labels.2021## Experience2223Before deep analysis, read `references/experience.md` if it exists, but only `Active Playbook` and `Compression Protocol` unless the user explicitly asks for historical lessons. If a multi-turn correction produces a durable reusable lesson about gamma interpretation, option scenario handling, news/gamma interaction, or chart confirmation, update that file after answering. Generalize the lesson and strip private details.2425Cross-skill calls are operational. When this workflow says to use another market skill, actually load that skill's `SKILL.md` and required references if the skill is installed or available as a sibling in this repository. Do not merely mention the other skill by name in the answer.2627Required coordination: for US option/gamma analysis, use this skill as the positioning and option-structure entry point, and add supporting skills based on the analysis workflow, not only on the user's wording. If the analysis is about SPX, SPXW, SPY, QQQ, Nasdaq, Dow, Russell, VIX, Nikkei proxy gamma, or any broad index/ETF gamma map, load `macro-news-check` because index gamma cannot be read well without current macro and broad-market tape. If the analysis discusses news acceptance, theme crowding, risk-on/risk-off tone, forum/social sentiment, or leader/follower context, load `stock-sentiment-analysis`. If the final view depends on support/resistance, intraday timing, trend confirmation, failed breakout, or price-action validation, load `stock-technical-analysis`. Gamma is the positioning map; macro, sentiment, and chart structure decide whether the map is being accepted or rejected.2829When official moomoo anomaly skills are installed, use them as an auxiliary scan layer, not as a replacement for the self-calculated gamma map. For user requests involving `异动`, `大单`, `IV`, `PCR`, `聪明钱`, unusual options activity, option sentiment, or volatility anomaly, call `moomoo-derivatives-anomaly` alongside this skill by default. For U.S. stocks, do not request Hong Kong-only warrant / CBBC dimensions; use only U.S.-applicable option dimensions such as `option_unusual`, `option_volatility`, `option_volume_price`, `option_sentiment`, and `option_comprehensive`. A full scan can fail if it includes Hong Kong-only dimensions, so narrow the dimensions explicitly when needed.3031If the analysis uses 1-minute K-line confirmation from moomoo OpenD, coordinate with `stock-technical-analysis`: let this skill fetch or compute the option/gamma map, then use the technical skill's framework to judge whether price action accepts, rejects, or only probes a wall, pit, or flip. If the user asks why a U.S. stock moved, whether earnings/guidance/news were accepted, or what explains a price move, route the evidence-gathering entry point to `us-stock-move-reason` first, then use this skill only for the option-positioning layer.3233For ordinary U.S. stock move analysis, ChartExchange-style off-exchange/dark-pool data can be a secondary confirmation layer when price action or option positioning leaves an open question. Use it after confirmed news, macro/sector tape, price/volume, and option/gamma evidence. It is most useful for hidden-liquidity context around unusual volume, unexplained moves, failed news reactions, squeeze candidates, or repeated support/resistance at specific prices.3435## Mandatory Execution Gate3637Before running scripts or writing the final answer, classify the request and load required sibling skills:3839- **Broad index / ETF gamma** (`SPX`, `SPXW`, `SPY`, `QQQ`, `Nasdaq`, `Dow`, `Russell`, `VIX`, `Nikkei`): load `macro-news-check` first or in parallel, then explicitly merge the macro tape with the gamma map. Do not answer index gamma from gamma data alone.40- **宏观 / 快讯 / rates / FX / commodities / geopolitics / Fed / yields**: load `macro-news-check`. Do not substitute ad hoc web search for this layer.41- **技术面 / intraday execution / "now" / support-resistance / "can it get through" / price action**: load `stock-technical-analysis` unless the user asks for a pure option-positioning dump. Use price action to decide whether a wall/pit is accepted, rejected, or only a battlefield.42- **官方 moomoo 期权异动 / 大单 / IV / PCR / 聪明钱**: when `moomoo-derivatives-anomaly` is available, run it as a parallel anomaly scan using U.S.-applicable option dimensions only; do not include Hong Kong warrant / CBBC dimensions for U.S. stocks.43- **情绪面 / news acceptance / crowding / risk-on or risk-off psychology / expectation gap**: load `stock-sentiment-analysis` when sentiment or expectation gap changes the interpretation.44- **新闻接受度 / 财报 / 指引 / 股价为何涨跌**: use `us-stock-move-reason` as the upstream catalyst workflow, then merge its evidence with this skill's gamma map.45- **Dark pool / off-exchange / borrow / FTD / short-volume checks for U.S. stocks**: use ChartExchange or the original FINRA/borrow-data source only as a secondary positioning layer. Do not use dark-pool prints or off-exchange share alone as a bullish/bearish signal.46- If a required sibling skill is unavailable, say so and provide a limited gamma-only read. If it is available but not needed, state the reason briefly.4748Final answers for index gamma should include a compact `融合口径` line naming the layers used, for example: `自算 SPXW gamma + macro-news-check tape + stock-technical-analysis price action + stock-sentiment-analysis emotion/expectation gap`. This makes skipped or missing skill fusion visible.4950## DTM SPX Reference5152For SPX/SPXW context, first reference the canonical `https://daytrading.monster/api/gamma/` interface documented in `https://daytrading.monster/api-docs/gamma`. Parse its `text/plain` body as JSON and check its session/update time. It provides current SPX structure, expiry summaries, selected strike levels, Camarilla, and 0DTE five-minute samples. Use `price_trajectory.points` (`timestamp`, `index_value`) to read all available SPX source prices in the returned session; these are price-only points, not interpolated or guaranteed tick-complete. It is a fixed SPX/SPXW reference, not a full strike grid or an arbitrary-ticker endpoint. Keep the existing moomoo collection and computation workflow for full-chain calculations, requested scenario/heatmap detail, and other stocks or ETFs; do not present a DTM snapshot as a local calculation. Reuse an applicable upstream snapshot instead of requesting it twice.5354## Environment Check5556This skill requires moomoo OpenD, the `moomoo` Python SDK, and the separately installed `moomooapi` skill. The collectors import `common.py` from `~/.codex/skills/moomooapi/scripts/`; this plugin does not bundle that dependency. In a cloud environment without these local dependencies, do not run the collectors or claim locally calculated GEX. Use the documented DTM SPX reference when applicable, or request a user-provided option-chain snapshot and clearly limit the analysis.5758Run the commands below with the directory containing this SKILL.md as the working directory, resolved from the installed skill location. This supports both standalone skill and plugin-cache installations.5960- First check whether OpenD is running and the `moomoo` Python package imports. If not, guide the user to install or launch OpenD using the `install-moomoo-opend` skill.61- Tell the user OpenD must stay running in the background while querying quotes/options. Login may be required for permissioned data.62- Do not ask the user to unlock trading or input an encrypted private key unless they explicitly want trading functions. This skill only needs quote/option data.63- If moomoo cannot provide a live index snapshot, use available option chains plus a user-provided/live SPX, ES, CFD, or SPY anchor and state the anchor clearly.64- For live 1-minute K-line confirmation through OpenD, treat subscriptions as reusable runtime state, not as permanent skill state. Prefer reusing an existing `US.SPY` `SubType.K_1M` subscription during a live OpenD session; if `get_cur_kline(code, n, KLType.K_1M, AuType.QFQ)` returns `请先订阅KL_1Min数据` or another stale-subscription/permission error, call `subscribe([code], [SubType.K_1M], subscribe_push=False)` and retry once. OpenD subscriptions may disappear after OpenD restart, reconnect, quota changes, permission changes, or context lifecycle changes, so do not write "currently subscribed" as a static fact into the skill or output.6566## Default Output6768Route the request before choosing a script:6970- **Ordinary US stocks/ETFs**: use `scripts/gamma_report.py`, then interpret the output with the `Single-Stock Directional Framework` below before giving a bullish/bearish view.71- **SPX / SPXW / SP500 / 标普500 / S&P 500 index gamma**: do not use `gamma_report.py` as the final workflow. Use `scripts/spx_intraday_latest.py` and `references/spx-intraday.md`: query `US..SPX`, keep SPX/SPXW strikes directly, infer the spot anchor from SPXW 0DTE put-call parity when the SPX index snapshot is unavailable, and treat SPY only as a sanity check or fallback.7273After the U.S. options session closes, never retain an expired same-day SPXW chain in a forward chart or memo. Start from the next listed unexpired expiry; the script uses that front expiry in the existing `0DTE` calculation bucket so its Flip, walls, range, and comparison logic remain front-expiry based. Label it as a `next-expiry proxy after close`, not as live 0DTE.74- **Nikkei / 日经 / 日経 / NKY / Nikkei 225 index gamma**: do not present raw EWJ ETF strikes as index levels, and do not use a current Nikkei anchor against a stale EWJ close. Use EWJ only as a proxy option book, then convert with a time-aligned bridge: EWJ quote-time value -> `NKDmain`/Nikkei futures at that same time -> current `NIYmain`/Nikkei CFD or the user's current index anchor. Use `scripts/proxy_index_gamma.py`. The report must state every anchor, ratio, timestamp, and limitation.7576Default to a concise chat/terminal text summary. Do not create files as part of this skill unless the user explicitly requests raw JSON export.7778For ordinary US stocks/ETFs use `scripts/gamma_report.py` when the user asks for the ticker itself:7980```bash81python3 scripts/gamma_report.py US.BA82python3 scripts/gamma_report.py US.MP83```8485For SPX/SPXW intraday index gamma use:8687```bash88python3 scripts/spx_intraday_latest.py89```9091For SPX answers, default to the detailed index-gamma format. The answer should be detailed enough to explain claims such as “still negative gamma, 7450 starts neutralizing, 7500 becomes stronger positive gamma” from data. Include:9293- SPX anchor and anchor method.94- 0DTE, Next2, Fri2w, and All-window net GEX, net VEX, flip, top walls, and top pits.95- A key-strike cross-section showing 0DTE / Next2 / Fri2w / All GEX and All VEX at nearby decision levels, especially current rounded strikes, major walls, major pits, and user-mentioned levels.96- A distinction between aggregate regime and local strike regime: `All still negative` can coexist with `7450/7500 locally positive`.97- A conclusion that says whether each level is downside acceleration, neutralization/repair threshold, or stronger positive-gamma pinning wall.9899When the user asks about `未来几天 gamma`, `未来几日 gamma`, `后面几天 gamma`, `按日期看 gamma`, `哪天强哪天弱`, or shares a multi-expiry gamma chart and wants the forward read, use the per-expiry report mode:100101```bash102python3 scripts/spx_intraday_latest.py --by-expiry-report103```104105When comparing against an earlier same-day SPX/SPXW snapshot, pass the previous JSON and any specific battlefield strikes the user cares about:106107```bash108python3 scripts/spx_intraday_latest.py \109 --compare-json /path/to/previous_spx_gamma.json \110 --watch-strikes 7400,7425,7450111```112113When the user asks to draw a current or forward multi-expiry SPX gamma chart, first export the current calculation JSON, then generate the theme-aware heatmap fragment:114115```bash116python3 scripts/spx_intraday_latest.py \117 --by-expiry-report --future-count 6 \118 --json-output /tmp/current-spx-gamma.json119120python3 scripts/render_spx_gamma_heatmap.py \121 /tmp/current-spx-gamma.json /tmp/spx-gamma.html \122 --smooth-radius 5 --smooth-sigma 2.25123```124125Use only real listed expiries from the JSON. Each chart column, Flip, Call Wall, and Put Wall must use only contracts expiring on that column's date. The solid foreground/black line is each expiry's gamma flip, not a price forecast; the dashed line is the current SPX anchor. The left `All GEX` profile must mirror all selected-expiry Call-side GEX right of zero and absolute Put-side GEX left of zero on one shared scale; overlay the raw Net GEX as a thin line. The right heatmap remains Net GEX only. Call Wall is the strike with the largest call-side GEX for that expiry; Put Wall is the strike with the most negative put-side GEX. Do not substitute maximum all-strike OI, which can select far-OTM legacy positions with little current gamma. The heatmap may smooth the visual layer along strikes, but must preserve the raw GEX calculations, Flip, and Call/Put Wall values. Read `references/gamma-heatmap-visualization.md` before changing the range, smoothing, or chart semantics.126127When no axis range is explicitly requested, render SPX from `floor(spot / 100) * 100 - 300` through `ceil(spot / 100) * 100 + 300`. For example, an anchor of 7480 renders `7100–7800`. Explicit `--min-strike` and `--max-strike` remain available for a user-requested audit range.128129For Codex inline display, generate the fragment inside the thread-scoped visualization directory and emit `::codex-inline-vis{file="basename.html"}` using only the file name. The fragment must use its generated unique root ID with `document.getElementById`, never `document.currentScript`. Show desktop CW and PW values on separate rows so adjacent expiry columns remain readable. Do not create or publish a website unless the user explicitly asks for one.130131For Nikkei 225 proxy gamma using EWJ converted to a Nikkei CFD/index anchor use:132133```bash134python3 scripts/proxy_index_gamma.py US.EWJ \135 --index-name "日经225 / NKD-NIY proxy" \136 --bridge-anchor-at-proxy-time 59920 --bridge-current 60110 --final-anchor 60080137```138139The script:140- reads stock snapshot, option expirations, option chain, option snapshots, and daily K lines from moomoo OpenD;141- throttles `get_option_chain` calls and retries once after OpenD frequency-limit errors, because moomoo can reject more than about 10 option-chain requests in 30 seconds;142- chooses the pricing anchor by U.S. session: regular `last_price`, after-hours `after_price`, overnight `overnight_price`, pre-market `pre_price`, then bid/ask midpoint or regular last as fallback; label it as a pricing anchor, not guaranteed live tradable price;143- gathers option `OI`, `IV`, `delta`, `gamma`, `theta`, `vega`, bid/ask, volume;144- calculates Black-Scholes vanna from live/anchor spot, strike, IV, and DTE because moomoo snapshots may not provide `option_vanna`;145- selects option expiries by default as: all weeklies within the next 2 calendar weeks when available, plus monthly expiries for the current month and next 2 months; for high-frequency option names also include the next 2 trading-day/daily expiries when listed;146- calculates signed GEX with the common assumption `Call = +`, `Put = -`;147- calculates signed VEX with the same directional convention, expressed as spot-equivalent delta-dollar change per 1 vol point IV move;148- calculates option delta exposure (`DEX`) and approximate charm exposure by strike, plus call/put OI shelves and front-expiry IV smile/skew;149- prints a complete OpenD gamma data group by default: pricing anchor, VT/flip, gamma wall, call wall, put wall, distance to VT/CW/PW, net GEX, net VEX, net DEX, charm/day, gamma pits, vanna zones, DEX zones, charm zones, OI shelves, IV smile/skew, and a conclusion that explicitly combines these dimensions;150- recomputes gamma across a spot-price grid to estimate gamma wall, gamma trough, and gamma flip;151- when JSON output is requested, includes per-strike `gex_by_strike` and `vex_by_strike` for each bucket so later runs can detect same-strike support/risk migration instead of only comparing top walls and pits;152- includes a `per_expiry` section in JSON for each selected expiration date, so future-days gamma reads can say which exact date is weaker or stronger instead of only using `Next2` / `Fri2w` aggregate buckets;153- includes per-expiry `call_wall` and `put_wall` from side-specific GEX within that expiry; preserve `null` when no valid level exists;154- with `--by-expiry-report`, prints a per-date forward gamma memo that names each selected expiry date, net GEX, flip, main downside risk zone, upper pressure/pinning zone, and a baseline/bearish/repair scenario; use this mode for single stocks too when the user shares or asks about multi-expiry vol-trigger/gamma-wall tables;155- with `--compare-json`, compares the new snapshot with a prior JSON snapshot and highlights material strike-level changes, including positive-to-negative GEX flips where a prior support/wall has disappeared and become a pit or acceleration risk;156- prints a readable text memo by default; JSON export flags should be used only when the user explicitly asks for raw data.157158For SPX 0DTE or quick trading questions, chat/terminal text is the default. Still compute or fetch the chain first when possible.159160For short-dated option value scenarios, use `scripts/option_scenario_table.py` after fetching live IV/spot from moomoo:161162```bash163python3 scripts/option_scenario_table.py \164 --kind C --strike 7370 --iv 16.8 \165 --asof 2026-05-13T02:30:00+09:00 --expiry 2026-05-13T05:00:00+09:00 \166 --spots 7350,7360,7370,7380,7390167```168169Read extra references only when the request needs them:170171- For `.SPX`, `SPXW`, `SPY`, `ES`, SpotGamma/TRACE heatmap, or intraday index judgment, read `references/spx-intraday.md`.172- For a continuous multi-expiry SPX gamma heatmap, visual smoothing, or same-session chart comparison, read `references/gamma-heatmap-visualization.md`.173- For short-dated option value tables, account-recovery option targets, or “what is this call/put worth if price reaches X by time Y”, read `references/option-scenario-tables.md`.174- For U.S. single-stock dark-pool/off-exchange, borrow-fee, short-volume, FTD, or ChartExchange confirmation, use the `Dark Pool / Short Data Layer` section below.175176## Single-Stock Directional Framework177178For ordinary U.S. stocks and ETFs, the default job is not only to calculate gamma; it is to convert option structure into a directional trading read. Use this framework whenever the user asks `看多还是看空`, `bullish or bearish`, `能不能追`, `支撑压力`, `未来几天 gamma`, or shares third-party gamma screenshots/tables.179180Start with the shortest useful answer:1811821. State a direct bias: `偏多`, `偏空`, `中性偏多修复`, `中性偏空防守`, or `高波动战场`.1832. Name the current spot and the one or two levels that decide the bias.1843. Say what changes the conclusion: reclaim/hold above an upper trigger, or lose a lower support/put wall.185186Directional labels are incomplete without levels. Whenever using labels such as `中性偏多修复`, `偏多钉扎`, `中性钉扎`, `偏空/高波动`, or `高波动战场`, immediately attach the price zone that makes the label actionable:187188- **Current spot / pricing anchor**: state the current spot or pricing anchor before the directional label or in the same table row. A level is only actionable relative to spot; say whether spot is below, inside, or above the key zone. Example: `现价 198.18,偏多钉扎,钉扎区 200 附近`.189- **Pinning zone**: name the exact strike or tight range being pinned, usually the nearest dominant `GW`, `CW`, `PW`, or confirmed OI shelf near spot. Example: `偏多钉扎,钉扎区 200 附近`.190- **Repair / confirmation level**: for repair labels, name the level that must be reclaimed or held, usually `VT/flip` first, then the nearest `GW/CW`. Example: `中性偏多修复,站稳 295,突破 297.5 才打开上沿`.191- **Invalidation / downside risk**: name the put wall, flip, or gamma pit whose loss invalidates the bullish/neutral read. Example: `跌破 290/284.6 则修复失败`.192- **Battlefield range**: for mixed or high-volatility labels, give the actual range between the nearest support and pressure levels. Example: `高波动战场,260-350 是主战场,跌破 205 扩大下行`.193194Do not output a direction-only label when current spot, `VT`, `GW`, `CW`, `PW`, gamma pits, or OI shelves are available. If current spot or precise levels are unavailable, say `现价/关键点位不足` and lower confidence instead of presenting a clean directional label.195196Always build the read from these layers, in this order:1971981. **Spot vs vol trigger**: treat the nearest major `vol trigger` or gamma flip as the regime divider. Spot below the trigger means higher-volatility/negative-gamma risk unless price reclaims it. Spot above the trigger allows repair but still needs confirmation above the nearest wall.1992. **Spot vs gamma wall**: gamma wall above spot is pressure, pinning, or a repair target; gamma wall below spot is support or a recapture zone. If spot is trapped between a put wall and a call wall, call it a battlefield instead of forcing a strong directional view.2003. **Call wall / put wall distance**: nearest call wall is the first upside pressure or pinning reference; nearest put wall is the first downside support. A wide gap between walls allows trend movement; a tight gap implies chop/pinning.2014. **Per-expiry net GEX**: identify which expiry actually dominates. Near-dated negative GEX can overpower longer-dated support and create squeeze/crash-style movement. Mixed positive and negative expiries mean conditional bias, not a clean all-in view.2025. **Open interest shelves**: use absolute OI to confirm where real option interest clusters. Treat large OI shelves above as pressure/pinning references and below as support/risk zones; do not assume OI alone reveals buyer direction.2036. **IV smile and skew**: high IV and steep downside skew strengthen the warning that the structure is defensive or volatility-seeking. A large vol smile with both call and put blocks often means long-vol/straddle/strangle positioning, not simple bullishness.2047. **Unusual option flow**: classify prints as directional only when they are clean single-leg buys/sells and the bid/ask side is visible. Treat multi-leg, condor, butterfly, straddle, strangle, or paired call/put prints as volatility/range trades unless price action proves direction.2058. **Delta hedging exposure**: use net delta-hedging pressure as a secondary force map. It can confirm where dealer hedging may add buying/selling, but it should not override spot vs trigger/wall structure.206207Use the following directional rules:208209- **Bullish repair**: spot is above the nearest vol trigger or reclaims it, holds above the nearest put wall/support, and has room to the next call wall. Wording: `站上 X 才算修复,第一目标 Y,突破 Y 才看 Z`.210- **Bearish pressure**: spot is below the nearest vol trigger/gamma flip, near-dated net GEX is negative, and losing the nearest put wall opens a lower put wall or gamma trough. Wording: `跌破 X 转空,下一层看 Y/Z`.211- **Neutral battlefield**: spot sits between a nearby put wall and call wall, or per-expiry GEX is mixed. Wording: `X-Y 是战场,不追单边;等站上 Y 或跌破 X`.212- **High-volatility warning**: spot is below trigger with negative GEX, IV is high, and option flow shows large puts or long-vol structures. Wording: `不是单纯看空,是波动放大;方向等关键位确认`.213- **False bullish signal**: do not call it bullish only because call wall is far above spot. A far call wall is potential upside/pinning only after spot reclaims trigger and nearby resistance.214- **False bearish signal**: do not call it bearish only because put OI is large. Put wall below spot can be support until it breaks; after it breaks, it becomes acceleration risk.215216For third-party trigger/wall table interpretation, map fields this way:217218| Field | Read |219|---|---|220| `VOL TRIGGER` | regime divider / volatility trigger |221| `GAMMA WALL` | main gamma pinning, pressure, or support |222| `CALL WALL` | upside pressure, pinning, or breakout target |223| `PUT WALL` | downside support while held, acceleration risk after break |224| `NET GEX` | dealer hedging regime; negative amplifies trend, positive favors chop |225| `ABS OPEN INTEREST` | where open option interest is actually concentrated |226| `IV SMILE` | whether the market is pricing elevated tail/volatility risk |227| unusual flow table | directional only if single-leg and bid/ask context is clear |228229For a complete OpenD-generated gamma memo, include these dimensions when the data is available:230231| Dimension | What to report | How to use in conclusion |232|---|---|---|233| `VT / Vol Trigger` | self-calculated gamma flip / volatility-regime divider | Above = repair or pinning possible; below = high-volatility or defensive unless reclaimed |234| `GW / Gamma Wall` | strongest positive GEX / pinning or pressure level | Wall above = first pressure/target; wall below = recapture/support zone |235| `CW / Call Wall` | largest call-side GEX/OI concentration | Upside pressure, pinning, or breakout target |236| `PW / Put Wall` | largest put-side GEX/OI concentration | Downside support while held; acceleration risk after break |237| `距VT / 距CW / 距PW` | percent distance from pricing anchor | Shows whether the next decision point is close enough to matter |238| `Net GEX` | aggregate signed gamma exposure | Positive favors chop/pinning; negative favors trend amplification |239| `Gamma pits` | strongest negative GEX strikes | Potential fast-move / failed-support zones |240| `Net DEX` | option delta exposure map using option delta sign | Secondary hedge-pressure map; dealer hedge may be opposite under customer-long assumptions |241| `VEX / Vanna zones` | vanna exposure by strike | Interprets IV crush/expansion pressure; never standalone bullish/bearish |242| `Charm zones` | approximate delta decay exposure by strike | Useful near expiry, especially 0DTE/weekly windows |243| `OI shelves` | largest call/put open-interest strikes | Confirms where interest clusters; not direction by itself |244| `IV smile/skew` | ATM IV, downside-wing IV, upside-wing IV, skew | Defensive skew or elevated wings warns of tail/volatility positioning |245| `Per-expiry rows` | each expiry's VT/GW/CW/PW, GEX, VEX, DEX, Charm | The dominant near-dated expiry can override the all-expiry aggregate |246247When the user asks only "看多还是空", answer in this compact structure:2482491. `结论`: one line, e.g. `中性偏多修复,但不是确认多头`.2502. `关键位`: `上方确认 X/Y`, `下方失守 A/B`.2513. `为什么`: three bullets maximum, using vol trigger, walls, and per-expiry GEX/flow.2524. `交易口径`: one sentence such as `不追,等站上 X;跌破 A 则按偏空处理`.253254## Text Level Map And Session Memory255256For SPX/SPXW and other index-style intraday gamma answers, expose the level work as text: short bullets, compact Markdown tables, and a direct bias line. Do not rely on visual-only interpretation.257258For forward-looking requests such as `未来几天 gamma`, `未来几日 gamma`, `后面几天 gamma`, `哪天强哪天弱`, or a screenshot showing several expiry dates, do not answer only with `0DTE / Next2 / Fri2w` tables. For SPX/SPXW use `spx_intraday_latest.py --by-expiry-report`; for ordinary stocks use `gamma_report.py --by-expiry-report` or otherwise compute `per_expiry`, then answer in this structure:2592601. Start with one sentence: `从“未来几天 gamma”角度看:...` and say whether the next 1-3 days are repaired, weak, high-volatility, or pressure-first. Name the key repair zone.2612. Add `按具体到期日看:` and one short paragraph per expiry date, e.g. `2026-06-09 周二,当天到期`, `2026-06-10 周三`, `2026-06-11 周四`, `2026-06-12 周五`. For each date, state: weak/strong label, net GEX direction and rough size, flip, main downside put-gamma risk zones, upper call-gamma pressure/pinning zones, and what price must reclaim to improve.2623. Add `我的推演:` with exactly three scenario bullets: `基准情形`, `偏空情形`, and `修复情形`. These scenarios should use dates and levels, not generic statements.2634. End with a plain conclusion such as: `所以按日期结论是:周二最弱,周三/周四仍偏压制,周五有修复窗口但门槛在 7450。`264265For this mode, avoid dumping every strike or table row. The user wants the trading meaning: which date is structurally weak, where risk migrates, where repair starts, and what would invalidate the weak/strong read.266267Key calculated levels:268269- Prior-session pivot map: use the prior regular-session high/low/close when available. `PP = (H + L + C) / 3`, `BC = (H + L) / 2`, `TC = 2 * PP - BC`, `R1 = 2 * PP - L`, `S1 = 2 * PP - H`, `R2 = PP + (H - L)`, `S2 = PP - (H - L)`. For Camarilla, use `unit = 1.1 * (H - L) / 12`, then `H3 = C + 3 * unit`, `H4 = C + 4 * unit`, `H5 = C * H / L` when stable, `L3 = C - 3 * unit`, `L4 = C - 4 * unit`, `L5 = C - (H5 - C)`.270- CPR interpretation: narrow `TC-BC` means a larger directional expansion is easier; wide CPR means more chop/mean reversion. Spot above `TC` is constructive, between `TC/BC` is a balance zone, and below `BC` is weaker unless reclaimed.271- Gamma map: wall above spot is pressure or pinning; wall below spot is support or a recapture zone; negative pit below spot is acceleration risk; flip or vol trigger is the regime divider. Say whether the current spot is above/below flip/trigger and whether GEX is strengthening or weakening.272- Vanna map: combine top positive/negative VEX zones with IV direction, spot versus flip, and price action. Do not describe VEX alone as bullish or bearish.273When the user runs this skill multiple times during the same trading day in the same conversation, use earlier same-day results as optional but important context. Compare the new result with the earlier answer when migration could change the judgment, when the user asks "now/again", or when spot is near a wall, pit, flip, or trigger: spot, net GEX, net VEX, flip, nearest wall, nearest pit, and CPR relationship. State what migrated and what strengthened/weakened. If a prior JSON snapshot exists or the user provides one, run `spx_intraday_latest.py --compare-json ...`; if the user asks about a specific level such as `7400支撑还在吗`, include it in `--watch-strikes`. Always check whether the same strike's GEX sign or magnitude changed materially across `0DTE`, `Next2`, `Fri2w`, and `All` buckets, but do not mechanically dump same-strike change rows in the final answer. Translate the comparison into what it means and what it may foreshadow: support quality deteriorating or recovering, risk center migrating lower/higher, upper pinning weakening, reflexive selling/buying risk rising, or chop/pinning returning. Treat positive-to-negative GEX migration at an active battlefield strike as `支撑跑路/降级为加速风险`, not merely as a lower wall ranking. Treat negative-to-positive migration as `支撑恢复/加速风险缓和`, but still require price action to confirm. If no earlier same-day result exists in the conversation or user-provided notes, do not imply there is an internal time series.274275## Dark Pool / Short Data Layer276277Use this layer only for U.S.-listed stocks and ETFs. Do not apply it to A-shares, Japanese stocks, or non-U.S. local listings.278279When using ChartExchange, build the URL from both listing venue and ticker. The path shape is:280281```text282https://chartexchange.com/symbol/{exchange-lowercase}-{ticker-lowercase}/exchange-volume/dark-pool-levels/283```284285Examples: `nyse-anet`, `nasdaq-nvda`, `nyse-spy`. SPY is a common exception where ChartExchange uses `nyse-spy`, so search the ticker on ChartExchange or a quote source first when the venue is uncertain, then use the matching venue in the URL. Do not reuse an ANET URL for other tickers without changing both ticker and venue.286287Interpretation rules:288289- `Off Exchange & Dark Pool %`: compare today's share with the ticker's own average. A high off-exchange share is common in U.S. equities and is not bullish or bearish by itself.290- `Dark Pool Levels`: treat high-volume price levels as hidden-liquidity reference zones. They become support/resistance only if later price action confirms acceptance, rejection, or repeated defense.291- `Dark Pool Prints`: large prints near VWAP, gaps, prior highs/lows, or post-news levels are notable, but the data does not reveal whether the initiating side was accumulation, distribution, internalization, or a cross.292- `Short Volume`: daily short-sale volume is not short interest and often includes market-maker activity. Use it for flow pressure only, not for outstanding short exposure.293- `Short Interest`, `Borrow Fee`, `Shares Available`, and `FTD`: use these for squeeze risk. Stronger squeeze evidence is rising borrow fee, shrinking availability, elevated short interest/FTD, and price refusing to break down after heavy short/dark flow.294- Always combine this layer with news acceptance, live price/VWAP, volume, and option/gamma structure. If the conclusion depends on a dark-pool level becoming support/resistance, load `stock-technical-analysis` and require price confirmation.295296## Optional User Knowledge Base297298Do not read local research folders by default. If a user wants to incorporate their own study materials, ask them to specify a private RAG or index folder outside this public repository:299300- keep raw PDFs, screenshots, notes, and proprietary indicators in a private local folder or private vector store;301- offer to create or update a lightweight local index for repeated use, with only user-approved aliases, topics, page/slide ranges, keywords, and public-safe summaries;302- extract only reusable, public-safe rules into this skill when the user explicitly asks to update the skill;303- strip private paths, account details, ticker-specific trade logs, original strategy names, private person names/handles, unique document labels, and memorable private labels;304- keep this skill functional even when that private RAG corpus is unavailable.305306## Required Interpretation Style307308Write like a pre-market trading memo:3093101. **结论**: direct bias first: bullish, bearish, neutral battlefield, or high-volatility watch. Do not bury the answer behind tables.3112. **关键位**: current spot, nearest vol trigger/flip, first call wall, first put wall, and the level that changes the view.3123. **我会怎么做**: concrete scenario handling, e.g. “do not chase until it holds X”, “treat X-Y as chop”, “above Z opens next target”.3134. **什么情况说明我错了**: exact invalidation levels.3145. **怎么和技术确认配合**: use gamma as the map, then confirm entries/exits with `stock-technical-analysis` concepts such as KDJ, MACD, MA144/Vegas, FVG, volume, and price action.315316Avoid only dumping tables. The user wants judgment, assumptions, and a clear action framework.317318### Multi-Stock Gamma Output Contract319320When answering a batch request with multiple stocks, ETFs, or mixed tickers, every row must include both:321322- **Current spot / pricing anchor**: the latest usable spot or anchor price used for option calculations, with the source/session caveat when relevant. Do not make the reader infer where price is relative to the levels.323- **Gamma sign / regime**: positive, negative, or mixed, with `Net GEX` when available. This is the dealer-hedging/volatility map.324- **Directional state / bias**: `偏多修复`, `中性钉扎`, `中性偏空防守`, `高波动战场`, or another explicit long/short/neutral state derived from spot vs flip/walls/pits. This is the trading interpretation.325- **Actionable key levels / zone**: the exact pinning area, battlefield range, repair trigger, upside pressure, and/or downside invalidation that justifies the directional state. At minimum, include the nearest `VT/flip`, `GW/CW` pressure or pinning reference, and `PW`/pit support or risk when those fields are available.326327Do not let one replace the other. A stock can be `净 GEX 为正` but still `中性偏空/高波动` if spot is below the volatility trigger or trapped under a nearby wall; a stock can be locally positive gamma but still a poor long setup if it has not reclaimed the trigger. In tables, prefer columns like:328329`Ticker | Spot anchor | Gamma sign / Net GEX | Directional state | Key zone / pinning area | Flip/VT | Upside wall | Downside risk | What changes the view`330331For batch summaries, group names after the table by directional state, but keep the per-row spot, gamma sign, and key levels visible. If space is limited, abbreviate commentary first; do not omit the spot/anchor, gamma regime, direction, or actionable price zone.332333For multi-expiry batch reports, each expiry row must show the date-specific levels, not only the all-expiry levels. Use the expiry's own `VT`, `GW`, `CW`, `PW`, net GEX, and pits when available. If describing `本周` and `下周`, give both periods' gamma sign, directional state, and actionable zone separately because the same ticker can pin this week and become high-volatility next week.334335When news or broad risk sentiment is driving the underlying or index, call `macro-news-check` only when current macro tape can plausibly change the gamma read, such as CPI/PCE/FOMC/central-bank events, Treasury yield shocks, USD moves, oil/gold/geopolitical headlines, index futures breaks, or sudden risk-on/risk-off tape. Use `stock-sentiment-analysis` if deeper emotion-cycle framing is needed, and add an expectation-gap check before relying on the gamma map: `prior market expectation` -> `actual news` -> `above expectation / in line or merely landed / below expectation`. Apply this to numeric headlines such as orders, CPI/FOMC data, earnings, guidance, and ETF flows, and to qualitative headlines such as regulatory wording, geopolitical tone, management confidence, timing, certainty, and whether the news solves the market's real concern. Gamma explains likely hedging pressure after price moves; it does not by itself explain whether the headline was accepted or rejected.336337## Gamma Reading Rules338339- `gamma wall`: a price where positive GEX is concentrated; price often slows, pins, or rejects there.340- `gamma flip`: estimated transition between positive and negative gamma regimes.341- `vol trigger`: treat as the practical gamma/volatility regime divider. Below it, expect more reflexive/high-volatility behavior; above it, expect repair or pinning if price also holds support.342- `call wall`: upside pressure/pinning zone first, breakout target second. Do not treat a distant call wall as bullish confirmation until spot reclaims the nearest trigger/resistance.343- `put wall`: downside support first, acceleration risk after it breaks. Do not treat large put OI as automatically bearish while spot is holding above the wall.344- `vanna`: estimated change in option delta as IV changes. Moomoo usually provides enough inputs to compute it even when it does not provide a direct `option_vanna` field.345- `VEX`: aggregate vanna exposure by strike. Use it to identify where IV crush/IV expansion can force meaningful delta adjustment; do not treat it as a standalone direction signal.346- Positive gamma: more chop/pinning/mean-reversion; avoid chasing into walls without confirmation.347- Negative g348349…(truncated)