Estimation of an output gap can be useful in order to understand the current state of the economy and when formulating economic policy, be it monetary, fiscal or macroprudential policy. In a joint NIER working paper with Göran Hjelm, methods for estimating a Swedish output gap are evaluated. The paper is available here.
Since trend/cycle components are unobserved quantities, estimates have to be assessed based on a range of criteria that are desirable for the components. Exhibiting small revisions to previously estimated components is one commonly investigated criterion. Different perspectives can be taken when considering revisions. Papers can be found in Empirical Economics, Journal of Business Cycle Research (a, b).
When setting up and running forecasting or analytical models, swift and efficient access to data is essential. Both the National Institute of Economic Research (NIER) and Statistics Sweden provide extensive datasets on their respective websites. Additionally, both agencies offer API access, enabling users to retrieve data programmatically.
Data can be accessed by specifying the desired time series and periods for download. The NIER also allows users to set up dynamic queries, ensuring that time series are automatically updated as new data become available.
Below, we provide MATLAB programs for seamless data retrieval from the NIER and Statistics Sweden. These scripts automatically download the data, format it into tables and matrices, and generate plots. The data can be visualized either as subplots within a single graph or as individual plots.
Retrieve specific series for defined periods from the NIER: GetNIERIndicators.m
Fetch a predefined query from the NIER: ReadNIERQuery.m
Retrieve specific series for defined periods from Statistics Sweden: GetStatSweData.m