• HOME
  • ABOUT
    AD&Co
    AD&Co Staff Vendor Partners News & Events Press Releases AD&Co in the News Contact Us
  • VECTORS™
    ANALYTICS
    Prepayment Credit Valuation RiskProfiler™ CreditProfile™
  • CONSULTING
  • PUBLICATIONS
    & RESEARCH
    The Pipeline The Pipeline Archives Quantitiative Perspectives Library Books & Papers Presentations
  • ONLINE TOOLS
    & REPORTS
    Model Demos Mortgage Analysis & Performance Reporting Market Valuation Reports Trend Reports CreditProfile™
  • VECTORS™
    SUPPORT
    Downloads FAQs Glossary Installation and Version Compatibility Model Description Model Validation Tuning Support User Manuals/Tutorials/Guides Release Notes Developer Support
  • My AD&Co
 
    Quick Links
  • API Integration Coding for Developers

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

virtual CAdppmdl* Duplicate() = 0;

Create an exact duplicate model instance. Copy is "deep". Useful for multi-threaded analysis.

virtual ~CAdppmdl() {};

Don't use this function! Use the CAdcoSys factory functions instead!

Parameter Manipuation

virtual const adco_cEnumeration& GetList( const char* listname = 0) = 0;

Return one of the standard or model specific lists. Default is list of lists (LISTS).

virtual adco_CParam GetParam( const adco_cEnumElem Parameter ) = 0;

Retrieve the the Parameter value from the list of INPUTS or RESULTS.

virtual adco_CParam GetParam( const char* ParamName );

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.

virtual void SetParam( const adco_cEnumElem Parameter, adco_CParam Value ) = 0;

Set the specified INPUTS parameter to the supplied parameter value.

