Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Why 90% of Open-Source Trading Bots Blow Up (And How We Engineered STRIDE with Formal Risk Bounds in Python 3.12)

Описание и применение

STRIDE устраняет распространённые ошибки в открытых торговых ботах, обеспечивая отсутствие look‑ahead bias, равномерное распределение риска по волатильности, динамическое ограничение кредитного плеча и автономные аварийные тормоза, что снижает риск потери капитала.

Задача

Retail quantitative codebases often contain critical architectural flaws that cause long‑term account ruin in live markets.

Результат

STRIDE reduces the risk of account blow‑ups by eliminating look‑ahead bias, enforcing volatility‑based position sizing, dynamically limiting leverage, and providing automated circuit breakers, all while maintaining high software quality.

Рабочий процесс

  • Design strategy and risk layers as pure functions receiving immutable past data slices.
  • Use Hypothesis to property‑test that appending future bars does not alter past signals.
  • Apply volatility parity: Position Size = (Account Equity × 1%) / (20‑day ATR).
  • Calculate effective leverage daily as the minimum of Kelly Limit, Volatility Target, Absolute Cap, Broker Limit, and Capital Floor.
  • Implement Stage 1 brake: halve target positions when drawdown >20%.
  • Implement Stage 2 brake: liquidate all positions and halt execution when drawdown >40%.
  • Enforce type safety with mypy strict, linting with Ruff, and secure broker keys with Pydantic SecretStr.
  • Run 791 automated tests locally in under 5 seconds with no external dependencies.
  • Clone the repo, run pytest, and adapt the risk engine for own research.

Доказательства

Almost without exception, retail quantitative codebases suffer from critical architectural flaws that guarantee long‑term account ruin in live markets.

Источник

In STRIDE, we eliminated this entire class of bugs by designing the strategy and risk layers as pure mathematical functions: the function receives an immutable slice of past bars, and returns the signals without any side effects.

Источник

Position Size = (Account Equity x 1%) / (20-day ATR)

Источник

Effective Leverage = Minimum of (Kelly Limit, Volatility Target, Absolute Cap, Broker Limit, Capital Limit)

Источник

Stage 1 (Drawdown exceeds 20%): Automatic de‑leveraging. Target position sizes are immediately halved across all assets.

Источник

791 automated tests executing locally in under 5 seconds with zero external dependencies.

Источник

  • Дата записи: 2026-10-25T05:11:22.071Z