pub struct CrrParams {
pub spot: f64,
pub strike: f64,
pub time_years: f64,
pub rate: f64,
pub dividend_yield: f64,
pub vol: f64,
pub steps: usize,
pub style: ExerciseStyle,
}Expand description
CRR tree inputs (equity-style continuous (q)).
Fields§
§spot: f64§strike: f64§time_years: f64§rate: f64§dividend_yield: f64§vol: f64§steps: usizeNumber of time steps (N \ge 1).
style: ExerciseStyleImplementations§
Source§impl CrrParams
impl CrrParams
pub const fn new( spot: f64, strike: f64, time_years: f64, rate: f64, dividend_yield: f64, vol: f64, steps: usize, style: ExerciseStyle, ) -> Self
pub fn with_style(self, style: ExerciseStyle) -> Self
Sourcepub const fn atm_one_year(
spot: f64,
rate: f64,
vol: f64,
steps: usize,
style: ExerciseStyle,
) -> Self
pub const fn atm_one_year( spot: f64, rate: f64, vol: f64, steps: usize, style: ExerciseStyle, ) -> Self
ATM one-year fixture.
Trait Implementations§
impl Copy for CrrParams
impl StructuralPartialEq for CrrParams
Auto Trait Implementations§
impl Freeze for CrrParams
impl RefUnwindSafe for CrrParams
impl Send for CrrParams
impl Sync for CrrParams
impl Unpin for CrrParams
impl UnsafeUnpin for CrrParams
impl UnwindSafe for CrrParams
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