dshbase

插件目录 / Data / dsh-quant-workspace

dsh-quant-workspace

已验证 · 实测可装 AllenCX

✓ 持续维护 基于 4 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

0Stars
0Forks
0未关闭 issue
Python语言
2026-08-14最近推送
跨平台平台

功能简介

低频量化引擎插件:信号卡、回测、复盘

✅
我们的评价
可用 — 实测通过,早期项目

低频量化引擎插件:信号卡、回测、复盘 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

dsh-quant-workspace

English | 中文

A self-contained quant research workspace for DeepSeek Harness.
It ships a Python engine inside the package — fetch Yahoo Finance daily data, backtest
rule-based strategies, and generate interactive visual reports, all from chat.

⚠️ Not investment advice. The workspace surfaces rule state and evidence; decisions are
always yours. It never places orders and never changes positions.

Features

  • Data — Yahoo Finance daily bars (2 years by default), with OHLCV + indicator export.
  • Backtesting — per-trade table, total return, max drawdown, win rate, average hold, and a
    buy-and-hold baseline.
  • Visual reports — self-contained interactive HTML charts: candlesticks with bands and
    entry/exit markers, volume, %B, and an equity curve. Zoom (anchored at the cursor), pan,
    crosshair, and a red-up/green-down toggle — no dependencies, open in any browser.
  • Strategy registry — save strategies you have researched and reuse them by id.
  • Read-only by design — no orders, no position changes, no market-data keys.

Requirements

  • A DeepSeek Harness installation (web profile) with pnpm.
  • uv (runs the bundled Python engine; first use syncs python/.venv).
  • Internet access for Yahoo Finance data.

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. Example user patch ($DSH_HOME/profiles/web/cordis.patch.yml):

- id: quant-workspace
  config:
    ledgerPath: 'C:\path\to\trade_log.csv'   # optional: track your real positions
    reportsDir: 'C:\path\to\reports'          # optional: where visual reports go
Option Default Meaning
ledgerPath (none) Position ledger CSV (date,ticker,action,price; FIFO). Positions are only tracked from this file.
reportsDir $DSH_HOME/dsh-quant-workspace/reports Directory for visual report artifacts (HTML charts) and state exports.
registryPath $DSH_HOME/dsh-quant-workspace/strategies.json Strategy registry JSON file.
defaultRule (none) Default rule family used when a call does not specify one.
timeoutMs 180000 Foreground timeout per tool call.
pythonCommand uv run --project <package>/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

Quick start

In a Harness session:

  • "Give me today's signal card for TSLA" — single_ticker, mode daily.
  • "Backtest META and generate a chart" — single_ticker, mode backtest, chart: true.
  • "Compare the review health check for TSLA" — single_ticker, mode review.

A call runs exactly one rule: an example rule family, a registered strategy id, or the
configured defaultRule when neither is given. Without any of these, the workspace reports
that no strategy is selected.

Tools

single_ticker

  • ticker (required) — symbol, e.g. TSLA. Uppercased automatically; only letters, digits, dot and dash.
  • mode (default daily) — daily signal card · backtest with per-trade table · review health check.
  • rule — an example rule family (currently bollinger_mean_reversion).
  • strategy — id of a strategy in the workspace registry.
  • chart (default false) — also write an interactive HTML report and the state CSV under reportsDir;
    the artifact paths are included in the output.

Strategy registry

After research, save a strategy and reuse it by id:

dsh-quant strategy register --id tsla_dip --family bollinger_mean_reversion --bollinger-window 30 --note 'dip strategy after Aug-2026 research'
dsh-quant strategy list
dsh-quant strategy remove --id tsla_dip

Example rule

The bundled engine ships one example rule so the workspace works out of the box: Bollinger
mean-reversion on daily bars — enter when %B <= 0, exit when %B >= 1 (Bollinger 20, 2σ,
same-bar close fills, no transaction costs in v1). Rule parameters are CLI options, and more
rule families (MA cross, Donchian, RSI, trend filters) are on the roadmap.

CLI reference

dsh-quant single-ticker --ticker <T> --mode <daily|backtest|review> (--rule <family> | --strategy <id>) [--ledger <path>] [--chart <dir>] [--export-state <dir>] [--registry <path>] [--data-file <csv>]
dsh-quant strategy register|list|remove [options]
  • Exit 0 with plain-text report on success; exit 1 when data cannot be loaded; exit 2 for invalid invocation.
  • --data-file reads 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

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-quant-workspace」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:AllenCX/dsh-quant-workspace

Headless(CLI)profile:

dsh plugin --profile headless add github:AllenCX/dsh-quant-workspace

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

使用场景

让 agent 处理数据——解析、转换或分析——用真实数据集工作,而不只是文字。

适合谁

任务涉及表格、文件或数字、需要处理或分析的人。

二次开发建议

数据源和转换工具是缝——加格式、聚合或可视化输出。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Data 里更多

浏览全部 7797 个插件 →