pub struct CostModel {
pub fee_bps: f64,
pub slippage_bps: f64,
pub impact_bps: f64,
pub financing_bps: f64,
pub max_participation: f64,
}Expand description
Basis-point transaction cost model.
Fields§
§fee_bps: f64§slippage_bps: f64§impact_bps: f64Own-order market-impact coefficient (bps at 100% participation). Slippage grows with the square root of the trade’s share of portfolio NAV, so an agent that wins by betting huge pays for the size it moves.
financing_bps: f64Per-step financing cost (bps) charged on leveraged exposure above 1× NAV — the cost of carrying borrowed money. Long-only, fully-invested books (gross ≤ 1) pay nothing; leverage pays for the size it borrows.
max_participation: f64Liquidity cap: the most an agent may trade in one step, as a fraction of
NAV. An order larger than this only partially fills; the remainder is
left for later steps. f64::INFINITY (the default) = unlimited liquidity.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CostModel
impl RefUnwindSafe for CostModel
impl Send for CostModel
impl Sync for CostModel
impl Unpin for CostModel
impl UnsafeUnpin for CostModel
impl UnwindSafe for CostModel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more