← スキル一覧に戻る

monte-carlo
by gevans3000
⭐ 0🍴 0📅 2026年1月25日
SKILL.md
name: monte-carlo description: Run Monte Carlo simulations on a trading strategy to verify robustness.
Monte Carlo Simulation Skill
This skill runs a Monte Carlo simulation on a specific strategy using the scripts/monte_carlo_v1.py script. It validates the statistical robustness of a strategy by repeatedly sampling trade returns.
Usage
Invoke with: /monte-carlo <strategy_name> [limit] [iterations] [source]
Examples:
/monte-carlo scalp_1m_sweep_optimized(Default: 1000 bars, 1000 iterations, bitunix source)/monte-carlo scalp_1m_sweep_optimized 5000(5000 bars)/monte-carlo scalp_1m_sweep_optimized 2000 5000 mock(2000 bars, 5000 iters, mock data)
Parameters
strategy_name(required): Name of the strategy file inconfig/strategies/(without .json extension).limit(optional): Number of bars to backtest before simulation (Default: 1000).iterations(optional): Number of Monte Carlo iterations (Default: 1000).source(optional): Data source, 'bitunix' or 'mock' (Default: bitunix).
Prerequisites
- The script
scripts/monte_carlo_v1.pymust exist. - Python env must be set up.
Steps
// turbo-all
Step 1: Validate Script and Strategy
Ensure the tool and strategy exist.
$scriptPath = "scripts/monte_carlo_v1.py"
$stratPath = "config/strategies/$strategyName.json"
if (-not (Test-Path $scriptPath)) {
Write-Error "Monte Carlo script not found at $scriptPath"
exit 1
}
if (-not (Test-Path $stratPath)) {
Write-Error "Strategy not found at $stratPath"
exit 1
}
Write-Host "Ready to simulate $strategyName using $scriptPath"
Step 2: Run Simulation
Execute the python script.
- Defaults are applied if arguments are missing.
$limitdefaults to 1000 if not provided.$iterationsdefaults to 1000 if not provided.$sourcedefaults to "bitunix" if not provided.
# Set defaults if variables are null/empty
if (-not $limit) { $limit = 1000 }
if (-not $iterations) { $iterations = 1000 }
if (-not $source) { $source = "bitunix" }
Write-Host "Running Monte Carlo: Strategy=$strategyName, Source=$source, Limit=$limit, Iterations=$iterations"
$env:PYTHONPATH="src"
.\.venv\Scripts\python.exe scripts/monte_carlo_v1.py --strategy $strategyName --limit $limit --iterations $iterations --source $source
Step 3: Interpret Results
The script will output a table.
- Pass Criteria:
Prob. of >20% DDshould be 0.00%.95% Max Drawdownshould be acceptable for your risk tolerance (e.g., < 20%).50% Percentile(Median) Equity should be > Starting Balance for a profitable strategy.
On Failure
- If
Prob. of >20% DDis high (> 0%), the strategy is too risky. - If Median Equity is < Start, the strategy has negative expectancy.
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です