Class AbstractCurve

java.lang.Object
net.finmath.marketdata2.model.curves.AbstractCurve
All Implemented Interfaces:
Cloneable, ParameterObject, Curve
Direct Known Subclasses:
CurveInterpolation, DiscountCurveFromForwardCurve

public abstract class AbstractCurve extends Object implements Curve, Cloneable
Abstract base class for a curve. It stores the name of the curve and provides some convenient way of getting values.
Version:
1.0
Author:
Christian Fries
  • Constructor Details

    • AbstractCurve

      public AbstractCurve(String name, LocalDate referenceDate)
      Parameters:
      name - The name of this curve.
      referenceDate - The reference date of this curve.
  • Method Details

    • getName

      public String getName()
      Description copied from interface: Curve
      Get the name of the curve.
      Specified by:
      getName in interface Curve
      Returns:
      The name of this curve
    • getReferenceDate

      public LocalDate getReferenceDate()
      Description copied from interface: Curve
      Return the reference date of this curve, i.e. the date associated with t=0. May be null in case the curve is not associated with a fixed date (e.g. a time homogenous model).
      Specified by:
      getReferenceDate in interface Curve
      Returns:
      The date identified as t=0.
    • getValue

      public RandomVariable getValue(double time)
      Description copied from interface: Curve
      Returns the value for the time using the interpolation method associated with this curve.
      Specified by:
      getValue in interface Curve
      Parameters:
      time - Time for which the value should be returned.
      Returns:
      The value at the give time.
    • getValues

      public RandomVariable[] getValues(double[] times)
      Return a vector of values corresponding to a given vector of times.
      Parameters:
      times - A given vector of times.
      Returns:
      A vector of values corresponding to the given vector of times.
    • clone

      Description copied from interface: Curve
      Create a deep copied clone.
      Specified by:
      clone in interface Curve
      Overrides:
      clone in class Object
      Returns:
      A clone (deep copied).
      Throws:
      CloneNotSupportedException - Thrown, when the curve could not be cloned.
    • getCloneForParameter

      public Curve getCloneForParameter(RandomVariable[] value) throws CloneNotSupportedException
      Description copied from interface: ParameterObject
      Create a clone with a modified parameter.
      Specified by:
      getCloneForParameter in interface Curve
      Specified by:
      getCloneForParameter in interface ParameterObject
      Parameters:
      value - The new parameter.
      Returns:
      A clone with an otherwise modified parameter.
      Throws:
      CloneNotSupportedException - Thrown, when the curve could not be cloned.
    • toString

      public String toString()
      Overrides:
      toString in class Object