public class DiscountingCmsPeriodPricer 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.
Modifier and Type | Field and Description |
---|---|
static DiscountingCmsPeriodPricer |
DEFAULT
Default implementation.
|
Constructor and Description |
---|
DiscountingCmsPeriodPricer(DiscountingSwapProductPricer swapPricer)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
double |
forwardRate(CmsPeriod cmsPeriod,
RatesProvider provider)
Computes the forward rate associated to the swap underlying the CMS period.
|
CurrencyAmount |
presentValue(CmsPeriod cmsPeriod,
RatesProvider provider)
Computes the present value of CMS coupon by simple forward rate estimation.
|
PointSensitivityBuilder |
presentValueSensitivity(CmsPeriod cmsPeriod,
RatesProvider provider)
Computes the present value curve sensitivity by simple forward rate estimation.
|
public static final DiscountingCmsPeriodPricer DEFAULT
public DiscountingCmsPeriodPricer(DiscountingSwapProductPricer swapPricer)
swapPricer
- the pricer for ResolvedSwap
public CurrencyAmount presentValue(CmsPeriod cmsPeriod, RatesProvider provider)
cmsPeriod
- the CMSprovider
- the rates providerpublic double forwardRate(CmsPeriod cmsPeriod, RatesProvider provider)
Returns a value only if the period has not fixed yet. If the fixing date is on or before the valuation date,
an IllegalArgumentException
is thrown.
cmsPeriod
- the CMSprovider
- the rates providerpublic PointSensitivityBuilder presentValueSensitivity(CmsPeriod cmsPeriod, RatesProvider provider)
cmsPeriod
- the CMSprovider
- the rates providerCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.