All models are derived from this class. Instances of models are created with the CAdcoSys::Adppmdl_factory() method. The model's characteristics are defined by various lists retrievable with GetList(). The standard lists are always available, along with other model specific lists, all of which are described in the default list LISTS. The standard lists include the INPUTS and RESULTS for each model, which define the parameters which can be retrieved with GetParam(). The INPUTS can be changed with SetParam(). One the model parameters have been set, calls to the PreCalc() method perform any onetime initialization, including retrieving any unsupplied but required historic data and running historic calculations. Once PreCalc() has been run, repeated calls to Forecast() can be interspersed with calls to SetParam() to modify forecast scenarios and GetParam() to retreive the results.
Methods
Construction/Destruction
virtual CAdppmdl* Duplicate() = 0;
Create an exact duplicate model instance. Copy is "deep". Useful for multi-threaded analysis.
Look-up the ParamName in first the RESULTS list, then the INPUTS list, then retrieve the value. Throws an element-not-found error if the ParamName is unknown.
Reset the specified INPUTS parameter to its default value.
Model Execution
virtual void PreCalc() = 0;
Perform initialization for the current set of model parameters. If historic information is required but not supplied, PreCalc() attempts to retrieve it from the HistCache.
virtual void Forecast() = 0;
Run the model forecast calculation based on the current forecast inputs and tuning factors. Stepwise forecasts can be performed by manipulating the forecast_offset and forecast_months standard inputs between multiple calls to forecast().
Details
Standard Lists
LISTS - List of all known lists for the model.
INPUTS - List of all modifiable input parameters.
RESULTS - List of all model output parameters.
NOTICES - Dynamic List of non-fatal errors that occured during PreCalc() or Forecast(). The list is cleared each at the beginning of each PreCalc() or Forecast() call.
Model Parameters
Parameters have a name, a descriptive string, and a Type. The Type is an element of the valid adco_CParam Types unless the the expected Parameter Type is ENUM, in which case the Type is an element of the LISTS list. You can then do a GetList to retrieve the list valid parameter values.
Model Parameters
Parameter Name
Parameter Description
Type
Models
10YrRateHist
Long (10 Year) CMT/Libor Rate History TimeSeries (Percent) (see CurveType
TIMESERIES
ARMMBS
10Yr_Fcst
Time-series containing 10-yr CMT/Libor rate forecast (Percent) (see CurveType)
TIMESERIES
ARMMBS, CCYCALC
1YrRateHist
Short (1 Year) CMT/Libor Rate History TimeSeries (Percent) (see CurveType)
TIMESERIES
ARMMBS
1Yr_Fcst
Time-series containing 1-yr CMT/Libor rate forecast (Percent) (see CurveType)
TIMESERIES
ARMMBS
2Yr_Fcst
Time-series containing 2-yr CMT/Libor rate forecast (Percent) (see CurveType)
TIMESERIES
CCYCALC
ARMType
ARM MBS Collateral Type
ARMTYPES
ARMMBS
Age
AGE of Collateral (Payment # minus 1 of 1st Forecast)
INTEGER
FIXEDMBS, ARMMBS, HYBRIDMBS, WHOLELOAN, PPCALC
AmortTerm
Amortization Term of Collateral (Months)
INTEGER
PPCALC
AsOfMonth
Old Name for FirstForecastMonth(1-12)
INTEGER
FIXEDMBS, ARMMBS, HYBRIDMBS, WHOLELOAN, HPICALC
AsOfYear
Old Name for FirstForecastYear (ex. 2001)
INTEGER
FIXEDMBS, ARMMBS, HYBRIDMBS, WHOLELOAN, HPICALC
Burnout
Adjusted Fraction of Scheduled balance outstanding
TIMESERIES
FIXEDMBS, HYBRIDMBS
CCYFcstCurrent
Use current CCY as Forecast
SWITCH
FIXEDMBS, HYBRIDMBS
CCYForecast
Current Coupon Yield Forecast vector for Security or Rate Proxy (Percent)
TIMESERIES
FIXEDMBS, HYBRIDMBS, WHOLELOAN, CCYCALC
CCYHistory
Current Coupon Yield History vector for Security or Rate Proxy (Percent)
TIMESERIES
FIXEDMBS, HYBRIDMBS, WHOLELOAN
CCY_Type
Type of coupon for which forecast is desired
CCY_TYPES
CCYCALC
CallerData1
Caller Specific Data Item 1 (ex. Intex iCMO struct)
UDATAPTR
FIXEDMBS, ARMMBS, HYBRIDMBS
CallerData2
Caller Specific Data Item 2 (ex. Intex POOL struct)
UDATAPTR
FIXEDMBS, ARMMBS, HYBRIDMBS
Cur_10Yr
Current value for 10-yr rate (for spread computation)
DOUBLE
CCYCALC
Cur_2Yr
Current value for 2-yr rate (for spread computation)
DOUBLE
CCYCALC
Cur_Mtg
Current value for mortgage rate (for spread computation)
DOUBLE
CCYCALC
Cur_Val
Value of property at as-of date in dollars
DOUBLE
WHOLELOAN
Curve_Type
Yield curve type (par or spot, Treasury or swap)
CURVE_TYPES
ARMMBS, CCYCALC
DUMPFILE
ADCO PPModel Debugging Dump File (Use Only As Advised by AD&Co!)
STRING
FIXEDMBS, HYBRIDMBS, PPCALC
EquivSMM
SMM vector for Equivalent Speed
TIMESERIES
PPCALC
EquivalentMeasure
Equivalent Speed Measurement Type (Default WAL)
PPMEASURES
PPCALC
EquivalentSpeed
Equivalent Speed calculated by Forecast() (in EquivalentMeasure Units)
API INTEGRATION CODING FOR DEVELOPERS
The Generic Model Class: CAdppmdl
Description
All models are derived from this class. Instances of models are created with the CAdcoSys::Adppmdl_factory() method. The model's characteristics are defined by various lists retrievable with GetList(). The standard lists are always available, along with other model specific lists, all of which are described in the default list LISTS. The standard lists include the INPUTS and RESULTS for each model, which define the parameters which can be retrieved with GetParam(). The INPUTS can be changed with SetParam(). One the model parameters have been set, calls to the PreCalc() method perform any onetime initialization, including retrieving any unsupplied but required historic data and running historic calculations. Once PreCalc() has been run, repeated calls to Forecast() can be interspersed with calls to SetParam() to modify forecast scenarios and GetParam() to retreive the results.
Methods
Construction/Destruction
Parameter Manipuation
Model Execution
Details
Standard Lists
Model Parameters
Model Parameters