virtual void UnSetParam( const adco_cEnumElem Parameter ) = 0;

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) DOUBLE PPCALC
FirstForecastMonth Month(1-12) of first forecast month INTEGER FIXEDMBS,ARMMBS, HYBRIDMBS, WHOLELOAN, PPCALC, HPICALC
FirstForecastYear Year (ex. 2001) of first forecast month INTEGER FIXEDMBS,ARMMBS, HYBRIDMBS, WHOLELOAN, PPCALC, HPICALC
ForecastCount Number of Months of Forecast in SMM vector INTEGER FIXEDMBS, HYBRIDMBS
ForecastMonths Only Forecast Next N Months INTEGER FIXEDMBS, ARMMBS, HYBRIDMBS, HPICALC
ForecastOffSet Start Forecast Offset Months After AsOfMonth INTEGER FIXEDMBS, ARMMBS, HYBRIDMBS
HPIFCSTwLAG House Price Index Forecast with required lagged values TIMESERIES HPICALC
HPIForecast Housing Price Index Forecast vector (AsOfMonth - 1 = 100) TIMESERIES FIXEDMBS, WHOLELOAN, HPICALC
HPIHistory Housing Price Index History vector (Percent) TIMESERIES FIXEDMBS, HPICALC
HPIRvsnVal Long Term Annual House Price Growth Ratio DOUBLE FIXEDMBS, HPICALC
HPI_DATA_TYPE House Price Index Data Type HPITYPES HPICALC
HPI_FCST_TYPE HPI Forecast Type HPIMODELS HPICALC
HYBRIDREVERSION Hybrid ARM Long Term Speed DOUBLE HYBRIDMBS
HybridType Hybrid MBS Collateral Type HYBRIDTYPES HYBRIDMBS
InputMeasure Input Speed Measurement Type (Default SMM) PPMEASURES PPCALC
InputSpeed Input Speed (in InputMeasure Units) DOUBLE PPCALC
InputSpeedTS Input Speed TimeSeries (in InputMeasure Units) TIMESERIES PPCALC
IterMax Maximum iterations to find Speed Equivalents INTEGER PPCALC
LoanType Fixed MBS Collateral Type LOANTYPES FIXEDMBS
MaxLag Maximum months rate lookback data required INTEGER FIXEDMBS, ARMMBS, HYBRIDMBS, HPICALC
Model Model Name of Model MODELS FIXEDMBS, ARMMBS, CCYCALC, PPCALC, HYBRIDMBS, HPICALC
Orig10Yr 10 Year Rate at Origination (FFdate-age-1) if 10 Year history not supplied NULLELEM ARMMBS
Orig_Face Original face valule of the loan DOUBLE WHOLELOAN
Orig_LTV Original LTV in percent DOUBLE WHOLELOAN
Orig_Val Value of property at origination in dollars DOUBLE WHOLELOAN
OriginationMonth Month(1-12) of Origination (AsOf = Orig+Age+1) INTEGER FIXEDMBS, HYBRIDMBS
OriginationYear Year (ex. 2001) of Origination (AsOf = Orig+Age+1) INTEGER FIXEDMBS, HYBRIDMBS
PCashflowEquiv Principal Cashflow for Equivalent Speed (Per Unit Starting Balance) TIMESERIES PPCALC
PCashflowIn Principal Cashflow for the Input Speed (Per Unit Starting Balance) TIMESERIES PPCALC
PointsEffect Ratio of WAC to lagged CCY at origination DOUBLE FIXEDMBS
PtsEffSwtch Turn On/Off Effect of Original Discount Points SWITCH FIXEDMBS
Refi Is the loan a refinance? REFI WHOLELOAN
RemainingTerm Remaining Term of Collateral (Months) INTEGER FIXEDMBS, ARMMBS, HYBRIDMBS, PPCALC
SMM Speed vector as Simple Monthly Mortality (decimal) DOUBLE FIXEDMBS, ARMMBS, HYBRIDMBS, WHOLELOAN
SmmTuneBurnOut Tune by changing burnout response (Default 1.0) DOUBLE FIXEDMBS, HYBRIDMBS
SmmTuneCurve Tune by Expanding Rate Response Curve (Default 1.0) DOUBLE FIXEDMBS, HYBRIDMBS
SmmTuneHPI Tune by changing House Price Inflation response (Default 1.0) DOUBLE FIXEDMBS
SmmTuneLag Tune by changing rate response lag (Default 1.0) DOUBLE FIXEDMBS, ARMMBS, HYBRIDMBS
SmmTuneRefi Tune by changing Rate Response Above WAC (Default 1.0) DOUBLE FIXEDMBS, HYBRIDMBS
SmmTuneScale Tune by Scaling Output (Default 1.0) DOUBLE FIXEDMBS, ARMMBS, HYBRIDMBS
SmmTuneScale Tune by Sliding Rate Response Curve (Default 1.0) DOUBLE FIXEDMBS, HYBRIDMBS
SmmTuneTurnOver Tune by changing Rate Response Below WAC (Default 1.0) DOUBLE FIXEDMBS, HYBRIDMBS
Sprd_Mnth Month to use for spread computation INTEGER CCYCALC
Sprd_Yr Year to use for spread computation INTEGER CCYCALC
Spread Spread (%) between mortgages and Treasury/Swap DOUBLE CCYCALC
State The state in which the property is located STATES WHOLELOAN
Term Amortization term of the loan TERMS WHOLELOAN
Tolerance Maximum WAL difference for Speed Equivalents DOUBLE PPCALC
TuneAgeBurnOut Tune Length Age Response (Default 1.0) DOUBLE ARMMBS
TranslateSpeedTS Translate Input SMM Month-by-Month to Equivalent Measure Units TIMESERIES PPCALC
TuneBack Callback function (see developer docs) UDATAPTR FIXEDMBS, ARMMBS, HYBRIDMBS
TuneBase Tune Base Prepayment Rate (Default 1.0) DOUBLE ARMMBS
TuneRampAge Tune Initial Age Response (0.8-1.0) DOUBLE ARMMBS
TuneRate Tune all Rate Responses (Default 1.0) DOUBLE ARMMBS
V43BbgStruct Set Model (Excl. Vectors) from an old v43 BBG IO_structure. adjusted_factor!=0 => PreCalc'd UDATAPTR FIXEDMBS, ARMMBS, HYBRIDMBS
V43ItxStruct Set Model (Excl. Vectors) from an old v43 ItxSub IO_structure. adjusted_factor!=0 => PreCalc'd UDATAPTR FIXEDMBS, ARMMBS, HYBRIDMBS
V43NlhStruct Set Model (Excl. Vectors) from an old v43 NoLoadHist IO_structure. adjusted_factor!=0 => PreCalc'd UDATAPTR FIXEDMBS, ARMMBS, HYBRIDMBS
V43SubStruct Set Model (Excl. Vectors) from an old v43 StdSub IO_structure. adjusted_factor!=0 => PreCalc'd UDATAPTR FIXEDMBS, ARMMBS, HYBRIDMBS
V43VbStruct Set Model from an old v43 VB IO_structure. adjusted_factor!=0 => PreCalc'd UDATAPTR FIXEDMBS, ARMMBS, HYBRIDMBS
VERSION AD&Co System/Model Version Number <System No>.<API No>.<Model No><compile letter> STRING FIXEDMBS, ARMMBS, HYBRIDMBS, WHOLELOAN, CCYCALC, PPCALC, HPICALC
WAC Gross Coupon(WAC) of Loan(Pool) in Percent DOUBLE FIXEDMBS, HYBRIDMBS, WHOLELOAN, PPCALC
WALcalc Weighted Average Life calculated by PreCalc() from the Input Speed DOUBLE PPCALC
WacForecast Gross ARM WAC Forecast vector (Percent) TIMESERIES ARMMBS

 



65 Bleecker St., Fifth Floor New York NY 10012   tel 212.274.9075   fax 212.274.0545
© 2012 Andrew Davidson & Co., Inc.