Skip to content
Back to search

digital-oracle

AI agent skill that answers macro questions — housing, gold, BTC, geopolitics — with probability estimates mined from 13 financial data sources (Polymarket, Kalshi, CFTC, SEC & more). For Claude Code / Cursor / Codex / OpenClaw. | 让 AI Agent 从金融数据中挖掘宏观趋势的数字先知

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/komako-workshop--digital-oracle/badge.svg)](/listings/komako-workshop--digital-oracle)

HTML

<a href="/listings/komako-workshop--digital-oracle"><img src="/api/listings/komako-workshop--digital-oracle/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

OpenClaw

clawhub install digital-oracle

其他 AI Agent(Claude Code / Cursor / Codex / ...)

直接告诉你的 Agent:

> 安装这个开源项目并读取 SKILL.md 作为你的工作指令:https://github.com/komako-workshop/digital-oracle

Agent 会自行 clone 代码、阅读方法论、调用 provider。

前置依赖

- [uv](https://docs.astral.sh/uv/) — Python 包管理器,skill 运行时用它执行 Python 脚本 - 13 个数据源中有 12 个零外部依赖(纯 Python 标准库)。期权链分析需要额外安装:

uv pip install yfinance

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

SKILL.md · Manifest · 352 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. ---
  2. name: digital-oracle
  3. version: 1.0.3
  4. description: "Answer prediction questions using market trading data, not opinions. Use when the user asks probability questions about geopolitics, economics, markets, industries, or any topic where real money is being traded on the outcome. Examples: 'What's the probability of WW3?', 'Will there be a recession?', 'Is AI in a bubble?', 'When will the Russia-Ukraine war end?', 'Is it a good time to buy gold?', 'Will SPY drop 5% this month?', 'Is NVDA options premium overpriced?'. The skill reads prices from prediction markets, commodities, equities, options chains, derivatives, yield curves, and currencies, then cross-validates multiple signals to produce a structured probability report."
  5. metadata: { "openclaw": { "emoji": "📈", "requires": { "bins": ["uv"] } } }
  6. ---
  7. # digital-oracle
  8. > Markets are efficient. Price contains all public information. Reading price = reading market consensus.
  9. ## Methodology
  10. **Answer questions using only market trading data — no news, opinions, or statistical reports as causal evidence.** If something is true, some market has already priced it in.
  11. Five iron rules:
  12. 1. **Trading data only** — prices, volume, open interest, spreads, premiums. Never cite analyst opinions.
  13. 2. **Explicit reasoning from price to judgment** — explain clearly "why this price answers this question."
  14. 3. **Multi-signal cross-validation** — never conclude from a single signal. At least 3 independent dimensions.
  15. 4. **Label the time horizon of each signal** — options price 3 months, equipment orders price 3 years — don't mix them in the same vote.
  16. 5. **Structured output** — the final report must follow the Step 5 template: layered signal tables → contradiction analysis → probability scenarios → signal consistency assessment. Do not substitute prose for structured reporting.
  17. ## Workflow
  18. ### Step 1: Understand the question
  19. Decompose the user's question into:
  20. - **Core variable**: What event or trend?
  21. - **Time window**: Is the user asking about 3 months, 1 year, or 5 years?
  22. - **Priceability**: Is there real money being traded on this outcome?
  23. ### Step 2: Select signals
  24. Based on question type, select from the signal menu below. **Don't use just one category — cover at least 3.**
  25. #### Geopolitical conflict / War risk
  26. - Polymarket: Search for related event contracts (ceasefire, invasion, regime change, declaration of war)
  27. - Kalshi: Search for related binary contracts
  28. - Safe-haven assets: Gold (GC=F), silver (SI=F), Swiss franc (USDCHF=X)
  29. - Conflict proxies: Crude oil (CL=F), natural gas (NG=F), wheat (ZW=F), defense ETF (ITA), defense stocks
  30. - Risk ratios: Copper/Gold ratio (risk-off indicator), Gold/Silver ratio
  31. - CFTC COT: Institutional positioning changes in crude/gold/wheat (which direction is smart money betting)
  32. - BIS: Central bank policy rate trends in relevant countries
  33. - FearGreedProvider: CNN Fear & Greed Index (composite of 7 price signals)
  34. - Web search: VIX, MOVE index, sovereign CDS, war risk premiums, BDI freight rates, high-yield OAS
  35. - Currencies: Currency pairs of relevant countries (e.g. USDRUB=X, USDCNY=X)
  36. - Country ETFs: Asset flows in relevant countries (e.g. FXI, EWY)
  37. #### Economic recession / Macro cycle
  38. - Treasury: Yield curve shape (10Y-2Y spread, 10Y-3M spread), real rates, breakeven inflation
  39. - YahooPriceProvider: SPY, copper (HG=F), crude oil (CL=F), price trends
  40. - Risk ratios: Copper/Gold ratio
  41. - CFTC COT: Speculative net positions in copper/crude (is managed money bullish or bearish)
  42. - BIS: Credit-to-GDP gap (credit overheating = late cycle), policy rate directions
  43. - World Bank: GDP growth rate historical trends, cross-country comparisons
  44. - Deribit: BTC futures basis (risk appetite proxy)
  45. - CoinGecko: Crypto total market cap + BTC dominance (risk appetite proxy)
  46. - FearGreedProvider: CNN Fear & Greed Index (7 price signals composite → 0-100)
  47. - Kalshi `KXFED` series: FOMC rate-decision contracts. (Use this for the rate path — CMEFedWatchProvider is currently 403-blocked by CME's bot protection from every host tested.)
  48. - Polymarket: Recession-related contracts, central bank rate path
  49. - Currencies: DXY/dollar strength, emerging market currencies
  50. - Web search: High-yield bond spread (HY OAS), TED spread, MOVE index, TTF gas, BDI freight rates
  51. #### Industry cycle / Bubble assessment
  52. - YahooPriceProvider: Industry leader stock trends, sector ETFs
  53. - Find the industry's "single-purpose commodity" (e.g. GPU rental price → AI, rebar → construction)
  54. - Upstream equipment maker orders/stock price (e.g. ASML → semiconductors)
  55. - Leader company valuation discount (e.g. TSMC vs peers → Taiwan Strait risk pricing)
  56. - EDGAR: Industry leader insider trading cadence (Form 4) — concentrated selling = bearish signal
  57. - CFTC COT: Institutional positioning changes in related commodities
  58. - CoinGecko: For crypto industry, look at BTC/ETH/altcoin market cap distribution
  59. - Web search: VC funding concentration, leveraged ETF concentration, margin debt levels
  60. - Deribit: Implied volatility of related crypto assets
  61. #### Asset pricing / Whether to buy
  62. - YahooPriceProvider: Target asset price trend (daily/weekly/monthly)
  63. - Relative price changes of correlated assets (divergence between two commodities = structural signal)
  64. - Treasury: Risk-free rate as valuation anchor
  65. - YFinance: Options chain (IV, put/call ratio, max pain, Greeks, implied move)
  66. - EDGAR: Insider selling cadence (heavy Form 4 selling = insiders bearish)
  67. - CFTC COT: Speculative vs commercial net position divergence for commodity assets
  68. - CoinGecko: For crypto assets, check market cap, ATH/ATL distance, 24h volatility
  69. - Deribit: Crypto options chain (implied volatility = market's expected range)
  70. - Polymarket/Kalshi: Probability pricing of related events
  71. - FearGreedProvider: CNN Fear & Greed composite score (momentum, breadth, VIX, put/call, junk bond demand, volatility, safe haven)
  72. - Web search: VIX, corporate bond issuance volume, analyst rating distribution
  73. #### Stock/Options analysis / Crash probability
  74. - YFinance: Options chain → ATM IV (expected volatility), IV skew (upside/downside fear asymmetry), put/call ratio (bull/bear sentiment), max pain (market maker profit zone), implied move (expected price range), Greeks (delta ≈ ITM probability)
  75. - YahooPriceProvider: Underlying historical price → realized volatility (compare vs implied volatility to judge options premium)
  76. - Kalshi: SPY/NASDAQ price range markets → direct probability pricing
  77. - CFTC COT: S&P 500/VIX futures positioning → institutional direction
  78. - Defensive rotation: XLY (cyclical) vs XLP (defensive) vs XLU (utilities) relative performance → market defensiveness
  79. - Treasury: Yield curve shape → recession signal
  80. - FearGreedProvider: CNN Fear & Greed Index
  81. - Web search: VIX level, margin debt level, leveraged ETF concentration
  82. #### China A-share: individual stock / ETF / sector
  83. Mainland listings are quoted in CNY on exchanges no US venue prices, so the usual
  84. Polymarket/Kalshi/CFTC layer has nothing to say about them. Route these to Eastmoney.
  85. - Eastmoney `get_quote`: Live quote for a 6-digit code → last, change %, turnover rate, PE(TTM), PB, market cap. Pass the bare code (`600519`, `000977`) — `to_secid` resolves the exchange.
  86. - Eastmoney `get_fund_flow`: **The signal with actual skin in the game.** Daily net inflow split by order size — extra-large / large (together = 主力, institutional) vs medium / small (retail). Institutions buying while retail sells is a different tape than the reverse, and price alone cannot show it.
  87. - Eastmoney `list_sector_fund_flow`: Industry or concept boards ranked by institutional net inflow → which sector money is rotating into. Answers "which sector is seeing inflows" directly.
  88. - Eastmoney `get_history`: OHLCV with forward adjustment (`adjust="forward"`) → realized volatility, trend, volume confirmation.
  89. - YahooPriceProvider: Same listings via `600519.SS` / `000977.SZ` suffixes — useful as a cross-check, and the only way to put an A-share on the same axis as a US comparable.
  90. - FXI / USDCNY=X: Foreign risk appetite toward Chinese assets and capital-flow direction — the offshore view on the same question.
  91. - Sector read-through: For semiconductors / AI hardware, cross-check US comparables (NVDA, AMD, SOXX) since the supply chain is shared.
  92. Two cautions. Eastmoney publishes fund flow **after the close**, so intraday questions get yesterday's tape. And no prediction market prices Chinese single names — if the user wants a probability, it has to be reasoned from positioning and volatility, not looked up.
  93. **Available trading symbols directory:** See [references/symbols.md](references/symbols.md)
  94. **Provider API reference:** See [references/providers.md](references/providers.md)
  95. ### Step 3: Signal routing
  96. Before fetching data, evaluate each candidate signal from Step 2 against three criteria:
  97. 1. **Relevance**: Can this signal actually answer the user's specific question? (e.g., asking about Taiwan → skip CoinGecko)
  98. 2. **Time match**: Does the signal's pricing horizon match the question's time window? (e.g., asking about 3 months → skip World Bank GDP which lags 1-2 years)
  99. 3. **Information increment**: Does this signal provide an independent perspective not already covered by other signals? Avoid redundancy, keep complementary signals.
  100. Only keep signals that pass all three checks. This reduces noise, saves fetch time, and produces cleaner analysis.
  101. ### Step 4: Fetch data
  102. Use digital-oracle's Python providers to fetch structured data, calling all sources in parallel with `gather()` (including web search):
  103. ```python
  104. from digital_oracle import (
  105. PolymarketProvider, PolymarketEventQuery,
  106. KalshiProvider, KalshiMarketQuery,
  107. YahooPriceProvider, PriceHistoryQuery, # requires uv pip install yfinance
  108. DeribitProvider, DeribitFuturesCurveQuery,
  109. USTreasuryProvider, YieldCurveQuery,
  110. WebSearchProvider,
  111. CftcCotProvider, CftcCotQuery,
  112. CoinGeckoProvider, CoinGeckoPriceQuery,
  113. EdgarProvider, EdgarInsiderQuery,
  114. BisProvider, BisRateQuery,
  115. WorldBankProvider, WorldBankQuery,
  116. YFinanceProvider, OptionsChainQuery, # requires uv pip install yfinance
  117. FearGreedProvider,
  118. EastmoneyProvider, EastmoneyQuoteQuery, EastmoneyKlineQuery,
  119. EastmoneyFundFlowQuery, EastmoneySectorFlowQuery,
  120. gather,
  121. )
  122. pm = PolymarketProvider()
  123. kalshi = KalshiProvider()
  124. yahoo = YahooPriceProvider() # requires uv pip install yfinance
  125. deribit = DeribitProvider()
  126. treasury = USTreasuryProvider()
  127. web = WebSearchProvider()
  128. cftc = CftcCotProvider()
  129. coingecko = CoinGeckoProvider()
  130. edgar = EdgarProvider() # set EDGAR_USER_EMAIL to identify yourself to SEC; a contact is required or it 403s
  131. bis = BisProvider()
  132. wb = WorldBankProvider()
  133. yf = YFinanceProvider() # requires uv pip install yfinance
  134. fear_greed = FearGreedProvider()
  135. eastmoney = EastmoneyProvider() # China A-share: quotes, OHLCV, fund flow, sector rotation
  136. result = gather({
  137. "pm_events": lambda: pm.list_events(PolymarketEventQuery(slug_contains="...", limit=10)),
  138. "yield_curve": lambda: treasury.latest_yield_curve(),
  139. "gold": lambda: yahoo.get_history(PriceHistoryQuery(symbol="GC=F", limit=30)),
  140. # Institutional positioning
  141. "gold_cot": lambda: cftc.list_reports(CftcCotQuery(commodity_name="GOLD", limit=4)),
  142. # Crypto market sentiment
  143. "crypto": lambda: coingecko.get_prices(CoinGeckoPriceQuery(coin_ids=("bitcoin", "ethereum"))),
  144. # Insider trades
  145. "insider": lambda: edgar.get_insider_transactions(EdgarInsiderQuery(ticker="AAPL", limit=10)),
  146. # Central bank policy rates
  147. "rates": lambda: bis.get_policy_rates(BisRateQuery(countries=("US", "CN"), start_year=2023)),
  148. # GDP data
  149. "gdp": lambda: wb.get_indicator(WorldBankQuery(indicator="NY.GDP.MKTP.CD", countries=("US", "CN"))),
  150. # BTC futures term structure (risk appetite proxy)
  151. "btc_futures": lambda: deribit.get_futures_term_structure(DeribitFuturesCurveQuery(currency="BTC")),
  152. # Kalshi event markets (use event_ticker or series_ticker, not keyword search)
  153. "kalshi_fed": lambda: kalshi.list_markets(KalshiMarketQuery(series_ticker="KXFED", limit=10)),
  154. # Options chain (with Greeks)
  155. "spy_options": lambda: yf.get_chain(OptionsChainQuery(ticker="SPY", expiration="2026-04-17")),
  156. # CNN Fear & Greed (composite of 7 price signals)
  157. "fear_greed": lambda: fear_greed.get_index(),
  158. # China A-share: institutional vs retail flow, and which sector money rotated into
  159. "cn_stock": lambda: eastmoney.get_quote(EastmoneyQuoteQuery(symbol="002156")),
  160. "cn_flow": lambda: eastmoney.get_fund_flow(EastmoneyFundFlowQuery(symbol="002156", limit=10)),
  161. "cn_sectors": lambda: eastmoney.list_sector_fund_flow(EastmoneySectorFlowQuery(limit=15)),
  162. # Web search runs in parallel with structured providers
  163. "vix": lambda: web.search("VIX index current level"),
  164. "hy_spread": lambda: web.search("US high yield bond spread OAS"),
  165. })
  166. # Partial failures don't affect other results
  167. curve = result.get("yield_curve")
  168. vix_info = result.get_or("vix", None) # WebSearchResult — use .text() to render
  169. # Options data usage
  170. chain = result.get_or("spy_options", None)
  171. if chain:
  172. print(f"ATM IV: {chain.atm_iv:.1%}, Implied move: {chain.implied_move():.1%}")
  173. print(f"Put/Call OI ratio: {chain.put_call_oi_ratio:.2f}")
  174. print(f"Max pain: {chain.max_pain()}")
  175. ```
  176. **All 14 Providers:**
  177. | Provider | Data Type | Purpose | Dependency |
  178. |----------|-----------|---------|------------|
  179. | PolymarketProvider | Prediction market contracts | Event probability pricing | stdlib |
  180. | KalshiProvider | Binary contracts | US regulated event contracts | stdlib |
  181. | YahooPriceProvider | Price history | Stocks/ETFs/FX/Commodities | yfinance |
  182. | DeribitProvider | Crypto derivatives | Futures term structure, options IV | stdlib |
  183. | USTreasuryProvider | Treasury yields | Yield curves, inflation expectations | stdlib |
  184. | WebSearchProvider | Web search | VIX/MOVE/CDS/BDI supplementary data | stdlib |
  185. | CftcCotProvider | Futures positioning | Institutional direction (smart money) | stdlib |
  186. | CoinGeckoProvider | Crypto spot | BTC/ETH price, market cap, dominance | stdlib |
  187. | EdgarProvider | SEC filings | Insider trades Form 4, filing search | stdlib |
  188. | BisProvider | Central bank data | Policy rates, credit-to-GDP gap | stdlib |
  189. | WorldBankProvider | Development indicators | GDP, population, trade, macro data | stdlib |
  190. | YFinanceProvider | US options chains | IV, Greeks, put/call ratio, max pain | yfinance |
  191. | **FearGreedProvider** | **Market sentiment** | **CNN 7-signal composite → 0-100 score** | **stdlib** |
  192. | **EastmoneyProvider** | **China A-share** | **Quotes, OHLCV, order-size fund flow, sector rotation** | **stdlib** |
  193. | CMEFedWatchProvider | Rate probabilities | **Currently 403-blocked by CME — use Kalshi `KXFED`** | stdlib |
  194. > 13 out of 15 providers have zero external dependencies and zero API keys. YahooPriceProvider and YFinanceProvider require `pip install yfinance`.
  195. **WebSearchProvider usage:**
  196. - `web.search("query")` → returns `WebSearchResult` (search summary) — render with `.text()`
  197. - `web.fetch_page("url")` → returns `WebPageContent` (page body extraction)
  198. - Search engine is DuckDuckGo, zero API keys needed
  199. **Data not available via structured providers — use web search instead:** VIX, MOVE, CDS spreads, TTF natural gas, BDI freight rates, war risk premiums, high-yield OAS — these need to be fetched from financial web pages. They are still trading data and comply with the methodology.
  200. ### Step 5: Data analysis
  201. This is the key to report quality. Don't just summarize data — derive judgment from data.
  202. Four analysis dimensions:
  203. 1. **Signal interpretation**: What is each data point saying? Derive meaning from price. Not "gold up 3%" but "the market is pricing in tail risk." e.g., Copper/Gold ratio declining → industrial demand weaker than safe-haven demand → risk-off.
  204. 2. **Cross-validation**: Which signals point in the same direction (resonance)? Which signals disagree (divergence)? Divergence itself is a high-value signal. e.g., gold says "disaster" but equities say "fine" → two markets pricing different time windows.
  205. 3. **Time alignment**: Group signals by their pricing horizon. Don't mix signals from different time windows in the same vote.
  206. - Short-term (3-12mo): Prediction market contracts, VIX/MOVE, price reaction patterns, executive selling
  207. - Medium-term (1-3yr): Leader revenue consensus, CapEx plans, VC concentration, leverage concentration
  208. - Long-term (3-10yr): Equipment maker orders, irreversible capital allocation, ultra-long infrastructure investment
  209. - Short-term bearish + long-term bullish ≠ contradiction, = S-curve inflection
  210. 4. **Weight judgment**: Not all signals are equally reliable. Signals backed by real money > surveys. Liquid markets > illiquid markets. Direct pricing > indirect proxies. e.g., Polymarket high-liquidity contract > CDS quotes (slow updates, low liquidity).
  211. **Core principle: Don't vote by majority.** When signals diverge:
  212. - Check the time dimension first — different signals price different future windows
  213. - Look for "two things happening at once" — old economy Japanification + new economy boom can coexist
  214. - Consider "direction right but timing wrong" — long-term bullish but short-term overheated → wait for a pullback
  215. ### Step 6: Output report
  216. **Must follow this structure.** You can adjust the number of layers and wording, but the four main sections (data summary, analysis, probability estimates, conclusion) cannot be omitted or merged into prose paragraphs:
  217. ```markdown
  218. # [Question Title]: Multi-Signal Synthesis
  219. ## Data Summary
  220. ### Layer 1: [Most direct signal source]
  221. | Signal | Data | What it's saying |
  222. |--------|------|-----------------|
  223. (table, one signal per row, third column is reasoning from price to meaning)
  224. ### Layer 2: [Secondary signal source]
  225. (same format)
  226. ### Layer N: ...
  227. (as needed, typically 3-5 layers)
  228. ## Analysis
  229. ### Resonance signals
  230. (which signals point in the same direction, and what judgment they form)
  231. ### Key divergences
  232. (A says X, B says Y → explain why + who is more credible)
  233. ### Time stratification
  234. (what do short-term / medium-term / long-term signals each point to)
  235. ## Probability Estimates
  236. | Scenario | Probability | Basis |
  237. |----------|-------------|-------|
  238. ### Most likely path: [one-sentence summary]
  239. **Core logic chain:** (2-3 paragraphs, reasoning from data to conclusion)
  240. ## Conclusion
  241. > [One-sentence summary, preferably including a specific probability estimate]
  242. ### Sub-conclusions
  243. | Dimension | Judgment | Confidence |
  244. |-----------|----------|------------|
  245. | Short-term (6-12mo) | ... | High/Medium/Low |
  246. | Medium-term (1-3yr) | ... | High/Medium/Low |
  247. | Long-term (3-5yr) | ... | High/Medium/Low |
  248. | Systemic risk | ... | High/Medium/Low |
  249. (adjust dimensions to match the question — e.g., replace "systemic risk" with whatever dimension is most relevant)
  250. ### Risk factors
  251. - **Upside risk:** what scenario would make things better than expected
  252. - **Downside risk:** what scenario would make things worse than expected
  253. ### Signals to monitor
  254. | Signal | Current value | Threshold | Meaning |
  255. |--------|--------------|-----------|---------|
  256. | ... | ... | if crosses X | then Y |
  257. (3-5 concrete signals with specific trigger levels and what they would imply)
  258. ---
  259. *Data sources: [list all structured and web data sources]*
  260. *Fetched at: [date]*
  261. ```
  262. ## Notes
  263. - Polymarket `slug_contains` search is fuzzy — filter results by title keywords after fetching
  264. - YahooPriceProvider uses Yahoo Finance symbols: futures use `=F` suffix (e.g. `GC=F`, `CL=F`, `HG=F`), forex uses `=X` suffix (e.g. `EURUSD=X`), US stocks/ETFs use plain tickers (e.g. `SPY`, `LMT`)
  265. - YahooPriceProvider requires `yfinance` — install with `uv pip install --target .deps yfinance`
  266. - European stocks available on Yahoo Finance with exchange suffix (e.g. `RHM.DE` for Rheinmetall, `BA.L` for BAE Systems)
  267. - Prediction market contracts vary in liquidity — contracts with volume < $100K should be discounted
  268. - Different signals update at different frequencies: prediction markets real-time, Yahoo Finance daily delayed, Treasury weekly
  269. - CFTC COT updates Tuesday, published Friday. commodity_name uses uppercase ("GOLD", "CRUDE OIL", "S&P 500")
  270. - CoinGecko free API has rate limits (~10-30 req/min) — don't pack too many CoinGecko calls in gather
  271. - EDGAR requires `EdgarProvider(user_email="you@example.com")` — SEC requires email in User-Agent, otherwise 403. First call parses ticker→CIK mapping, slightly slow
  272. - BIS data updates infrequently (monthly/quarterly) — suitable for long-term trends, not short-term trading
  273. - World Bank GDP data typically lags 1-2 years — latest year may return `None`
  274. - YFinance requires `uv pip install yfinance` (auto-installs pandas). After-hours IV may be inaccurate (bid/ask = 0) — use during market hours
  275. - YFinance `get_chain()` auto-computes Black-Scholes Greeks (pure stdlib `math.erf`, no scipy needed)
  276. - Absolute value of put delta ≈ probability of that strike being ITM at expiration (rough estimate)
  277. - Put/Call ratio > 1.5 is typically bearish, but as a contrarian indicator, extreme values (> 3) may signal a bottom
  278. - Max pain is the strike price maximizing market maker profit — actual expiration price often converges toward max pain
  279. - Kalshi does NOT support keyword search — use `series_ticker` or `event_ticker` to filter markets. Find tickers by browsing [kalshi.com](https://kalshi.com) or listing markets without filters first. Common series: `KXFED` (Fed rates), `KXINX` (S&P 500 range), `KXGDP` (GDP)
  280. - Deribit futures method is `get_futures_term_structure()`, not `get_futures_curve()`. Option chain method is `get_option_chain()`
  281. - FearGreedProvider has no API key requirement. Returns a single composite score (0-100) synthesizing 7 market price signals: stock momentum, breadth, VIX, put/call ratio, junk bond demand, volatility, safe haven demand. Score < 25 = Extreme Fear, > 75 = Extreme Greed
  282. - CMEFedWatchProvider is **currently unusable**: CME's bot protection returns 403 to every User-Agent tested, from residential and datacenter hosts alike. Don't spend a round-trip on it — go straight to Kalshi `KXFED` for the rate path
  283. - EdgarProvider needs a contact in the User-Agent or SEC returns 403. It now defaults to one, but set `EDGAR_USER_EMAIL` to identify yourself properly under SEC's fair-access policy
  284. - BIS `get_credit_to_gdp()` returns the **gap** (deviation from long-run trend, e.g. US ≈ -12pp), not the raw credit-to-GDP ratio (≈ 140%). Pass `series=CREDIT_GAP_SERIES["ratio"]` if you want the level instead. A double-digit positive gap is the classic credit-bubble warning
  285. - EastmoneyProvider takes bare 6-digit A-share codes; `to_secid()` resolves the exchange (`6xxxxx`/`5xxxxx`/`9xxxxx` → Shanghai, everything else → Shenzhen). Fund flow amounts are CNY and publish after the close. `main_net` = `extra_large_net` + `large_net`, i.e. institutional; `medium`/`small` are retail
  286. - Eastmoney throttles per source IP; quotes / fund flow / sectors fall back to its delay host automatically. `get_history` sources from Tencent first and only falls back to Eastmoney, since Eastmoney's history host is the one it throttles hardest — that means `turnover_cny` is `None` on bars that came from Tencent, but the OHLCV is complete
  287. - When reporting dollar amounts, use `USD` instead of `$` to avoid markdown renderers interpreting `$...$` as LaTeX
README.md · README · 113 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. [English](README.en.md) | **中文**
  2. # Digital Oracle 📈
  3. Digital Oracle 是一款让 AI Agent 基于从海量金融数据中,挖掘出宏观事件发展趋势的开源 Skill。
  4. 适用于 OpenClaw / Claude Code / Cursor / Codex。
  5. 我们生活在一个噪音极度泛滥的时代。社交媒体上充斥着情绪化的预测 — 有人说房价要崩了,有人说黄金要上天,有人说明天就打仗。这些观点往往顺应人群情绪,而不是基于客观数据的理性分析。
  6. 但交易数据不一样。
  7. 价格是绝对理性的 — 当一个人要把自己的钱押在某个结果上时,他会比发一条短视频认真很多。
  8. 这就是有效市场理论的核心洞察:**所有公开信息都已经被价格消化了。一切信息都在 K 线里。**
  9. Digital Oracle 把这个洞察变成了一个可执行的工具。它接入了 13 个权威金融数据源 — **从 Polymarket 和 Kalshi 这样的预测市场,到美国国债收益率曲线、CFTC 机构持仓、SEC 内部人交易、各国央行利率、加密衍生品,以及 A 股的拆单资金流与板块轮动。**
  10. 它不看报纸不读新闻,不消费文章、短视频、播客,只通过从金融数据中挖掘出的价值信号,来回答房价涨跌、黄金走势、比特币周期、军事冲突概率这类问题,并给出结构化的概率估计和推理链。
  11. 某种意义上,这就是新时代的数字先知。
  12. ## 能回答什么问题?
  13. - "WW3 的概率是多少?"
  14. - "中国房价还会跌多久?"
  15. - "AI 是不是泡沫?"
  16. - "现在适合买黄金吗?"
  17. - "比特币到底了吗?"
  18. - "NVDA 期权溢价是不是太高了?"
  19. 只要有市场在定价这件事,Digital Oracle 就能给出一个基于交易数据的概率估计。
  20. ## 数据源
  21. | Provider | 数据类型 | 用途 |
  22. |----------|---------|------|
  23. | Polymarket | 预测市场合约 | 事件概率定价 |
  24. | Kalshi | SEC 监管二元合约 | 美国政治/经济事件 |
  25. | Stooq | 股票/ETF/外汇/商品 | 价格历史和趋势 |
  26. | Deribit | 加密衍生品 | 期货 term structure、期权 IV |
  27. | US Treasury | 国债收益率 | 利率曲线、通胀预期 |
  28. | CFTC COT | 期货持仓 | 机构仓位方向(smart money) |
  29. | CoinGecko | 加密现货 | BTC/ETH 价格、市值 |
  30. | SEC EDGAR | 内部人交易 | Form 4 买卖信号 |
  31. | BIS | 央行数据 | 政策利率、信贷/GDP 缺口 |
  32. | World Bank | 发展指标 | GDP、人口、贸易 |
  33. | Yahoo Finance | US 期权链 | IV、Greeks、put/call ratio |
  34. | Eastmoney | A 股行情与资金流 | 个股/ETF 行情、K 线、拆单量级资金流、板块轮动 |
  35. | Web Search | 网页搜索 | VIX、CDS 等补充数据 |
  36. 所有 API 均免费、无需 API Key。
  37. ## 安装
  38. ### OpenClaw
  39. ```bash
  40. clawhub install digital-oracle
  41. ```
  42. ### 其他 AI Agent(Claude Code / Cursor / Codex / ...)
  43. 直接告诉你的 Agent:
  44. > 安装这个开源项目并读取 SKILL.md 作为你的工作指令:https://github.com/komako-workshop/digital-oracle
  45. Agent 会自行 clone 代码、阅读方法论、调用 provider。
  46. ### 前置依赖
  47. - [uv](https://docs.astral.sh/uv/) — Python 包管理器,skill 运行时用它执行 Python 脚本
  48. - 13 个数据源中有 12 个零外部依赖(纯 Python 标准库)。期权链分析需要额外安装:
  49. ```bash
  50. uv pip install yfinance
  51. ```
  52. ## 工作原理
  53. 1. **理解问题** — 拆解核心变量、时间窗口、可定价性
  54. 2. **选择信号** — 根据问题类型选择 3+ 个独立数据源
  55. 3. **并行拉取** — 用 `gather()` 同时调用多个 provider
  56. 4. **矛盾推理** — 找不同市场之间的分歧,解释为什么它们可以同时正确
  57. 5. **输出报告** — 结构化的多层信号表格 + 概率估计 + 场景分析
  58. ## 项目结构
  59. ```
  60. digital-oracle/
  61. ├── SKILL.md # Skill 定义(OpenClaw 读取这个文件)
  62. ├── digital_oracle/ # Python 源码
  63. │ ├── concurrent.py # 并行执行工具
  64. │ ├── http.py # HTTP 客户端抽象
  65. │ ├── snapshots.py # HTTP 响应录制/回放(测试用)
  66. │ └── providers/ # 13 个数据 provider
  67. ├── references/ # API 速查
  68. │ ├── providers.md # Provider API 参考
  69. │ └── symbols.md # 交易符号目录
  70. ├── scripts/ # Demo 脚本
  71. └── tests/ # 单元测试 + fixtures
  72. ```
  73. ## 设计原则
  74. - **零依赖优先** — 12/13 个 provider 只用 Python 标准库,无需 `pip install`
  75. - **依赖注入** — 所有 provider 接受可选的 `http_client` 参数,方便测试
  76. - **部分失败容忍** — 一个数据源挂了不影响其他结果
  77. - **快照测试** — 录制真实 HTTP 响应,CI 里无网络也能跑测试
  78. ## License
  79. MIT © 2026 komako-workshop — see [LICENSE](LICENSE).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.