Skip to content

Add Base Case Stress Test Forked Time Series Simulation#237

Open
jribbink wants to merge 9 commits intofeature/forked-simulationsfrom
jribbink/base-case-sims
Open

Add Base Case Stress Test Forked Time Series Simulation#237
jribbink wants to merge 9 commits intofeature/forked-simulationsfrom
jribbink/base-case-sims

Conversation

@jribbink
Copy link
Copy Markdown

@jribbink jribbink commented Mar 30, 2026

Closes: #225

Description

Validates HT vs AAVE "23.66% BTC crash" claim from Python simulations with HF ranges matching Unit Zeros initial research.

Individual Test Logs

Aggressive_1.01
=== SIMULATION: Aggressive_1.01 ===
Agents: 5
Funding per agent: 1.00000000 BTC (~100000.00000000 MOET)
Tick interval: 60.00000000s
Price points: 61
Initial BTC price: $100000.00000000
Initial HF range: 1.10000000 - 1.20000000
Rebalance Triggers:
  HF (Position): triggers when HF < 1.01000000, rebalances to HF = 1.01000001
  Liquidation:   HF < 1.0 (on-chain effectiveCollateral/effectiveDebt)
Notes: BTC $100K -> $76,342.50 (-23.66%) over 60 minutes

=== SIMULATION RESULTS ===
Agents:              5
Rebalance attempts:  305
Vault rebalances:    0
Position rebalances: 170
Liquidation count:   0

--- Price ---
Initial BTC price:   $100000.00000000
Lowest BTC price:    $76342.50000000
Highest BTC price:   $100000.00000000
Final BTC price:     $76342.50000000

--- Position ---
Initial HF range:    1.10000000 - 1.20000000
Lowest HF observed:  1.00546621
Final HF (agent 0):  1.01000001
Final collateral:    1.00000000 BTC (value: 76342.50000000 MOET)
Final debt:          60469.30633198 MOET
Final yield tokens:  56460.11788836 (value: 56460.76209830 MOET @ yt=1.00001141)

=== TEST PASSED: Aggressive_1.01 — Zero liquidations under 23.66% BTC crash ===
Balanced_1.1
=== SIMULATION: Balanced_1.1 ===
Agents: 5
Funding per agent: 1.00000000 BTC (~100000.00000000 MOET)
Tick interval: 60.00000000s
Price points: 61
Initial BTC price: $100000.00000000
Initial HF range: 1.25000000 - 1.45000000
Rebalance Triggers:
  HF (Position): triggers when HF < 1.10000000, rebalances to HF = 1.10000001
  Liquidation:   HF < 1.0 (on-chain effectiveCollateral/effectiveDebt)
Notes: BTC $100K -> $76,342.50 (-23.66%) over 60 minutes

=== SIMULATION RESULTS ===
Agents:              5
Rebalance attempts:  305
Vault rebalances:    0
Position rebalances: 256
Liquidation count:   0

--- Price ---
Initial BTC price:   $100000.00000000
Lowest BTC price:    $76342.50000000
Highest BTC price:   $100000.00000000
Final BTC price:     $76342.50000000

--- Position ---
Initial HF range:    1.25000000 - 1.45000000
Lowest HF observed:  1.09506221
Final HF (agent 0):  1.10000001
Final collateral:    1.00000000 BTC (value: 76342.50000000 MOET)
Final debt:          55521.81767707 MOET
Final yield tokens:  54111.58760617 (value: 54112.20501938 MOET @ yt=1.00001141)

=== TEST PASSED: Balanced_1.1 — Zero liquidations under 23.66% BTC crash ===
Conservative_1.05
=== SIMULATION: Conservative_1.05 ===
Agents: 5
Funding per agent: 1.00000000 BTC (~100000.00000000 MOET)
Tick interval: 60.00000000s
Price points: 61
Initial BTC price: $100000.00000000
Initial HF range: 1.30000000 - 1.50000000
Rebalance Triggers:
  HF (Position): triggers when HF < 1.05000000, rebalances to HF = 1.05000001
  Liquidation:   HF < 1.0 (on-chain effectiveCollateral/effectiveDebt)
Notes: BTC $100K -> $76,342.50 (-23.66%) over 60 minutes

=== SIMULATION RESULTS ===
Agents:              5
Rebalance attempts:  305
Vault rebalances:    0
Position rebalances: 283
Liquidation count:   0

