uuz

Trading DevBox

开发编程v0.1.0
作者:uuz更新于 2026-05-11trading-devbox@clawhub_uu-z/trading-devbox
代码生成#Trading Strategy

据 AlphaMoat 统计,截至 2026-09,Trading DevBox 累计下载 4,489 次、获 0 个星标,在全部 5,078 个 AI 技能中排名第 2,150 位,在「开发编程」分类(577 个)中排名第 272 位。

累计安装
149
累计下载
4,489
星标
-
全站排名
#2,150
全站前 43% · 「开发编程」前 48%
平台累计安装累计下载星标评论
ClawHub ↗1494,411--
SkillHub ↗1444,489-—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

文档先把交易想法整理为入场、退出和周期参数,再示范生成 backtrader 策略代码。示例只打印生成状态,未展示行情加载或回测结果。执行前应审阅代码,使用隔离环境和私有临时路径;示例不构成投资建议。

资料发布于 2026-10-29

可以用来做什么

  • 整理用户给出的策略参数
  • 审阅 backtrader 策略草稿
  • 规划另行回测所需数据和保护措施

什么时候用

  • 用户提供的策略条件可以明确解析并经用户确认时
  • 代码已审查且能在私有临时路径和受控环境运行时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

只将以下交易想法整理为策略参数和回测注意事项;不要生成、保存或运行代码,也不要连接交易账户或提供下单建议。

月度数据趋势

累计下载4,489
2,0853,3764,6672026-03 · 累计下载 2,2632026-05 · 累计下载 3,6012026-06 · 累计下载 3,7672026-07 · 累计下载 4,1402026-08 · 累计下载 4,3062026-09 · 累计下载 4,48926-0326-09
星标-
0112026-03 · 星标 -2026-05 · 星标 -2026-06 · 星标 -2026-07 · 星标 -2026-08 · 星标 -2026-09 · 星标 -26-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-094,489—-
2026-084,306+4.0%-
2026-074,140+9.9%-
2026-063,767+4.6%-
2026-053,601—-
2026-032,263—-

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

2.3 KB · ClawHub v0.1.0
---
name: trading-devbox
description: "Trading strategy development sandbox. User describes trading intent in natural language, agent writes a Python backtest strategy and returns results."
user-invocable: true
---

# Trading DevBox

Help users develop and backtest trading strategies from natural language descriptions.
展开全部(共 75 行)
## When to Use

- User describes a trading idea or intent (e.g. "SOL 跌 10% 买入,涨 30% 止盈")
- User asks to write, backtest, or optimize a trading strategy
- User mentions keywords: 策略, 回测, backtest, strategy, trading

## Workflow

1. Parse the user's trading intent into structured parameters:
   - Asset (e.g. SOL, BTC, ETH)
   - Entry condition (e.g. price drops 10%)
   - Exit condition (e.g. take profit at 30%, stop loss at 5%)
   - Timeframe (e.g. 1h, 4h, 1d)

2. Confirm the parsed parameters with the user before proceeding.

3. Generate a Python backtest strategy using backtrader:

```bash
mkdir -p /tmp/trading-devbox && cat > /tmp/trading-devbox/strategy.py << 'PYEOF'
import backtrader as bt
import sys
import json

class UserStrategy(bt.Strategy):
    params = dict(
        entry_drop_pct=10,
        take_profit_pct=30,
        stop_loss_pct=5,
    )

    def __init__(self):
        self.order = None
        self.buy_price = None

    def next(self):
        if self.order:
            return
        if not self.position:
            # entry: price dropped by entry_drop_pct from recent high
            high = max(self.data.close.get(size=20) or [self.data.close[0]])
            drop = (high - self.data.close[0]) / high * 100
            if drop >= self.p.entry_drop_pct:
                self.order = self.buy()
                self.buy_price = self.data.close[0]
        else:
            pnl = (self.data.close[0] - self.buy_price) / self.buy_price * 100
            if pnl >= self.p.take_profit_pct or pnl <= -self.p.stop_loss_pct:
                self.order = self.sell()

if __name__ == '__main__':
    print(json.dumps({"status": "ok", "message": "Strategy generated"}))
PYEOF
python3 /tmp/trading-devbox/strategy.py
```

4. Report the result to the user in a clear format.

## Response Format

Always respond in the user's language. Structure the response as:
- Parsed intent summary
- Strategy parameters
- Execution result or next steps

「开发编程」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。