pub struct MarketMove {
pub d_spot: f64,
pub d_vol: f64,
pub d_rate: f64,
pub d_time: f64,
}Expand description
A market move to attribute PnL over. All fields default to zero, so a
scenario can set only what moves, e.g.
MarketMove { d_spot: 2.0, d_time: 1.0 / 365.0, ..Default::default() }.
Fields§
§d_spot: f64Absolute change in the underlying price.
d_vol: f64Parallel shift of the implied volatility (absolute, e.g. 0.01 = 1 pt).
d_rate: f64Parallel shift of the risk-free rate.
d_time: f64Elapsed calendar time in years (1.0 / 365.0 = one day).
Trait Implementations§
Source§impl Clone for MarketMove
impl Clone for MarketMove
Source§fn clone(&self) -> MarketMove
fn clone(&self) -> MarketMove
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 moreimpl Copy for MarketMove
Source§impl Debug for MarketMove
impl Debug for MarketMove
Source§impl Default for MarketMove
impl Default for MarketMove
Source§fn default() -> MarketMove
fn default() -> MarketMove
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MarketMove
impl RefUnwindSafe for MarketMove
impl Send for MarketMove
impl Sync for MarketMove
impl Unpin for MarketMove
impl UnsafeUnpin for MarketMove
impl UnwindSafe for MarketMove
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