Skip to content

v2.1.2

Latest

Choose a tag to compare

@brndnmtthws brndnmtthws released this 28 Oct 13:13
· 3 commits to main since this release
f250d5c

ThetaGang v2.1.2

ThetaGang v2.1.2 fixes regime hard-band rebalancing so partial steps always move at least one share toward the target, letting zero-target exits actually finish instead of stranding a single share, and widens the python-dateutil upper bound to allow 3.x.

Full Changelog: v2.1.1...v2.1.2

Highlights Since v2.1.1

Regime & Order Sizing

  • Zero-target exits no longer stall at one share (#719): hard-band partial rebalance steps were rounded to nearest, so a shrinking exit could halve each run down to 1 share and then stop — leaving the position stranded and re-triggering a full hard rebalance on every run (roughly 5.6 orders per session until the target turned positive).
  • Partial hard-band steps round up, bounded by the target: each step now moves at least one share toward the desired position and never past it. A full step (rebalance_fraction 1.0), the soft-band, flow, and deficit paths are unchanged. A 1e-9 tolerance keeps float products such as 10 * 0.3 from rounding up spuriously.
  • Sizing detail: odd partial gaps can now trade one share more than before — 3 shares of a 5-share gap at a 0.5 fraction instead of 2.
  • Impact: a 2018–2026 replay showed no measurable CAGR or drawdown effect. This is an order-hygiene fix, not a returns change.
  • Tests: tests/test_regime_rebalance.py covers a zero target holding 1 share, a 5-share gap at a 0.5 fraction, and a 492-share exit finishing at 0.
  • Operations note: this changes live order sizing. Deployments tracking the main Docker image pick it up on their next scheduled run.

Dependencies

  • python-dateutil 3.x permitted: the requirement moved from >=2.8.1,<3 to >=2.8.1,<4 (#720). ThetaGang does not import dateutil directly.

Pull Requests by Category

Bug Fixes

  • fix(regime): round partial hard-band steps up so zero-target exits finish (#719)

Misc