Module quantmath::risk[][src]

Modules

bumptime
cache
deltagamma
dependencies
marketdata
timebumped
vegavolga

Structs

ReportTolerances

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.

Traits

ApproxEqReport

Redefine ApproxEqReport because Rust complains about circular type references otherwise

Bumpable

Interface that defines all bumps of simple underlying market data. This defines most risks that the analytics outputs. Most methods take a save parameter which is a Any class. This is normally a second instance of the Bumpable object, where it can copy any state that is bumped so it can be restored later.

BumpablePricingContext
BumpablePricingContextClone
Pricer

The basic pricing interface for qm. Returns a price from a pricer or a priceable instrument. The point of this interface is that it is bumpable, so it can be used to calculate risks and scenarios.

PricerClone

For some reason that I do not understand, the rust compiler runs into an infinite recursion issue if we try to implement this with generics, the same as clone_box is implemented elsewhere. Thus you need to implement this manually in each pricer.

Report

A report is the result of a set of calculations, normally with bumped time and or market data. For example, a delta-gamma report shows the first and second differentials to all applicable underliers.

ReportGenerator

A report generator performs all the calculations needed to produce a report.

Saveable

Interface that defines how market data or derived data can save itself during a bump, so it can restore itself later. The interface is largely a placeholder, as the means of save/restore are specific to the data.

TimeBumpable

Time bumping is done to calculate theta or time-forward greeks, such as the delta as of the next market open. It is more complicated than other greeks, because it may involve changes to the instrument, which may have fixings before the theta date.

Functions

bumped_price

Useful method for report generators. Bumps a pricer and reprices it if necessary, returning the bumped price.

get_generator_registry

Return the type registry required for deserialization.

get_report_registry

Return the type registry required for deserialization.

Type Definitions

BoxReport
GeneratorTypeRegistry
RcReportGenerator
ReportTypeRegistry