Class AnalyticModelFromCurvesAndVols

    • Constructor Detail

      • AnalyticModelFromCurvesAndVols

        public AnalyticModelFromCurvesAndVols()
        Create an empty analytic model.
      • AnalyticModelFromCurvesAndVols

        public AnalyticModelFromCurvesAndVols​(LocalDate referenceDate)
        Create an empty analytic model for a specified date.
        Parameters:
        referenceDate - The reference date that should be used for all curves and surfaces of this model.
      • AnalyticModelFromCurvesAndVols

        public AnalyticModelFromCurvesAndVols​(Curve[] curves)
        Create an analytic model with the given curves.
        Parameters:
        curves - The vector of curves.
      • AnalyticModelFromCurvesAndVols

        public AnalyticModelFromCurvesAndVols​(Collection<Curve> curves)
        Create an analytic model with the given curves.
        Parameters:
        curves - A collection of curves.
      • AnalyticModelFromCurvesAndVols

        public AnalyticModelFromCurvesAndVols​(LocalDate referenceDate,
                                              Curve[] curves)
        Create an analytic model with the given curves for the specified reference date.
        Parameters:
        referenceDate - The reference date that should be used for all curves and surfaces of this model.
        curves - The vector of curves.
      • AnalyticModelFromCurvesAndVols

        public AnalyticModelFromCurvesAndVols​(LocalDate referenceDate,
                                              Collection<Curve> curves)
        Create an analytic model with the given curves for the specified reference date.
        Parameters:
        referenceDate - The reference date that should be used for all curves and surfaces of this model.
        curves - A collection of curves.
      • AnalyticModelFromCurvesAndVols

        public AnalyticModelFromCurvesAndVols​(LocalDate referenceDate,
                                              Map<String,​Curve> curvesMap,
                                              Map<String,​VolatilitySurface> volatilitySurfaceMap)
        Create an analytic model for the specified reference date, together with curves and volatility surfaces, 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.
    • Method Detail

      • getCurve

        public Curve getCurve​(String name)
        Description copied from interface: AnalyticModel
        Get a curve by a given curve name.
        Specified by:
        getCurve in interface AnalyticModel
        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.
      • addCurve

        public AnalyticModel addCurve​(String name,
                                      Curve curve)
        Description copied from interface: AnalyticModel
        Add a reference to a given curve under a given name to this model. It is not necessary that the name given agrees with curve.getName(). This method comes in handy, if you like to create curve mappings.
        Specified by:
        addCurve in interface AnalyticModel
        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

        public AnalyticModel addCurves​(Curve... curves)
        Description copied from interface: AnalyticModel
        Create a new analytic model consisting of a clone of this one together with the given curves added.
        Specified by:
        addCurves in interface AnalyticModel
        Parameters:
        curves - The set of curves to add.
        Returns:
        A new analytic model.
      • addCurves

        public AnalyticModel addCurves​(Set<Curve> curves)
        Description copied from interface: AnalyticModel
        Create a new analytic model consisting of a clone of this one together with the given curves added.
        Specified by:
        addCurves in interface AnalyticModel
        Parameters:
        curves - The list of curves to add.
        Returns:
        A new analytic model.
      • getDiscountCurve

        public DiscountCurve getDiscountCurve​(String discountCurveName)
        Description copied from interface: AnalyticModel
        Returns a discount curve for a given name.
        Specified by:
        getDiscountCurve in interface AnalyticModel
        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

        public ForwardCurve getForwardCurve​(String forwardCurveName)
        Description copied from interface: AnalyticModel
        Returns a forward curve for a given name.
        Specified by:
        getForwardCurve in interface AnalyticModel
        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

        public VolatilitySurface getVolatilitySurface​(String name)
        Description copied from interface: AnalyticModel
        Returns a volatility surface for a given name.
        Specified by:
        getVolatilitySurface in interface AnalyticModel
        Parameters:
        name - THe name of the requested surface.
        Returns:
        The volatility surface corresponding to the name.
      • addVolatilitySurfaces

        public AnalyticModel addVolatilitySurfaces​(VolatilitySurface... volatilitySurfaces)
        Description copied from interface: AnalyticModel
        Create a new analytic model consisting of a clone of this one together with the given volatility surfaces added.
        Specified by:
        addVolatilitySurfaces in interface AnalyticModel
        Parameters:
        volatilitySurfaces - The list of volatility surfaces to add.
        Returns:
        A new analytic model.
      • addVolatilitySurfaces

        public AnalyticModel addVolatilitySurfaces​(Set<VolatilitySurface> volatilitySurfaces)
        Description copied from interface: AnalyticModel
        Create a new analytic model consisting of a clone of this one together with the given volatility surfaces added.
        Specified by:
        addVolatilitySurfaces in interface AnalyticModel
        Parameters:
        volatilitySurfaces - The list of volatility surfaces to add.
        Returns:
        A new analytic model.
      • getReferenceDate

        public LocalDate getReferenceDate()
        Returns the reference date of the curves of this model.
        Returns:
        The reference date of the model.