Package org.drip.product.params
Class EmbeddedOptionSchedule
java.lang.Object
org.drip.product.params.EmbeddedOptionSchedule
public class EmbeddedOptionSchedule
extends java.lang.Object
EmbeddedOptionSchedule is a place holder for the embedded option schedule for the component. It
contains the schedule of exercise dates and factors, the exercise notice period, and the option is to call
or put. Further, if the option is of the type fix-to-float on exercise, contains the post-exercise floater
index and floating spread. If the exercise is not discrete (American option), the exercise dates/factors
are discretized according to a pre-specified discretization grid. It exports serialization into and de-
serialization out of byte arrays.
- Module = Product Core Module
- Library = Fixed Income Analytics
- Project = Product Components/Baskets for Credit, FRA, FX, Govvie, Rates, and Option AssetClasses
- Package = Fixed Income Product Customization Parameters
- Author:
- Lakshmi Krishnamurthy
-
Field Summary
Fields Modifier and Type Field Description static int
CALL_NOTICE_PERIOD_DEFAULT
Default Call Notice Period -
Constructor Summary
Constructors Constructor Description EmbeddedOptionSchedule(int[] aiDate, 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 factorsEmbeddedOptionSchedule(EmbeddedOptionSchedule eosOther)
Construct a Deep Copy EOS from another EOS -
Method Summary
Modifier and Type Method Description static EmbeddedOptionSchedule
CreateFromDateFactorSet(java.lang.String strDates, java.lang.String strFactors, int iNoticePeriod, boolean bIsPut, boolean bIsDiscrete, int iScheduleStart, boolean bFixToFloatOnExercise, double dblFixToFloatExerciseDate, java.lang.String strFloatIndex, double dblFixToFloatSpread)
Create the EOS from the dates/factors string arraysint[]
dates()
Get the array of datesint[]
exerciseDates(int iSpotDate)
Generate the Possible Exercise Dates from the Spot Date and the Notice Perioddouble[]
exerciseFactors(int iSpotDate)
Generate the Possible Exercise Factors from the Spot Date and the Notice Periodint
exerciseNoticePeriod()
Retrieve the exercise notice perioddouble
factor(int iIndex)
Get the specific indexed factordouble[]
factors()
Get the array of factorsstatic EmbeddedOptionSchedule
FromAmerican(int iValDate, int[] aiDate, 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 factorsstatic EmbeddedOptionSchedule
FromAmerican(int iValDate, int[] aiDate, double[] adblFactor, boolean bIsPut, int iNoticePeriod, int iCallDiscretization, boolean bFixToFloatOnExercise, double dblFixToFloatExerciseDate, java.lang.String strFloatIndex, double dblFixToFloatSpread)
Create the discretized American EOS schedule from the array of dates and factorsboolean
isFixToFloatOnExercise()
Return whether the component is fix to float on exerciseboolean
isPut()
Whether the component is putable or callableint
nextDate(int iSpotDate)
Retrieve the Next Exercise Date, starting from the Spotdouble
nextFactor(int iSpotDate)
Retrieve the Exercise Factor corresponding to the Next Exercise Date, starting from the SpotMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
CALL_NOTICE_PERIOD_DEFAULT
public static final int CALL_NOTICE_PERIOD_DEFAULTDefault Call Notice Period- See Also:
- Constant Field Values
-
-
Constructor Details
-
EmbeddedOptionSchedule
public EmbeddedOptionSchedule(int[] aiDate, double[] adblFactor, boolean bIsPut, int iNoticePeriod, boolean bFixToFloatOnExercise, double dblFixToFloatExerciseDate, java.lang.String strFloatIndex, double dblFixToFloatSpread) throws java.lang.ExceptionConstruct the EOS from the array of dates and factors- Parameters:
aiDate
- 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 Spread- Throws:
java.lang.Exception
- Thrown if inputs are invalid
-
EmbeddedOptionSchedule
Construct a Deep Copy EOS from another EOS- Parameters:
eosOther
- The Other EOS
-
-
Method Details
-
CreateFromDateFactorSet
public static final EmbeddedOptionSchedule CreateFromDateFactorSet(java.lang.String strDates, java.lang.String strFactors, int iNoticePeriod, boolean bIsPut, boolean bIsDiscrete, int iScheduleStart, boolean bFixToFloatOnExercise, double dblFixToFloatExerciseDate, java.lang.String strFloatIndex, double dblFixToFloatSpread)Create the EOS from the dates/factors string arrays- Parameters:
strDates
- String representing the date arraystrFactors
- String representing the factor arrayiNoticePeriod
- Exercise Notice PeriodbIsPut
- True (Put), False (Call)bIsDiscrete
- True (Discrete), False (Continuous)iScheduleStart
- Schedule start DatebFixToFloatOnExercise
- True - component becomes a floater on calldblFixToFloatExerciseDate
- Date at which the fix to float conversion happensstrFloatIndex
- Floater Rate IndexdblFixToFloatSpread
- Floater Spread- Returns:
- EOS object
-
FromAmerican
public static final EmbeddedOptionSchedule FromAmerican(int iValDate, int[] aiDate, 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- Parameters:
iValDate
- Valuation Date - date to which the component is assumed to not have been exercisedaiDate
- 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 Spread- Returns:
- Discretized EOS
-
FromAmerican
public static final EmbeddedOptionSchedule FromAmerican(int iValDate, int[] aiDate, double[] adblFactor, boolean bIsPut, int iNoticePeriod, int iCallDiscretization, boolean bFixToFloatOnExercise, double dblFixToFloatExerciseDate, java.lang.String strFloatIndex, double dblFixToFloatSpread)Create the discretized American EOS schedule from the array of dates and factors- Parameters:
iValDate
- Valuation Date - date to which the component is assumed to not have been exercisedaiDate
- Array of datesadblFactor
- Matched Array of FactorsbIsPut
- True (Put), False (Call)iNoticePeriod
- Exercise Notice PeriodiCallDiscretization
- Call Discretization Period UnitbFixToFloatOnExercise
- True - component becomes a floater on calldblFixToFloatExerciseDate
- Date at which the fix to float conversion happensstrFloatIndex
- Floater Rate IndexdblFixToFloatSpread
- Floater Spread- Returns:
- Discretized EOS
-
isPut
public boolean isPut()Whether the component is putable or callable- Returns:
- True (Put), False (Call)
-
dates
public int[] dates()Get the array of dates- Returns:
- The array of dates
-
factors
public double[] factors()Get the array of factors- Returns:
- The array of factors
-
factor
public double factor(int iIndex)Get the specific indexed factor- Parameters:
iIndex
- Factor index- Returns:
- Factor corresponding to the index
-
exerciseNoticePeriod
public int exerciseNoticePeriod()Retrieve the exercise notice period- Returns:
- Minimum Exercise Notice Period in Days
-
isFixToFloatOnExercise
public boolean isFixToFloatOnExercise()Return whether the component is fix to float on exercise- Returns:
- True (component becomes a floater on call), False (component does not change)
-
exerciseDates
public int[] exerciseDates(int iSpotDate)Generate the Possible Exercise Dates from the Spot Date and the Notice Period- Parameters:
iSpotDate
- The Spot Date- Returns:
- Array of Possible Exercise Dates from the Spot Date and the Notice Period
-
exerciseFactors
public double[] exerciseFactors(int iSpotDate)Generate the Possible Exercise Factors from the Spot Date and the Notice Period- Parameters:
iSpotDate
- The Spot Date- Returns:
- Array of Possible Exercise Factors from the Spot Date and the Notice Period
-
nextDate
public int nextDate(int iSpotDate) throws java.lang.ExceptionRetrieve the Next Exercise Date, starting from the Spot- Parameters:
iSpotDate
- The Spot Date- Returns:
- Next Exercise Date
- Throws:
java.lang.Exception
- Thrown if the Inputs are Invalid
-
nextFactor
public double nextFactor(int iSpotDate) throws java.lang.ExceptionRetrieve the Exercise Factor corresponding to the Next Exercise Date, starting from the Spot- Parameters:
iSpotDate
- The Spot Date- Returns:
- Next Exercise Factor
- Throws:
java.lang.Exception
- Thrown if the Inputs are Invalid
-