Preface¶
Conducting quantitative research in DeepSeek Harness (DSH) commonly involves hand-written scripts, fragmented data interface calls, and having agents piece together the workflow. As steps multiply, alignment rules, backtesting boundaries, and risk control calibers easily become inconsistent, and the model struggles to stably reproduce the end-to-end pipeline.
dsh-quant modularizes quantitative research into pluggable components, exposing them to agents via 59 quant_* tools covering six domains: data, factors, models, risk control, execution, and ecosystem. It provides a PDAT→PET research pipeline. Below, we introduce what it is, its capabilities, and how to install and try it out.
What Is It¶
dsh-quant is a DSH plugin maintained by pengpengyi92, published as the npm package dsh-quant (current version 0.90.0, MIT license). The project describes itself as an “AI-native & DSH-native quant toolkit” and has been included in awesome-dsh-plugin. It can be installed with a single command via dsh-market.
Unlike “quant libraries for humans,” its primary users are agents: tool schemas are injected into system prompts, outputs use standardized JSON with null-aligned lengths, and functions are designed to be pure and support concurrent invocation. The codebase is implemented in TypeScript with no Python files, running with zero runtime dependencies. When Python data sources like akshare or tushare are needed, they are launched on-demand via DSH’s shell/subprocess capabilities; the plugin itself does not bundle a Python runtime.
Core Features¶
Five-Module Plugin Paradigm¶
The project open-sources its internal five-team paradigm into five replaceable modules:
data plugin dsh-data Market Data / Data Sources / Quality Checks
alpha plugin dsh-alpha Indicators / Factors / Evaluation
model plugin dsh-ml Backtesting / ML / DL / RL Frameworks
risk plugin dsh-risk VaR / Drawdown / Options / Bonds
exec plugin dsh-execution Simulated Execution / Funds / Reports
What is public includes how modules are combined and how contracts are defined (null alignment, no look-ahead, manual baseline validation). Strategy, model, and trading details are left for users to fill in.
59 Quant Tools & Six-Domain Coverage¶
The README lists 59 quant_* tools distributed across six domains: data, alpha, ML, risk control, execution, and ecosystem. Typical capabilities include:
- Data:
quant_market_fetch,quant_data_quality,quant_data_compare,quant_data_advice, etc. - Factors & Backtesting:
quant_factor_evaluate,quant_backtest,quant_metrics - Risk Control:
quant_risk,quant_drawdown,quant_var_backtest(tool table continues in the README) - Execution & Reporting:
quant_execute_sim,quant_fund,quant_report
A single call to quant_research_pipeline(symbol=BTCUSDT, limit=120) can chain the entire PDAT→PET workflow.
End-to-End Pipeline Example¶
After installation, you can run the full pipeline using public BTC data:
data(quant_market_fetch) → quality(quant_data_quality) → factors(quant_factor_evaluate)
→ backtest(quant_backtest) → metrics(quant_metrics) → risk(quant_risk)
→ drawdown(quant_drawdown) → paper sim(quant_execute_sim) → fund sim(quant_fund)
→ report(quant_report)
There is also a skill/quant-research skill layer for models to load research workflows. Detailed contracts are in mcp/AGENT_GUIDE.md within the repository, and onboarding steps are in docs/ONBOARDING.md.
CLI & UI (Separate Repositories)¶
The terminal CLI allows browsing the tool directory, institutional archive index, and K-line tables using pure Node. Examples:
node cli/main.mjs repo
node cli/main.mjs kline BTCUSDT --limit 20
After global installation, the command can be shortened to dsh-quant repo. The visual workbench is in the separate project dsh-quant-ui, with an online demo at: https://dsh-quant-ui.pages.dev.
Installation & Activation¶
DSH users install via the official README method:
npm i dsh-quant
Add a line to cordis.yml:
- name: 'dsh-quant'
After saving, the 59 tools will be automatically registered. The plugin depends on peer dependencies like @deepseek-ai/cordis, @deepseek-ai/dsh-tools, and @deepseek-ai/dsh-system-prompt, which must match the current DSH version.
Community directory page: https://www.skillhub.cn/plugins/pengpengyi92/dsh-quant (SkillHub is an independent community site with no official affiliation to DeepSeek / High-Flyer).
Typical Usage¶
One-Click Research Pipeline¶
In a DSH session with the plugin enabled, have the agent invoke:
quant_research_pipeline(symbol=BTCUSDT, limit=120)
This returns results for data quality, factor evaluation, backtesting metrics, risk, and simulated execution in one go. ML/DL-related instructions are in docs/ML_GUIDE.md; an executable demo:
npx tsx demos/ml-workflow.ts
Step-by-Step Invocation¶
If you need step-by-step verification, you can sequentially call quant_market_fetch, quant_backtest, quant_risk, etc., following the README order, and then aggregate into quant_report. When agents access the repository, they can start by reading AGENTS.md in the root directory and plugin/CASE_STUDY.md.
Use Cases & Notes¶
Who It’s For
- Developers already running agents in DSH who want to use unified contracts for quantitative research, backtesting, and paper trading simulation.
- Teams needing pluggable data sources, factors, models, and risk control modules who are willing to fill in strategy details themselves.
- AI-native quantitative scenarios where tools need to be callable by models in parallel and outputs need to be machine-parsable.
Pre-Use Notes
- The plugin runs under DSH process permissions. Before installation, read the source code and MIT license to ensure tool behavior meets your compliance requirements.
- What is public is the methodology and framework; “secrets internal” – internal alpha and live trading interfaces need to be connected to corresponding plugin slots by yourself.
- Numerical methods are validated with manual baselines and unit tests (README states 215), but still require secondary verification based on your data frequency and market rules.
- When Python data sources are needed, they rely on DSH to launch external processes; the environment must be prepared by yourself.
Conclusion¶
dsh-quant modularizes the PDAT→PET pipeline for quantitative research, using 59 quant_* tools to serve agents rather than just manual scripts. It is suitable for building composable, verifiable quantitative workflows in DSH. For extending data sources or execution modules, follow the plugin solicitation in Issue #27.
- Community directory: https://www.skillhub.cn/plugins/pengpengyi92/dsh-quant
- GitHub: https://github.com/pengpengyi92/dsh-quant
- Project site: https://dsh-quant-site.pages.dev