Struct quantmath::risk::ReportTolerances [−][src]
pub struct ReportTolerances { /* fields omitted */ }
Tolerances for comparing risk reports. The price_tol is used for comparing prices, and things that behave like prices such as bumped prices. The currency_risk_tol is used for comparing risks that are in units of currency and measure the change in price for a given bump, such as Vega or Volga. The unit_risk_tol is used for comparing risks that have no units, and measure the percentage change in price for a given bump, such as Delta or Gamma.
Methods
impl ReportTolerances
[src]
impl ReportTolerances
pub fn new(price: f64, currency_risk: f64, unit_risk: f64) -> ReportTolerances
[src]
pub fn new(price: f64, currency_risk: f64, unit_risk: f64) -> ReportTolerances
pub fn price(&self) -> f64
[src]
pub fn price(&self) -> f64
pub fn currency_risk(&self) -> f64
[src]
pub fn currency_risk(&self) -> f64
pub fn unit_risk(&self) -> f64
[src]
pub fn unit_risk(&self) -> f64
Trait Implementations
impl<'v> ApproxEq<ReportTolerances, &'v DeltaGammaReport> for &'v DeltaGammaReport
[src]
impl<'v> ApproxEq<ReportTolerances, &'v DeltaGammaReport> for &'v DeltaGammaReport
fn validate(
self,
other: &'v DeltaGammaReport,
tol: &ReportTolerances,
_msg: &str,
diffs: &mut Formatter
) -> Result
[src]
fn validate(
self,
other: &'v DeltaGammaReport,
tol: &ReportTolerances,
_msg: &str,
diffs: &mut Formatter
) -> Result
Are the two objects approximately the same? If so, return without doing anything. If they are different, write a description of the differences to the diffs parameter. If the diffs ends up not having been written to, treat this as success. Returns an error if the formatter fails or if the objects are so different they cannot be compared. The tol parameter changes its type and meaning depending on what is being valued. Read more
impl<'v> ApproxEq<ReportTolerances, &'v TimeBumpedReport> for &'v TimeBumpedReport
[src]
impl<'v> ApproxEq<ReportTolerances, &'v TimeBumpedReport> for &'v TimeBumpedReport
fn validate(
self,
other: &'v TimeBumpedReport,
tol: &ReportTolerances,
msg: &str,
diffs: &mut Formatter
) -> Result
[src]
fn validate(
self,
other: &'v TimeBumpedReport,
tol: &ReportTolerances,
msg: &str,
diffs: &mut Formatter
) -> Result
Are the two objects approximately the same? If so, return without doing anything. If they are different, write a description of the differences to the diffs parameter. If the diffs ends up not having been written to, treat this as success. Returns an error if the formatter fails or if the objects are so different they cannot be compared. The tol parameter changes its type and meaning depending on what is being valued. Read more
impl<'v> ApproxEq<ReportTolerances, &'v VegaVolgaReport> for &'v VegaVolgaReport
[src]
impl<'v> ApproxEq<ReportTolerances, &'v VegaVolgaReport> for &'v VegaVolgaReport
fn validate(
self,
other: &'v VegaVolgaReport,
tol: &ReportTolerances,
_msg: &str,
diffs: &mut Formatter
) -> Result
[src]
fn validate(
self,
other: &'v VegaVolgaReport,
tol: &ReportTolerances,
_msg: &str,
diffs: &mut Formatter
) -> Result
Are the two objects approximately the same? If so, return without doing anything. If they are different, write a description of the differences to the diffs parameter. If the diffs ends up not having been written to, treat this as success. Returns an error if the formatter fails or if the objects are so different they cannot be compared. The tol parameter changes its type and meaning depending on what is being valued. Read more
impl<'v> ApproxEq<ReportTolerances, &'v BoxReport> for &'v BoxReport
[src]
impl<'v> ApproxEq<ReportTolerances, &'v BoxReport> for &'v BoxReport
fn validate(
self,
other: &'v BoxReport,
tol: &ReportTolerances,
msg: &str,
diffs: &mut Formatter
) -> Result
[src]
fn validate(
self,
other: &'v BoxReport,
tol: &ReportTolerances,
msg: &str,
diffs: &mut Formatter
) -> Result
Are the two objects approximately the same? If so, return without doing anything. If they are different, write a description of the differences to the diffs parameter. If the diffs ends up not having been written to, treat this as success. Returns an error if the formatter fails or if the objects are so different they cannot be compared. The tol parameter changes its type and meaning depending on what is being valued. Read more
impl<'v> ApproxEq<ReportTolerances, &'v [BoxReport]> for &'v [BoxReport]
[src]
impl<'v> ApproxEq<ReportTolerances, &'v [BoxReport]> for &'v [BoxReport]
fn validate(
self,
other: &'v [BoxReport],
tol: &ReportTolerances,
msg: &str,
diffs: &mut Formatter
) -> Result
[src]
fn validate(
self,
other: &'v [BoxReport],
tol: &ReportTolerances,
msg: &str,
diffs: &mut Formatter
) -> Result
Are the two objects approximately the same? If so, return without doing anything. If they are different, write a description of the differences to the diffs parameter. If the diffs ends up not having been written to, treat this as success. Returns an error if the formatter fails or if the objects are so different they cannot be compared. The tol parameter changes its type and meaning depending on what is being valued. Read more
Auto Trait Implementations
impl Send for ReportTolerances
impl Send for ReportTolerances
impl Sync for ReportTolerances
impl Sync for ReportTolerances