pub struct InstrumentGreeksParamsBuilder { /* private fields */ }
Expand description
Builder for InstrumentGreeksParams
.
Implementations§
Source§impl InstrumentGreeksParamsBuilder
impl InstrumentGreeksParamsBuilder
Sourcepub fn instrument_id<VALUE: Into<InstrumentId>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn instrument_id<VALUE: Into<InstrumentId>>( &mut self, value: VALUE, ) -> &mut Self
The instrument ID to calculate greeks for
Sourcepub fn flat_interest_rate<VALUE: Into<f64>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn flat_interest_rate<VALUE: Into<f64>>( &mut self, value: VALUE, ) -> &mut Self
Flat interest rate (default: 0.0425)
Sourcepub fn flat_dividend_yield<VALUE: Into<Option<f64>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn flat_dividend_yield<VALUE: Into<Option<f64>>>( &mut self, value: VALUE, ) -> &mut Self
Flat dividend yield
Sourcepub fn spot_shock<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn spot_shock<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
Spot price shock (default: 0.0)
Sourcepub fn vol_shock<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn vol_shock<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
Volatility shock (default: 0.0)
Sourcepub fn time_to_expiry_shock<VALUE: Into<f64>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn time_to_expiry_shock<VALUE: Into<f64>>( &mut self, value: VALUE, ) -> &mut Self
Time to expiry shock (default: 0.0)
Sourcepub fn use_cached_greeks<VALUE: Into<bool>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn use_cached_greeks<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self
Whether to use cached greeks (default: false)
Sourcepub fn cache_greeks<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn cache_greeks<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Whether to cache greeks (default: false)
Sourcepub fn publish_greeks<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn publish_greeks<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Whether to publish greeks (default: false)
Sourcepub fn ts_event<VALUE: Into<Option<UnixNanos>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn ts_event<VALUE: Into<Option<UnixNanos>>>( &mut self, value: VALUE, ) -> &mut Self
Event timestamp
Sourcepub fn position<VALUE: Into<Option<Position>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn position<VALUE: Into<Option<Position>>>( &mut self, value: VALUE, ) -> &mut Self
Position for PnL calculation
Sourcepub fn percent_greeks<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn percent_greeks<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Whether to compute percent greeks (default: false)
Sourcepub fn index_instrument_id<VALUE: Into<Option<InstrumentId>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn index_instrument_id<VALUE: Into<Option<InstrumentId>>>( &mut self, value: VALUE, ) -> &mut Self
Index instrument ID for beta weighting
Sourcepub fn beta_weights<VALUE: Into<Option<HashMap<InstrumentId, f64>>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn beta_weights<VALUE: Into<Option<HashMap<InstrumentId, f64>>>>( &mut self, value: VALUE, ) -> &mut Self
Beta weights for portfolio calculations
Sourcepub fn vega_time_weight_base<VALUE: Into<Option<i32>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn vega_time_weight_base<VALUE: Into<Option<i32>>>( &mut self, value: VALUE, ) -> &mut Self
Base value in days for time-weighting vega
Sourcepub fn build(
&self,
) -> Result<InstrumentGreeksParams, InstrumentGreeksParamsBuilderError>
pub fn build( &self, ) -> Result<InstrumentGreeksParams, InstrumentGreeksParamsBuilderError>
Trait Implementations§
Source§impl Clone for InstrumentGreeksParamsBuilder
impl Clone for InstrumentGreeksParamsBuilder
Source§fn clone(&self) -> InstrumentGreeksParamsBuilder
fn clone(&self) -> InstrumentGreeksParamsBuilder
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 InstrumentGreeksParamsBuilder
impl RefUnwindSafe for InstrumentGreeksParamsBuilder
impl Send for InstrumentGreeksParamsBuilder
impl Sync for InstrumentGreeksParamsBuilder
impl Unpin for InstrumentGreeksParamsBuilder
impl UnwindSafe for InstrumentGreeksParamsBuilder
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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