AllenCX/dsh-quant-workspace ↗★ 0
dsh-quant-workspace
Self-contained DSH plugin for single-ticker quant analysis: bundled Python engine (Yahoo data, Bollinger mean-reversion) with signal card / backtest / review tools.
AI 분석
核心用途是进行单只股票的量化策略分析与回测。适合对金融量化投资感兴趣的用户。内置 Python 引擎,无需额外配置行情 key,通过注册工具供 AI 调用分析。
설치
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:AllenCX/dsh-quant-workspacedsh-quant-workspace
A fully self-contained DeepSeek Harness plugin
for single-ticker quant analysis. It ships its own Python engine inside the package
(python/): Yahoo Finance daily bars, Bollinger mean-reversion rules, and three
read-only tools — the daily signal card, a full backtest, and a strategy health review.
No external engine, no market-data key, no private references: the plugin is the
analysis. The TypeScript shell only registers the single_ticker tool and runs the
bundled dsh-quant CLI through the harness shell seam.
⚠️ Not investment advice. The plugin only surfaces rule state and evidence; the decision is always yours. It never places orders and never changes positions.
What it is for
The plugin turns single-ticker analysis into a human-in-the-loop research loop: you ask in
natural language, the model pulls real computed evidence through single_ticker, you review and
decide. The model researches and interprets; every judgment call — entries, exits, sizing — stays
with you.
Requirements
- A DeepSeek Harness installation (
webprofile) withpnpm(for installing the bundle). uv(runs the bundled Python engine; first use syncspython/.venv).- Internet access for Yahoo Finance data (daily bars).
Install
Installation status: not yet published to npm. Until then, install from the git spec (
dsh plugin --profile web add github:AllenCX/dsh-quant-workspace) or use the dev overlay below.
dsh plugin --profile web add dsh-quant-workspace
All configuration is optional (the plugin works out of the box). To track your real position,
configure a ledger in the profile user patch ($DSH_HOME/profiles/web/cordis.patch.yml):
- id: quant-workspace
config:
ledgerPath: 'C:\path\to\trade_log.csv'
| Option | Default | Meaning |
|---|---|---|
ledgerPath | (none) | Position ledger CSV (date,ticker,action,price; FIFO). Without it the engine treats positions as flat and says so. |
timeoutMs | 180000 | Foreground timeout per tool call. |
pythonCommand | `uv run --project | |
| /python dsh-quant` | Override for running the bundled engine CLI (e.g. a pre-built venv). |
Dev / local overlay
pnpm dsh web --patch ./dev.patch.yml # or any patch mounting src/index.ts / lib/index.js
Tools
single_ticker
ticker(required): symbol, e.g.TSLA. Uppercased automatically; only letters, digits, dot and dash are accepted (shell-safe by construction).mode(defaultdaily):daily= today's signal card ·backtest= full backtest with per-trade table ·review= strategy health check (data freshness, rule state, ledger vs signals).
The tool returns the engine's rendered report text.
Strategy (v1)
Bollinger mean-reversion on daily bars: enter when %B = 1 (close at/above the upper band). Bollinger(20, 2σ). Same-bar close fills,
no transaction costs modeled in v1. Rule parameters are CLI options, so richer rules can be
exposed by the tool later without an engine rewrite.
Boundaries
- Read-only. The tool never places orders, never changes positions, never writes market data.
- Position state comes only from the ledger you configure — the engine never assumes an unlogged holding.
- Data stays Yahoo. v1 fetches daily bars from Yahoo Finance on each call; no caching layer yet.
- Privacy. No keys, no accounts, no per-user data leaves your machine.
Bundled engine CLI
The plugin's tool runs this bundled command (also available for scripting):
dsh-quant --ticker --mode [--ledger
] [--data-file ] [--start ] [--end ]
- Exit 0 with plain-text report on success.
- Exit 1 with a message when data cannot be loaded; exit 2 for invalid invocation.
--data-filereads a local OHLCV CSV instead of the network (used by the tests).
Development
pnpm install && pnpm run typecheck && pnpm run test && pnpm run build # TS shell
cd python && uv run --project . pytest tests -q # bundled engine
License
MIT