メインコンテンツまでスキップ

Command Reference

This document explains each executable command in the ATC project.

Prerequisites

cd /Users/shion/workspace/crypto-auto-trading
uv sync --extra dev

1) atc CLI commands

The package exposes the atc entrypoint via:

  • uv run atc ...

1.1 atc ingest historical

Purpose:

  • Download GMO historical trade CSV gzip files.
  • Validate schema and data quality.
  • Write raw files + manifests.
  • Convert to canonical Parquet events.
  • If raw data already exists locally, skip network acquisition and reuse local files.

Command:

uv run atc ingest historical --symbol ETH_JPY --start 2026-01-01 --end 2026-01-31

Arguments:

  • --symbol (required): Symbol name (e.g. ETH_JPY).
  • --start (required): Start business date in YYYY-MM-DD.
  • --end (required): End business date in YYYY-MM-DD.
  • --data-root (optional, default data): Base directory for raw/canonical/derived data.

Typical output (JSON):

  • symbol
  • start
  • end
  • files_processed
  • files_downloaded
  • rows_processed

Data written:

  • Raw gzip: data/raw/historical_trades/{symbol}/{YYYY}/{MM}/{YYYYMMDD}_{symbol}.csv.gz
  • Manifest: data/raw/historical_trades/{symbol}/{YYYY}/{MM}/{YYYYMMDD}_{symbol}.manifest.json
  • Canonical Parquet: data/canonical/events/symbol={symbol}/year={YYYY}/month={M}/day={D}/...

1.2 atc backtest

Purpose:

  • Load canonical events.
  • Run event-driven strategy simulation.
  • Apply risk checks and execution simulation.
  • Simulate execution as limit-only with configurable order latency.
  • Evaluate alpha metrics and save a report.

Command:

uv run atc backtest --symbol ETH_JPY --start 2022-01-01 --end 2022-12-31 --strategy baseline_momentum_micro

With trade overlay chart generation:

uv run atc backtest --symbol ETH_JPY --strategy baseline_momentum_micro --plot --plot-interval 1m

With both HTML and PNG at once:

uv run atc backtest --symbol ETH_JPY --strategy baseline_momentum_micro --plot --plot-format both --plot-interval 1m

With explicit order latency:

uv run atc backtest --symbol ETH_JPY --strategy baseline_momentum_micro --order-latency-sec 0.3

With slower order cadence (5 minutes between submissions):

uv run atc backtest --symbol ETH_JPY --strategy baseline_momentum_micro --min-order-interval-sec 300

Arguments:

  • --symbol (required)
  • --start (optional, default 2021-05-01): business date (JST, 06:00 boundary).
  • --end (optional, default 2026-01-31): business date (JST, 06:00 boundary).
  • --strategy (required)
  • --data-root (optional, default data)
  • --plot (optional): Generate an overlay chart (price + order markers).
  • --plot-output (optional): Output chart path (.html or .png).
  • --plot-format (optional, default html): html, png, or both.
  • --plot-interval (optional, default 1m): Derived bar interval for plotting.
  • --order-latency-sec (optional, default 0.3): Minimum delay before a submitted limit order becomes eligible for fill checks.
  • --min-order-interval-sec (optional, default 300): Minimum interval between new order submissions.
  • --initial-position-eth (optional, default 0.0): Starting position for the run. Useful for day-by-day chained analysis.
  • --initial-cash-jpy (optional, default 0.0): Starting cash for the run. Pair with --initial-position-eth to carry portfolio state.
  • --target-abs-qty-eth (optional): Override strategy target absolute quantity (for strategies that support target_abs_qty).
  • --max-abs-position-eth (optional): Override risk hard limit max_abs_position_eth.
  • --benchmark-hold-eth (optional, default 10.0): Fixed buy-and-hold benchmark quantity in ETH for alpha comparison.
  • --enforce-session-close (optional, default disabled): Enable 05:59-style close constraints.
  • --no-new-entry-minutes (optional, default 10): Applied only when --enforce-session-close is enabled.
  • --force-close-start-jst (optional, default 05:55:00): Applied only when --enforce-session-close is enabled.
  • --close-deadline-jst (optional, default 05:59:50): Applied only when --enforce-session-close is enabled.
  • --allow-market-fallback / --no-market-fallback (default enabled): Applied only when --enforce-session-close is enabled.

