quantdata.dysanos.grid.gendysanos.norm_continuation#
Fixed-radius continuation models for conditional-arbitrage searches.
For every trading time, one network jointly trades all matched expiries and
instruments. Its unconstrained output v_t(x_t) is projected radially onto
an L1 ball of radius n. The utility sees only the feasible action, while
an exterior quadratic penalty supplies a radial recovery gradient whenever
the unconstrained output leaves the ball.
- class quantdata.dysanos.grid.gendysanos.norm_continuation.NormContinuationAction(env, *, config, state_mean, state_whitener)[source]#
Bases:
BaseModelIndependent per-time action networks in physical orthogonal factors.
- class quantdata.dysanos.grid.gendysanos.norm_continuation.NormContinuationConfig(*, label, source_cache_uid, state_features, risk_aversion, utility, radii, exterior_penalty, trading_times=10, expiries=7, instruments_per_expiry=21, covariance_relative_floor=1e-10, group='', user_version='0.1', network_config=FeedForwardConfig(activation='SiLU', num_depth=2, num_width=96, use_bias=True))[source]#
Bases:
objectLogical geometry and objective of one radius-continuation search.
- network_config: FeedForwardConfig = FeedForwardConfig(activation='SiLU', num_depth=2, num_width=96, use_bias=True)#
- class quantdata.dysanos.grid.gendysanos.norm_continuation.NormContinuationTrainConfig(*, batch_size=4096, valuation_batch_size=16384, epochs_per_radius=10000, minimum_epochs_per_radius=1500, value_update=250, checkpoint_update=2000, lr=0.0003, weight_decay=0.0, compile=True, convergence_points=10, convergence_relative_tolerance=0.0001, seed=94103)[source]#
Bases:
objectOperational settings shared by all continuation radii.
- quantdata.dysanos.grid.gendysanos.norm_continuation.clipped_radius_pnl_derivative(pnl, clipped, radius)[source]#
Differentiate feasible P&L with respect to a frozen L1 radius.
Transaction costs are homogeneous in the action. Thus a clipped action and its P&L scale linearly with the radius, while an interior action is locally independent of the radius.
- quantdata.dysanos.grid.gendysanos.norm_continuation.continuation_loss(model, state, returns, costs, path_weight, *, radius)[source]#
Return the penalized loss and its unpenalized components by time.
- quantdata.dysanos.grid.gendysanos.norm_continuation.continuation_pnl(action, returns, costs)[source]#
Return exact net P&L for each path and trading time.
- quantdata.dysanos.grid.gendysanos.norm_continuation.exterior_l1_penalty(raw_l1, radius)[source]#
Return \(E[(\|v_t\|_1-n)_+^2]\) separately by trading time.
- quantdata.dysanos.grid.gendysanos.norm_continuation.radial_l1_clip(raw, radius)[source]#
Project each path/time action radially onto its L1 ball.
The final two axes are the expiry and within-expiry instrument axes. The returned Boolean tensor identifies outputs in the exterior region where the radial utility derivative is zero but tangential derivatives remain.