Comprehensive strategy development workflow from ideation to validation. Use when creating trading strategies, running backtests, parameter optimization, or walk-forward validation.
Comprehensive strategy development workflow for quantitative trading, from hypothesis to validated production deployment.
This skill provides a complete framework for developing, testing, and validating trading strategies. It supports:
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
Unified wrapper that starts control plane and launches parallel work:
scripts/backtest-optimize --parallel
Multi-GPU, multi-symbol execution:
cd WORKFLOW && ./launch_parallel.sh
For focused optimization on a single asset:
scripts/backtest-optimize --single --symbol SYMBOL --engine native --prescreen 50000 --paths 1000 --by-regime
Define your strategy hypothesis in measurable terms:
Identify relevant features for signal generation:
Convert features into actionable signals:
Implement risk-aware position sizing:
MANDATORY before every optimization run:
python validation.py --check-all --data-path DATA_PATH --symbol SYMBOL
Validation checks:
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"
Phase 0: GPU-accelerated parameter screening:
Performance baseline (RTX 5090, 730d lookback, 250k combos): ~4s per mode.
Phase 1: Event-driven backtesting for top candidates:
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)
| Method | Use Case |
|---|---|
| Grid Search | Small parameter space, exhaustive coverage needed |
| Random Search | Large space, quick exploration |
| Bayesian (TPE) | Efficient optimization, exploitation/exploration balance |
| CMA-ES | Continuous parameters, smooth objective |
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://...")
Slide the training/test window through time:
[Train 1][Test 1]
[Train 2][Test 2]
[Train 3][Test 3]
Parameters:
train_window: Training period lengthtest_window: Out-of-sample test lengthstep_size: Window advancement incrementExpand 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.
Intelligent selection of training periods:
Final validation phase:
Enforced by:
hooks/hardware_capacity_watchdog.pyscripts/process_auditor.pyControl plane loops monitor:
Self-healing actions:
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.
Attach PAL as an MCP server for research/consensus across multiple model providers:
config/mcp/pal.mcp.json.exampledocs/reference/PAL_MCP_INTEGRATION.mdconfig/workflow_defaults.yaml - Default configurationconfig/model_policy.yaml - Model policy (advisory)docs/guides/SWARM_OPTIMIZATION_RUNBOOK.md - Detailed runbookhooks/pipeline-hooks.md - Hook contractsdocs/reference/VECTORBT_GRAPH_INGEST.md - VectorBT PRO integrationBacktests/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