Package com.opengamma.strata.pricer.cms
Class DiscountingCmsLegPricer
- java.lang.Object
-
- com.opengamma.strata.pricer.cms.DiscountingCmsLegPricer
-
public class DiscountingCmsLegPricer extends Object
Pricer for CMS legs by simple forward estimation.This is an overly simplistic approach to CMS coupon pricer. It is provided only for testing and comparison purposes. It is not recommended to use this for valuation or risk management purposes.
This function provides the ability to price
ResolvedCmsLeg
. One must applyresolved()
in order to priceCmsLeg
.
-
-
Constructor Summary
Constructors Constructor Description DiscountingCmsLegPricer(DiscountingCmsPeriodPricer cmsPeriodPricer)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CurrencyAmount
currentCash(ResolvedCmsLeg cmsLeg, RatesProvider ratesProvider)
Calculates the current cash of the leg.CurrencyAmount
presentValue(ResolvedCmsLeg cmsLeg, RatesProvider ratesProvider)
Computes the present value of CMS leg by simple forward rate estimation.PointSensitivityBuilder
presentValueSensitivity(ResolvedCmsLeg cmsLeg, RatesProvider ratesProvider)
Calculates the present value curve sensitivity of the CMS leg by simple forward rate estimation.
-
-
-
Constructor Detail
-
DiscountingCmsLegPricer
public DiscountingCmsLegPricer(DiscountingCmsPeriodPricer cmsPeriodPricer)
Creates an instance.- Parameters:
cmsPeriodPricer
- the pricer forCmsPeriod
-
-
Method Detail
-
presentValue
public CurrencyAmount presentValue(ResolvedCmsLeg cmsLeg, RatesProvider ratesProvider)
Computes the present value of CMS leg by simple forward rate estimation.The result is returned using the payment currency of the leg.
- Parameters:
cmsLeg
- the CMS legratesProvider
- the rates provider- Returns:
- the present value
-
presentValueSensitivity
public PointSensitivityBuilder presentValueSensitivity(ResolvedCmsLeg cmsLeg, RatesProvider ratesProvider)
Calculates the present value curve sensitivity of the CMS leg by simple forward rate estimation.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 provider- Returns:
- the present value sensitivity
-
currentCash
public CurrencyAmount currentCash(ResolvedCmsLeg cmsLeg, RatesProvider ratesProvider)
Calculates the current cash of the leg.- Parameters:
cmsLeg
- the CMS legratesProvider
- the rates provider- Returns:
- the current cash
-
-