Module net.finmath.lib
Package net.finmath.singleswaprate.model
Class AnalyticModelWithVolatilityCubes
- java.lang.Object
-
- net.finmath.marketdata.model.AnalyticModelFromCurvesAndVols
-
- net.finmath.singleswaprate.model.AnalyticModelWithVolatilityCubes
-
- All Implemented Interfaces:
Serializable
,Cloneable
,AnalyticModel
,Model
,VolatilityCubeModel
public class AnalyticModelWithVolatilityCubes extends AnalyticModelFromCurvesAndVols implements VolatilityCubeModel, Cloneable
Implementation ofVolatilityCubeModel
based onAnalyticModelFromCurvesAndVols
.- Author:
- Christian Fries, Roland Bachl
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AnalyticModelWithVolatilityCubes()
Create an empty analytic model.AnalyticModelWithVolatilityCubes(LocalDate referenceDate)
Create an empty analytic model for a specified date.AnalyticModelWithVolatilityCubes(LocalDate referenceDate, Map<String,Curve> curvesMap, Map<String,VolatilitySurface> volatilitySurfaceMap, Map<String,VolatilityCube> volatilityCubeMap)
Create an analytic model for the specified reference date, together with curves as well as volatility surfaces and cubes, each with their specific name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VolatilityCubeModel
addVolatilityCube(String volatilityCubeName, VolatilityCube volatilityCube)
Add a reference to the given volatility cube to this model under the name provided.VolatilityCubeModel
addVolatilityCube(VolatilityCube volatilityCube)
Add a reference to the given volatility cube to this model.AnalyticModelWithVolatilityCubes
clone()
VolatilityCube
getVolatilityCube(String name)
Get a volatility cube by a given name.Set<String>
getVolatilityCubeNames()
Return a Set view of all volatility cubes of this model.Map<String,VolatilityCube>
getVolatilityCubes()
Returns an unmodifiable map of all volatility cubes in the model.String
toString()
-
Methods inherited from class net.finmath.marketdata.model.AnalyticModelFromCurvesAndVols
addCurve, addCurve, addCurves, addCurves, addVolatilitySurface, addVolatilitySurfaces, addVolatilitySurfaces, getCloneForParameter, getCurve, getCurves, getDiscountCurve, getForwardCurve, getReferenceDate, getVolatilitySurface, getVolatilitySurfaces
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.finmath.marketdata.model.AnalyticModel
addCurve, addCurves, addCurves, addVolatilitySurfaces, addVolatilitySurfaces, getCloneForParameter, getCurve, getCurves, getDiscountCurve, getForwardCurve, getVolatilitySurface, getVolatilitySurfaces
-
-
-
-
Constructor Detail
-
AnalyticModelWithVolatilityCubes
public AnalyticModelWithVolatilityCubes()
Create an empty analytic model.
-
AnalyticModelWithVolatilityCubes
public AnalyticModelWithVolatilityCubes(LocalDate referenceDate)
Create an empty analytic model for a specified date.- Parameters:
referenceDate
- The reference date the curves of this model should match.
-
AnalyticModelWithVolatilityCubes
public AnalyticModelWithVolatilityCubes(LocalDate referenceDate, Map<String,Curve> curvesMap, Map<String,VolatilitySurface> volatilitySurfaceMap, Map<String,VolatilityCube> volatilityCubeMap)
Create an analytic model for the specified reference date, together with curves as well as volatility surfaces and cubes, each with their specific name.- Parameters:
referenceDate
- The reference date that should be used for all curves and surfaces of this model.curvesMap
- A map containing all curves, together with their names they should have in the model.volatilitySurfaceMap
- A map containing all volatility surfaces, together with their names they should have in the model.volatilityCubeMap
- A map containing all volatility cubes, together with their names they should have in the model.
-
-
Method Detail
-
getVolatilityCube
public VolatilityCube getVolatilityCube(String name)
Description copied from interface:VolatilityCubeModel
Get a volatility cube by a given name.- Specified by:
getVolatilityCube
in interfaceVolatilityCubeModel
- Parameters:
name
- The name of the volatility cube.- Returns:
- The cube with the corresponding name, given that it is part of this model, otherwise null is return.
-
addVolatilityCube
public VolatilityCubeModel addVolatilityCube(VolatilityCube volatilityCube)
Description copied from interface:VolatilityCubeModel
Add a reference to the given volatility cube to this model.- Specified by:
addVolatilityCube
in interfaceVolatilityCubeModel
- Parameters:
volatilityCube
- The cube.- Returns:
- A clone of this model, with the given cube added or overwritten.
-
addVolatilityCube
public VolatilityCubeModel addVolatilityCube(String volatilityCubeName, VolatilityCube volatilityCube)
Description copied from interface:VolatilityCubeModel
Add a reference to the given volatility cube to this model under the name provided.- Specified by:
addVolatilityCube
in interfaceVolatilityCubeModel
- Parameters:
volatilityCubeName
- The name under which this cube is to known in the model.volatilityCube
- The cube.- Returns:
- A clone of this model, with the given cube added or overwritten under the name provided.
-
clone
public AnalyticModelWithVolatilityCubes clone()
- Specified by:
clone
in interfaceAnalyticModel
- Overrides:
clone
in classAnalyticModelFromCurvesAndVols
-
toString
public String toString()
- Overrides:
toString
in classAnalyticModelFromCurvesAndVols
-
getVolatilityCubeNames
public Set<String> getVolatilityCubeNames()
Description copied from interface:VolatilityCubeModel
Return a Set view of all volatility cubes of this model.- Specified by:
getVolatilityCubeNames
in interfaceVolatilityCubeModel
- Returns:
- The set containing all names of volatility cubes referenced in this model.
-
getVolatilityCubes
public Map<String,VolatilityCube> getVolatilityCubes()
Description copied from interface:VolatilityCubeModel
Returns an unmodifiable map of all volatility cubes in the model.- Specified by:
getVolatilityCubes
in interfaceVolatilityCubeModel
- Returns:
- Map of all volatility cubes.
-
-