Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

run-simulations

БесплатноБез исполняемых скриптовНе проверен

Use BEFORE and AFTER running trading engine simulations. Helps with: (1) SETUP - choosing configs, selecting segments via segment collections, batch sizing…

ratacatот ratacat★ 60 звёзд на GitHub

Об этом скилле

Run Simulations Skill

You are helping set up and run trading engine simulations, then performing comprehensive diagnostic analysis.

Current Phase: DUAL-FOCUS (Validation + Optimization)

System confidence: ~85% accurate. The simulation system is largely trustworthy, but discrepancies still exist and are critical to find.

Priority #1: ACCURACY DISCREPANCIES (Most Important)

Any gap between expected vs actual behavior is a potential bug or misunderstanding. These must be surfaced prominently:

  • Does behavior match config parameters?
  • Are there logical inconsistencies in the data?
  • Do results align with what the strategy SHOULD produce?

When you spot a discrepancy, flag it prominently. Even small accuracy issues compound over thousands of trades.

Priority #2: PROFIT OPTIMIZATION (Active Research)

With a trustworthy system, we're now actively researching:

  • Which configs perform best?
  • What market conditions favor which strategies?
  • How do parameters affect PnL?

Surface interesting profit patterns AND accuracy concerns. Both matter now.


IMPORTANT: This skill should be invoked BEFORE running simulations to help with setup decisions (config selection, segment selection via collections, batch sizing).

Recommended Batch Size

Current recommendation: 2,000-3,000 simulations per batch.

  • Runs quickly (~30-60 seconds with tick caching)
  • Provides statistically meaningful results
  • More than 3,000 doesn't add much value at current stage
  • Formula: configs × segments = total runs (e.g., 20 configs × 100 segments = 2,000 runs)

Phase 1: Setup & Run

⚠️ USER INPUT TAKES PRIORITY

If the user provides ANY arguments, instructions, or context when invoking this skill, those take absolute priority over all defaults below.

  • User says "run config X" → run config X, ignore default config selection
  • User says "test these 5 segments" → test those 5 segments, ignore default segment query
  • User asks a specific question → answer that question, don't run the full default workflow
  • User provides partial instructions → fill in gaps with defaults, but honor what they specified

The defaults below are ONLY for when the skill is invoked with no arguments at all.


Default Behavior (no args only)

Pick a diverse spread of configs and segments using segment collections (legacy filters are deprecated):

  1. Query available configs: SELECT name, config FROM strategy_configs ORDER BY name
  2. Select 10-20 configs covering different indicator types (EMA, RSI, Bollinger, combined)
  3. Choose or create a segment collection (AND-only annotations in v1):
    bun src/systems/trading-engine/bd-segments.ts list
    bun src/systems/trading-engine/bd-segments.ts create --name=high-activity --annotations=high_activity --limit=100
    bun src/systems/trading-engine/bd-segments.ts preview --name=high-activity
    
  4. Run batch simulation:
    bun src/systems/trading-engine/batch-runner.ts --config-pattern="<pattern>" --collection=high-activity --save
    

Batch Runner CLI Reference

Location: src/systems/trading-engine/batch-runner.ts

Usage:

bun src/systems/trading-engine/batch-runner.ts [options]

Options:

Option Short Description
--config=ID -c Strategy config ID (can specify multiple)
--all-configs -a Run all available strategy configs
--config-pattern=PAT -p Run configs matching name pattern (SQL LIKE)
--strategy-type=TYPE Filter configs by strategy type (volatility, arb, grid)
`--collection=NAME ID` -C
--show-selection Preview collection selection and exit
--capital=CENTS Initial capital in cents (default: 10000 = $100)
--workers=N -w Number of parallel workers (default: 8)
--save -S Save results to database
--dry-run Show what would run without executing
--warmup-candles=N Pre-load N candles before segment for indicator warmup (default: 50)
--db-pool-max=N DB pool size for main batch process (default: 10)
--db-pool-max-worker=N DB pool size for worker processes (default: 3)

Examples:

# Run one config on a segment collection
bun src/systems/trading-engine/bd-segments.ts create --name=swings100 --annotations=high_activity
bun src/systems/trading-engine/batch-runner.ts --config=abc123 --collection=swings100 --save

# Run all configs on a collection
bun src/systems/trading-engine/batch-runner.ts --all-configs --collection=swings50 --save

# Run all configs on specific segment IDs (snapshot collection)
bun src/systems/trading-engine/bd-segments.ts create --name=segment-set --segment-ids=949,950,951,952 --mode=snapshot
bun src/systems/trading-engine/batch-runner.ts --all-configs --collection=segment-set --save

# Run configs matching "RSI-*" on high_activity segments
bun src/systems/trading-engine/bd-
Полный SKILL.md на GitHub

Установить run-simulations в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл run-simulations?

Use BEFORE and AFTER running trading engine simulations. Helps with: (1) SETUP - choosing configs, selecting segments via segment collections, batch sizing (recommend 2,000-3,000 runs); (2) EXECUTION - running batch simulations with --collection; (3) ANALYSIS - comprehensive diagnostics after runs. Triggers on: 'run simulations', 'test configs', 'batch simulation', 'analyze sim results', 'which configs to test', 'how many segments', 'simulation setup'.

Как установить скилл run-simulations?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл run-simulations запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить run-simulations с