Token导航 LogoToken导航TokenDH.com
研究检索external-serviceclawhub未标认证来源可访问clear审计提醒

strategy-workflow策略工作流程

Agent Skill

strategy-workflow 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

14,888

周安装

633

GitHub Stars

1

下载量

5,216
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:strategy-workflow(策略工作流程)
来源仓库:https://github.com/ahuserious/strategy-workflow
安装命令:
openclaw skills install strategy-workflow
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install strategy-workflow

简介

strategy-workflow 提供从构思到验证的完整战略开发流程,适用于交易策略设计、回测与参数优化。

  • 适合在 OpenClaw 中创建量化策略时,快速定位候选方案并进行结构化验证。
  • 通过关键词、任务场景或来源线索检索信息,结合原始 README 核验具体用法。
  • 安装前需确认权限范围、维护状态,注意是否涉及联网、命令执行或文件读写操作。
  • 建议参考来源仓库和安装命令,确保环境兼容性与功能完整性。

SKILL.md

name
strategy-workflow
description
>
version
2.0.0
allowed-tools
Read, Write, Edit, Bash, Glob, Grep

Strategy Workflow

Comprehensive strategy development workflow for quantitative trading, from hypothesis to validated production deployment.

Overview

This skill provides a complete framework for developing, testing, and validating trading strategies. It supports:

  • Hypothesis-driven strategy development
  • Multi-GPU backtesting on Vast.ai
  • Bayesian hyperparameter optimization with Optuna
  • Walk-forward validation and out-of-sample testing
  • Automated tearsheet generation

Entry Points

Control Plane (Swarm Orchestration)

Always-on watchdog loops that manage hardware utilization and self-healing:

bash scripts/start_swarm_watchdogs.sh

For local environments, set explicit paths:

VENV_PATH=/path/to/.venv/bin/activate \
RESULTS_ROOT=/path/to/backtests \
STATE_ROOT=/path/to/backtests/state \
LOGS_ROOT=/path/to/backtests/logs \
bash scripts/start_swarm_watchdogs.sh

Work Plane (Parallel Execution)

Unified wrapper that starts control plane and launches parallel work:

scripts/backtest-optimize --parallel

Multi-GPU, multi-symbol execution:

cd WORKFLOW && ./launch_parallel.sh

Single-Symbol Pipeline

For focused optimization on a single asset:

scripts/backtest-optimize --single --symbol SYMBOL --engine native --prescreen 50000 --paths 1000 --by-regime

Strategy Development

1. Hypothesis Formulation

Define your strategy hypothesis in measurable terms:

  • What market inefficiency are you exploiting?
  • What is the expected holding period?
  • What are the entry/exit conditions?
  • What is the target risk-adjusted return?

2. Feature Selection

Identify relevant features for signal generation:

  • Price-based (OHLCV, returns, volatility)
  • Technical indicators (EMA, RSI, Bollinger Bands)
  • Multi-timeframe features (MTF resampling)
  • Volume analysis (PVSRA, VWAP)
  • Market microstructure (order flow, spread)

3. Signal Generation

Convert features into actionable signals:

  • Directional bias (trend following, mean reversion)
  • Entry conditions (threshold crossings, pattern recognition)
  • Exit conditions (take-profit, stop-loss, trailing stops)
  • Position sizing rules

4. Position Sizing

Implement risk-aware position sizing:

  • Fixed fractional
  • Kelly criterion
  • Volatility-adjusted
  • Regime-dependent scaling

Backtesting

Pre-Flight Validation

MANDATORY before every optimization run:

python validation.py --check-all --data-path DATA_PATH --symbol SYMBOL

Validation checks:

  • Data >= 90 days with no gaps/NaN
  • Min trades >= 30 for statistical significance
  • MTF resampling implemented correctly
  • No look-ahead bias

Multi-GPU Execution on Vast.ai

Deploy to cloud GPU instances for large-scale parameter sweeps:

# Copy workflow files
scp -P PORT workflow_files root@HOST:/root/WORKFLOW/

# Run optimization
ssh -p PORT root@HOST "cd /root/WORKFLOW && python optimize_strategy.py \
  --data-path /root/data --symbol SYMBOL --mode aggressive \
  --prescreen 5000 --paths 200 --engine gpu"

Prescreening with Vectorized Backtests

Phase 0: GPU-accelerated parameter screening:

  • Generate N random parameter combinations
  • Batch evaluate on GPU
  • Filter by minimum trades (30+)
  • Return top K by Sharpe ratio

Performance baseline (RTX 5090, 730d lookback, 250k combos): ~4s per mode.

Full Backtests with NautilusTrader

Phase 1: Event-driven backtesting for top candidates:

  • High-fidelity simulation with realistic execution
  • Slippage and commission modeling
  • Multi-asset portfolio backtests

