# 888 Stock Quant Platform

> 專業級台美股深度學習與多維量化決策平台，整合總體經濟宏觀風控、玄鐵均線波段回調、LSTM 深度學習時序預測、Google Research TimesFM 時序大模型、三大法人籌碼鎖碼、7 大板塊資金輪動與 2MD 即時財經資訊。

888 Stock Quant 遵循 [llmstxt.org](https://llmstxt.org/) 規範，為大語言模型 (LLM)、AI Agents、Claude Desktop、Cursor、Antigravity 與自動化投資決策系統提供標準化、結構化之量化訊號與資料字典。本平台核心定位為「盤前買進決策指南 (Pre-Market Buy Guide)」，每日於台股開盤前 (08:00 TWN / 00:00 UTC) 與美股開盤前 (20:30 TWN / 12:30 UTC) 自動完成運算並推播。

## Core Strategy Matrix & Resonance Framework

- [Multi-Model Resonance Guidelines](/api/v1/predictions/resonance): 多策略交集共振機制
  - 👑 **四重共振 (Quadruple Resonance)**: 同時滿足「技術均線買點 ∩ 法人籌碼鎖碼 ∩ LSTM 看漲 ∩ TimesFM 看漲」之極高信心標的。
  - 🏆 **三重共振 (Triple Resonance)**: 滿足「技術均線買點 ∩ 法人籌碼鎖碼 ∩ (LSTM ∪ TimesFM) 看漲 ∩ 估值合理 (PE<25, PB<3.5)」。
  - 🔮 **雙ML共振 (Dual-ML Resonance)**: 微觀個股量價 LSTM 與宏觀預訓練 TimesFM 同步給出看漲訊號，雙重驗證勝率最高。
  - ⚖️ **高盈虧比 (High Risk/Reward)**: TimesFM horizon 預測真實盈虧比 (P50_h - P0) / (P0 - P10_h) >= 1.5，具備非對稱獲利空間。

## Quantitative Strategy Endpoints

- [Triple & Quad Resonance Recommendations](/api/v1/predictions/resonance): 取得多策略共振焦點推薦名單 (`index_name`, `limit`)
- [TimesFM Bullish Top Picks](/api/v1/predictions/timesfm/top-bullish): 查詢 Google TimesFM 時序大模型 5 日預測漲幅與盈虧比排行
- [TimesFM Bearish Top Picks](/api/v1/predictions/timesfm/top-bearish): 查詢 Google TimesFM 時序大模型 5 日預測跌幅避險/破底防禦排行
- [LSTM Bullish Top Picks](/api/v1/predictions/lstm/top-bullish): 查詢 LSTM 深度學習次日預測漲幅排行
- [LSTM Bearish Top Picks](/api/v1/predictions/lstm/top-bearish): 查詢 LSTM 深度學習次日預測跌幅排行
- [Xuantie Heavy Sword Pullback](/api/v1/predictions/xuantie): 查詢玄鐵重劍策略 MA60 季線 / MA120 半年線趨勢回調技術買點
- [Latest Batch Snapshot](/api/v1/predictions/latest): 取得全市場最新日報批次數據（含現價、目標價、均線、估值、標籤）
- [Stock History Trajectory](/api/v1/predictions/history/2330.TW): 查詢個股歷史時序預測軌跡、均線排列與法人籌碼歷程
- [Resolve Stock Symbol](/api/v1/predictions/resolve/台積電): 將中英文股票名稱（台積電、聯發科、NVDA、Tesla）模糊解析為標準代號

## Macroeconomic Risk & Investing Catalysts (2MD)

- [Market Macro Risk Regime](/api/v1/macro/latest): 查詢台股加權指數/美股S&P 500、VIX 恐慌指數、SOX 費半趨勢與動態投資曝險比例 (0~100%)
- [Investing Macro Summary](/api/v1/macro/investing/summary): 整合 2MD 一站式總經數據（FedWatch、美股財報、大宗商品、行事曆）
- [CME FedWatch Interest Rate Monitor](/api/v1/macro/investing/fed-rate): 查詢下次 FOMC 利率決策機率分布表與倒數天數
- [US Corporate Earnings Calendar](/api/v1/macro/investing/earnings-calendar): 查詢近期美股重量級企業財報行事曆（EPS、營收預估、市值）
- [Key Commodities Summary](/api/v1/macro/investing/commodities): 查詢黃金 (Gold)、銅博士 (Copper)、原油 (WTI) 實時報價與週期走勢
- [Global Economic Calendar](/api/v1/macro/investing/economic-calendar): 查詢全球重磅總經行事曆（CPI、非農 NFP、GDP、PCE）
- [Polymarket Real-Money Sentiment](/api/v1/macro/polymarket/sentiment): 透過 2MD 與 DoH (8.8.8.8) 查詢 Polymarket 真金白銀預測市場；機率欄位統一為 0~100 百分比，上游失敗會回傳 `success=false`，可用舊快取時標記 `stale=true`

## Institutional & Broker Fund Flows

- [Institutional Fund Flows](/api/v1/market/institutional/top): 查詢外資、投信、自營商三大法人買賣超排行與持股集中度
- [Broker Branch Trades](/api/v1/market/broker/summary/2330.TW): 查詢券商關鍵分點主力進出追蹤與多空明細
- [Company Profile & Live News](/api/v1/market/company-profile?ticker=2330.TW): 整合 2MD 提取個股繁體中文公司簡介、核心業務、市值與即時新聞
- [Batch Company Profiles](/api/v1/market/company-profiles/batch): 並發非同步批次預載多支股票之公司營運摘要

## Model Context Protocol (MCP) Tools

本平台提供 16 大標準 FastMCP 工具函數（支援 stdio 與 SSE 雙向通訊）：
- `get_market_macro_regime`: 評估大盤宏觀風控情境與建議投資曝險比例。
- `get_triple_resonance_stocks`: 查詢 👑四重共振、🏆三重共振與 🔮雙ML共振焦點股。
- `get_timesfm_top_predictions`: 查詢 Google TimesFM 時序大模型 5 日漲跌幅排行與盈虧比。
- `get_lstm_top_predictions`: 查詢 LSTM 深度學習次日漲跌幅排行。
- `get_xuantie_pullback_stocks`: 查詢玄鐵重劍 MA60/120 趨勢回調買點標的。
- `get_stock_history`: 查詢特定股票歷史時序量化預測軌跡與法人籌碼。
- `get_latest_market_snapshot`: 取得最新量化日報批次數據快照。
- `get_top_institutional_flows`: 查詢三大法人買賣超焦點股排行榜。
- `get_broker_trades_for_stock`: 查詢券商關鍵主力分點進出明細。
- `get_company_profile`: 透過 2MD 查詢個股繁體中文公司簡介與即時新聞。
- `get_fed_rate_monitor`: 透過 2MD 查詢 CME FedWatch 聯準會利率決策機率。
- `get_us_earnings_calendar`: 透過 2MD 查詢美股重量級企業財報行事曆。
- `get_economic_calendar`: 透過 2MD 查詢全球重大總經行事曆。
- `get_commodities_summary`: 透過 2MD 查詢黃金、原油、銅博士行情。
- `resolve_stock_ticker`: 將模糊搜尋之公司名稱快速解析為標準交易代號。
- `get_polymarket_macro_sentiment`: 透過 2MD/DoH 查詢 Polymarket 真金白銀預測市場之宏觀風控與重大事件情緒。

## Agent & Developer Discovery Standards

- [WebMCP SSE Stream](/mcp/sse): FastMCP Server-Sent Events bidirectional RPC stream
- [OpenAPI 3.1 Specification](/openapi.json): Full REST API schema in standard OpenAPI 3.1 JSON format
- [WebMCP Manifest](/.well-known/mcp.json): Model Context Protocol (MCP) server discovery manifest
- [OpenAI Plugin Manifest](/.well-known/ai-plugin.json): Standard ChatGPT / GPT Actions plugin specification
- [Agent Trading Skill](/skill): 4-step quantitative trading workflow markdown skill specification
- [Interactive Swagger UI](/docs): Live API testing and interactive documentation
- [Chrome WebMCP Dynamic Bridge](/.webmcp/bridge.js): Cloudflare & Chrome WebMCP registration script
- [Alternative MCP Manifest](/mcp.json): WebMCP discovery alias

## Optional & Full Documentation

- [Full LLM Context](/llms-full.txt): Complete system specification, strategy mathematical formulation, DuckDB data dictionary, and multi-asset quant architecture
- [GitHub Repository](https://github.com/tbdavid2019/stock-underdog-ml): Open source repository and automated CI/CD pipelines

## Powered By
技術提供: [david888.com](https://david888.com) | Specification: [llmstxt.org](https://llmstxt.org)
