polymarket-analyzer

Analyze Polymarket prediction market data to provide investment insights for Chinese concept stocks (中概股) and A-shares. This skill should be used when the user asks about Polymarket data, prediction markets, A-share (A股) investment advice based on prediction market sentiment, or 中概股 correlations.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "polymarket-analyzer" with this command: npx skills add cyberelf/agent_skills/cyberelf-agent-skills-polymarket-analyzer

Polymarket + Multi-Source China Market Sentiment Analyzer

Collect data from multiple information channels to support comprehensive sentiment analysis for Chinese concept stocks (中概股) and A-shares.

The agent performs all judgment and interpretation. The scripts in this skill are pure data collectors — they fetch raw information without making directional calls.


When to Use

  • The user asks about Polymarket prediction market data for China/HK topics
  • The user wants sentiment context for A-share or 中概股 investment decisions
  • The user requests multi-source market intelligence (news, macro, market proxies)
  • The user asks about specific stocks: BYD, NIO, Alibaba, Tencent, SMIC, etc.

Prerequisites

Polymarket CLI (required for prediction market data)

brew tap Polymarket/polymarket-cli https://github.com/Polymarket/polymarket-cli
brew install polymarket
# or
curl -sSL https://raw.githubusercontent.com/Polymarket/polymarket-cli/main/install.sh | sh
polymarket --version

yfinance (optional — enables market proxy data)

pip install yfinance

Skill Structure

polymarket-analyzer/
├── SKILL.md
├── references/
│   ├── china_stock_mapping.json        # 21 China concept stocks → A-share sector/ticker mapping
│   ├── signal_weights.json             # Configurable source weights for composite analyzer
│   ├── workflows/
│   │   ├── scenario-1-macro-geopolitical.md  # Top-down macro & geopolitical risk workflow
│   │   ├── scenario-2-sector-catalyst.md     # Bottom-up sector/company catalyst workflow
│   │   └── scenario-3-daily-pulse.md         # Fast daily digest / delta-only briefing
│   └── templates/
│       ├── comprehensive-insight-report.md   # Full deep-dive report template (Scenarios 1 & 2)
│       └── quick-brief.md                    # 30-second pulse template (Scenario 3)
└── scripts/
    ├── polymarket_analyzer.py     # Full 7-source composite analyzer
    ├── query-markets.py           # Polymarket search — active markets only by default
    ├── filter-markets.py          # Polymarket multi-filter — active markets only by default
    ├── fetch-market-data.py       # Raw price/volume for China proxy instruments
    └── fetch-cn-news.py           # Raw headlines from Chinese domestic + global sources

Information Channels

Channel 1 — Polymarket Prediction Markets

Scripts: scripts/query-markets.py, scripts/filter-markets.py

Real-money crowd probabilities on macro, geopolitical, and corporate events. Best for tail risks such as Taiwan conflict, trade war escalation, and rate decisions.

Channel 2 — Financial Market Proxies

Script: scripts/fetch-market-data.py

Raw daily price and volume data for 11 China-sensitive instruments:

TickerInstrumentRelevance
FXIiShares China Large-Cap ETFDirect China equity sentiment
KWEBKraneShares China Internet ETFChina tech/internet
^HSIHang Seng IndexHK market
HG=FCopper FuturesChina industrial demand
AUDUSD=XAUD/USDChina commodities activity
CNY=XUSD/CNYRenminbi strength
^VIXCBOE Volatility IndexGlobal risk appetite
GC=FGold FuturesSafe-haven demand
^TNXUS 10-yr Treasury YieldUS rate pressure on EM
EEMiShares Emerging Markets ETFEM flow proxy
UUPUS Dollar Index ETFUSD strength

Channel 3 — Chinese Domestic Financial News

Script: scripts/fetch-cn-news.py

Raw headlines from domestic Chinese financial media:

Source IDNameCoverage
caixin财新 Caixin GlobalInvestigative finance/economy (EN+ZH)
sina_finance新浪财经Breaking A-share news, policy
yicai第一财经Macro, banking, real estate
eastmoney东方财富Retail investor hot topics
stcn证券时报Regulatory / official securities news
21cbh21世纪经济报道Industry deep dives
xinhua_finance新华财经State macro/policy announcements

Channel 4 — Global / HK China-Focused News

Script: scripts/fetch-cn-news.py (same script, global sources)

Source IDNameCoverage
reuters_chinaReuters ChinaBreaking, macro, corporate
scmpSouth China Morning PostHK/Greater China business
ft_chinaFinancial Times ChinaWestern institutional view
nikkei_chinaNikkei Asia ChinaJapan/Asia regional perspective
xinhua_enXinhua EnglishOfficial Chinese government narrative

Channels 5–7 — Embedded in Composite Analyzer

Invoked automatically by scripts/polymarket_analyzer.py:

  • CNN Fear & Greed Index — US market psychology; extreme readings affect EM risk appetite
  • Reddit Social Sentiment — r/investing, r/wallstreetbets, r/china, r/ChineseStocks, r/emergingmarkets
  • World Bank Macro — China GDP, CPI, export growth, FDI, US real interest rate

Scripts Usage

scripts/query-markets.py — Polymarket raw search

Returns active markets only by default. Use --all to include closed/resolved markets.

python3 scripts/query-markets.py "china"
python3 scripts/query-markets.py "taiwan" --limit 100 --format json
python3 scripts/query-markets.py "byd" --limit 50
python3 scripts/query-markets.py "pboc rate"
# Include resolved markets (for historical analysis only):
python3 scripts/query-markets.py "taiwan" --limit 100 --format json --all

scripts/filter-markets.py — Polymarket multi-filter

Defaults to --status active. Use --status closed or --status all to override.

python3 scripts/filter-markets.py --keywords taiwan,invasion --volume 100000
python3 scripts/filter-markets.py --keywords byd,nio,xpeng,alibaba,tencent
python3 scripts/filter-markets.py --status active --volume 50000 --format json
# Closed markets (historical reference only):
python3 scripts/filter-markets.py --keywords taiwan --status closed --format json

scripts/fetch-market-data.py — Market proxy raw data

python3 scripts/fetch-market-data.py
python3 scripts/fetch-market-data.py --format json
python3 scripts/fetch-market-data.py --period 30d
python3 scripts/fetch-market-data.py --tickers "FXI KWEB ^VIX"

scripts/fetch-cn-news.py — China news raw headlines

python3 scripts/fetch-cn-news.py
python3 scripts/fetch-cn-news.py --format json --limit 20
python3 scripts/fetch-cn-news.py --source caixin --limit 30
python3 scripts/fetch-cn-news.py --source caixin,scmp

scripts/polymarket_analyzer.py — Full composite run

Executes all seven channels and prints a structured report:

python3 scripts/polymarket_analyzer.py

Channels unavailable at runtime degrade gracefully with no crash.


Analysis Workflows & Scenarios

Three scenario-specific workflows are defined in references/workflows/. Each workflow applies First Principles Thinking — defining a hypothesis first, then fetching only the data needed to test it.

ScenarioFileUse When
1. Macro & Geopolitical Risk (Top-Down)references/workflows/scenario-1-macro-geopolitical.mdTaiwan, tariffs, PBOC, elections, USD/CNY stress
2. Sector-Specific Catalyst (Bottom-Up)references/workflows/scenario-2-sector-catalyst.mdEVs, Semiconductors, Property, Internet, specific companies
3. Daily Market Pulse / Fast Digestreferences/workflows/scenario-3-daily-pulse.mdPre-market briefing, end-of-day delta check