Parameter Optimization

Optuna for Hyperparameter Search

Phase 2: Bayesian optimization with warm-start from prescreening:

import optuna

study = optuna.create_study(
    direction="maximize",
    sampler=optuna.samplers.TPESampler(seed=42),
    pruner=optuna.pruners.MedianPruner()
)

study.optimize(objective, n_trials=1000)

Grid Search vs Bayesian Optimization

MethodUse Case
Grid SearchSmall parameter space, exhaustive coverage needed
Random SearchLarge space, quick exploration
Bayesian (TPE)Efficient optimization, exploitation/exploration balance
CMA-ESContinuous parameters, smooth objective

Pruning Strategies

  • MedianPruner: Prune if worse than median of completed trials
  • PercentilePruner: Prune bottom X% of trials
  • HyperbandPruner: Multi-fidelity optimization
  • SuccessiveHalvingPruner: Aggressive early stopping

Distributed Optimization

For large-scale runs, use persistent storage:

# JournalStorage for multi-process
storage = optuna.storages.JournalStorage(
    optuna.storages.JournalFileStorage("journal.log")
)

# RDBStorage for distributed clusters
storage = optuna.storages.RDBStorage("postgresql://...")

Walk-Forward Validation

Rolling Window Validation

Slide the training/test window through time:

[Train 1][Test 1]
    [Train 2][Test 2]
        [Train 3][Test 3]

Parameters:

  • train_window: Training period length
  • test_window: Out-of-sample test length
  • step_size: Window advancement increment

Anchored Walk-Forward

Expand training window while sliding test window:

[Train 1      ][Test 1]
[Train 1 + 2      ][Test 2]
[Train 1 + 2 + 3      ][Test 3]

Use when historical regime diversity improves model robustness.

Epoch Selection Criteria

Intelligent selection of training periods:

  • Regime-aware: Match training regimes to expected deployment conditions
  • Volatility-adjusted: Include both high and low volatility periods
  • Event-inclusive: Ensure major market events are represented
  • Recency-weighted: Emphasize recent data while maintaining diversity

Out-of-Sample Testing

Final validation phase:

  • Hold out 20-30% of data for final OOS test
  • No parameter tuning on OOS data
  • Monte Carlo stress testing
  • Regime-conditional performance analysis

SLOs and Guardrails

Utilization Targets

  • CPU utilization target: >= 70%
  • GPU utilization target: >= 70%
  • No silent GPU fallback for GPU sweeps

Hardware Watchdog Hooks

Enforced by:

  • hooks/hardware_capacity_watchdog.py
  • scripts/process_auditor.py

Capacity Monitoring

Control plane loops monitor:

  • Worker health and liveness
  • Progress artifact freshness
  • Resource utilization
  • Job queue depth

Self-healing actions:

  • Automatic worker restart on crash
  • Fill lanes for underutilized resources
  • Cooldown guardrails to prevent thrashing

Tearsheet Generation

Generate QuantStats-style performance reports:

scripts/generate-tearsheet STRATEGY_NAME \
  --trades /path/to/trades.csv \
  --capital 10000 \
  --output ./tearsheets

See tearsheet-generator skill for detailed visualization options.

Multi-Provider Orchestration

PAL MCP Integration

Attach PAL as an MCP server for research/consensus across multiple model providers:

  • Config template: config/mcp/pal.mcp.json.example
  • Docs: docs/reference/PAL_MCP_INTEGRATION.md
  • Providers: OpenRouter, OpenAI, Anthropic, xAI, local models

Resources

Documentation

Project References

  • config/workflow_defaults.yaml - Default configuration
  • config/model_policy.yaml - Model policy (advisory)
  • docs/guides/SWARM_OPTIMIZATION_RUNBOOK.md - Detailed runbook
  • hooks/pipeline-hooks.md - Hook contracts
  • docs/reference/VECTORBT_GRAPH_INGEST.md - VectorBT PRO integration

Results Structure

Backtests/optimizations/{SYMBOL}/{MODE}/
  best_sharpe/
    config.json      # Best Sharpe configuration
    metrics.json     # Performance metrics
  best_returns/
  lowest_drawdown/
  best_winrate/
  all_trials.json    # All Optuna trials
  phase0_top500.json # Prescreening results

适合场景

01

调用多模型

02

代码和文本生成

03

Agent 推理流程

04

OpenRouter 模型接入

能力概览

能力 1

统一调用多种 LLM

能力 2

支持 Claude、Gemini、Kimi 等模型

能力 3

适合聊天、代码和推理任务

能力 4

可作为 Agent 模型调用入口

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

88.81%
按下载量换算4,632

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

未展示

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills