Struct quantmath::pricers::selfpricer::SelfPricer [−][src]
pub struct SelfPricer { /* fields omitted */ }
The SelfPricer calculator uses the Priceable interface of an instrument to evaluate the instrument . It then exposes this interface as a Pricer, allowing bumping for risk calculation.
Methods
impl SelfPricer
[src]
impl SelfPricer
pub fn new(
instruments: Vec<(f64, RcInstrument)>,
market_data: &MarketData
) -> Result<SelfPricer, Error>
[src]
pub fn new(
instruments: Vec<(f64, RcInstrument)>,
market_data: &MarketData
) -> Result<SelfPricer, Error>
Trait Implementations
impl Clone for SelfPricer
[src]
impl Clone for SelfPricer
fn clone(&self) -> SelfPricer
[src]
fn clone(&self) -> SelfPricer
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Pricer for SelfPricer
[src]
impl Pricer for SelfPricer
fn as_bumpable(&self) -> &Bumpable
[src]
fn as_bumpable(&self) -> &Bumpable
fn as_mut_bumpable(&mut self) -> &mut Bumpable
[src]
fn as_mut_bumpable(&mut self) -> &mut Bumpable
fn as_mut_time_bumpable(&mut self) -> &mut TimeBumpable
[src]
fn as_mut_time_bumpable(&mut self) -> &mut TimeBumpable
fn price(&self) -> Result<f64, Error>
[src]
fn price(&self) -> Result<f64, Error>
Returns the present value. If no discount date is supplied, the value is discounted to the settlement date of the instrument being priced. This means that every listed instrument should give a price equal to the current screen price. If you supply a discount date, the value is discounted to that date. This allows you to view prices that are consistent across different exchanges, but it is not possible to choose a discount date such that all values equal their screen prices, unless all underlyings have the same settlement date. Read more
impl PricerClone for SelfPricer
[src]
impl PricerClone for SelfPricer
impl Bumpable for SelfPricer
[src]
impl Bumpable for SelfPricer
fn bump(
&mut self,
bump: &Bump,
save: Option<&mut Saveable>
) -> Result<bool, Error>
[src]
fn bump(
&mut self,
bump: &Bump,
save: Option<&mut Saveable>
) -> Result<bool, Error>
Applies a bump to market data or to anything derived from market data, such as a model or a pricer. Returns true if anything was bumped. Read more
fn dependencies(&self) -> Result<&DependencyCollector, Error>
[src]
fn dependencies(&self) -> Result<&DependencyCollector, Error>
Optionally allows access to the dependencies that drive the bumpability.
fn context(&self) -> &PricingContext
[src]
fn context(&self) -> &PricingContext
Allows access to the pricing context that is to be bumped. This is useful for bumps that adjust their size according to the forward etc. Read more
fn new_saveable(&self) -> Box<Saveable>
[src]
fn new_saveable(&self) -> Box<Saveable>
Creates a save area to use with this bump
fn restore(&mut self, saved: &Saveable) -> Result<(), Error>
[src]
fn restore(&mut self, saved: &Saveable) -> Result<(), Error>
Restores the state to what it was before the bump
impl TimeBumpable for SelfPricer
[src]
impl TimeBumpable for SelfPricer
Auto Trait Implementations
impl Send for SelfPricer
impl Send for SelfPricer
impl Sync for SelfPricer
impl Sync for SelfPricer