Core Analytical Principles (applied in all scenarios)

  1. Liquidity Weighting: Polymarket odds mean nothing without volume. Verify pool size. A 90% probability with $500 volume is noise; with $5M volume, it's a signal.
  2. Divergence Detection: The most profitable insights stem from discrepancies between explicit prediction market odds and implicit market proxy pricing.
  3. Probability Momentum: Focus on the delta (change over time). A contract moving from 10% to 30% in two days is highly actionable.
  4. Active Markets Only (Data Collection): Scripts default to active-only. Never treat a closed/resolved contract as a current signal.
  5. Historical Context (Mandatory): Always compare the current PM probability against: (a) the trend of the last 7–30 days for this specific contract, and (b) how analogous resolved contracts priced and resolved historically. A probability without a trend is not a signal — it is a datapoint. Use --all to retrieve resolved contracts for comparison.
  6. Conflict-First Analysis: When any two sources disagree, the conflict itself is the most important finding in the report. Explain the conflict and its likely cause before forming any directional thesis. A thesis built by ignoring a conflict is not a thesis — it is wishful reasoning.
  7. Multi-Source Minimum: A directional conclusion requires ≥2 independent channels in agreement. Single-source signals must be labeled "Unconfirmed — Watch Only." State explicitly which channels confirm and which dissent.

Accumulated Experience

Before running any analysis, check EXPERIENCE.md for relevant prior observations:

  • Source reliability notes calibrated from past sessions
  • Known false signal patterns (e.g., sectors where PM historically misprices)
  • Conflict resolution examples from past analyses
  • User feedback on conviction thresholds

After the user provides feedback on analysis quality or outcome accuracy, append a new entry to EXPERIENCE.md using the format defined in that file.


Standardized Output Templates

Two templates are defined in references/templates/. Always use the appropriate template when generating a response.

TemplateFileUse When
A: Comprehensive Investment Insight Reportreferences/templates/comprehensive-insight-report.mdFull analysis from Scenario 1 or 2; includes confidence score, proxy confirmation table, source attribution, and data provenance
B: Quick Briefreferences/templates/quick-brief.mdDaily pulse (Scenario 3) or when user needs a rapid digest; ALERT / WATCH / No-Change triage format

References

references/china_stock_mapping.json

Maps 21 China concept stocks to A-share sectors, tickers, supply chain names, HK listings, and correlation coefficients. Companies covered: BYD, NIO, XPeng, Li Auto, Tencent, Alibaba, Baidu, Xiaomi, Pinduoduo, JD.com, Meituan, NetEase, Kuaishou, Bilibili, SMIC, Huawei supply chain, Evergrande, Anta, Haier, Midea, Foxconn. Also includes macro factor mappings for: PBOC rate cuts, US-China trade war, Taiwan tensions, China stimulus.

references/signal_weights.json

Configurable source weights for the composite analyzer. Four profiles:

ProfileDescription
defaultPolymarket 35%, market_data 25%, news 20%, fear_greed 10%, …
news_heavyElevates news to 35% when Polymarket coverage is thin
market_only90% weight on market proxies only
sentiment_focusEmphasis on social + Fear & Greed for retail sentiment reads

A-share Sector Quick Reference

Market SignalA-share SectorKey Tickers
EV sales / BYD / NIONew Energy + BatteryBYD 002594.SZ, CATL 300750.SZ
Taiwan tensionsDefenseAVIC 600893.SH, CSGC 000768.SZ
US chip restrictionsSemiconductor localizationSMIC 688981.SH, Hua Hong 688347.SH
Trade war / tariffsExport manufacturingLuxshare 002475.SZ, Hisense 600060.SH
PBOC rate cutBanks + Real estateICBC 601398.SH, Vanke 000002.SZ
China stimulusInfrastructureCRCC 601186.SH, CREC 601390.SH
Copper surgeIndustrial metalsJiangxi Copper 600362.SH

Troubleshooting

Polymarket CLI not found

export PATH="$PATH:$HOME/.cargo/bin:$HOME/.local/bin"

yfinance not installedfetch-market-data.py will print an error and exit cleanly; all other channels still work.

Chinese news sources unreachable — Some domestic RSS feeds block non-CN IPs. Use a HK/mainland proxy, or focus on: caixin, reuters_china, scmp, xinhua_en.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

openspec-constitution-guard

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

brownfield-onboarding

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

retrospect

No summary provided by upstream source.

Repository SourceNeeds Review