public class LIBORVolatilityModelFromGivenMatrix extends LIBORVolatilityModel
Constructor and Description |
---|
LIBORVolatilityModelFromGivenMatrix(TimeDiscretizationInterface timeDiscretization,
TimeDiscretizationInterface liborPeriodDiscretization,
double[][] volatility)
Creates a simple volatility model using given piece-wise constant values on
a given discretization grid.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
double[] |
getParameter() |
RandomVariableInterface |
getVolatility(int timeIndex,
int component)
Implement this method to complete the implementation.
|
void |
setParameter(double[] parameter) |
getLiborPeriodDiscretization, getTimeDiscretization
public LIBORVolatilityModelFromGivenMatrix(TimeDiscretizationInterface timeDiscretization, TimeDiscretizationInterface liborPeriodDiscretization, double[][] volatility)
timeDiscretization
- Discretization of simulation time.liborPeriodDiscretization
- Discretization of tenor times.volatility
- Volatility matrix volatility[timeIndex][componentIndex] where timeIndex the index of the start time in timeDiscretization and componentIndex from liborPeriodDiscretizationpublic RandomVariableInterface getVolatility(int timeIndex, int component)
LIBORVolatilityModel
getVolatility
in class LIBORVolatilityModel
timeIndex
- The time index (for timeDiscretization)component
- The libor index (for liborPeriodDiscretization)public double[] getParameter()
getParameter
in class LIBORVolatilityModel
public void setParameter(double[] parameter)
setParameter
in class LIBORVolatilityModel
public Object clone()
clone
in class LIBORVolatilityModel
Copyright © 2015. All rights reserved.