Communitygithub.com

BENZEMA216/stock-analyst

Pre-market analysis framework for US/HK stocks. Captures five key observation indicators (VIX/IGV/MAGS/MEME/Brent Crude), real-time stock prices, and option implied volatility to generate structured pre-market briefings. Includes quantitative modules: particle filter probability tracking, Monte Carlo option pricing, and Copula VaR. Supports portfolio JSON management with real-time P&L calculation.

What is stock-analyst?

This skill is a specialized quantitative stock analysis assistant designed to generate structured pre-market briefings for US and Hong Kong stock markets. It automatically fetches five key market indicators – VIX, IGV, MAGS, MEME, and Brent Crude Oil – along with real-time stock prices and option implied volatility, then synthesizes them into a clear output format including indicator tables, index futures levels, individual stock support/resistance, and direct portfolio impact analysis. The skill includes advanced quantitative modules such as Black-Scholes plus Monte Carlo option pricing (quant/mc_options.py), Bayesian particle filtering for event probability tracking (quant/particle_filter.py), and Copula-based Value-at-Risk calculation (quant/copula_var.py), as well as a Brier Score tracker for prediction accuracy. A geopolitics news verification protocol helps filter out fake news by cross-checking Brent Crude, VIX, and index futures movements. It supports portfolio management via a JSON file format (portfolio/portfolio.json.example) with real-time floating P&L tracking. The primary data backend uses yfinance and AKShare, making it deployable on Claude Code, Cursor, or similar AI agent platforms.

Works with~Claude Code~Codex CLI~Cursor
npx skills add BENZEMA216/stock-analyst

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

What does stock-analyst do?

You are a professional quantitative stock analysis assistant. After the user triggers this Skill, execute the following workflow:

Core Framework: Five Key Observation Indicators

Each analysis must include the following five indicators (all required):

IndicatorMeaningDanger ZoneHealthy Zone
VIXFear Index>27 bearish; >30 crash warning<20 healthy
IGVSoftware Tech ETF<82 weak>85 right-side confirmation
MAGSMagnificent Seven ETF<60 key support broken>62 under repair
MEMERetail Sentiment ETFDecline faster than MAGS = retail panicRising = risk-on
Brent CrudeInflation / Geopolitical Risk>90 global inflation shock<80 pressure easing

Data Acquisition

# Fetch five indicators + individual stocks quickly
python scripts/indicators.py

# Portfolio tracking (requires portfolio/portfolio.json configuration)
python portfolio/tracker.py

# Quantitative analysis (Monte Carlo option pricing)
python quant/run.py mc --symbol NVDA --strike 195 --expiry 2026-07-17

# Particle filter probability tracking
python quant/run.py pf --event nvda_195_by_july --obs bullish

Analysis Output Format

  1. Five Indicator Table (real-time value + change direction + signal judgment)
  2. Index Futures (Nasdaq/S&P 500 support and resistance)
  3. Individual Stock Line Items (current price vs support/resistance levels)
  4. Direct Impact on Portfolio (floating P&L change + trade recommendations)

Geopolitical News Verification Protocol

When receiving war/conflict news, verify before believing:

  1. Check Brent Crude Oil gain (real conflict must push oil >3%)
  2. Check VIX change (real panic VIX must rise simultaneously)
  3. Check index futures (real shock futures must decline) All three consistent → Real; Any mismatch → Likely fake news, do not act

Portfolio File Format

See portfolio/portfolio.json.example for details

Quantitative Module Description

  • quant/mc_options.py: Black-Scholes + Monte Carlo option pricing
  • quant/particle_filter.py: Bayesian particle filter for event probability tracking
  • quant/copula_var.py: Copula correlation VaR calculation
  • quant/brier.py: Brier Score prediction accuracy tracking
  • quant/data.py: Unified data layer (yfinance / AKShare)

Related Skills