Industry Intellect
Thought Leadership

SARB Web API Connector

Opti-Num's Finance Team
SARB Web API Connector
Opti-Num's Finance Team
September 28, 2023

SARB Web API Connector

Our finance team at Opti-Num Solutions has built a MATLAB connector (available on File Exchange) to the South African Reserve Bank’s (SARB) available data on their public web API.

The SARB database contains data to help researchers and practitioners access financial and economic data for South Africa. SARB hosts a variety of economic data published by the SARB themselves or Statistics South Africa (Stats SA).

What data can be accessed using the SARB Web API?

SARB collects two groups of data which can be used for macro-economic analysis and modelling;

1.      Economic and Financial Statistics for South Africa

2.      Selected Statistics

A summary of the available data can be seen in the diagram below. The data is rich in the number of use cases it may serve. We will look at several of these use cases in this blog and we welcome any suggestions or topic ideas from our readers that they would like us to explore in our content.

Some examples from the different data set sare shown below. The grey bars highlight recession periods in South Africa asper data sources from the Federal Reserve Economic Data (FRED) database. This is not an exhaustive list of available data.

How is the data connector used?

The code is written with an object-oriented programming approach making the functionality easy to use. The snippet of code below shows a user how to connect to the SARB web API by specifying the type of data of interest and retrieving the time series of interest. In the snippet we want to extract the time-series for the Consumer Price Index (CPI) which has the time-series code CPI1000F.

connector = ResBankEconData;

tsCPI =connector.fetchTimeSeries('CPI1000F');

Where can I access the MATLAB connector?

You can download our connector directly from the MathWorks File Exchange. Extract the files and open the Readme.md file to learn how to start using our code. Please feel free to send us feedback and questions on the connector and suggestions on any improvements.

We hope that this connector can add value to your work by enabling you to access this rich dataset concerning the South African economy.

Happy modelling!

Stay up to date with the lastest Opti-Num news

Thank you!
Your submission has been received!
Oops! Something went wrong while submitting the form.