pub struct Input {
pub price: f32,
pub spot: f32,
pub strike: f32,
pub mat: f32,
pub rate: f32,
pub div: f32,
pub iter: u32,
pub prec: f32,
}Expand description
§Implied volatility input
This is the input to the implied volatility function reversing the Black Scholes model.
Fields§
§price: f32call option price observed in the market
spot: f32underlying spot, in currency
strike: f32option strike, in currency
mat: f32option maturity, in years
rate: f32interest rate, annualized, e.g. 0.05=5%
div: f32underlying dividend yield, annualized, e.g. 0.02=2%
iter: u32maximum number of iterations - optional
prec: f32target precision - optional
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Input
impl<'de> Deserialize<'de> for Input
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 Input
impl RefUnwindSafe for Input
impl Send for Input
impl Sync for Input
impl Unpin for Input
impl UnsafeUnpin for Input
impl UnwindSafe for Input
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