Package com.opengamma.strata.pricer.cms
Class SabrExtrapolationReplicationCmsLegPricer
- java.lang.Object
-
- com.opengamma.strata.pricer.cms.SabrExtrapolationReplicationCmsLegPricer
-
public class SabrExtrapolationReplicationCmsLegPricer extends Object
Pricer for CMS legs by swaption replication on a SABR formula with extrapolation.This function provides the ability to price
ResolvedCmsLeg
. One must applyresolved()
in order to priceCmsLeg
.
-
-
Constructor Summary
Constructors Constructor Description SabrExtrapolationReplicationCmsLegPricer(SabrExtrapolationReplicationCmsPeriodPricer cmsPeriodPricer)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CurrencyAmount
currentCash(ResolvedCmsLeg cmsLeg, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the current cash of the leg.ExplainMap
explainPresentValue(ResolvedCmsLeg cmsLeg, RatesProvider provider, SabrSwaptionVolatilities volatilities)
Explains the present value of a CMS leg.CurrencyAmount
presentValue(ResolvedCmsLeg cmsLeg, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value of the CMS leg.PointSensitivityBuilder
presentValueSensitivityModelParamsSabr(ResolvedCmsLeg cmsLeg, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value sensitivity to the SABR model parameters.PointSensitivityBuilder
presentValueSensitivityRates(ResolvedCmsLeg cmsLeg, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value curve sensitivity of the CMS leg.double
presentValueSensitivityStrike(ResolvedCmsLeg cmsLeg, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value sensitivity to the strike value.
-
-
-
Constructor Detail
-
SabrExtrapolationReplicationCmsLegPricer
public SabrExtrapolationReplicationCmsLegPricer(SabrExtrapolationReplicationCmsPeriodPricer cmsPeriodPricer)
Creates an instance.- Parameters:
cmsPeriodPricer
- the pricer forCmsPeriod
-
-
Method Detail
-
presentValue
public CurrencyAmount presentValue(ResolvedCmsLeg cmsLeg, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value of the CMS leg.The present value of the leg is the value on the valuation date. The result is returned using the payment currency of the leg.
- Parameters:
cmsLeg
- the CMS legratesProvider
- the rates providerswaptionVolatilities
- the swaption volatilities- Returns:
- the present value
-
explainPresentValue
public ExplainMap explainPresentValue(ResolvedCmsLeg cmsLeg, RatesProvider provider, SabrSwaptionVolatilities volatilities)
Explains the present value of a CMS leg.This returns explanatory information about the calculation.
- Parameters:
cmsLeg
- the CMS legprovider
- the rates providervolatilities
- the swaption volatilities- Returns:
- the explanatory information
-
presentValueSensitivityRates
public PointSensitivityBuilder presentValueSensitivityRates(ResolvedCmsLeg cmsLeg, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value curve sensitivity of the CMS leg.The present value sensitivity of the leg is the sensitivity of the present value to the underlying curves.
- Parameters:
cmsLeg
- the CMS legratesProvider
- the rates providerswaptionVolatilities
- the swaption volatilities- Returns:
- the present value sensitivity
-
presentValueSensitivityModelParamsSabr
public PointSensitivityBuilder presentValueSensitivityModelParamsSabr(ResolvedCmsLeg cmsLeg, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value sensitivity to the SABR model parameters.The present value sensitivity of the leg is the sensitivity of the present value to the SABR model parameters, alpha, beta, rho and nu.
- Parameters:
cmsLeg
- the CMS legratesProvider
- the rates providerswaptionVolatilities
- the swaption volatilities- Returns:
- the present value sensitivity
-
presentValueSensitivityStrike
public double presentValueSensitivityStrike(ResolvedCmsLeg cmsLeg, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value sensitivity to the strike value.The present value sensitivity of the leg 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:
cmsLeg
- the CMS legratesProvider
- the rates providerswaptionVolatilities
- the swaption volatilities- Returns:
- the present value sensitivity
-
currentCash
public CurrencyAmount currentCash(ResolvedCmsLeg cmsLeg, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the current cash of the leg.- Parameters:
cmsLeg
- the CMS legratesProvider
- the rates providerswaptionVolatilities
- the swaption volatilities- Returns:
- the current cash
-
-