Backtest day boundary:

  • A single business date YYYY-MM-DD means YYYY-MM-DD 06:00:00 JST to next day 05:59:59.999 JST.
  • Overlay chart time axis is displayed in JST.

Execution assumptions:

  • Orders are always limit orders.
  • Buy limit fill condition: subsequent trade price <= limit_price after latency.
  • Sell limit fill condition: subsequent trade price >= limit_price after latency.
  • Limit price selection in trade-only mode: buy uses bid -> mid -> last, sell uses ask -> mid -> last.
  • New orders are throttled by min_order_interval_sec; strategy evaluation still runs on every event.
  • Alpha metrics are computed against fixed benchmark PnL: benchmark_hold_eth * (mid(t)-mid(t-1)).
  • Session-close policy:
    • 05:49:00-05:59:59 JST: no new entries.
    • 05:55:00-05:59:59 JST: forced close ladder (limit repricing).
    • >=05:59:50 JST and fallback enabled: force market close to reach flat.

Available baseline strategies:

  • baseline_flat
  • baseline_momentum_micro
  • baseline_mean_reversion_micro
  • baseline_inventory_mm
  • baseline_queue_imbalance_breakout
  • baseline_sweep_follow
  • baseline_regime_switch_micro
  • baseline_flow_imbalance_pulse
  • baseline_technical_hold_overlay (10ETH hold-bias pseudo-technical overlay: de-risk on downside, rebuild on recovery)
  • baseline_technical_hold_overlay_slow (lower-turnover conservative variant of technical hold overlay)
  • ml_direction_linear (requires trained model file)
  • ml_direction_logistic (requires trained logistic model file)
  • ml_direction_logistic_swing (smoothed, lower-frequency ML strategy with cooldown/min-hold)
  • ml_direction_logistic_swing_tokyo (swing model restricted to Tokyo session hours)
  • ml_direction_logistic_swing_europe (swing model restricted to Europe session hours)
  • ml_direction_logistic_swing_europe_conservative (Europe session with stricter signal/cadence controls)
  • ml_direction_logistic_swing_europe_defensive (Europe session, trades only in local bearish micro-regime)
  • ml_direction_logistic_swing_europe_regime2 (Europe session tuned for stronger trend-following regime)
  • ml_direction_logistic_swing_europe_regime3 (Europe session tuned from expanded segmented search)
  • ml_direction_logistic_swing_europe_robust (Europe session + outlier guard for anomalous feature states)
  • ml_direction_logistic_swing_europe_ultra_conservative (Europe session with very strict low-turnover controls)
  • ml_direction_logistic_swing_us (swing model restricted to US session hours)
  • ml_direction_logistic_hold_overlay (10ETH long-bias overlay: hold by default, flatten/short only on strong downside signal)
  • ml_direction_logistic_hold_overlay_regime_guard (hold overlay with downside/recovery confirmation filters to reduce whipsaw)
  • ml_direction_logistic_hold_overlay_regime_guard_derisk_only (regime guard variant that de-risks to flat and avoids net-short)
  • ml_direction_logistic_hold_overlay_regime_guard_conservative (regime guard variant with smaller/stricter short hedges)

Typical output (JSON):

  • symbol, strategy
  • events, intents, fills
  • final_position_eth, final_equity_jpy
  • metrics.alpha_sharpe
  • metrics.alpha_max_dd
  • metrics.turnover, metrics.fill_rate, metrics.adverse_selection
  • report_path
  • plot_path (present when --plot is enabled)
  • plot_html_path / plot_png_path (present when corresponding format is generated)
  • benchmark_mode, benchmark_hold_eth
  • session_close_policy
  • forced_close_orders, forced_close_fills
  • market_fallback_count
  • deadline_breach_flag

Report file:

  • data/derived/reports/backtest_{symbol}_{start}_{end}_{strategy}.json

1.2b Chart Legend (Daily / Overview)

Daily overlay chart (--plot-format png|both):

