Class SabrExtrapolationReplicationCmsProductPricer
- java.lang.Object
-
- com.opengamma.strata.pricer.cms.SabrExtrapolationReplicationCmsProductPricer
-
public class SabrExtrapolationReplicationCmsProductPricer extends Object
Pricer for CMS products by swaption replication on a SABR formula with extrapolation.This function provides the ability to price
ResolvedCms
.
-
-
Constructor Summary
Constructors Constructor Description SabrExtrapolationReplicationCmsProductPricer(SabrExtrapolationReplicationCmsLegPricer cmsLegPricer)
Creates an instance using the default pay leg pricer.SabrExtrapolationReplicationCmsProductPricer(SabrExtrapolationReplicationCmsLegPricer cmsLegPricer, DiscountingSwapLegPricer payLegPricer)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiCurrencyAmount
currencyExposure(ResolvedCms cms, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the currency exposure of the product.MultiCurrencyAmount
currentCash(ResolvedCms cms, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the current cash of the product.ExplainMap
explainPresentValue(ResolvedCms cms, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Explains the present value of the CMS product.MultiCurrencyAmount
presentValue(ResolvedCms cms, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value of the CMS product.PointSensitivityBuilder
presentValueSensitivityModelParamsSabr(ResolvedCms cms, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value sensitivity to the SABR model parameters.PointSensitivityBuilder
presentValueSensitivityRates(ResolvedCms cms, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value curve sensitivity of the CMS product.double
presentValueSensitivityStrike(ResolvedCms cms, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value sensitivity to the strike value.
-
-
-
Constructor Detail
-
SabrExtrapolationReplicationCmsProductPricer
public SabrExtrapolationReplicationCmsProductPricer(SabrExtrapolationReplicationCmsLegPricer cmsLegPricer)
Creates an instance using the default pay leg pricer.- Parameters:
cmsLegPricer
- the pricer forCmsLeg
-
SabrExtrapolationReplicationCmsProductPricer
public SabrExtrapolationReplicationCmsProductPricer(SabrExtrapolationReplicationCmsLegPricer cmsLegPricer, DiscountingSwapLegPricer payLegPricer)
Creates an instance.
-
-
Method Detail
-
presentValue
public MultiCurrencyAmount presentValue(ResolvedCms cms, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value of the CMS product.The present value of the product is the value on the valuation date.
CMS leg and pay leg are typically in the same currency. Thus the present value is expressed as a single currency amount in most cases.
- Parameters:
cms
- the CMS productratesProvider
- the rates providerswaptionVolatilities
- the swaption volatilities- Returns:
- the present value
-
explainPresentValue
public ExplainMap explainPresentValue(ResolvedCms cms, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Explains the present value of the CMS product.This returns explanatory information about the calculation.
- Parameters:
cms
- the CMS productratesProvider
- the rates providerswaptionVolatilities
- the swaption volatilities- Returns:
- the explain PV map
-
presentValueSensitivityRates
public PointSensitivityBuilder presentValueSensitivityRates(ResolvedCms cms, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value curve sensitivity of the CMS product.The present value sensitivity of the product is the sensitivity of the present value to the underlying curves.
- Parameters:
cms
- the CMS productratesProvider
- the rates providerswaptionVolatilities
- the swaption volatilities- Returns:
- the present value sensitivity
-
presentValueSensitivityModelParamsSabr
public PointSensitivityBuilder presentValueSensitivityModelParamsSabr(ResolvedCms cms, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value sensitivity to the SABR model parameters.The present value sensitivity of the product is the sensitivity of the present value to the SABR model parameters, alpha, beta, rho and nu.
- Parameters:
cms
- the CMS productratesProvider
- the rates providerswaptionVolatilities
- the swaption volatilities- Returns:
- the present value sensitivity
-
presentValueSensitivityStrike
public double presentValueSensitivityStrike(ResolvedCms cms, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value sensitivity to the strike value.The present value sensitivity of the product is the sensitivity of the present value to the strike value. This is not relevant for CMS coupons and an exception is thrown in the underlying pricer.
- Parameters:
cms
- the CMS productratesProvider
- the rates providerswaptionVolatilities
- the swaption volatilities- Returns:
- the present value sensitivity
-
currencyExposure
public MultiCurrencyAmount currencyExposure(ResolvedCms cms, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the currency exposure of the product.- Parameters:
cms
- the CMS productratesProvider
- the rates providerswaptionVolatilities
- the swaption volatilities- Returns:
- the currency exposure
-
currentCash
public MultiCurrencyAmount currentCash(ResolvedCms cms, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the current cash of the product.- Parameters:
cms
- the CMS productratesProvider
- the rates providerswaptionVolatilities
- the swaption volatilities- Returns:
- the current cash
-
-