Orchestrates the full lifecycle from academic paper to validated trading factor or strategy: ingests documents, extracts quantitative signals, implements backtests, evaluates statistical thresholds, and monitors long-term decay.
Ships in vibe-trading-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
SDM orchestrates the full lifecycle from academic paper or research report to validated factor or strategy. It ingests documents, extracts quantitative signals, implements and backtests them through the existing tool chain, evaluates results against statistical thresholds, and monitors long-term decay. SDM does not reinvent any step. It delegates to the tools already available (read_document, factor_analysis, backtest, alpha_bench, and the hypothesis/autopilot stack) and adds a thin coordination layer with persistent artifact tracking.
Use this skill whenever a user wants to go from "here is a paper" to "I have a working, monitored factor or strategy in the system."
Decision tree for routing user requests:
sdm_status(action="disable", artifact_id=...)sdm_status(action="enable", artifact_id=...)sdm_status(action="list")When the user's intent spans multiple phases (for example "read this paper and build a factor"), run the phases sequentially from INGEST through EVALUATE.
Parse the source document and classify its content.
read_document(paper_path) to extract the full text from the PDF or report.Turn the parsed content into structured artifact definitions.
For factors, extract:
name: short identifier (for example "momentum_12_1")formula_latex: the mathematical formula as written in the papervariables: list of input variables and their meaningscolumns_required: OHLCV columns or fundamental fields neededuniverse: target market (for example "equity_us", "equity_cn")decay_horizon: recommended holding period in trading daysFor strategies, extract:
name: short identifierentry_rules: conditions that trigger a long or short positionexit_rules: conditions that close a positionposition_sizing: how to allocate capital across selected instrumentsrisk_management: stop-loss, max drawdown, exposure limitsuniverse: target marketcolumns_required: data fields neededDeduplication check: call alpha_bench or check sdm_status(action="list") to see if a similar artifact already exists. If the Pearson IC between the new factor and an existing alpha exceeds 0.99, treat it as a duplicate and stop. IC between 0.90 and 0.99 may be a variant worth keeping with a note.
Register the artifact: call sdm_register(artifact_type, name, universe, ...) to persist the extracted definition with status "extracted".
After ingesting a paper via read_document, check the ocr_quality field in the response:
quality_flag == "good": proceed with extractionquality_flag == "degraded": warn user that some pages could not be OCR'd, suggest manual reviewquality_flag == "no_ocr_engine": suggest installing an OCR engine — pip install rapidocr_onnxruntime for local, or set VIBE_TRADING_OCR_ENGINE=llm-vision to use a vision-capable LLM model (GPT-4o, Qwen-VL, etc.) via your existing provider configtext_density < 100: flag as potentially low-quality extraction, suggest verifying formulas manuallyBuild the SignalEngine, run the backtest, and link results.
create_hypothesis(title, thesis, universe, signal_definition) to create a research hypothesis that tracks this work.generate_backtest_config(hypothesis_id, start_date, end_date) to produce the config.json for the backtest runner. For an artifact registered with sdm_register, add its artifact_id to config.json so the backtest is recorded in the artifact's bench history. Add "bench_type": "initial" for the first evaluation run and "periodic" for scheduled re-benches; without it the run is recorded as manual, which decay monitoring ignores.scaffold_signal_engine(hypothesis_id, run_dir) to generate the skeleton signal_engine.py in the run directory.signal_engine.py using the appropriate template from templates/:
templates/factor_signal_engine.pytemplates/strategy_signal_engine.pybash("python -c \"import ast; ast.parse(open('code/signal_engine.py').read()); print('OK')\"")backtest(run_dir) to execute the backtest. When config.json declares an artifact_id, the result carries a bench_record that reports whether the run was recorded, skipped (failed run, no trades, missing metrics, or the same measurement already stored (even in another directory)) or failed (for example an unregistered artifact_id), with a reason.link_autopilot_backtest(hypothesis_id, run_dir) to link the run results back to the hypothesis.sdm_status(action="detail", artifact_id=...) and update the artifact status to "benching".Judge the backtest output against quality thresholds.
For factors: call factor_analysis with the factor CSV and return CSV. Check:
For strategies: read artifacts/metrics.csv and run_card.json. Check:
If the artifact is alive (meets thresholds):
factors/zoo/ and update status to "active"If the artifact is dead (fails thresholds):
Check the bench record: the backtest itself writes the bench row when config.json declares the artifact_id. Confirm bench_record.status is recorded in the backtest result, or list the rows with sdm_status(action="detail", artifact_id=...). If the run was not recorded, fix the config and re-run the backtest.
Track artifact health over time and handle decay.
sdm_decay_scan(universe=...) for batch monitoring across all active artifacts in a universe.references/decay_thresholds.md)active → monitoring when any metric enters "Warning"monitoring → decayed when metrics stay in "Decayed" for 3+ consecutive scansdecayed → disabled when metrics enter "Critical"monitoring → active when metrics recover to "Healthy" for 2+ consecutive scans| Tool | Phase | Purpose |
|---|---|---|
read_document | 1 | Parse PDF papers and reports |
sdm_register | 2 | Register extracted factor or strategy |
sdm_status | 2, 3, 4, 5 | Query or update artifact lifecycle status |
alpha_bench | 2 | Deduplication check against existing alphas |
create_hypothesis | 3 | Create a research hypothesis |
generate_backtest_config | 3 | Generate backtest config.json |
scaffold_signal_engine | 3 | Generate SignalEngine skeleton |
backtest | 3 | Execute the backtest |
link_autopilot_backtest | 3 | Link backtest results to hypothesis |
factor_analysis | 4 | IC/IR analysis for factor artifacts |
sdm_decay_scan | 5 | Batch decay monitoring |
The generated signal_engine.py MUST satisfy the backtest runner contract:
class SignalEngine:
def __init__(self):
"""No-arg constructor. All parameters must have defaults."""
...
def generate(self, data_map: dict[str, pd.DataFrame]) -> dict[str, pd.Series]:
"""
Args:
data_map: symbol -> DataFrame (columns: open, high, low, close, volume,
DatetimeIndex). May include extra fields from config.extra_fields
or config.fundamental_fields.
Returns:
symbol -> signal Series (float, clipped to [-1.0, 1.0])
1.0 = fully long, 0.5 = half position, 0.0 = flat, -1.0 = fully short
"""
...
Hard constraints:
SignalEngineif __name__ == "__main__" blockSelf-check before marking any phase complete:
LLMs may generate plausible-looking formulas that do not appear in the paper. ALWAYS cross-check the extracted formula against the original document text. If the paper uses notation you cannot parse, ask the user to confirm.
IC > 0.99 means the factor is a duplicate. IC between 0.90 and 0.99 may be a variant. Use judgment: if the formula is structurally different but produces similar signals, note it as a variant rather than rejecting it outright.
Decay monitoring requires at least 3 initial or periodic bench history entries to establish a baseline; manual entries are kept for reference and do not count. A newly registered artifact with only one backtest cannot be meaningfully scanned for decay.
Strategy-type artifacts need the strategy SignalEngine template (with entry/exit/position logic), not the factor template. Using the wrong template produces a SignalEngine that compiles but generates meaningless signals.
Factor values must use data from day T and earlier. Returns must use data from T+1 onward. The delta(df, d) operator enforces d >= 1 to prevent lookahead. Never use Ref(df, -n) style negative shifts.
Two SignalEngine templates are provided in templates/:
factor_signal_engine.py: for factor-type artifacts. Computes a cross-sectional factor value per instrument per date, then ranks and clips to [-1.0, 1.0].strategy_signal_engine.py: for strategy-type artifacts. Implements entry/exit rules with position sizing and risk management.references/decay_thresholds.mdexamples.mdsrc/factors/base.py (rank, zscore, scale, ts_mean, ts_std, ts_rank, ts_corr, ts_cov, ts_max, ts_min, ts_argmax, ts_argmin, delta, decay_linear, signed_power, safe_div, vwap)examples.md (opens in a new tab)references/decay_thresholds.md (opens in a new tab)references/scheduled_decay_scan.md (opens in a new tab)references/strategy_extraction_guide.md (opens in a new tab)references/strategy_metrics.md (opens in a new tab)templates/decay_report.md (opens in a new tab)templates/factor_signal_engine.py (opens in a new tab)templates/strategy_signal_engine.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
/hkuds-vibe-trading-skills:strategy-dev-managerfrom vibe-trading-skills
Generated from the plugin's indexed repository (hkuds/vibe-trading) — no native marketplace selected
npx claudepluginhub p/hkuds-vibe-trading-skills89 skills in this plugin
/adr-hshareADR/H-share/A-share cross-listing premium analysis — track pricing gaps between US-listed ADRs, HK-listed H-shares, and A-shares for arbitrage signals, dual-listing valuation, and delisting risk assessment./akshareAKShare financial data aggregator (18k+ stars). Free, no API key. Covers A-shares, US, HK, futures, macro, forex. Primary fallback for tushare and yfinance./alpha-zooBrowse and bench the bundled alpha zoos — prebuilt cross-sectional factor libraries (Kakushadze 101, GTJA 191, Qlib 158, Fama-French / Carhart). Use when the user asks "which alphas exist", wants metadata on a named alpha, or wants to run IC/IR on a whole zoo over a universe.Other plugins' skills for the same job