Main Content

getdata

Class: numerixCrossAsset

Convert Numerix CROSSASSET Application object to MATLAB structure

Syntax

AppData = getdata(C)

Description

AppData = getdata(C) converts a Numerix® CROSSASSET Application object to a MATLAB® structure.

Input Arguments

expand all

Connection object to Numerix CROSSASSET, specified using the numerixCrossAsset constructor.

Output Arguments

expand all

Converted Numerix CROSSASSET Application object, returned as a MATLAB structure

Attributes

Accesspublic
Staticfalse
Hiddenfalse

To learn about attributes of methods, see Method Attributes.

Examples

expand all

Create a datetime object.

dates = datetime({'18-Feb-2014';'20-May-2014';'18-Jun-2014';'16-Jul-2014';
                   '20-Aug-2014';'17-Sep-2014';'15-Oct-2014';'19-Nov-2014';
                  '17-Dec-2014';'18-Mar-2015';'17-Jun-2015';'16-Sep-2015';
                  '16-Dec-2015';'16-Mar-2016';'15-Jun-2016';'21-Sep-2016';
                  '21-Dec-2016';'15-Mar-2017';'20-Feb-2018';'20-Feb-2019';
                  '20-Feb-2020';'22-Feb-2021';'22-Feb-2022';'21-Feb-2023';
                  '20-Feb-2024';'20-Feb-2025';'20-Feb-2026';'20-Feb-2029';
                  '21-Feb-2034';'22-Feb-2039';'22-Feb-2044';'20-Feb-2054';
                  '20-Feb-2064'});

Create the corresponding vector of discount factors for a 3-month LIBOR curve.

 discountFactors = [1;0.99942;0.999231;0.999037;0.998797;0.998616;0.998385;...
                       0.998122;0.997941;0.997159;0.996157;0.994825;0.993065;...
                       0.99078;0.987889;0.984092;0.979913;0.975459;0.952707;...
                       0.922223;0.888128;0.852291;0.816462;0.781228;0.746677;...
                       0.712892;0.680462;0.592285;0.474003;0.383493;0.312617;...
                       0.213809;0.152345];

Create a Numerix CROSSASSET object.

c = numerixCrossAsset;

Add data to the Numerix CROSSASSET Application Data object.

applicationData(c,'USD_3MLIBOR_CURVE','DATE',dates,'DISCOUNTFACTOR',discountFactors)

Add the RATESPEC Call object to the Numerix CROSSASSET Application object using name-value pairs, where USD_3MLIBOR_CURVE denotes yield curve data object created previously.

headers = {'ID','LOCAL ID','TIMER','TIMER CPU','UPDATED'};
 applicationCall(c,headers,'ID','RATESPEC','OBJECT','MARKET DATA','TYPE','YIELD','COMMENT','Comments here',...
                 'SKIP',false,'INTERPMETHOD','LogLinear','INTERPVARIABLE','DF',...
                 'CURRENCY','USD','DATA','USD_3MLIBOR_CURVE','BASIS','ACT/360');

Use getdata to convert the Numerix CROSSASSET Application object to a MATLAB structure.

APPDATA = getdata(C)

Version History

Introduced in R2016b