Skip to content

Noise modelling#77

Merged
MatthewWilletts merged 8 commits into
devfrom
noise-modelling
Mar 9, 2026
Merged

Noise modelling#77
MatthewWilletts merged 8 commits into
devfrom
noise-modelling

Conversation

@MatthewWilletts
Copy link
Copy Markdown
Contributor

No description provided.

…ly forwarding

- base_pool: add calculate_volatility_array and _handle_numeraire_ordering
- optimal_n_pool_arb: use relative invariant check instead of absolute slack
- balancer/balancer_reserves: forward lp_supply through scan functions
- balancer: use materialized_inputs.lp_supply in dynamic_inputs path
- TFMM_base_pool: use materialized_inputs.lp_supply, fix trade_array ref
- core_simulator/__init__: enable JAX compilation cache
Three noise trade volume models for reCLAMM pools, each predicting
non-arbitrage trading volume from pool TVL, fee tier, volatility,
and arb volume. Used by the noise model dispatch in scan steps.
… steps

Scan step carry now includes prev_lp_supply (pos 3) and price-ratio
schedule state (pos 4-9). Scan inputs include price_ratio_update (7),
lp_supply (8), and optional volatility (9).

- reclamm_reserves: LP supply scaling, noise model dispatch (ratio,
  tsoukalas_sqrt, tsoukalas_log, loglinear, arb_only) in scan steps
- reclamm: _prepare_dynamic_array for volatility, noise/LP kwargs
  threading through all pool method variants
- tests: LP supply and noise volume coverage
Hierarchical Bayesian noise model calibration using numpyro: data
pipeline, covariate encoding, model definitions, inference, BLUP
postprocessing, diagnostic plotting, and CLI.

Adds [calibration] optional deps (numpyro, arviz) to pyproject.toml
and updates CI to install them.
…olation

General-purpose pool parameter calibration with loss functions,
per-pool and joint optimisation, learned parameter mappings, and
grid-based interpolation. Independent of noise calibration.
- tune_reclamm_params: wire noise_trader_ratio, date ranges,
  bout_offset, val_fraction, overfitting_penalty from CLI args
- compare_exposures: pool exposure comparison experiment
- scripts: noise calibration runners, reclamm benchmarks, plotting
  utilities, demo simulation, token mcap fetcher
- historic_data_utils: minor cleanup
These singleton defaults are always recast to the caller's dtype by
materialize_dynamic_inputs. Hardcoding float64 caused 200+ warnings
when running in float32 mode (e.g. BFGS with compute_dtype=float32).
…ates

- test_lp_supply_through_pool_class: use DynamicInputArrays bundle
  instead of old positional-args signature
- test_lp_supply_e2e_do_run_on_historic_data: use TEST_DATA_DIR and
  date range within test data coverage (2023-01-01 to 2023-01-15)
- test_noise_trade_does_not_affect_virtual_balances: carry/input_list
  already fixed in previous commit
@MatthewWilletts MatthewWilletts merged commit 2c234e6 into dev Mar 9, 2026
1 check passed
@MatthewWilletts MatthewWilletts deleted the noise-modelling branch March 9, 2026 23:50
MatthewWilletts added a commit that referenced this pull request Mar 10, 2026
Resolve 9 merge conflicts from noise-modelling (PR #77) merge to dev:

- noise_calibration (model, output, postprocessing, tests, script):
  take dev's hierarchical parameterization (MoE was superseded)
- reclamm_reserves.py: keep STE gates + ste_temperature from this
  branch, take dev's quadratic apply_target_price_ratio formula
  (centeredness-preserving, from ReClammMath.sol)
- reclamm.py: keep _resolve_noise_inputs() DRY helper and
  ste_temperature threading, remove duplicated inline noise logic
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.

1 participant