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
累計下載
4489
星標
-
全站排名
#2,150
全站前 43% · 「開發程式設計」前 48%
平台累計安裝累計下載星標評論
ClawHub ↗1494411--
SkillHub ↗1444489-—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

文件先把交易想法整理為入場、退出和週期引數,再示範生成 backtrader 策略程式碼。示例只列印生成狀態,未展示行情載入或回測結果。執行前應審閱程式碼,使用隔離環境和私有臨時路徑;示例不構成投資建議。

資料釋出於 2026-10-29

可以用來做什麼

  • 整理使用者給出的策略引數
  • 審閱 backtrader 策略草稿
  • 規劃另行回測所需資料和保護措施

什麼時候用

  • 使用者提供的策略條件可以明確解析並經使用者確認時
  • 程式碼已審查且能在私有臨時路徑和受控環境執行時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

只將以下交易想法整理為策略引數和回測注意事項;不要生成、儲存或執行程式碼,也不要連線交易帳戶或提供下單建議。

月度資料趨勢

累計下載4489
2085337646672026-03 · 累計下載 22632026-05 · 累計下載 36012026-06 · 累計下載 37672026-07 · 累計下載 41402026-08 · 累計下載 43062026-09 · 累計下載 448926-0326-09
星標-
0112026-03 · 星標 -2026-05 · 星標 -2026-06 · 星標 -2026-07 · 星標 -2026-08 · 星標 -2026-09 · 星標 -26-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-094489—-
2026-084306+4.0%-
2026-074140+9.9%-
2026-063767+4.6%-
2026-053601—-
2026-032263—-

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),按月更新。口徑說明見資料方法。