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.
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;
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.