Skip to content

Releases: brndnmtthws/thetagang

v2.0.2

Choose a tag to compare

@brndnmtthws brndnmtthws released this 28 May 12:27
f7f0536

ThetaGang v2.0.2

This patch release tightens regime rebalance behavior and cleans up Docker-based IB Gateway startup logging. It also updates the bundled Docker IBC release to 3.23.0.

Full Changelog: v2.0.1...v2.0.2

Breaking Changes

  • regime_rebalance.ratio_gate.var_min has been removed. Use regime_rebalance.ratio_gate.vol_min instead. Configurations that still set var_min now fail fast with migration guidance.

Highlights Since v2.0.1

Regime Rebalancing

  • Flow-driven rebalances now respect the same regime, cooldown, and ratio gates used by soft-band rebalances, while hard-band breaches can still force partial rebalances when needed.
  • Ratio gating now uses annualized ratio volatility through vol_min, making thresholds and logs easier to interpret than raw daily variance values.
  • Positive residual regime cash-flow capital is reserved from post-run cash management so staged regime buys are not immediately swept into the configured cash fund.

Docker and IB Gateway

  • Docker images now apply IB Gateway/TWS Log4j options through the actual IBC Java launch path instead of relying on ignored *.vmoptions system properties.
  • Additional Log4j StatusLogger and default status-level options suppress noisy IB Gateway startup and shutdown status logs while preserving real Java errors.
  • The bundled IBC Linux release is updated from 3.20.0 to 3.23.0, with the pinned checksum refreshed and ibc-config.ini updated for the new IncludeStackTraceForExceptions option.

Documentation

  • Removed stale README links to deleted Reddit posts and adjusted the surrounding strategy description.

Migration Guide

1) Update ratio gate configuration

Replace:

[regime_rebalance.ratio_gate]
var_min = 0.00001

With:

[regime_rebalance.ratio_gate]
vol_min = 0.05

vol_min is annualized ratio volatility. To convert an old daily variance threshold, use:

vol_min = sqrt(var_min * 252)

2) Validate before live trading

uv run thetagang --config thetagang.toml --dry-run

For Docker users, rebuild or pull the updated image so the IBC 3.23.0 and Log4j launcher changes are present.

Pull Requests by Category

