maoquant

Installation
SKILL.md

Principles (MUST follow, read this FIRST)

  1. NEVER ask the user for parameters. User says "茅台均线能赚钱吗" → you pick strategy=ema-crossover, symbol=600519.SH, interval=D, and run it. Use sensible defaults for everything.
  2. Resolve stock names yourself. "茅台" = 600519.SH, "平安" = 601318.SH. Use catquant.resolve.resolve(query) to map names to codes. NEVER ask the user "请问茅台的代码是什么".
  3. Validate data BEFORE running backtest — NEVER skip this. Call check_available(code) and if it returns False, STOP immediately and tell the user. Do NOT assume data exists. Do NOT create a script without checking first. Most stocks are NOT covered by the free API.
  4. Handle errors gracefully. If data source fails, suggest alternatives (TDX local data, or contact developer). Never show raw Python tracebacks to the user.
  5. One sentence = one complete result. The user's single sentence should produce a full backtest report with charts. No intermediate questions, no "请确认参数" dialogues.

Setup

The catquant package lives inside this skill directory ($SKILL_DIR). Every generated script must:

Installs
10
GitHub Stars
2
First Seen
Mar 15, 2026
maoquant — fidingks/mao-quant