PanelLine / MarkerMeaningFormula / SourceWhy it matters
Price + OrdersPrice (1m) candlestick1-minute OHLC built from event prices (JST axis)trade/ticker price aggregated by group_by_dynamicMarket context for each order decision
Price + OrdersBuy Orders markerBuy-side submitted/filled order pointsmarker on order reference/fill priceVisual check of long entries timing
Price + OrdersSell Orders markerSell-side submitted/filled order pointsmarker on order reference/fill priceVisual check of short/exit timing
Price + OrdersRisk Rejected markerOrders blocked by risk rulesrisk gate resultDetects if limits are suppressing strategy actions
PositionPosition ETH lineNet position over the daysimulated execution stateConfirms exposure control and reset/carry behavior
PnL vs BenchmarkCum Strategy PnL lineCumulative strategy PnLcumulative sum of step strategy PnLRaw strategy monetary result
PnL vs BenchmarkCum Benchmark PnL lineCumulative fixed benchmark PnLbenchmark_hold_eth * (mid(t)-mid(t-1)) cumulativeBaseline from passive hold (e.g. 10 ETH)
PnL vs BenchmarkCum Alpha PnL lineStrategy excess PnL over benchmarkCum Strategy PnL - Cum Benchmark PnLCore metric: trading skill vs market drift

Overview chart (monthly summary PNG generated from daily CSV):

PanelLine / BarMeaningFormula / SourceWhy it matters
Daily PnLDaily Strategy PnL barStrategy PnL per business dayfrom each day backtest resultDay-by-day profitability distribution
Daily PnLDaily Benchmark PnL (10ETH Hold) barPassive-hold daily PnLfixed hold benchmark for same dayMarket regime effect without strategy skill
Daily PnLDaily Alpha PnL lineDaily excess over benchmarkDaily Strategy PnL - Daily Benchmark PnLDirect daily skill score
Cumulative PnLCum Strategy PnL lineRunning total strategy PnLcumulative daily strategy PnLLong-run monetary trajectory
Cumulative PnLCum Benchmark PnL lineRunning total benchmark PnLcumulative daily benchmark PnLDrift-only baseline trajectory
Cumulative PnLCum Alpha PnL lineRunning total excess PnLcumulative daily alpha PnLWhether edge accumulates over month
Orders/FillsOrders barSubmitted orders per daydaily backtest reportActivity/turnover intensity
Orders/FillsFills barFilled orders per daydaily backtest reportExecution efficiency with limit-only model

1.3 atc replay

Purpose:

  • Replay canonical events from a path.
  • Run the same event-driven backtest pipeline.

Command:

uv run atc replay --from data/canonical/events/symbol=ETH_JPY --strategy baseline_flat

Arguments:

  • --from (required): Path to canonical event root or symbol partition path.
  • --strategy (required)
  • --symbol (optional): Explicit symbol override.

Typical output:

  • Same JSON shape as atc backtest (except report_path is not added here).

1.4 atc dataset

Purpose:

  • Build derived feature datasets from canonical events.
  • Reuse cached feature results when available.
  • Support Rust or Python feature-generation backend.

Command:

uv run atc dataset --symbol ETH_JPY --start 2022-01-01 --end 2022-01-31 --name features_jan

Arguments:

  • --symbol (required)
  • --start (required)
  • --end (required)
  • --name (optional, default features)
  • --data-root (optional, default data)
  • --feature-backend (optional, default rust): rust or python.
  • --workers (optional, default 0): Rust backend worker count (0 = auto).
  • --no-cache (optional): force rebuild instead of cache reuse.

Typical output (JSON):

  • dataset_path

Dataset file:

  • data/derived/datasets/{name}.parquet

1.5 atc features cache

Purpose:

  • Build a reusable feature cache from canonical events.
  • Cache is stored as Parquet and can be reused by atc dataset.

Command:

uv run atc features cache --symbol ETH_JPY --start 2026-01-01 --end 2026-01-31 --feature-backend rust

Arguments:

  • --symbol (required)
  • --start (required)
  • --end (required)
  • --data-root (optional, default data)
  • --feature-backend (optional, default rust): rust or python.
  • --workers (optional, default 0): Rust backend worker count (0 = auto).
  • --no-cache (optional): force rebuild.

Typical output (JSON):

  • cache_path
  • manifest_path
  • backend
  • cache_hit
  • events
  • rows
  • workers

Cache file:

  • data/derived/features/cache/symbol={symbol}/backend={backend}/features_{start}_{end}_v1.parquet

1.6 atc ml

Purpose:

  • Train machine-learning direction model from event-derived features.

atc ml train-direction

uv run atc ml train-direction --symbol ETH_JPY --start 2025-01-01 --end 2025-12-31 --horizon-sec 300

