- java.lang.Object
-
- net.finmath.marketdata.products.AbstractAnalyticProduct
-
- net.finmath.marketdata.products.Cap
-
- net.finmath.marketdata.model.volatility.caplet.CapShiftedVol
-
- All Implemented Interfaces:
AnalyticProduct,Product
public class CapShiftedVol extends Cap
Implements the valuation of a cap via an analytic model, i.e. the specification of a forward curve, discount curve and volatility surface. A cap is a portfolio of Caplets with a common strike, i.e., the strike is the same for all Caplets. The class can value a caplet with a given strike or given moneyness. If moneyness is given, the class calculates the ATM forward. Note that this is done by omitting the first (fixed) period, seeCap.getATMForward(AnalyticModel, boolean). Note: A fixing in arrears is not handled correctly since a convexity adjustment is currently not applied.- Version:
- 1.0
- Author:
- Christian Fries
- To dos:
- Support convexity adjustment if fixing is in arrears., Fix JavaDoc for shift.
-
-
Constructor Summary
Constructors Constructor Description CapShiftedVol(Schedule schedule, String forwardCurveName, double strike, boolean isStrikeMoneyness, String discountCurveName, String volatilitySurfaceName, double shift)Create a Caplet with a given schedule, strike on a given forward curve (by name) with a given discount curve and volatility surface (by name).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetValueAsPrice(double evaluationTime, AnalyticModel model)Returns the value of this product under the given model.-
Methods inherited from class net.finmath.marketdata.products.Cap
getATMForward, getDiscountCurveName, getForwardCurveName, getImpliedVolatility, getStrike, getValue, toString
-
Methods inherited from class net.finmath.marketdata.products.AbstractAnalyticProduct
getValue, getValue
-
-
-
-
Constructor Detail
-
CapShiftedVol
public CapShiftedVol(Schedule schedule, String forwardCurveName, double strike, boolean isStrikeMoneyness, String discountCurveName, String volatilitySurfaceName, double shift)
Create a Caplet with a given schedule, strike on a given forward curve (by name) with a given discount curve and volatility surface (by name). The valuation is performed using analytic valuation formulas for the underlying caplets.- Parameters:
schedule- A given payment schedule, i.e., a collection ofPeriods with fixings, payments and period length.forwardCurveName- The forward curve to be used for the forward of the index.strike- The given strike (or moneyness).isStrikeMoneyness- If true, then the strike argument is interpreted as moneyness, i.e. we calculate an ATM forward from the schedule.discountCurveName- The discount curve to be used for discounting.volatilitySurfaceName- The volatility surface to be used.shift- The shift of the volatility surface.
-
-
Method Detail
-
getValueAsPrice
public double getValueAsPrice(double evaluationTime, AnalyticModel model)Returns the value of this product under the given model.- Overrides:
getValueAsPricein classCap- Parameters:
evaluationTime- Evaluation time.model- The model.- Returns:
- Value of this product under the given model.
-
-