Class DiscountingOvernightFutureProductPricer
- java.lang.Object
-
- com.opengamma.strata.pricer.index.DiscountingOvernightFutureProductPricer
-
public class DiscountingOvernightFutureProductPricer extends Object
Pricer for for Overnight rate future products.This function provides the ability to price a
ResolvedOvernightFuture
.Price
The price of an Overnight rate future is based on the interest rate of the underlying index. It is defined as(100 - percentRate)
.Strata uses decimal prices for Overnight rate futures in the trade model, pricers and market data. The decimal price is based on the decimal rate equivalent to the percentage. For example, a price of 99.32 implies an interest rate of 0.68% which is represented in Strata by 0.9932.
-
-
Field Summary
Fields Modifier and Type Field Description static DiscountingOvernightFutureProductPricer
DEFAULT
Default implementation.
-
Constructor Summary
Constructors Constructor Description DiscountingOvernightFutureProductPricer(RateComputationFn<RateComputation> rateComputationFn)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
price(ResolvedOvernightFuture future, RatesProvider ratesProvider)
Calculates the price of the Overnight rate future product.PointSensitivities
priceSensitivity(ResolvedOvernightFuture future, RatesProvider ratesProvider)
Calculates the price sensitivity of the Overnight rate future product.
-
-
-
Field Detail
-
DEFAULT
public static final DiscountingOvernightFutureProductPricer DEFAULT
Default implementation.
-
-
Constructor Detail
-
DiscountingOvernightFutureProductPricer
public DiscountingOvernightFutureProductPricer(RateComputationFn<RateComputation> rateComputationFn)
Creates an instance.- Parameters:
rateComputationFn
- the rate computation function
-
-
Method Detail
-
price
public double price(ResolvedOvernightFuture future, RatesProvider ratesProvider)
Calculates the price of the Overnight rate future product.The price of the product is the price on the valuation date.
- Parameters:
future
- the futureratesProvider
- the rates provider- Returns:
- the price of the product, in decimal form
-
priceSensitivity
public PointSensitivities priceSensitivity(ResolvedOvernightFuture future, RatesProvider ratesProvider)
Calculates the price sensitivity of the Overnight rate future product.The price sensitivity of the product is the sensitivity of the price to the underlying curves.
- Parameters:
future
- the futureratesProvider
- the rates provider- Returns:
- the price curve sensitivity of the product
-
-