Arguments:

  • --symbol (required)
  • --start (required)
  • --end (required)
  • --data-root (optional, default data)
  • --horizon-sec (optional, default 300)
  • --valid-ratio (optional, default 0.2)
  • --ridge-alpha (optional, default 1.0)
  • --model-output (optional): explicit model output path
  • --workers (optional, default 0): feature-generation workers (0 = auto CPU cores minus one, capped at 5)
  • --progress-every (optional, default 1): print progress every N chunks
  • --no-progress (optional): disable intermediate progress lines
  • --no-update-latest (optional): do not overwrite latest model alias

Outputs:

  • Model JSON at:
  • data/derived/models/ml_direction_linear_{symbol}_{start}_{end}.json
  • Latest alias (default):
  • data/derived/models/ml_direction_linear_latest.json
  • Metrics JSON:
  • {model_path}.metrics.json

atc ml train-direction-logistic

uv run atc ml train-direction-logistic --symbol ETH_JPY --start 2025-01-01 --end 2025-12-31 --horizon-sec 300

Arguments:

  • --symbol (required)
  • --start (required)
  • --end (required)
  • --data-root (optional, default data)
  • --horizon-sec (optional, default 300)
  • --valid-ratio (optional, default 0.2)
  • --learning-rate (optional, default 0.05)
  • --l2-alpha (optional, default 1e-4)
  • --epochs (optional, default 40)
  • --target-mode (optional, default direction): direction or hold10_oracle
  • --oracle-sell-threshold-bps (optional, default 25.0): for hold10_oracle, sell label threshold in bps
  • --model-output (optional): explicit model output path
  • --workers (optional, default 0): feature-generation workers (0 = auto CPU cores minus one, capped at 5)
  • --progress-every (optional, default 1): print progress every N chunks
  • --no-progress (optional): disable intermediate progress lines

Outputs:

  • Model JSON at:
  • data/derived/models/ml_direction_logistic_{symbol}_{start}_{end}.json
  • Metrics JSON:
  • {model_path}.metrics.json

atc ml build-image-dataset

uv run atc ml build-image-dataset --symbol ETH_JPY --start 2026-01-01 --end 2026-01-31 --output-name image_alpha

Purpose:

  • Build a multichannel image dataset for shadow comparison (4 x H x W).
  • Apply session-aware drops:
    • drop anchors in no-new-entry window.
    • optionally drop cross-day horizon samples.

Arguments:

  • --symbol (required)
  • --start (required)
  • --end (required)
  • --data-root (optional, default data)
  • --output-name (optional, default image_alpha)
  • --window-minutes (optional, default 30)
  • --image-size (optional, default 128)
  • --stride-sec (optional, default 30)
  • --horizon-sec (optional, default 1800)
  • --benchmark-hold-eth (optional, default 10.0)
  • --enforce-session-close (optional, default disabled)
  • --no-new-entry-minutes (optional, default 10, only when close constraints are enabled)
  • --drop-cross-day / --allow-cross-day (default drop enabled)

Output JSON:

  • dataset_path, meta_path
  • rows_total
  • dropped_cross_day
  • dropped_no_new_entry_window
  • drop_ratio

atc ml train-image-alpha

uv run atc ml train-image-alpha --dataset-path data/derived/datasets/image_alpha_ETH_JPY_2026-01-01_2026-01-31.npz

Purpose:

  • Train a lightweight image alpha regression model for shadow evaluation.

Arguments:

  • --dataset-path (required)
  • --model-output (optional): default sibling ml_image_alpha_linear_latest.json
  • --valid-ratio (optional, default 0.2)
  • --ridge-alpha (optional, default 1.0)

Output JSON:

  • model_path
  • rows_total, rows_train, rows_valid
  • train_mse, valid_mse
  • metrics_path

atc ml shadow-compare

uv run atc ml shadow-compare \
--dataset-path data/derived/datasets/image_alpha_ETH_JPY_2026-01-01_2026-01-31.npz \
--output-csv data/derived/reports/shadow_compare_ETH_JPY_2026-01.csv

Purpose:

  • Compare Tabular and Image expected-alpha scores on the same event sequence in shadow mode.

Arguments:

  • --dataset-path (required)
  • --output-csv (required)
  • --image-model-path (optional): default sibling ml_image_alpha_linear_latest.json
  • --tabular-model-path (optional): default logistic latest if present, otherwise linear latest
  • --benchmark-hold-eth (optional, default 10.0)

Output JSON:

  • rows
  • tabular_target_corr
  • image_target_corr
  • image_better_rows
  • tabular_better_or_equal_rows
  • output_csv_path

1.7 atc report