--- Price ---
Initial BTC price:   $100000.00000000
Lowest BTC price:    $76342.50000000
Highest BTC price:   $100000.00000000
Final BTC price:     $76342.50000000

--- Position ---
Initial HF range:    1.30000000 - 1.50000000
Lowest HF observed:  1.04528666
Final HF (agent 0):  1.05000001
Final collateral:    1.00000000 BTC (value: 76342.50000000 MOET)
Final debt:          58165.71373175 MOET
Final yield tokens:  56756.40422770 (value: 56757.05181827 MOET @ yt=1.00001141)

=== TEST PASSED: Conservative_1.05 — Zero liquidations under 23.66% BTC crash ===
Mixed_1.075
=== SIMULATION: Mixed_1.075 ===
Agents: 5
Funding per agent: 1.00000000 BTC (~100000.00000000 MOET)
Tick interval: 60.00000000s
Price points: 61
Initial BTC price: $100000.00000000
Initial HF range: 1.10000000 - 1.50000000
Rebalance Triggers:
  HF (Position): triggers when HF < 1.07500000, rebalances to HF = 1.07500001
  Liquidation:   HF < 1.0 (on-chain effectiveCollateral/effectiveDebt)
Notes: BTC $100K -> $76,342.50 (-23.66%) over 60 minutes

=== SIMULATION RESULTS ===
Agents:              5
Rebalance attempts:  305
Vault rebalances:    0
Position rebalances: 403
Liquidation count:   0

--- Price ---
Initial BTC price:   $100000.00000000
Lowest BTC price:    $76342.50000000
Highest BTC price:   $100000.00000000
Final BTC price:     $76342.50000000

--- Position ---
Initial HF range:    1.10000000 - 1.50000000
Lowest HF observed:  1.07017444
Final HF (agent 0):  1.07500001
Final collateral:    1.00000000 BTC (value: 76342.50000000 MOET)
Final debt:          56813.02272732 MOET
Final yield tokens:  52803.44434430 (value: 52804.04683159 MOET @ yt=1.00001141)

=== TEST PASSED: Mixed_1.075 — Zero liquidations under 23.66% BTC crash ===
Moderate_1.025
=== SIMULATION: Moderate_1.025 ===
Agents: 5
Funding per agent: 1.00000000 BTC (~100000.00000000 MOET)
Tick interval: 60.00000000s
Price points: 61
Initial BTC price: $100000.00000000
Initial HF range: 1.20000000 - 1.40000000
Rebalance Triggers:
  HF (Position): triggers when HF < 1.02500000, rebalances to HF = 1.02500001
  Liquidation:   HF < 1.0 (on-chain effectiveCollateral/effectiveDebt)
Notes: BTC $100K -> $76,342.50 (-23.66%) over 60 minutes

=== SIMULATION RESULTS ===
Agents:              5
Rebalance attempts:  305
Vault rebalances:    0
Position rebalances: 461
Liquidation count:   0

--- Price ---
Initial BTC price:   $100000.00000000
Lowest BTC price:    $76342.50000000
Highest BTC price:   $100000.00000000
Final BTC price:     $76342.50000000

--- Position ---
Initial HF range:    1.20000000 - 1.40000000
Lowest HF observed:  1.02039888
Final HF (agent 0):  1.02500001
Final collateral:    1.00000000 BTC (value: 76342.50000000 MOET)
Final debt:          59584.38966259 MOET
Final yield tokens:  57341.41890198 (value: 57342.07316756 MOET @ yt=1.00001141)

=== TEST PASSED: Moderate_1.025 — Zero liquidations under 23.66% BTC crash ===

@jribbink jribbink changed the title Add base case HT vs AAVE forked time series simulation Add Base Case Stress Test Forked Time Series Simulation Mar 30, 2026
@jribbink jribbink force-pushed the jribbink/base-case-sims branch 2 times, most recently from 142fbc2 to 00e27f0 Compare March 30, 2026 23:42
@jribbink jribbink force-pushed the jribbink/base-case-sims branch from 00e27f0 to 5e31321 Compare March 30, 2026 23:49
@jribbink jribbink marked this pull request as ready for review March 30, 2026 23:49
@jribbink jribbink requested a review from a team as a code owner March 30, 2026 23:49
@jribbink jribbink changed the base branch from jribbink/time-series-helpers to feature/forked-simulations April 1, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants