Introduction¶
The core philosophy of DeepSeek Harness (DSH) is “everything is a plugin,” enabling models to orchestrate complex workflows. Quant factor research typically involves a cumbersome workflow spanning data probing, panel construction, factor calculation (IC/5-gate), backtesting, and Regime detection. dsh-quant-factor-pipeline encapsulates this strictly disciplined research pipeline as MCP tools that models can invoke step by step.
Core Features¶
The plugin provides a set of tools covering the entire factor research pipeline:
- panel_probe: Fetches an A-share daily-frequency panel, reports turnover-rate coverage, and generates a completeness
panel_hash. - ic_gate: Constructs a CGO disposition-effect factor, computes RankIC versus forward returns, Newey-West t-statistic, and R² mechanical health.
- regime_check: Performs coarse-grained regime state plus correlation breaks / orthogonality detection on signal/return series.
- factor_backtest: Provides a pure-Node long/short decile backtest approximation (RankIC / ICIR / Sharpe / turnover / equity curve).
- project_save / project_load: Writes the research project manifest to YAML, enabling persistence of the research state.
Installation and Execution¶
Installing the plugin requires manually running the packaging and installation steps:
npm pack && cd ~/.dsh/profiles/web && npm install /path/to/dsh-quant-factor-pipeline-0.1.0.tgz --no-save --no-audit --no-fund
It takes effect after restarting dsh web (port 3080).
Runtime requirements:
* Protocol: NDJSON (JSON-RPC 2.0), one JSON object per line, terminated by \n, tolerating a trailing \r. Do not use Content-Length framing.
* Runtime: managed Node 22.22.2 (absolute path, no build required).
* Dependencies: zero dependencies; only Node built-in modules are used (http/https, zlib, crypto, fs, path).
Data Sources¶
The plugin relies on the following verified endpoints for data retrieval:
* push2his.eastmoney.com/api/qt/stock/kline/get — kline + turnover
* datacenter-web.eastmoney.com/api/data/v1/get — RPT_LICO_FN_CPD financial data
* qt.gtimg.cn — Tencent snapshot
The following endpoints are forbidden; calling them may cause 403 errors or invalid responses:
* emweb.securities (legacy Eastmoney emweb site)
* f10.eastmoney.com/zycwzbAjax
* web.ifzq.gtimg.cn (some historical endpoints)
Environment Variables¶
Environment variables can be used to configure data directories and log paths:
QMT_DATADIR: QMT simulation terminaldatadirpath; leave empty to disable the QMT data source layer.AKSHARE_PYTHON: Python interpreter for running akshare bridge scripts; defaults topython3.AKSHARE_HELPER: path to the akshare bridge.pyscript.QUANT_MCP_LOG: sidecar log file path; defaults todsh-mcp-quant-factor-server.login the same directory.QUANT_PROJECTS_DIR: directory for persistentproject_save/project_loadmanifests; defaults to.quant-pipeline/projectsunder the user home directory.
Notes¶
- Version lock: Do not install
@latestunpinned; use the version locked in this repository. - Scope clarification: This is the repository’s first release; the scope boundary with
dsh-quant-data-mcpneeds further clarification to avoid duplicated data sources.
License¶
MIT — Copyright (c) 2026 helibeiqi