public class DiscountingCmsLegPricer extends Object
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 apply resolved()
in order to price CmsLeg
.
Constructor and Description |
---|
DiscountingCmsLegPricer(DiscountingCmsPeriodPricer cmsPeriodPricer)
Creates an instance.
|
Modifier and Type | Method and 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.
|
public DiscountingCmsLegPricer(DiscountingCmsPeriodPricer cmsPeriodPricer)
cmsPeriodPricer
- the pricer for CmsPeriod
public CurrencyAmount presentValue(ResolvedCmsLeg cmsLeg, RatesProvider ratesProvider)
The result is returned using the payment currency of the leg.
cmsLeg
- the CMS legratesProvider
- the rates providerpublic PointSensitivityBuilder presentValueSensitivity(ResolvedCmsLeg cmsLeg, RatesProvider ratesProvider)
The present value sensitivity of the leg is the sensitivity of the present value to the underlying curves.
cmsLeg
- the CMS legratesProvider
- the rates providerpublic CurrencyAmount currentCash(ResolvedCmsLeg cmsLeg, RatesProvider ratesProvider)
cmsLeg
- the CMS legratesProvider
- the rates providerCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.