AI Agent Hub
Back to skills
China Margin Financing Premarket Observer icon

China Margin Financing Premarket Observer

Professional Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please follow https://skillhub.cn/install/skillhub.md to install @user_33655e80/china-margin-financing-premarket-akshare.

About this skill

Problem

Premarket review of A-share margin financing is often blocked by inconsistent sources, mismatched units, missing history, and metric errors: SSE summaries are in CNY, SZSE in hundred million CNY, and BSE in ten thousand CNY. Some dates only have partial exchange coverage, and replacing the 20-day average of daily changes with a 20-day moving average of balances can distort trend interpretation.

How it works

The skill uses akshare as the only data source and builds reports from local historical caches. It first checks that python3, akshare, pandas, and matplotlib are available, then fetches trading days via tool_trade_date_hist_sina. It pulls the company universe, current and previous official totals, and security-level details. For missing SSE/SZSE historical rows and BSE bulk gaps, the script backfills from exchange daily endpoints; BSE requests are rate-limited with low concurrency, and a 403 on GET only switches to POST against the same official endpoint. Before publishing, it validates complete same-day coverage, normalizes units to CNY, left-joins the active company universe, keeps missing details as 0, and checks daily changes, 20-day average changes, cumulative changes, and component status.

Boundaries

The output is for premarket research only. It does not execute trades or predict direction. It tracks margin financing balance only, not short selling balance. The company scope excludes ETFs, funds, and bonds. Because the akshare company universe has no unified industry field, industry should remain “not provided” rather than being guessed.

Use Cases

  • Consolidate SSE, SZSE, and BSE margin totals, daily changes, and change ratios before the open
  • Backfill SSE/SZSE history and BSE daily data to compute a complete trading-calendar percentile
  • Join the active company universe to security details and output top ten gainers and losers
  • Validate exchange units and component status before treating a partial date as the latest complete day

Best For

  • Quant researchers who need premarket checks of A-share margin financing balance scope
  • Financial data engineers unifying SSE/SZSE/BSE units and generating premarket reports
  • Premarket analysts monitoring margin activity changes without executing trades
  • Financial data quality owners validating history gaps and component status