Package com.illumon.modelfarm.fitterfarm
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 Summary
Constructors Modifier Constructor Description protectedCoreFitData()Create a new, empty data set.protectedCoreFitData(CoreFitData data)Copy the data. -
Method Summary
Modifier and Type Method Description protected static double[][]clone2d(double[][] vals)DBDateTime[]getCarryCurveDates()Gets an array of dates defining the cost-of-carry curve.double[]getCarryCurveErrors()Gets an array of rate errors defining the cost-of-carry curve.double[]getCarryCurveRates()Gets an array of rates defining the cost-of-carry curve.double[]getDivCashAmounts()Gets an array of cash dividend values for the underlying security.DBDateTime[]getDivExDates()Gets an array of dividend ex-dates for the underlying security.double[]getDivProportionalAmounts()Gets an array of proportional dividend values for the underlying security.StringgetFitGroup()Gets the grouping of the data snapshot.FitScopegetFitScope()Gets the scope indicating the extent of this data (e.g.String[]getOptionExerciseTypes()Gets the type of option exercise (e.g.DBDateTime[]getOptionExpirations()Gets an array of expirations associated with the option prices.long[]getOptionIds()Gets an array of ids associated with the options.String[]getOptionPayoffTypes()Gets the type of option payoff (e.g.String[]getOptionRoots()Gets an array of root symbols associated with the options.String[]getOptionSettlementTypes()Gets the type of option settlement (e.g.double[]getOptionStrikes()Gets an array of strikes associated with the option prices.String[]getOptionSyms()Gets an array of symbols associated with the options.DBDateTimegetTimestamp()Gets the timestamp of the data snapshot.longgetUnderlyingId()Gets the underlying id.StringgetUnderlyingSym()Gets the underlying symbol.StringgetUnderlyingType()Gets the type of underlying (e.g.DBDateTime[]getYieldCurveDates()Gets an array of dates defining the yield curve.double[]getYieldCurveRates()Gets an array of rates defining the yield curve.voidsetCarryCurveDates(DBDateTime[] carryCurveDates)Sets an array of dates defining the cost-of-carry curve.voidsetCarryCurveErrors(double[] carryCurveErrors)Sets an array of rate errors defining the cost-of-carry curve.voidsetCarryCurveRates(double[] carryCurveRates)Sets an array of rates defining the cost-of-carry curve.voidsetDivCashAmounts(double[] divCashAmounts)Sets an array of cash dividend values for the underlying security.voidsetDivExDates(DBDateTime[] divExDates)Sets an array of dividend ex-dates for the underlying security.voidsetDivProportionalAmounts(double[] divProportionalAmounts)Sets an array of proportional dividend values for the underlying security.voidsetFitGroup(String fitGroup)Set the grouping of the data snapshot.voidsetOptionExerciseTypes(String[] optionExerciseTypes)Sets the type of option exercise (e.g.voidsetOptionExpirations(DBDateTime[] optionExpirations)Sets the expirations associated with the option prices.voidsetOptionIds(long[] optionIds)Sets an array of ids associated with the options.voidsetOptionPayoffTypes(String[] optionPayoffTypes)Sets the type of option payoff (e.g.voidsetOptionRoots(String[] optionRoots)Sets an array of root symbols associated with the options.voidsetOptionSettlementTypes(String[] optionSettlementTypes)Sets the type of option settlement (e.g.voidsetOptionStrikes(double[] optionStrikes)Sets an array of strikes associated with the option prices.voidsetOptionSyms(String[] optionSyms)Sets an array of symbols associated with the options.voidsetTimestamp(DBDateTime timestamp)Set the timestamp of the data snapshot.voidsetUnderlyingId(long underlyingId)Set the underlying id.voidsetUnderlyingSym(String usym)Set the underlying symbol.voidsetUnderlyingType(String underlyingType)Sets the type of underlying (e.g.voidsetYieldCurveDates(DBDateTime[] yieldCurveDates)Sets an array of dates defining the yield curve.voidsetYieldCurveRates(double[] yieldCurveRates)Sets an array of rates defining the yield curve.StringtoString()protected StringtoStringContents()
-
Constructor Details
-
CoreFitData
protected CoreFitData()Create a new, empty data set. -
CoreFitData
Copy the data.- Parameters:
data- data to copy.
-
-
Method Details
-
getFitScope
Description copied from interface:FitDataBaseGets the scope indicating the extent of this data (e.g. underlying ID + fit group)- Specified by:
getFitScopein interfaceFitDataBase- Returns:
- fit scope
-
getFitGroup
Description copied from interface:FitDataBaseGets the grouping of the data snapshot.- Specified by:
getFitGroupin interfaceFitDataBase- Returns:
- grouping of the data snapshot.
-
setFitGroup
Set the grouping of the data snapshot.- Parameters:
fitGroup- grouping of the data snapshot.
-
getTimestamp
Description copied from interface:FitDataUnderlyingGets the timestamp of the data snapshot.- Specified by:
getTimestampin interfaceFitDataUnderlying- Returns:
- timestamp of the data snapshot.
-
setTimestamp
Set the timestamp of the data snapshot.- Parameters:
timestamp- timestamp of the data snapshot.
-
getUnderlyingId
public long getUnderlyingId()Description copied from interface:FitDataUnderlyingGets the underlying id.- Specified by:
getUnderlyingIdin interfaceFitDataUnderlying- Returns:
- underlying id.
-
setUnderlyingId
public void setUnderlyingId(long underlyingId)Set the underlying id.- Parameters:
underlyingId- underlying id.
-
getUnderlyingSym
Description copied from interface:FitDataUnderlyingGets the underlying symbol.- Specified by:
getUnderlyingSymin interfaceFitDataUnderlying- Returns:
- underlying symbol.
-
setUnderlyingSym
Set the underlying symbol.- Parameters:
usym- underlying symbol.
-
getUnderlyingType
Description copied from interface:FitDataUnderlyingGets the type of underlying (e.g. "Equity", "Future").- Specified by:
getUnderlyingTypein interfaceFitDataUnderlying- Returns:
- type of underlying (e.g. "Equity", "Future").
-
setUnderlyingType
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:FitDataOptionChainGets an array of ids associated with the options.- Specified by:
getOptionIdsin interfaceFitDataOptionChain- 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
Description copied from interface:FitDataOptionChainGets an array of symbols associated with the options.- Specified by:
getOptionSymsin interfaceFitDataOptionChain- Returns:
- array of symbols associated with the options.
-
setOptionSyms
Sets an array of symbols associated with the options.- Parameters:
optionSyms- array of symbols associated with the options.
-
getOptionRoots
Description copied from interface:FitDataOptionChainGets an array of root symbols associated with the options.- Specified by:
getOptionRootsin interfaceFitDataOptionChain- Returns:
- array of root symbols associated with the options.
-
setOptionRoots
Sets an array of root symbols associated with the options.- Parameters:
optionRoots- array of root symbols associated with the options.
-
getOptionExpirations
Description copied from interface:FitDataOptionChainGets an array of expirations associated with the option prices.- Specified by:
getOptionExpirationsin interfaceFitDataOptionChain- Returns:
- array of expirations associated with the option prices.
-
setOptionExpirations
Sets the expirations associated with the option prices.- Parameters:
optionExpirations- expirations associated with the option prices.
-
getOptionStrikes
public double[] getOptionStrikes()Description copied from interface:FitDataOptionChainGets an array of strikes associated with the option prices.- Specified by:
getOptionStrikesin interfaceFitDataOptionChain- 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
Description copied from interface:FitDataOptionChainGets the type of option payoff (e.g. "Put", "Call", etc.) associated with the option prices.- Specified by:
getOptionPayoffTypesin interfaceFitDataOptionChain- Returns:
- type of option payoff (e.g. "Put", "Call", etc.) associated with the option prices.
-
setOptionPayoffTypes
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
Description copied from interface:FitDataOptionChainGets the type of option exercise (e.g. "American", "European", etc.) associated with the option prices.- Specified by:
getOptionExerciseTypesin interfaceFitDataOptionChain- Returns:
- type of option exercise (e.g. "American", "European", etc.) associated with the option prices.
-
setOptionExerciseTypes
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
Description copied from interface:FitDataOptionChainGets the type of option settlement (e.g. "Cash", "Underlying", etc.) associated with the option prices.- Specified by:
getOptionSettlementTypesin interfaceFitDataOptionChain- Returns:
- type of option settlement (e.g. "Cash", "Underlying", etc.) associated with the option prices.
-
setOptionSettlementTypes
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
Description copied from interface:FitDataRatesGets an array of dividend ex-dates for the underlying security.- Specified by:
getDivExDatesin interfaceFitDataRates- Returns:
- array of dividend ex-dates for the underlying security.
-
setDivExDates
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:FitDataRatesGets an array of cash dividend values for the underlying security.- Specified by:
getDivCashAmountsin interfaceFitDataRates- 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:FitDataRatesGets an array of proportional dividend values for the underlying security.- Specified by:
getDivProportionalAmountsin interfaceFitDataRates- 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
Description copied from interface:FitDataRatesGets an array of dates defining the yield curve.- Specified by:
getYieldCurveDatesin interfaceFitDataRates- Returns:
- array of dates defining the yield curve.
-
setYieldCurveDates
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:FitDataRatesGets an array of rates defining the yield curve.- Specified by:
getYieldCurveRatesin interfaceFitDataRates- 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
Description copied from interface:FitDataRatesGets an array of dates defining the cost-of-carry curve.- Specified by:
getCarryCurveDatesin interfaceFitDataRates- Returns:
- array of dates defining the cost-of-carry curve.
-
setCarryCurveDates
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:FitDataRatesGets an array of rates defining the cost-of-carry curve.- Specified by:
getCarryCurveRatesin interfaceFitDataRates- 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:FitDataRatesGets an array of rate errors defining the cost-of-carry curve.- Specified by:
getCarryCurveErrorsin interfaceFitDataRates- 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
-
toString
-
clone2d
protected static double[][] clone2d(double[][] vals)
-