Class CoreFitData

java.lang.Object
com.illumon.modelfarm.fitterfarm.CoreFitData
All Implemented Interfaces:
FitDataBase, FitDataOptionChain, FitDataRates, FitDataUnderlying, Serializable
Direct Known Subclasses:
EquityFitData, FuturesCoreFitData

public abstract class CoreFitData
extends Object
implements FitDataBase, FitDataUnderlying, FitDataOptionChain, FitDataRates, Serializable
A snapshot of market data needed to fit an equity option model.
See Also:
Serialized Form
  • Constructor Details

    • CoreFitData

      protected CoreFitData()
      Create a new, empty data set.
    • CoreFitData

      protected CoreFitData​(CoreFitData data)
      Copy the data.
      Parameters:
      data - data to copy.
  • Method Details

    • getFitScope

      public FitScope getFitScope()
      Description copied from interface: FitDataBase
      Gets the scope indicating the extent of this data (e.g. underlying ID + fit group)
      Specified by:
      getFitScope in interface FitDataBase
      Returns:
      fit scope
    • getFitGroup

      public String getFitGroup()
      Description copied from interface: FitDataBase
      Gets the grouping of the data snapshot.
      Specified by:
      getFitGroup in interface FitDataBase
      Returns:
      grouping of the data snapshot.
    • setFitGroup

      public void setFitGroup​(String fitGroup)
      Set the grouping of the data snapshot.
      Parameters:
      fitGroup - grouping of the data snapshot.
    • getTimestamp

      public DBDateTime getTimestamp()
      Description copied from interface: FitDataUnderlying
      Gets the timestamp of the data snapshot.
      Specified by:
      getTimestamp in interface FitDataUnderlying
      Returns:
      timestamp of the data snapshot.
    • setTimestamp

      public void setTimestamp​(DBDateTime timestamp)
      Set the timestamp of the data snapshot.
      Parameters:
      timestamp - timestamp of the data snapshot.
    • getUnderlyingId

      public long getUnderlyingId()
      Description copied from interface: FitDataUnderlying
      Gets the underlying id.
      Specified by:
      getUnderlyingId in interface FitDataUnderlying
      Returns:
      underlying id.
    • setUnderlyingId

      public void setUnderlyingId​(long underlyingId)
      Set the underlying id.
      Parameters:
      underlyingId - underlying id.
    • getUnderlyingSym

      public String getUnderlyingSym()
      Description copied from interface: FitDataUnderlying
      Gets the underlying symbol.
      Specified by:
      getUnderlyingSym in interface FitDataUnderlying
      Returns:
      underlying symbol.
    • setUnderlyingSym

      public void setUnderlyingSym​(String usym)
      Set the underlying symbol.
      Parameters:
      usym - underlying symbol.
    • getUnderlyingType

      public String getUnderlyingType()
      Description copied from interface: FitDataUnderlying
      Gets the type of underlying (e.g. "Equity", "Future").
      Specified by:
      getUnderlyingType in interface FitDataUnderlying
      Returns:
      type of underlying (e.g. "Equity", "Future").
    • setUnderlyingType

      public void setUnderlyingType​(String underlyingType)
      Sets the type of underlying (e.g. "Equity", "Future").
      Parameters:
      underlyingType - type of underlying (e.g. "Equity", "Future").
    • getOptionIds

      public long[] getOptionIds()
      Description copied from interface: FitDataOptionChain
      Gets an array of ids associated with the options.
      Specified by:
      getOptionIds in interface FitDataOptionChain
      Returns:
      array of ids associated with the options.
    • setOptionIds

      public void setOptionIds​(long[] optionIds)
      Sets an array of ids associated with the options.
      Parameters:
      optionIds - array of ids associated with the options.
    • getOptionSyms

      public String[] getOptionSyms()
      Description copied from interface: FitDataOptionChain
      Gets an array of symbols associated with the options.
      Specified by:
      getOptionSyms in interface FitDataOptionChain
      Returns:
      array of symbols associated with the options.
    • setOptionSyms

      public void setOptionSyms​(String[] optionSyms)
      Sets an array of symbols associated with the options.
      Parameters:
      optionSyms - array of symbols associated with the options.
    • getOptionRoots

      public String[] getOptionRoots()
      Description copied from interface: FitDataOptionChain
      Gets an array of root symbols associated with the options.
      Specified by:
      getOptionRoots in interface FitDataOptionChain
      Returns:
      array of root symbols associated with the options.
    • setOptionRoots

      public void setOptionRoots​(String[] optionRoots)
      Sets an array of root symbols associated with the options.
      Parameters:
      optionRoots - array of root symbols associated with the options.
    • getOptionExpirations

      public DBDateTime[] getOptionExpirations()
      Description copied from interface: FitDataOptionChain
      Gets an array of expirations associated with the option prices.
      Specified by:
      getOptionExpirations in interface FitDataOptionChain
      Returns:
      array of expirations associated with the option prices.
    • setOptionExpirations

      public void setOptionExpirations​(DBDateTime[] optionExpirations)
      Sets the expirations associated with the option prices.
      Parameters:
      optionExpirations - expirations associated with the option prices.
    • getOptionStrikes

      public double[] getOptionStrikes()
      Description copied from interface: FitDataOptionChain
      Gets an array of strikes associated with the option prices.
      Specified by:
      getOptionStrikes in interface FitDataOptionChain
      Returns:
      array of strikes associated with the option prices.
    • setOptionStrikes

      public void setOptionStrikes​(double[] optionStrikes)
      Sets an array of strikes associated with the option prices.
      Parameters:
      optionStrikes - array of strikes associated with the option prices.
    • getOptionPayoffTypes

      public String[] getOptionPayoffTypes()
      Description copied from interface: FitDataOptionChain
      Gets the type of option payoff (e.g. "Put", "Call", etc.) associated with the option prices.
      Specified by:
      getOptionPayoffTypes in interface FitDataOptionChain
      Returns:
      type of option payoff (e.g. "Put", "Call", etc.) associated with the option prices.
    • setOptionPayoffTypes

      public void setOptionPayoffTypes​(String[] optionPayoffTypes)
      Sets the type of option payoff (e.g. "Put", "Call", etc.) associated with the option prices.
      Parameters:
      optionPayoffTypes - type of option payoff (e.g. "Put", "Call", etc.) associated with the option prices.
    • getOptionExerciseTypes

      public String[] getOptionExerciseTypes()
      Description copied from interface: FitDataOptionChain
      Gets the type of option exercise (e.g. "American", "European", etc.) associated with the option prices.
      Specified by:
      getOptionExerciseTypes in interface FitDataOptionChain
      Returns:
      type of option exercise (e.g. "American", "European", etc.) associated with the option prices.
    • setOptionExerciseTypes

      public void setOptionExerciseTypes​(String[] optionExerciseTypes)
      Sets the type of option exercise (e.g. "American", "European", etc.) associated with the option prices.
      Parameters:
      optionExerciseTypes - type of option exercise (e.g. "American", "European", etc.) associated with the option prices.
    • getOptionSettlementTypes

      public String[] getOptionSettlementTypes()
      Description copied from interface: FitDataOptionChain
      Gets the type of option settlement (e.g. "Cash", "Underlying", etc.) associated with the option prices.
      Specified by:
      getOptionSettlementTypes in interface FitDataOptionChain
      Returns:
      type of option settlement (e.g. "Cash", "Underlying", etc.) associated with the option prices.
    • setOptionSettlementTypes

      public void setOptionSettlementTypes​(String[] optionSettlementTypes)
      Sets the type of option settlement (e.g. "Cash", "Underlying", etc.) associated with the option prices.
      Parameters:
      optionSettlementTypes - type of option settlement (e.g. "Cash", "Underlying", etc.) associated with the option prices.
    • getDivExDates

      public DBDateTime[] getDivExDates()
      Description copied from interface: FitDataRates
      Gets an array of dividend ex-dates for the underlying security.
      Specified by:
      getDivExDates in interface FitDataRates
      Returns:
      array of dividend ex-dates for the underlying security.
    • setDivExDates

      public void setDivExDates​(DBDateTime[] divExDates)
      Sets an array of dividend ex-dates for the underlying security.
      Parameters:
      divExDates - array of dividend ex-dates for the underlying security.
    • getDivCashAmounts

      public double[] getDivCashAmounts()
      Description copied from interface: FitDataRates
      Gets an array of cash dividend values for the underlying security.
      Specified by:
      getDivCashAmounts in interface FitDataRates
      Returns:
      array of cash dividend values for the underlying security.
    • setDivCashAmounts

      public void setDivCashAmounts​(double[] divCashAmounts)
      Sets an array of cash dividend values for the underlying security.
      Parameters:
      divCashAmounts - array of cash dividend values for the underlying security.
    • getDivProportionalAmounts

      public double[] getDivProportionalAmounts()
      Description copied from interface: FitDataRates
      Gets an array of proportional dividend values for the underlying security.
      Specified by:
      getDivProportionalAmounts in interface FitDataRates
      Returns:
      array of proportional dividend values for the underlying security.
    • setDivProportionalAmounts

      public void setDivProportionalAmounts​(double[] divProportionalAmounts)
      Sets an array of proportional dividend values for the underlying security.
      Parameters:
      divProportionalAmounts - array of proportinoal dividend values for the underlying security.
    • getYieldCurveDates

      public DBDateTime[] getYieldCurveDates()
      Description copied from interface: FitDataRates
      Gets an array of dates defining the yield curve.
      Specified by:
      getYieldCurveDates in interface FitDataRates
      Returns:
      array of dates defining the yield curve.
    • setYieldCurveDates

      public void setYieldCurveDates​(DBDateTime[] yieldCurveDates)
      Sets an array of dates defining the yield curve.
      Parameters:
      yieldCurveDates - array of dates defining the yield curve.
    • getYieldCurveRates

      public double[] getYieldCurveRates()
      Description copied from interface: FitDataRates
      Gets an array of rates defining the yield curve.
      Specified by:
      getYieldCurveRates in interface FitDataRates
      Returns:
      array of rates defining the yield curve.
    • setYieldCurveRates

      public void setYieldCurveRates​(double[] yieldCurveRates)
      Sets an array of rates defining the yield curve.
      Parameters:
      yieldCurveRates - array of rates defining the yield curve.
    • getCarryCurveDates

      public DBDateTime[] getCarryCurveDates()
      Description copied from interface: FitDataRates
      Gets an array of dates defining the cost-of-carry curve.
      Specified by:
      getCarryCurveDates in interface FitDataRates
      Returns:
      array of dates defining the cost-of-carry curve.
    • setCarryCurveDates

      public void setCarryCurveDates​(DBDateTime[] carryCurveDates)
      Sets an array of dates defining the cost-of-carry curve.
      Parameters:
      carryCurveDates - array of dates defining the cost-of-carry curve.
    • getCarryCurveRates

      public double[] getCarryCurveRates()
      Description copied from interface: FitDataRates
      Gets an array of rates defining the cost-of-carry curve.
      Specified by:
      getCarryCurveRates in interface FitDataRates
      Returns:
      array of rates defining the cost-of-carry curve.
    • setCarryCurveRates

      public void setCarryCurveRates​(double[] carryCurveRates)
      Sets an array of rates defining the cost-of-carry curve.
      Parameters:
      carryCurveRates - array of rates defining the cost-of-carry curve.
    • getCarryCurveErrors

      public double[] getCarryCurveErrors()
      Description copied from interface: FitDataRates
      Gets an array of rate errors defining the cost-of-carry curve.
      Specified by:
      getCarryCurveErrors in interface FitDataRates
      Returns:
      array of rate errors defining the cost-of-carry curve.
    • setCarryCurveErrors

      public void setCarryCurveErrors​(double[] carryCurveErrors)
      Sets an array of rate errors defining the cost-of-carry curve.
      Parameters:
      carryCurveErrors - array of rate errors defining the cost-of-carry curve.
    • toStringContents

      protected String toStringContents()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • clone2d

      protected static double[][] clone2d​(double[][] vals)