Bug Fixes

  • Reserve regime flow cash from cash management (#666)
  • Configure IB Gateway Java logging in Docker (#667)
  • Apply IBC Java logging options at launch (#668)
  • Gate ratios on annualized volatility (#672)
  • Gate flow rebalances (#673)
  • Suppress IB Gateway status logging (#674)
  • Suppress remaining IB Gateway status logs (#676)

Documentation

  • Remove broken Reddit links (#670)

Misc

  • Bump version (#671)
  • Bump bundled IBC to 3.23.0 (#675)

v2.0.1

Choose a tag to compare

@brndnmtthws brndnmtthws released this 11 May 12:25
8cf5dcc

ThetaGang v2.0.1

This release adds optional volatility-weighted regime targets and tightens several runtime details around regime history, target reporting, and TWS/Gateway startup. It also reduces container log noise from IBKR Java startup paths and includes routine dependency maintenance.

Full Changelog: v2.0.0...v2.0.1

Highlights Since v2.0.0

Regime Rebalancing

  • Added optional portfolio.symbols.<symbol>.volatility_weight configuration so selected regime symbols can scale effective target weights from realized volatility, with configurable lookback, target volatility, min/max weight, rebalance band, and smoothing controls.
  • Effective volatility-adjusted weights are now used in regime target value and share calculations for symbols that opt in, while symbols without the new configuration continue to use static configured weights.
  • Ratio-gate history is fetched independently from proxy-symbol history, which fixes edge cases where non-anchor symbols could be evaluated against the wrong history set.
  • Startup and runtime output now show volatility-weight configuration and calculation details more clearly, including raw, clamped, previous, smoothing, and effective weights.

TWS and Gateway Runtime

  • Updated the pinned TWS/IBC startup version from 1037 to 1045 and aligned Docker image paths with the installed TWS tree.
  • Suppressed noisy Log4j status output and a known useless Gateway appender lifecycle message while preserving normal Java, IBC, and bot error output.

Upgrade Notes

  • Existing v2.0.0 configs continue to work without changes. Volatility-weighted targets are opt-in per symbol through portfolio.symbols.<symbol>.volatility_weight.
  • Container users should pull/rebuild the latest image so the TWS 1045 paths and Gateway log-suppression settings are present.
  • Validate config and behavior with a dry run before enabling live trading:
uv run thetagang --config thetagang.toml --dry-run

Pull Requests by Category

Features

  • feat(regime): add volatility weighted targets (#660)

Bug Fixes

  • fix(regime): decouple ratio gate from proxy history (#659)
  • fix(tws): bump pinned version to 1045 (#661)
  • fix(regime): clarify volatility weight output (#663)
  • fix(tws): suppress log4j status output (#662)
  • fix(tws): suppress noisy gateway logs (#664)

Misc

  • chore: bump version (#650)
  • chore(deps): bump the deps group across 1 directory with 2 updates (#658)
  • chore(deps): bump docker/setup-qemu-action from 3 to 4 (#655)
  • chore(deps): bump docker/setup-buildx-action from 3 to 4 (#654)
  • chore(deps): bump docker/metadata-action from 5 to 6 (#651)
  • chore(deps): bump docker/build-push-action from 6 to 7 (#652)
  • chore(deps): bump docker/login-action from 3 to 4 (#653)

v2.0.0

Choose a tag to compare

@brndnmtthws brndnmtthws released this 05 Mar 12:28

ThetaGang v2.0.0

v2.0.0 is a major release that introduces the new config schema (v2), strategy/stage runtime refactors, a persistent state database, and major upgrades to regime-aware rebalancing.

Full Changelog: v1.16.3...v2.0.0

Breaking Changes

  • Config schema v2 is now required (meta.schema_version = 2).
  • Legacy v1 top-level sections are no longer valid in v2 configs (for example: account, target, roll_when, symbols, infrastructure, overrides).
  • run now requires exactly one of:
    • run.strategies (recommended)
    • run.stages (advanced)
  • wheel and regime_rebalance cannot both be enabled in run.strategies.

Highlights Since v1.16.3

Config and Runtime

  • Added a new typed v2 config model and startup migration flow.
  • Added CLI migration controls:
    • --migrate-config to migrate and exit
    • --yes for non-interactive migration approval
  • Added stronger validation around strategy/stage plans and dependency ordering.
  • Refactored orchestration into strategy engines and stage runners for clearer execution boundaries.

Regime-Aware Rebalancing

  • Added flow/deficit rails and proxy weighting improvements.
  • Added optional ratio-gate for soft rebalance decisions.
  • Updated rebalance base handling to exclude options (and cash fund handling updates), improving sizing consistency.
  • Switched cash rails to percentage thresholds and improved summary/telemetry output.

State, Persistence, and Observability

  • Added SQLite/Alembic-backed state store and runtime telemetry tables.
  • Added persistent order intent tracking and richer execution history.
  • Added untracked position reporting/persistence.

Reliability and Operational Fixes

  • Improved order completion timeout handling.
  • Fixed watchdog execution to run inside the event loop task.
  • Fixed exchange-hours out-of-bounds calendar checks.
  • Improved market data contract qualification for IBKR.
  • Reduced noisy third-party logging by default.

Config Migration Guide (v1 -> v2)

1) Run the built-in migration

thetagang --config thetagang.toml --migrate-config

For non-interactive environments (CI/containers):

thetagang --config thetagang.toml --migrate-config --yes

The migrator writes your updated v2 config in-place and creates a backup as:

  • thetagang.toml.old
  • or thetagang.toml.old.N if a backup already exists

2) Key section moves in v2

  • account, option_chains, exchange_hours, orders, database, ib_async, ibc, watchdog -> runtime.*
  • symbols -> portfolio.symbols
  • target, write_when, roll_when, constants -> strategies.wheel.defaults.*
  • regime_rebalance, vix_call_hedge, cash_management -> strategies.*

3) Rebalance override migration details

Legacy per-symbol buy/sell-only knobs are migrated to:

  • strategies.wheel.equity_rebalance.symbol_overrides.<SYMBOL>

Legacy per-symbol call-write-only overrides are migrated to:

  • strategies.wheel.symbol_overrides.<SYMBOL>

4) Verify and dry-run

After migration, verify:

  • meta.schema_version = 2
  • run.strategies (or advanced run.stages) is present
  • your runtime/portfolio/strategy sections are nested under the new v2 hierarchy

Then run a dry-run before live trading:

uv run thetagang --config thetagang.toml --dry-run

Pull Requests by Category

Features

  • Regime aware rebalancing, db (#629)
  • feat(db): track order intents (#631)
  • feat(regime): add flow/deficit rails and proxy weights (#636)
  • feat(regime): add ratio gate for soft rebalances (#637)
  • feat(portfolio): show and persist untracked positions (#638)
  • feat(regime): base on net liq excluding options and cash fund (#642)
  • feat(regime): exclude options from rebalance base (#643)
  • feat(regime): switch cash rails to percentage thresholds (#644)
  • feat(config): introduce v2 schema and startup migration (#647)

Bug Fixes

  • fix(watchdog): run watchdog inside event loop task (#632)
  • fix: silence third-party logging by default (#633)
  • fix(exchange-hours): avoid out-of-bounds calendar checks (#635)
  • fix(ibkr): qualify contracts for market data (#640)
  • fix(execution): handle order completion timeouts gracefully (#645)
  • fix(migration): enforce v2 strategy semantics (#648)

Misc

v1.16.3

Choose a tag to compare

@brndnmtthws brndnmtthws released this 17 Dec 13:17
b12a728

What's Changed

Full Changelog: v1.16.2...v1.16.3

v1.16.2

Choose a tag to compare

@brndnmtthws brndnmtthws released this 24 Nov 14:00
6a889f2

What's Changed

New Contributors

Full Changelog: v1.16.1...v1.16.2

v1.16.1

Choose a tag to compare

@brndnmtthws brndnmtthws released this 25 Sep 12:33
b56f739

What's Changed

New Contributors

Full Changelog: v1.16.0...v1.16.1

v1.16.0

Choose a tag to compare

@brndnmtthws brndnmtthws released this 15 Jul 12:32
5ec98ab

What's Changed

Full Changelog: v1.15.1...v1.16.0

v1.15.1

Choose a tag to compare

@brndnmtthws brndnmtthws released this 04 Jul 12:10
14cc916

What's Changed

Full Changelog: v1.14.1...v1.15.1

v1.14.1

Choose a tag to compare

@brndnmtthws brndnmtthws released this 14 Feb 16:16

What's Changed

Full Changelog: v1.14.0...v1.14.1

v1.14.0

Choose a tag to compare

@brndnmtthws brndnmtthws released this 23 Jan 18:25

What's Changed

Full Changelog: v1.13.2...v1.14.0