dsh-quant-indicators: a small quantitative toolkit built on dsh's tool contract #2307
pengpengyi92
started this conversation in
Show Your Plugins!
Replies: 3 comments
|
Update: the package is now published on npm — install with |
0 replies
|
Update: the UI is live! 🐋 dsh-quant-ui — a Jane Street-style workbench that renders dsh-quant chart data:
dsh-quant is now at 0.14.0 — 31 tools across data, indicators, factor lab (alphalens-style), backtests, metrics, risk (VaR/CVaR/beta/alpha), fund simulation, and chart data plane. |
0 replies
|
📢 本插件已大幅迭代:37 工具 · 6 域 · 0.17.1,最新展示帖见 → #2513 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone! After studying the dsh architecture (the
ctx.toolspipeline, capability seams, and the canonical-output contract), I built a small plugin that gives agents a complete quant workflow: fetch market data → compute technical indicators → backtest a strategy. Everything is structured so Code Mode can consume it programmatically.Repo: https://github.com/pengpengyi92/dsh-quant-indicators · npm:
dsh-quant-indicators(taggeddsh-plugin)What's inside (9 tools)
quant_market_fetch{openTime, open, high, low, close, volume}quant_sma/quant_ema/quant_rsi/quant_macd/quant_bollinger/quant_atrquant_backtestiand execute at bari+1close (no look-ahead)Design decisions worth sharing (learned from the dsh contracts)
output.schema+output.rendersplit). Code Mode gets typed values for free —await tools.quant_sma(...)resolves to the actual numbers.nulls, so the model aligns by index without re-requesting.src/indicators.ts/src/backtest.tshave zero dsh imports — numerical correctness is tested standalone (classic Wilder RSI 70.46, hand-computed MACD/ATR/backtest trades), and the harness layer is just thedefineToolregistration.tool-todo'sloader-composition.spec.ts, the plugin boots through a realcordis.yml+ Loader with a module map — registration, pipeline execution, isError paths, and HMR-safety disposal are all covered.Verified end-to-end (live)
Tests: 30 unit cases + 4 loader-composition cases + live integration, all green.
Why this matters for the ecosystem
The official toolset is excellent for coding workflows, but quantitative analysis (fetch → indicator → backtest) was a gap. This plugin shows how quickly a domain-specific toolkit can be built purely on the documented extension points — no loop changes, no UI changes, just
ctx.tools.register+defineTool+ a README. It's a proper bundle (dsh.bundle+cordis.patch.yml), sodsh plugin add dsh-quant-indicatorsworks and it can join the awesome-dsh-plugin list.I'd love feedback on the contract choices (especially the null-alignment convention), and I'm happy to turn any part of it into a proper ecosystem contribution. Also very interested in contributing to dsh itself — I've written up study notes on the architecture (Cordis composition, seam roles, tool pipeline, goal domain, subagent activation) plus a Chinese deep-dive blog post, and would be glad to help with docs, issues, or plugins. Thanks for building such a clean harness!
All reactions