Purpose:

  • Inspect generated report JSON.
  • Build multi-strategy leaderboard for a fixed date window.
  • Run walk-forward optimization for baseline_regime_switch_micro.

atc report show

uv run atc report show --path data/derived/reports/backtest_ETH_JPY_2026-01-01_2026-01-01_baseline_momentum_micro.json

Arguments:

  • --path (required): JSON report path.

atc report leaderboard

uv run atc report leaderboard --symbol ETH_JPY --start 2026-01-01 --end 2026-01-07

Arguments:

  • --symbol (required)
  • --start (required)
  • --end (required)
  • --data-root (optional, default data)
  • --strategy (optional, repeatable): Evaluate only the specified strategy names.
  • --order-latency-sec (optional, default 0.3)
  • --min-order-interval-sec (optional, default 300)

Output:

  • JSON ranking sorted by alpha_sharpe descending.
  • Parquet snapshot at:
  • data/derived/reports/leaderboard_{symbol}_{start}_{end}.parquet

atc report walk-forward

uv run atc report walk-forward --symbol ETH_JPY --start 2026-01-01 --end 2026-01-31 --train-days 14 --valid-days 7 --step-days 7

Arguments:

  • --symbol (required)
  • --start (required)
  • --end (required)
  • --data-root (optional, default data)
  • --train-days (optional, default 14)
  • --valid-days (optional, default 7)
  • --step-days (optional, default 7)
  • --session (optional, repeatable): TOKYO, EUROPE, US, or ALL.
  • --max-candidates (optional, default 64)
  • --workers (optional, default 0): parallel workers for candidate evaluation (0 = auto CPU cores minus one).
  • --order-latency-sec (optional, default 0.3)
  • --min-order-interval-sec (optional, default 300)
  • --progress-every (optional, default 10): print progress every N train evaluations.
  • --no-progress (optional): disable intermediate progress lines.

Output:

  • JSON summary with train/valid split results and best params per split.
  • JSON file at:
  • data/derived/reports/walk_forward_regime_switch_{symbol}_{start}_{end}.json

atc report daily-eval

uv run atc report daily-eval --symbol ETH_JPY --start 2026-01-01 --end 2026-01-31 --strategy baseline_regime_switch_micro

Purpose:

  • Run day-by-day backtests with per-day reset (start_position=0, start_cash=0).
  • Export daily metrics CSV, overall summary CSV, and overview PNG.
  • Enforce fixed benchmark comparison (10 ETH hold default).

Arguments:

  • --symbol (required)
  • --start (required)
  • --end (required)
  • --strategy (required)
  • --data-root (optional, default data)
  • --benchmark-hold-eth (optional, default 10.0)
  • --target-abs-qty-eth (optional, default 10.0)
  • --max-abs-position-eth (optional, default 10.0)
  • --order-latency-sec (optional, default 0.3)
  • --min-order-interval-sec (optional, default 300)
  • --enforce-session-close (optional, default disabled)
  • --no-new-entry-minutes (optional, default 10, only when close constraints are enabled)
  • --force-close-start-jst (optional, default 05:55:00, only when close constraints are enabled)
  • --close-deadline-jst (optional, default 05:59:50, only when close constraints are enabled)
  • --allow-market-fallback / --no-market-fallback (default enabled, only when close constraints are enabled)
  • --plot-interval (optional, default 1m)
  • --plot-format (optional, default png): png, html, or both for each daily overlay.
  • --plot / --no-plot (default plot enabled): skip per-day overlay generation for faster iteration.

Generated outputs:

  • Daily CSV:
    • strategy_total_pnl_jpy
    • benchmark_total_pnl_jpy
    • alpha_total_pnl_jpy
    • orders, fills, fill_rate, turnover
    • forced_close_orders, forced_close_fills
    • market_fallback_count
    • deadline_breach_flag
  • Overall CSV:
    • totals, means, daily win-rate, max drawdown
  • Overview PNG:
    • daily Strategy/Benchmark/Alpha
    • cumulative Strategy/Benchmark/Alpha
    • orders/fills

2) just wrapper commands

just provides convenient wrappers around the atc CLI.

2.1 just sync

just sync
  • Runs uv sync --extra dev.

2.2 just test

just test
  • Runs uv run pytest -q.

2.3 just lint

just lint
  • Runs uv run ruff check src tests.

2.4 just typecheck

just typecheck
  • Runs uv run mypy src.

