Package com.opengamma.strata.pricer.cms
Class SabrExtrapolationReplicationCmsTradePricer
- java.lang.Object
-
- com.opengamma.strata.pricer.cms.SabrExtrapolationReplicationCmsTradePricer
-
public class SabrExtrapolationReplicationCmsTradePricer extends Object
Pricer for CMS trade by swaption replication on a SABR formula with extrapolation.This function provides the ability to price
ResolvedCmsTrade
.
-
-
Constructor Summary
Constructors Constructor Description SabrExtrapolationReplicationCmsTradePricer(SabrExtrapolationReplicationCmsProductPricer cmsProductPricer)
Creates an instance using the default payment pricer.SabrExtrapolationReplicationCmsTradePricer(SabrExtrapolationReplicationCmsProductPricer cmsProductPricer, DiscountingPaymentPricer paymentPricer)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiCurrencyAmount
currencyExposure(ResolvedCmsTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the currency exposure of the trade.MultiCurrencyAmount
currentCash(ResolvedCmsTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the current cash of the trade.ExplainMap
explainPresentValue(ResolvedCms cms, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Explains the present value of the CMS trade.MultiCurrencyAmount
presentValue(ResolvedCmsTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value of the CMS trade.PointSensitivities
presentValueSensitivityModelParamsSabr(ResolvedCmsTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value sensitivity to the SABR model parameters.PointSensitivities
presentValueSensitivityRates(ResolvedCmsTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value curve sensitivity of the CMS trade.double
presentValueSensitivityStrike(ResolvedCmsTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value sensitivity to the strike value.
-
-
-
Constructor Detail
-
SabrExtrapolationReplicationCmsTradePricer
public SabrExtrapolationReplicationCmsTradePricer(SabrExtrapolationReplicationCmsProductPricer cmsProductPricer)
Creates an instance using the default payment pricer.- Parameters:
cmsProductPricer
- the pricer forCmsLeg
-
SabrExtrapolationReplicationCmsTradePricer
public SabrExtrapolationReplicationCmsTradePricer(SabrExtrapolationReplicationCmsProductPricer cmsProductPricer, DiscountingPaymentPricer paymentPricer)
Creates an instance.- Parameters:
cmsProductPricer
- the pricer forResolvedCms
paymentPricer
- the pricer forPayment
-
-
Method Detail
-
presentValue
public MultiCurrencyAmount presentValue(ResolvedCmsTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value of the CMS trade.The present value of the trade is the value on the valuation date.
- Parameters:
trade
- the CMS traderatesProvider
- 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 trade.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 PointSensitivities presentValueSensitivityRates(ResolvedCmsTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value curve sensitivity of the CMS trade.The present value sensitivity of the trade is the sensitivity of the present value to the underlying curves.
- Parameters:
trade
- the CMS traderatesProvider
- the rates providerswaptionVolatilities
- the swaption volatilities- Returns:
- the present value sensitivity
-
presentValueSensitivityModelParamsSabr
public PointSensitivities presentValueSensitivityModelParamsSabr(ResolvedCmsTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value sensitivity to the SABR model parameters.The present value sensitivity of the trade is the sensitivity of the present value to the SABR model parameters, alpha, beta, rho and nu.
- Parameters:
trade
- the CMS traderatesProvider
- the rates providerswaptionVolatilities
- the swaption volatilities- Returns:
- the present value sensitivity
-
presentValueSensitivityStrike
public double presentValueSensitivityStrike(ResolvedCmsTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value sensitivity to the strike value.The present value sensitivity of the trade is the sensitivity of the present value to the strike value.
- Parameters:
trade
- the CMS traderatesProvider
- the rates providerswaptionVolatilities
- the swaption volatilities- Returns:
- the present value sensitivity
-
currencyExposure
public MultiCurrencyAmount currencyExposure(ResolvedCmsTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the currency exposure of the trade.- Parameters:
trade
- the CMS traderatesProvider
- the rates providerswaptionVolatilities
- the swaption volatilities- Returns:
- the currency exposure
-
currentCash
public MultiCurrencyAmount currentCash(ResolvedCmsTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the current cash of the trade.- Parameters:
trade
- the CMS traderatesProvider
- the rates providerswaptionVolatilities
- the swaption volatilities- Returns:
- the current cash
-
-