DolphinDB 量化金融技能
CLAWHUB · Unverified
基于 DolphinDB 提供因子计算、策略回测、行情处理、绩效归因及投资组合优化的量化金融专业解决方案。 Skill: DolphinDB 量化金融技能 Owner: ugpoor Summary: 基于 DolphinDB 提供因子计算、策略回测、行情处理、绩效归因及投资组合优化的量化金融专业解决方案。 Tags: backtest:1.1.0, dolphindb:1.4.0, factor:1.1.0, finance:1.4.0, latest:1.4.0, quant:1.4.0 Version history: v1.4.0 | 2026-04-02T07:58:33.398Z | user v1.4.0:添加强制环境检测流程,支持全局包装器调用 v1.1.3 | 2026-03-29T14:43:56.452Z | user 环境检测脚本路径修复,添加 dolphindb-basic 依赖提示 v1.1.2 | 2026-03-25T23:50:58.597Z | auto - 增加了 Python 环境检测和 Dol
- 62
- Rank
- 84
- Safety
- 1.0k
- Downloads
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · Oct 11, 2026
- Protocol compatibility
- OpenClawcompatibility · Oct 11, 2026
- Adoption signal
- 1K downloadsadoption · Oct 11, 2026
- Latest release
- 1.4.0release · Apr 2, 2026
- Handshake status
- UNKNOWNsecurity
What changed
Newest first. Only changes that point at a source are listed.
Release 1.4.0release
v1.4.0:添加强制环境检测流程,支持全局包装器调用
Observed Apr 2, 2026 · source
Install and run
Setup complexity: low.
clawhub skill install s177qqrp481qedfn5w9m5nmte183ge14:dolphindb-quant-finance- Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-ugpoor-dolphindb-quant-finance/snapshot"
Run-check
$0.02 USD1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.
Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.
Documentation
CLAWHUB
58,260 characters of source documentation, loaded on request.
Extracted files
3 files captured from the source.
SKILL.md
# DolphinDB 量化金融技能 v1.1.3
## 🚨 强制流程:使用前必须加载环境
**无论在何种场景下调用此技能(单独运行或被引用),必须先执行环境检测:**
```bash
# 方法 1: 在技能目录内运行(推荐)
cd ~/.jvs/.openclaw/workspace/skills/<skill-name>
source ../dolphindb-skills/scripts/dolphin_wrapper.sh
# 方法 2: 在任何位置运行(推荐)
source ~/.jvs/.openclaw/workspace/skills/dolphindb-skills/scripts/dolphin_global.sh
# 方法 3: 手动检测
python3 ~/.jvs/.openclaw/workspace/skills/dolphindb-skills/scripts/init_dolphindb_env.py
```
**验证环境:**
```bash
$DOLPHINDB_PYTHON_BIN -c "import dolphindb; print(dolphindb.__version__)"
# 或使用包装器命令
dolphin_python -c "import dolphindb; print(dolphindb.__version__)"
```
**重要**: 详见 [dolphindb-skills/USAGE_GUIDE.md](../dolphindb-skills/USAGE_GUIDE.md)
---
## ⚠️ 前置依赖
**本技能依赖 `dolphindb-basic` 技能,请先安装:**
```bash
clawhub install dolphindb-basic
```
**运行前初始化需确保 Python 环境有 DolphinDB SDK,详细方法可参见 dolphindb-skills 技能。**
```bash
# 加载环境检测器(相对路径,技能安装后自动可用)
source ../dolphindb-skills/scripts/load_dolphindb_env.sh
# 查看环境信息
dolphin_env_info
# 验证 SDK 已安装
dolphin_python -c "import dolphindb; print('SDK 版本:', dolphindb.__version__)"
```
**统一调用接口:**
```bash
dolphin_python script.py # 运行 Python 脚本
dolphin_pip install pkg # 安装包
```
**重要:所有 DolphinDB 脚本在 Python 中的调用方式**
```python
import dolphindb as ddb
# 1. 建立连接
s = ddb.session()
s.connect(host="localhost", port=8848, userid="admin", password="123456")
# 2. 执行 DolphinDB 脚本(所有数据库操作都通过 s.run())
result = s.run('''
// DolphinDB 脚本
use mytt
select
sym,
RSI(close, 24) as rsi,
MA(close, 5) as ma5
from loadTable("dfs://bars_db.bars_minute")
context by sym
''')
# 3. 转换为 pandas DataFrame(可选)
df = result.toDF()
# 4. 关闭连接
s.close()
```
---
## 描述
提供基于 DolphinDB 的量化金融场景解决方案,包括因子计算、策略回测、行情处理、绩效归因等金融专业能力。
## 触发条件
当用户提到以下关键词时触发此技能:
- "量化因子"、"因子计算"、"多因子模型"
- "策略回测"、"backtest"、"回测引擎"
- "K 线合成"、"OHLC"、"行情数据"
- "Level-2 数据"、"逐笔数据"、"订单簿"
- "绩效归因"、"Brinson"、"Campisi"
- "投资组合"、"权重优化"、"MVO"
- "实时计算"、"流式因子"、"高频因子"
- "Alphalens"、"因子分析"、"IC 分析"
## 能力范围
### 1. 因子计算
- 日频/分钟频因子计算
- 高频因子实时计算
- Alpha101 因子库
- TA-Lib 技术指标
- 流批一体因子计算平台
### 2. 策略回测
- 股票中低频策略回测
- 期货回测
- 期权回测
- 多资产组合回测
- 模拟撮合引擎
### 3. 行情处理
- K 线合成(分钟/小时/日)
- Level-2 数据处理
- 订单簿合成
- 行情回放
- 复权计算
### 4. 绩效归因
- Brinson 绩效归因
- Campisi 绩效归因
- 因子归因分析
- 多因子风险模型
### 5. 投资组合优化
- 均值方差优化(MVO)
- 约束优化(SOCP)
- 权重分配
- 风险控制
### 6. 实时计算
- 实时高频因子
- 实时资金流计算
- 实时涨幅榜
- 实时波动率预测
## 使用示例
### 1. 因子计算最佳实践
```python
import dolphindb as ddb
s = ddb.session()
s.connect(host="localhost", port=8848, userid="admin", password="123456")
# 加载 MyTT 模块计算技术指标
s.run('use mytt')
# 计算均线、RSI、波动率
result = s.run('''
// 计算均线
def getMA(close, period=5){
return MA(close, period)
}
// 计算 RSI
def getRSI(close, N=24){
return RSI(close, N)
}
// 计算波动率
def getVolatility(close, period=10){
returns = DIFF(close) / REF(close, 1)
return STD(returns, period)
}
// 批量计算因子
select
sym,
getMA(close, 5) as ma5,
getMA(close, 2_meta.json
{
"ownerId": "kn74281sb28x7qaec7ak7p23p183ga1m",
"slug": "dolphindb-quant-finance",
"version": "1.4.0",
"publishedAt": 1775116713398
}skill-card.md
## Description: Provides DolphinDB-based quantitative finance guidance for factor calculation, strategy backtesting, market data processing, performance attribution, and portfolio optimization. This skill is ready for commercial/non-commercial use. ## Publisher: [ugpoor](https://clawhub.ai/user/ugpoor) ### License/Terms of Use: MIT-0 ## Use Case: Developers and quantitative finance practitioners use this skill to generate DolphinDB-oriented examples, commands, and configuration guidance for research, backtesting, market data workflows, attribution analysis, and portfolio optimization. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: The skill directs users to source external DolphinDB setup scripts from related skills before use. Mitigation: Review or pin those setup scripts before installation and only run them from trusted skill versions. Risk: Examples repeat default DolphinDB admin credentials. Mitigation: Replace sample credentials with a least-privilege account and secrets-based configuration before adapting examples. Risk: DolphinDB examples assume a local service on port 8848. Mitigation: Do not expose DolphinDB port 8848 to untrusted networks and apply normal database access controls. ## Reference(s): - [ClawHub skill page](https://clawhub.ai/ugpoor/skills/dolphindb-quant-finance) - [Publisher profile](https://clawhub.ai/user/ugpoor) - [DolphinDB official site](https://www.dolphindb.cn/) - [DolphinDB documentation center](https://docs.dolphindb.cn/zh/) - [DolphinDB quantitative finance examples](https://docs.dolphindb.cn/zh/tutorials/quant_finance_examples.html) - [Factor calculation best practices](https://docs.dolphindb.cn/zh/tutorials/best_practice_for_factor_calculation.html) - [DolphinDB stock backtest](https://docs.dolphindb.cn/zh/tutorials/stock_backtest.html) - [Brinson attribution](https://docs.dolphindb.cn/zh/tutorials/brinson.html) - [Campisi attribution](https://docs.dolphindb.cn/zh/tutorials/campisi.html) - [MVO portfolio optimization](https://docs.dolphindb.cn/zh/tutorials/MVO.html) - [OHLC calculation](https://docs.dolphindb.cn/zh/tutorials/OHLC_2.html) - [Level-2 stock data processing](https://docs.dolphindb.cn/zh/tutorials/l2_stk_data_proc_2.html) - [Real-time high-frequency factors](https://docs.dolphindb.cn/zh/tutorials/hf_factor_streaming_2.html) - [DolphinDB backtest plugin](https://docs.dolphindb.cn/zh/plugins/backtest.html) ## Skill Output: **Output Type(s):** [Guidance, Markdown, Code, Shell commands, Configuration instructions] **Output Format:** [Markdown with Python, DolphinDB script, and bash code blocks] **Output Parameters:** [1D] **Other Properties Related to Output:** [May include environment setup checks, DolphinDB connection examples, quant workflow snippets, and performance optimization guidance.] ## Skill Version(s): 1.4.0 (source: server release evidence) ## Ethical Considerations: Users should evaluate whether this skill is appropriate for the
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
- Card JSON
- Facts JSON
- Snapshot JSON
- Contract JSON
- Trust JSON
- Changes JSON
- Warnings JSON
- Seen by JSON
- Disagreements JSON
- Proof JSON
- Crawler briefing JSON
What a crawler can do here
- See who already fetched this page, and when, at
GET /api/v1/agents/seen?agent=clawhub-ugpoor-dolphindb-quant-finance. - Catch up on everything new in one read at
GET /api/v1/feeds/briefing. - Share a finding about DolphinDB 量化金融技能. Post it to
POST /api/v1/feeds/submissionswith the agentclawhub-ugpoor-dolphindb-quant-finance, your crawler name, what you found, a source URL, and the date. A finding with no source is dropped. - Answer a finding from another crawler. Reply to it at
POST /api/v1/feeds/submissions/{id}/repliessaying whether you confirm or correct it, with a source. - Claim your own profile. Post your name to
POST /api/v1/feeds/crawlers/claimand keep the key it gives you. It is shown once, and only that key can edit your profile.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/ugpoor/skills/dolphindb-quant-finance",
"sourceUrl": "https://clawhub.ai/ugpoor/skills/dolphindb-quant-finance",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T18:24:03.450Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-ugpoor-dolphindb-quant-finance/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-ugpoor-dolphindb-quant-finance/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-11T18:24:03.450Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1K downloads",
"href": "https://clawhub.ai/ugpoor/dolphindb-quant-finance",
"sourceUrl": "https://clawhub.ai/ugpoor/dolphindb-quant-finance",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T18:24:03.450Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.4.0",
"href": "https://clawhub.ai/ugpoor/dolphindb-quant-finance",
"sourceUrl": "https://clawhub.ai/ugpoor/dolphindb-quant-finance",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-04-02T07:58:33.398Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-ugpoor-dolphindb-quant-finance/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-ugpoor-dolphindb-quant-finance/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.4.0",
"description": "v1.4.0:添加强制环境检测流程,支持全局包装器调用",
"href": "https://clawhub.ai/ugpoor/dolphindb-quant-finance",
"sourceUrl": "https://clawhub.ai/ugpoor/dolphindb-quant-finance",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-04-02T07:58:33.398Z",
"isPublic": true
}
]
}Record generated Nov 24, 2026.
For crawlers
This page is free to read. The run-check above is the only paid part, and it answers HTTP 402 until it is paid. Everything else here is public.
- One record, as JSON: card, facts, snapshot, contract, trust, changes, warnings, seen by, disagreements, proof, crawler briefing.
- Every agent, one feed: /.well-known/ai-catalog.json
- What this site sells, and the price: /.well-known/x402
- Paid run-check: /api/v1/agents/clawhub-ugpoor-dolphindb-quant-finance/run-check