2.5 just ingest symbol start end

just ingest ETH_JPY 2026-01-01 2026-01-31

Equivalent to:

uv run atc ingest historical --symbol ETH_JPY --start 2026-01-01 --end 2026-01-31

2.6 just backtest symbol start end strategy

just backtest ETH_JPY 2022-01-01 2022-12-31 baseline_momentum_micro

Equivalent to:

uv run atc backtest --symbol ETH_JPY --start 2022-01-01 --end 2022-12-31 --strategy baseline_momentum_micro

2.7 just features-cache symbol start end [backend]

just features-cache ETH_JPY 2026-01-01 2026-01-31 rust

Equivalent to:

uv run atc features cache --symbol ETH_JPY --start 2026-01-01 --end 2026-01-31 --feature-backend rust

2.6b just backtest-default symbol strategy

just backtest-default ETH_JPY baseline_momentum_micro

Equivalent to:

uv run atc backtest --symbol ETH_JPY --strategy baseline_momentum_micro

2.7 just replay path strategy

just replay data/canonical/events/symbol=ETH_JPY baseline_flat

Equivalent to:

uv run atc replay --from data/canonical/events/symbol=ETH_JPY --strategy baseline_flat

2.7b just backtest-plot symbol strategy

just backtest-plot ETH_JPY baseline_momentum_micro

Equivalent to:

uv run atc backtest --symbol ETH_JPY --strategy baseline_momentum_micro --plot --plot-interval 1m

2.8 just compare-baselines symbol start end

just compare-baselines ETH_JPY 2022-01-01 2022-12-31
  • 複数 baseline 戦略を同条件で順番に backtest します。
  • 実行対象:
  • baseline_flat
  • baseline_momentum_micro
  • baseline_mean_reversion_micro
  • baseline_inventory_mm
  • baseline_queue_imbalance_breakout
  • baseline_sweep_follow
  • baseline_regime_switch_micro
  • baseline_flow_imbalance_pulse

2.9 just leaderboard symbol start end

just leaderboard ETH_JPY 2026-01-01 2026-01-07

Equivalent to:

uv run atc report leaderboard --symbol ETH_JPY --start 2026-01-01 --end 2026-01-07

Output:

  • Ranked strategy table in JSON (sorted by alpha_sharpe descending).
  • Parquet snapshot at:
  • data/derived/reports/leaderboard_{symbol}_{start}_{end}.parquet

2.10 just walk-forward symbol start end

just walk-forward ETH_JPY 2026-01-01 2026-01-31

Equivalent to:

uv run atc report walk-forward --symbol ETH_JPY --start 2026-01-01 --end 2026-01-31

2.11 just ml-train-direction symbol start end

just ml-train-direction ETH_JPY 2025-01-01 2025-12-31

Equivalent to:

uv run atc ml train-direction --symbol ETH_JPY --start 2025-01-01 --end 2025-12-31

2.12 just ml-train-direction-logistic symbol start end

just ml-train-direction-logistic ETH_JPY 2025-01-01 2025-12-31

Equivalent to:

uv run atc ml train-direction-logistic --symbol ETH_JPY --start 2025-01-01 --end 2025-12-31

3) Built-in help

To confirm current options from source of truth:

uv run atc --help
uv run atc ingest historical --help
uv run atc backtest --help
uv run atc replay --help
uv run atc dataset --help
uv run atc ml --help
uv run atc ml train-direction --help
uv run atc ml train-direction-logistic --help
uv run atc ml build-image-dataset --help
uv run atc ml train-image-alpha --help
uv run atc ml shadow-compare --help
uv run atc report --help
uv run atc report leaderboard --help
uv run atc report walk-forward --help
uv run atc report daily-eval --help
just --list

4) Website and report article workflow

4.1 Install and run docs website

cd website
pnpm install
pnpm start

Build static site:

cd website
pnpm build

4.2 Convert backtest report JSON to website article

Command:

uv run python scripts/report_to_article.py \
--report data/derived/reports/backtest_ETH_JPY_2025-10-01_2026-02-11_ml_direction_logistic_hold_overlay_regime_guard.json

Useful options:

  • --output-dir (default: website/blog)
  • --date (default: today, YYYY-MM-DD)
  • --decision (default: 保留)
  • --note (optional free text)
  • --overwrite (replace existing markdown)

Generated file:

  • website/blog/{YYYY-MM-DD}-{symbol}-{strategy}.md