pub struct GkState { /* private fields */ }Expand description
Live FX option state.
Implementations§
Source§impl GkState
impl GkState
pub fn new(params: GkParams, option_type: OptionType) -> FinanceResult<Self>
pub fn params(&self) -> GkParams
pub fn option_type(&self) -> OptionType
pub fn set_spot(&mut self, spot: 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<GkGreeks>
Trait Implementations§
impl StructuralPartialEq for GkState
Auto Trait Implementations§
impl Freeze for GkState
impl RefUnwindSafe for GkState
impl Send for GkState
impl Sync for GkState
impl Unpin for GkState
impl UnsafeUnpin for GkState
impl UnwindSafe for GkState
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