pub struct AutocallableNote {
pub spots: Vec<f64>,
pub autocall_barriers: Vec<f64>,
pub observation_dates: Vec<f64>,
pub coupon_rates: Vec<f64>,
pub knock_in_barrier: f64,
pub principal: f64,
pub rate: f64,
pub volatilities: Vec<f64>,
pub correlation: Array2<f64>,
}Expand description
Autocallable note with barrier monitoring
Fields§
§spots: Vec<f64>Initial spot prices for each underlying
autocall_barriers: Vec<f64>Autocall barrier levels (as % of initial spot)
observation_dates: Vec<f64>Observation dates (in years)
coupon_rates: Vec<f64>Coupon rates at each observation
knock_in_barrier: f64Downside barrier (knock-in level)
principal: f64Principal amount
rate: f64Risk-free rate
volatilities: Vec<f64>Volatilities for each underlying
correlation: Array2<f64>Correlation matrix
Implementations§
Source§impl AutocallableNote
impl AutocallableNote
Sourcepub fn new(
spots: Vec<f64>,
autocall_barriers: Vec<f64>,
observation_dates: Vec<f64>,
coupon_rates: Vec<f64>,
knock_in_barrier: f64,
principal: f64,
rate: f64,
volatilities: Vec<f64>,
correlation: Array2<f64>,
) -> IntegrateResult<Self>
pub fn new( spots: Vec<f64>, autocall_barriers: Vec<f64>, observation_dates: Vec<f64>, coupon_rates: Vec<f64>, knock_in_barrier: f64, principal: f64, rate: f64, volatilities: Vec<f64>, correlation: Array2<f64>, ) -> IntegrateResult<Self>
Create a new autocallable note
Sourcepub fn price_monte_carlo(&self, n_paths: usize) -> IntegrateResult<f64>
pub fn price_monte_carlo(&self, n_paths: usize) -> IntegrateResult<f64>
Price autocallable note using Monte Carlo simulation
Trait Implementations§
Source§impl Clone for AutocallableNote
impl Clone for AutocallableNote
Source§fn clone(&self) -> AutocallableNote
fn clone(&self) -> AutocallableNote
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AutocallableNote
impl RefUnwindSafe for AutocallableNote
impl Send for AutocallableNote
impl Sync for AutocallableNote
impl Unpin for AutocallableNote
impl UnwindSafe for AutocallableNote
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