pub struct Black76State { /* private fields */ }Expand description
Live Black ’76 contract state (forward / vol / time updates).
Implementations§
Source§impl Black76State
impl Black76State
pub fn new( params: Black76Params, option_type: OptionType, ) -> FinanceResult<Self>
pub fn params(&self) -> Black76Params
pub fn option_type(&self) -> OptionType
pub fn set_forward(&mut self, forward: f64) -> FinanceResult<()>
pub fn set_vol(&mut self, vol: f64) -> FinanceResult<()>
pub fn set_time_years(&mut self, time_years: f64) -> FinanceResult<()>
pub fn set_vol_from_price(&mut self, market_price: f64) -> FinanceResult<f64>
pub fn price(&self) -> FinanceResult<f64>
pub fn greeks(&self) -> FinanceResult<Black76Greeks>
Trait Implementations§
Source§impl Clone for Black76State
impl Clone for Black76State
Source§fn clone(&self) -> Black76State
fn clone(&self) -> Black76State
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 Black76State
impl Debug for Black76State
Source§impl PartialEq for Black76State
impl PartialEq for Black76State
impl StructuralPartialEq for Black76State
Auto Trait Implementations§
impl Freeze for Black76State
impl RefUnwindSafe for Black76State
impl Send for Black76State
impl Sync for Black76State
impl Unpin for Black76State
impl UnsafeUnpin for Black76State
impl UnwindSafe for Black76State
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more