-
- All Known Implementing Classes:
AnalyticModelFromCurvesAndVols
public interface AnalyticModel extends Model, Cloneable
A collection of objects representing analytic valuations, i.e., curves and volatility surfaces.- Version:
- 1.0
- Author:
- Christian Fries
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description AnalyticModel
addCurve(String name, Curve curve)
Add a reference to a given curve under a given name to this model.AnalyticModel
addCurves(Set<Curve> curves)
Create a new analytic model consisting of a clone of this one together with the given curves added.AnalyticModel
addCurves(Curve... curves)
Create a new analytic model consisting of a clone of this one together with the given curves added.AnalyticModel
addVolatilitySurfaces(Set<VolatilitySurface> volatilitySurfaces)
Create a new analytic model consisting of a clone of this one together with the given volatility surfaces added.AnalyticModel
addVolatilitySurfaces(VolatilitySurface... volatilitySurfaces)
AnalyticModel
clone()
AnalyticModel
getCloneForParameter(Map<ParameterObject,RandomVariable[]> curvesParameterPairs)
Curve
getCurve(String name)
Get a curve by a given curve name.Map<String,Curve>
getCurves()
Returns an unmodifiable map of all curves.DiscountCurveInterface
getDiscountCurve(String discountCurveName)
Returns a discount curve for a given name.ForwardCurveInterface
getForwardCurve(String forwardCurveName)
Returns a forward curve for a given name.RandomVariable
getRandomVariableForConstant(double value)
VolatilitySurface
getVolatilitySurface(String name)
Returns a volatility surface for a given name.Map<String,VolatilitySurface>
getVolatilitySurfaces()
Returns an unmodifiable map of all volatility surfaces.void
setCurve(Curve curve)
Deprecated.
-
-
-
Method Detail
-
getRandomVariableForConstant
RandomVariable getRandomVariableForConstant(double value)
-
getCurve
Curve getCurve(String name)
Get a curve by a given curve name.- Parameters:
name
- The name of the curve.- Returns:
- The curve with the corresponding name, given that it is part of this model, otherwise null is return.
-
getCurves
Map<String,Curve> getCurves()
Returns an unmodifiable map of all curves.- Returns:
- Map of all curves.
-
addCurve
AnalyticModel addCurve(String name, Curve curve)
Add a reference to a given curve under a given name to this model. It is not necessary that the name given agrees withcurve.getName()
. This method comes in handy, if you like to create curve mappings.- Parameters:
name
- Name under which the curve is known in the model.curve
- The curve.- Returns:
- A clone of this model, containing the curves of this model which are not known under the given name and the new curve under the given name.
-
addCurves
AnalyticModel addCurves(Curve... curves)
Create a new analytic model consisting of a clone of this one together with the given curves added.- Parameters:
curves
- The set of curves to add.- Returns:
- A new analytic model.
-
addCurves
AnalyticModel addCurves(Set<Curve> curves)
Create a new analytic model consisting of a clone of this one together with the given curves added.- Parameters:
curves
- The list of curves to add.- Returns:
- A new analytic model.
-
setCurve
@Deprecated void setCurve(Curve curve)
Deprecated.
-
getDiscountCurve
DiscountCurveInterface getDiscountCurve(String discountCurveName)
Returns a discount curve for a given name.- Parameters:
discountCurveName
- The name of the requested curve.- Returns:
- discount curve corresponding to discountCurveName or null if no discountCurve with this name exists in the model
-
getForwardCurve
ForwardCurveInterface getForwardCurve(String forwardCurveName)
Returns a forward curve for a given name.- Parameters:
forwardCurveName
- The name of the requested curve.- Returns:
- forward curve corresponding to forwardCurveName or null if no forwardCurve with this name exists in the model
-
getVolatilitySurface
VolatilitySurface getVolatilitySurface(String name)
Returns a volatility surface for a given name.- Parameters:
name
- THe name of the requested surface.- Returns:
- The volatility surface corresponding to the name.
-
getVolatilitySurfaces
Map<String,VolatilitySurface> getVolatilitySurfaces()
Returns an unmodifiable map of all volatility surfaces.- Returns:
- Map of all volatility surfaces.
-
addVolatilitySurfaces
AnalyticModel addVolatilitySurfaces(VolatilitySurface... volatilitySurfaces)
-
addVolatilitySurfaces
AnalyticModel addVolatilitySurfaces(Set<VolatilitySurface> volatilitySurfaces)
Create a new analytic model consisting of a clone of this one together with the given volatility surfaces added.- Parameters:
volatilitySurfaces
- The list of volatility surfaces to add.- Returns:
- A new analytic model.
-
clone
AnalyticModel clone()
-
getCloneForParameter
AnalyticModel getCloneForParameter(Map<ParameterObject,RandomVariable[]> curvesParameterPairs) throws CloneNotSupportedException
- Throws:
CloneNotSupportedException
-
-