-
Notifications
You must be signed in to change notification settings - Fork 49
SDMX Connector for MATLAB
MatSDMX is the SDMX Connector for MATLAB.
All the instructions that follow refer to linux, but they can be easily adapted to Windows installations.
-
Download the latest stable release of the toolbox (file name: MatSDMX.mltbx) from the downloads section of the releases. Alternatively you can download it from MatlabCentral
-
From the MATLAB file explorer, double click the toolbox file
-
Click install in the installation dialog.
More information about custom toolboxes can be found in the MATLAB help pages
If necessary, override the default configuration by means of a custom configuration file. This is particularly necessary if you want to run the connector in an environment that connects to the internet by means of a proxy.
Help pages can be obtained in the usual way:
doc MatSDMX
Get the list of available data providers:
getProviders
Get the list of available data flows for data provider ECB:
flows=getFlows('ECB')
If we want to refine the search with a search pattern:
exr=getFlows('ECB', '*Exchange*')
Get the list of dimensions for data flow EXR:
dims=getDimensions('ECB', 'EXR')
As an alternative, we can explore all the metadata of interest with the graphical SDMX helper:
sdmxHelp
Finally, let's get some data (I guess this is what you really want...)
single time series, freq=A, CURRENCY=USD
result = getTimeSeries('ECB', 'EXR/A.USD.EUR.SP00.A')
multiple time series, FREQUENCY=A (annual), all currencies
result = getTimeSeries('ECB', 'EXR/A..EUR.SP00.A')
multiple time series, all currencies, freq = A or M (monthly)
result = getTimeSeries('ECB', 'EXR/M+A..EUR.SP00.A')
NOTE: data calls will return a cell array of timeseries classes. The time series metadata is stored in the UserData slot
If you prefer to work with a MATLAB table you can use the getTimeSeriesTable function to get it. This is supported only in MATLAB 2013B and higher versions (when the tables were introduced).
tstable = getTimeSeriesTable('ECB', 'EXR/M+A..EUR.SP00.A')