pub struct AllocationPolicy {
pub allow_shorts: bool,
pub max_gross: f64,
pub epsilon: f64,
}Expand description
Validity limits a target-allocation vector must respect.
Fields§
§allow_shorts: boolWhether negative (short) weights are permitted.
max_gross: f64Cap on gross exposure Σ|wᵢ| (1.0 = fully invested, no leverage).
epsilon: f64Tolerance for the gross-exposure comparison (floating-point slack).
Trait Implementations§
Source§impl Clone for AllocationPolicy
impl Clone for AllocationPolicy
Source§fn clone(&self) -> AllocationPolicy
fn clone(&self) -> AllocationPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AllocationPolicy
impl Debug for AllocationPolicy
Source§impl Default for AllocationPolicy
impl Default for AllocationPolicy
Source§impl<'de> Deserialize<'de> for AllocationPolicy
impl<'de> Deserialize<'de> for AllocationPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AllocationPolicy
impl RefUnwindSafe for AllocationPolicy
impl Send for AllocationPolicy
impl Sync for AllocationPolicy
impl Unpin for AllocationPolicy
impl UnsafeUnpin for AllocationPolicy
impl UnwindSafe for AllocationPolicy
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