Class DiscountingCmsPeriodPricer
- java.lang.Object
-
- com.opengamma.strata.pricer.impl.cms.DiscountingCmsPeriodPricer
-
public class DiscountingCmsPeriodPricer extends Object
Computes the price of a CMS coupon 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.
-
-
Field Summary
Fields Modifier and Type Field Description static DiscountingCmsPeriodPricer
DEFAULT
Default implementation.
-
Constructor Summary
Constructors Constructor Description DiscountingCmsPeriodPricer(DiscountingSwapProductPricer swapPricer)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Field Detail
-
DEFAULT
public static final DiscountingCmsPeriodPricer DEFAULT
Default implementation.
-
-
Constructor Detail
-
DiscountingCmsPeriodPricer
public DiscountingCmsPeriodPricer(DiscountingSwapProductPricer swapPricer)
Creates an instance.- Parameters:
swapPricer
- the pricer forResolvedSwap
-
-
Method Detail
-
presentValue
public CurrencyAmount presentValue(CmsPeriod cmsPeriod, RatesProvider provider)
Computes the present value of CMS coupon by simple forward rate estimation.- Parameters:
cmsPeriod
- the CMSprovider
- the rates provider- Returns:
- the present value
-
forwardRate
public double forwardRate(CmsPeriod cmsPeriod, RatesProvider provider)
Computes the forward rate associated to the swap underlying the CMS period.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.- Parameters:
cmsPeriod
- the CMSprovider
- the rates provider- Returns:
- the forward rate
-
presentValueSensitivity
public PointSensitivityBuilder presentValueSensitivity(CmsPeriod cmsPeriod, RatesProvider provider)
Computes the present value curve sensitivity by simple forward rate estimation.- Parameters:
cmsPeriod
- the CMSprovider
- the rates provider- Returns:
- the present value sensitivity
-
-