public class EmbeddedOptionSchedule extends Serializer
Modifier and Type | Field and Description |
---|---|
static int |
CALL_NOTICE_PERIOD_DEFAULT |
NULL_SER_STRING, VERSION
Constructor and Description |
---|
EmbeddedOptionSchedule(byte[] ab)
EmbeddedOptionSchedule de-serialization from input byte array
|
EmbeddedOptionSchedule(double[] adblDate,
double[] adblFactor,
boolean bIsPut,
int iNoticePeriod,
boolean bFixToFloatOnExercise,
double dblFixToFloatExerciseDate,
java.lang.String strFloatIndex,
double dblFixToFloatSpread)
Construct the EOS from the array of dates and factors
|
EmbeddedOptionSchedule(EmbeddedOptionSchedule eosOther)
Construct a Deep Copy EOS from another EOS
|
Modifier and Type | Method and Description |
---|---|
static EmbeddedOptionSchedule |
CreateFromDateFactorSet(java.lang.String strDates,
java.lang.String strFactors,
int iNoticePeriod,
boolean bIsPut,
boolean bIsDiscrete,
double dblScheduleStart,
boolean bFixToFloatOnExercise,
double dblFixToFloatExerciseDate,
java.lang.String strFloatIndex,
double dblFixToFloatSpread)
Create the EOS from the dates/factors string arrays
|
Serializer |
deserialize(byte[] ab)
De-serialize from a byte array.
|
static EmbeddedOptionSchedule |
fromAmerican(double dblValDate,
double[] adblDate,
double[] adblFactor,
boolean bIsPut,
int iNoticePeriod,
boolean bFixToFloatOnExercise,
double dblFixToFloatExerciseDate,
java.lang.String strFloatIndex,
double dblFixToFloatSpread)
Create the discretized American EOS schedule from the array of dates and factors
|
double[] |
getDates()
Get the array of dates
|
int |
getExerciseNoticePeriod()
Retrieve the exercise notice period
|
double |
getFactor(int iIndex)
Get the specific indexed factor
|
double[] |
getFactors()
Get the array of factors
|
boolean |
isFixToFloatOnExercise()
Return whether the component is fix to float on exercise
|
boolean |
isPut()
Whether the component is putable or callable
|
static void |
main(java.lang.String[] astrArgs) |
byte[] |
serialize()
Serialize into a byte array.
|
getCollectionKeyValueDelimiter, getCollectionMultiLevelKeyDelimiter, getCollectionRecordDelimiter, getFieldDelimiter, getObjectTrailer
public static final int CALL_NOTICE_PERIOD_DEFAULT
public EmbeddedOptionSchedule(double[] adblDate, double[] adblFactor, boolean bIsPut, int iNoticePeriod, boolean bFixToFloatOnExercise, double dblFixToFloatExerciseDate, java.lang.String strFloatIndex, double dblFixToFloatSpread) throws java.lang.Exception
adblDate
- Array of datesadblFactor
- Matched Array of FactorsbIsPut
- True (Put), False (Call)iNoticePeriod
- Exercise Notice PeriodbFixToFloatOnExercise
- True => component becomes a floater on calldblFixToFloatExerciseDate
- Date at which the fix to float conversion happensstrFloatIndex
- Floater Rate IndexdblFixToFloatSpread
- Floater Spreadjava.lang.Exception
- Thrown if inputs are invalidpublic EmbeddedOptionSchedule(EmbeddedOptionSchedule eosOther)
eosOther
- The Other EOSpublic EmbeddedOptionSchedule(byte[] ab) throws java.lang.Exception
ab
- Byte Arrayjava.lang.Exception
- Thrown if EmbeddedOptionSchedule cannot be properly de-serializedpublic static final EmbeddedOptionSchedule CreateFromDateFactorSet(java.lang.String strDates, java.lang.String strFactors, int iNoticePeriod, boolean bIsPut, boolean bIsDiscrete, double dblScheduleStart, boolean bFixToFloatOnExercise, double dblFixToFloatExerciseDate, java.lang.String strFloatIndex, double dblFixToFloatSpread)
strDates
- String representing the date arraystrFactors
- String representing the factor arrayiNoticePeriod
- Exercise Notice PeriodbIsPut
- True (Put), False (Call)bIsDiscrete
- True (Discrete), False (Continuous)dblScheduleStart
- Schedule start DatebFixToFloatOnExercise
- True => component becomes a floater on calldblFixToFloatExerciseDate
- Date at which the fix to float conversion happensstrFloatIndex
- Floater Rate IndexdblFixToFloatSpread
- Floater Spreadpublic static final EmbeddedOptionSchedule fromAmerican(double dblValDate, double[] adblDate, double[] adblFactor, boolean bIsPut, int iNoticePeriod, boolean bFixToFloatOnExercise, double dblFixToFloatExerciseDate, java.lang.String strFloatIndex, double dblFixToFloatSpread)
dblValDate
- Valuation Date - date to which the component is assumed to not have been exercisedadblDate
- Array of datesadblFactor
- Matched Array of FactorsbIsPut
- True (Put), False (Call)iNoticePeriod
- Exercise Notice PeriodbFixToFloatOnExercise
- True => component becomes a floater on calldblFixToFloatExerciseDate
- Date at which the fix to float conversion happensstrFloatIndex
- Floater Rate IndexdblFixToFloatSpread
- Floater Spreadpublic boolean isPut()
public double[] getDates()
public double[] getFactors()
public double getFactor(int iIndex)
iIndex
- Factor indexpublic int getExerciseNoticePeriod()
public boolean isFixToFloatOnExercise()
public byte[] serialize()
Serializer
serialize
in class Serializer
public Serializer deserialize(byte[] ab)
Serializer
deserialize
in class Serializer
public static final void main(java.lang.String[] astrArgs) throws java.lang.Exception
java.lang.Exception