The Wisdom of the Crowd: Using ensemble machine learning techniques as an early warning indicator for systemic banking crises

Finance master project by Gabriela Lavagna, Helena Patterson, and Robizon Razmadze ’21

Blurred chart on a computer screen
Image by Pexels from Pixabay

Editor’s note: This post is part of a series showcasing BSE master projects. The project is a required component of all Master’s programs at the Barcelona School of Economics.

Abstract

We develop early warning models for systemic crisis prediction using machine learning techniques on macrofinancial data for 36 countries for quarterly data spanning 1970-2013. Machine learning models outperform logistic regression in out-of-sample predictions under the recursive window forecasting mechanism. In particular, using the ensemble random forest algorithm for both feature selection and prediction substantially outperforms the logit models. We identify the key economic and financial drivers of our models using the random forest framework by extracting each feature’s Gini impurity and corresponding information gain. Throughout the time period, the most important predictors are credit, foreign liabilities, asset prices and foreign currency reserves. 

Conclusions

  • The aim of the study was to construct a machine learning methodology to improve the predictive ability of systemic crises models. We applied these algorithms on macrofinancial data for 36 countries for quarterly data spanning 1970-2013. The results of the paper show that predictions of financial crises are more accurately obtained via machine learning algorithms as opposed to logit regression models in out-of-sample predictions (obtaining an AUC score of 0.77-0.81).
  • During the analysis, our goal was not only to be able to improve the predictive power of the models, but also to be able to select the most relevant and concise predictor variables. We applied the random forest ensemble algorithm to undertake feature selection and concluded that, over the years, the variables credit, foreign liabilities, asset prices and currency reserves were most important in predicting systemic crises.
  • The value-add derived from the models developed by us can be viewed in two main directions: Firstly, the need to use time series data as a means of predicting crises has meant many authors in the past have been unable to avoid the ‘looking to the future’ issue. We managed to alleviate this risk by using a recursive window estimation mechanism. The main benefit of this methodology is that it would allow policymakers to observe the predictors in real-time. Second, by being able to rank variables in order of importance, we were able to reveal the key economic and financial drivers which should be used by policymakers in evaluating any pressing risk of systemic crises. 

Connect with the authors

About the BSE Master’s Program in Finance

Gender Gap and Retirement Decisions: the Maternity Pension Supplement in Spain

Economics master project by Jorge Casanova, Horia Guias, Carlos Javier López, Andrea Salvanti, and Patrick Sewell ’21

Family graphic spray painted on pavement
Photo by Sandy Millar on Unsplash

Editor’s note: This post is part of a series showcasing BSE master projects. The project is a required component of all Master’s programs at the Barcelona School of Economics.

Abstract

Embedded in the growing governmental efforts to reduce the gender income gap, in 2016 a retirement pension supplement for mothers of at least two children was introduced in Spain. Through an Oaxaca-Blinder decomposition analysis, we find that the policy had a smaller-than-expected shrinking effect in the gender gap in retirement pensions. Using a difference-in-differences approach, we identify that the trade-off between the supplement incentivizing early retirement and the penalty this retirement modality entails in Spain is the mechanism driving this result. Finally, we developed a dynamic choice model to simulate women’s behavior under alternative versions of the policy.

Summary

Our main motivation was to analyse whether the maternity supplement proposed by the Spanish government in 2016 fostered gender equality through a reduction of the gender gap in retirement income. We decompose the average monthly retirement income for both men and women into its determinants and estimate how the gender difference in returns on pension of having two or more children changes after the policy is introduced. Our result is that the policy had a smaller-than-expected shrinking effect in the gender gap in retirement pensions, as the gender gap for regular retirement closes but the gap conditional on early retirement (i.e. below 65 years) remains unaffected.

chart

Figure 1: Time Series of Average Monthly Retirement Income: negative trend reverted for women retiring at 65 after the introduction of the policy but not for women retiring at an earlier age.

Using a difference-in-differences approach, we observe that the policy has a positive effect on all retirement hazard rates – i.e. the probability of retiring at a certain age, conditional on not having done so before.

One reason for the lower income effect is due to the trade-off that women face when they consider retiring before reaching the age at which they would start receiving their full retirement pension. On the one hand, early retirement increases the value of leisure, which could be especially beneficial for women with difficult working biographies. On the other hand, early retirement entails a penalty on the pension. For this group of women, early retirement reduces this penalty and hence, changes the trade-off in favour of early retirement, making the substitution of retirement income for more leisure more appealing.

Finally, we develop a dynamic choice model that depicts the trade-off between income and leisure that women face in retirement decisions, which can be used in a next step to simulate different retirement policies and compare their outcomes.

Future research on the maternity benefit ought to shed light on the different effects it produced between women who were and were not in a couple, and how much agents value leisure relative to money.

Connect with the authors

About the BSE Master’s Program in Economics

The role of pensions: Exploring the link between pension funds, monetary policy and economic performance

Macroeconomic Policy and Financial Markets master project by Diljá Matthíasardóttir and Lara Zarges ’21

A grandmother and granddaughter sit on a park bench talking happily about what they see on a mobile phone
Photo by Andrea Piacquadio on Pexels

Editor’s note: This post is part of a series showcasing BSE master projects. The project is a required component of all Master’s programs at the Barcelona School of Economics.

Abstract

Shocks to the European Central bank’s unconventional monetary policy trigger Dutch pension funds to search for yield: A structural VAR analysis shows that the pension funds reallocate their asset holdings from bonds towards equity and alternatives. The latter suggests the existence of a portfolio-rebalancing channel through institutional investors in the euro area. Moreover, we emphasize that the portfolio reallocation induced by monetary policy has increased the overall riskiness of the funds’ investments, which has potentially systemic risk implications. As the pension sector has evolved into a key player in the Dutch financial market, we additionally investigate the domestic real effects of a further increase in its size. In this context, a second SVAR approach shows that an expansive shock to total asset holdings boosts economic growth. As this link also works in the reverse direction, we point out the potential problems of a sudden dissaving of pension funds. Our results are of general interest for the aging societies in Europe as they improve the understanding of pension funds’ potential importance for economic policy in a period of demographic change. This paper hence urges future research to contribute to a better understanding of the link between demographic change, growing pension systems and central bank policies.

Conclusions

We infer that the change in the portfolio composition following a monetary shock to the ECB shadow rate after 2008 is driven by unconventional monetary policy succeeding in lowering the long-term interest rates. The resulting rise in equity and alternatives in the pension fund’s asset holdings can therefore be interpreted as evidence for the existence of a portfolio rebalancing transmission channel of quantitative easing in the euro area.

These findings also imply that due to unconventional monetary policy the riskiness of Dutch pension funds’ portfolios has been increasing gradually. Together with the sheer size of the Dutch pension sector and the funds’ tendency to herd-behavior this might be affecting local financial stability and with it the safety of Dutch pensions.

We further show that the size of the pension sector is a factor influencing economic growth and unemployment in the Netherlands.

Due to structural drivers such as demographic change, interest rates are likely to be lower for longer. We therefore stress the importance of future research on demographic effects such as the evolution of the size of funded pension systems on monetary policy conduction. This is e.g. important considering that the change of the Dutch pension system towards a full DC system in 2027 will most likely alter the consumption and saving patterns of citizens. The importance of bank deposits could shrink, impeding the supply of bank loans to the corporate sector. Firms would then likely turn towards financial securities to finance their operations. This would imply an overall decline in the importance of the credit channel for monetary policy transmission regardless of unconventional times. Therefore, a deeper understanding of the influence of central bank policies on institutional investors and insurers is required. This is especially important since the number of private, complementary pension schemes has been growing in many member states following the European Directive 2003/41/EC.

Connect with the authors

About the BSE Master’s Program in Macroeconomic Policy and Financial Markets

Extreme Weather and Health Outcomes in Women: Evidence from Colombia and Peru

Economics of Public Policy master project by Melina Aliayi, Manohar Gannavarapu, and André López ’21

A pregnant woman in a warm sweater places her hands on her belly, forming a heart shape with her fingers
Image by StockSnap from Pixabay

Editor’s note: This post is part of a series showcasing BSE master projects. The project is a required component of all Master’s programs at the Barcelona School of Economics.

Abstract

This paper investigates the relationship between health outcomes during delivery and extreme temperatures in Colombia and Peru. 

We used geo-coded household survey data from the Demographic and Health Survey Program (DHS), allowing us to construct an index accounting for the incidence of pregnancy complications in women during labor. Matching these health outcomes indicators with monthly-temperature data at a grid-cell level, we find that experiencing extreme temperatures during pregnancy, particularly cold temperatures, increases the probability of suffering pregnancy complications in the case of Colombia. Contrary to majority of the literature on health outcomes and temperature, we find no effect of experiencing extreme high temperatures. Interestingly, we find no significant effects in Peru.

Conclusions

  • We identify that experiencing at least one month of extreme cold temperatures during pregnancy increases the incidence of pregnancy complications by 2.5%.  
  • Shifting the analysis to the trimester level, we find that experiencing extreme cold temperatures during the first and third trimester of pregnancy increases the probability of pregnancy complications. 
  • Furthermore, we find an additional effect by wealth. Being poor increases the probability of experiencing pregnancy complications due to extreme cold temperatures by an additional 5%.

Connect with the authors

About the BSE Master’s Program in Economics of Public Policy

Save The Euro Policy: European Debt Crisis and Covid-19 Pandemic

Economics master project by Kadir Özen and Hirotaka Ito ’21

Euro bills and face masks

Editor’s note: This post is part of a series showcasing BSE master projects. The project is a required component of all Master’s programs at the Barcelona School of Economics.

Abstract

The 2008-2009 Global Financial Crisis led to European debt crisis leaving the periphery of euro zone with very high borrowing costs compared to core countries. When Covid-19 Pandemic Crisis hit the economies, monetary policy tools of European Central Bank prevented a similar debt crisis. We identify the underlying factor of the ECB monetary policy that is active during the 2011-2012 debt crisis and Covid-19 Pandemic periods operated through sovereign spreads preventing the contagion of fragmentation risk of euro area. We call this new factor, save-the-euro with which we shed light on the monetary policies of this unusual periods.

Conclusions

  • Identified the new dimension of the ECB Policy, save-the-euro policy, that captures stabilization policy of ECB that works through euro zone sovereign yields
  • This policy addresses euro area fragmentation risk 
  • An expansionary save-the-euro policy leads to a highly statistically significant appreciation of Euro against US dollar: Sharp contrast with the standard textbook treatment
  • Document the reversal of flight-to-safety flows in the euro area

Connect with the authors

About the BSE Master’s Program in Economics

Green Agreement in the Electricity Market

An ex-post evaluation of the 2013 Dutch Coal Power Plants Closure Agreement by Ilaria Noviello and Shaun Tey ’21

Smoke stacks
Photo by Andreas Felske on Unsplash

The full title of this project is “Green Agreement in the Electricity Market: An ex-post evaluation of the 2013 Dutch Coal Power Plants Closure Agreement.”

Editor’s note: This post is part of a series showcasing BSE master projects. The project is a required component of all Master’s programs at the Barcelona School of Economics.

Abstract

There has been much theoretical discussion on whether Green Agreements can be a cost efficient means of improving the sustainability of products, but no empirical studies have been done on what the cost and benefits of past Green Agreements have been. 

In order to provide a substantive contribution to this discussion, we have undertaken an ex-post analysis of an agreement in the Netherlands to close five aging coal power plants in 2016 and 2017. First, we evaluated the ACM’s assumption that the plant closures would result in an increase of the Dutch wholesale electricity price in the Netherlands by undertaking a before-and-after analysis. Second, we examined how the ACM quantification of the benefits deriving from emissions reductions would have changed if it used its same methodology a year after the plants closed (in mid-2018). Third, we considered how the quantification of the benefits would have changed if the ACM used an alternative evaluation technique based on estimating consumers’ willingness to pay for Green Electricity.

Our findings indicate that the ACM was likely incorrect to oppose the agreement to close the coal power plants.

Conclusions

  • The before-and-after analysis indicates that the agreement to close the coal power plants did not result in any increase in the wholesale price of electricity in the Netherlands. This implies that this Green Agreement had no cost, while still producing a benefit of reduced emissions.
  • Our examination of the ACM’s method for quantifying the benefits derived from reduced emissions finds it to be volatile. In particular, due to subsequent changes to the methods used by the Dutch Government for valuing reduced emissions, the benefit of the Closure Agreement would be regarded as far higher if evaluated today. 
  • We find that it is unviable to use an alternative evaluation technique based on estimating consumers’ willingness to pay for Green Electricity.

Our conclusion suggests that those working on ex-ante assessments of Green Agreements should recognise that the volatility of their government’s approach to environmental policy can alter the accuracy of their assessments. As a result of this, regulators should coordinate better across government departments, in order to understand which methodologies are currently subject to scrutiny and could possibly change in the future.

Connect with the authors

About the BSE Master’s Program in Competition and Market Regulation

Understanding Latent Vector Arithmetic for Attribute Manipulation in Normalizing Flows

Data Science master project by Eduard Gimenez Funes ’21

Five portraits of the same man with different facial expressions

Editor’s note: This post is part of a series showcasing BSE master projects. The project is a required component of all Master’s programs at the Barcelona School of Economics.

Abstract

Normalizing flows are an elegant approximation to generative modelling. It can be shown that learning a probability distribution of a continuous variable X is equivalent to learning a mapping f from the domain where X is defined to Rn is such that the final distribution is a Gaussian. In “Glow: Generative flow with invertible 1×1 convolutions,” Kingma et al introduced the Glow model. Normalizing flows arrange the latent space in such a way that feature additivity is possible, allowing synthetic image generation. For example, it is possible to take the image of a person not smiling, add a smile, and obtain the image of the same person smiling. Using the CelebA dataset we report new experimental properties of the latent space such as specular images and linear discrimination. Finally, we propose a mathematical framework that helps to understand why feature additivity works.

Conclusions

Generative Models for Deep Fake generation sit in between Engineering, Mathematics and Art. Trial and error is key to finding solutions to these types of problems. Theoretical grounding might only come afterwards. But when it does, it is simply amazing. By experimenting with normalizing flows we found properties of the latent space that have helped us create a mathematical model that explains why feature additivity works.

Connect with the author

About the BSE Master’s Program in Data Science Methodology

The Macroeconomics of Fighting Climate Change

Macroeconomic Policy and Financial Markets master project by Astrid Esparza Sánchez, Benedikt J. F. Höcherl, and Wei Liam Yap ’21

Photo by Nicholas Doherty on Unsplash

The full title of this project is “The Macroeconomics of Fighting Climate Change: Estimating the Impact of Carbon Taxes, Public and Private R&D Investment in Low-Carbon Technologies on the Scandinavian Economy.”

Editor’s note: This post is part of a series showcasing BSE master projects. The project is a required component of all Master’s programs at the Barcelona School of Economics.

Abstract

The worldwide lockdowns and slowdown of the global economy in the past two years induced a significant overall decrease in CO2 emissions by 8.8% – the largest observed decrease since World War II. In that sense, COVID-19 emphasized the important trade-off between the emissions reductions necessary to fight climate change and economic welfare, which also constitutes a major political stumbling block to introducing policies aimed at halting climate change in normal times.

In order to further our understanding of this trade-off, we evaluate the macroeconomic impact of three policies that are commonly regarded as crucial to meeting national emissions targets:

  • Carbon taxes
  • Public Investment in low-carbon R&D
  • Private Investment in the R&D of low-carbon technologies, proxied by the number of patents for environmentally friendly applications 

In our paper, we develop a novel approach to identifying the long-term impact of these policies using an Structural Vector Autoregression (SVAR) model. We use a Blanchard-Quah long-run identification scheme and a Cholesky short-run identification respectively to  recover a one-standard deviation shock of carbon tax and low-carbon R&D, and investigate their impact on the evolution of GDP, employment and CO2 emissions. In an extension, we include both public and private low-carbon R&D in an SVAR to uncover how public and low-carbon R&D incentivize and complement each other.

Conclusions

We evaluate the effect of carbon taxes, public low-carbon R&D and private low-carbon R&D on GDP, employment and CO2 emissions in Finland, Norway, Denmark and Sweden. We find that carbon taxes do not significantly affect GDP and employment in the long run, but we also do not observe a significant reduction in CO2 emissions. Our results might be shaped by the fact that the first carbon taxes were introduced in 1990 and consequently data is still relatively limited.

Furthermore, our results indicate a significant negative effect of public and private low-carbon R&D on emissions in Denmark and Finland. However, the effect on GDP and employment is ambiguous and depends on the individual country. 

To the best of our knowledge, this is a first empirical indication of the relevance of R&D into low-carbon technologies in reducing CO2 emissions in Northern Europe. 

The implications of our result can fruitfully contribute to the debate about the adequate policy instruments for fighting climate change on at least three dimensions:

  • We find no evidence supporting the political concern that carbon taxes might negatively impact jobs and growth.
  • We provide evidence for the effectiveness of low-carbon R&D – public and private – in reducing CO2 emissions. However, country specific crowding in and crowding out effects of public and private investment in low-carbon technologies should be taken into account when deciding for example on appropriate innovation policies.
  • Our paper underlines the idea that revenues from carbon taxes might potentially be employed for financing low-carbon R&D which in turn could spur long-run, emission free economic growth.

In any case, as for the planet time is of the essence, the Economics profession should focus ever more efforts on understanding the macroeconomics of climate change.

Connect with the authors

About the BSE Master’s Program in Macroeconomic Policy and Financial Markets

Where Does the Money Flow? Understanding Allocations of Post-Epidemic Foreign Aid

ITFD master project by Ashley Do, Nicolas Legrain, Nadine Schüttler, and María Soares de Lima ’21

Two hands cradle a transparent globe
Photo by Bill Oxford on Unsplash

Editor’s note: This post is part of a series showcasing BSE master projects. The project is a required component of all Master’s programs at the Barcelona School of Economics.

Abstract

The purpose of this paper is to examine aggregate and cross-sector allocations of foreign aid flows in the aftermath of epidemics and to determine whether latent effects can be observed in the following year.

Using data from the Organization for Economic Cooperation and Development (OECD) on Bilateral commitments of Official Development Assistance (ODA) from 2005-2019, we employ an Ordinary Least Squares (OLS) model based on the structural gravity framework to account for spatial interactions between donor and recipient countries.

Our results show that epidemics have a positive and significant effect on bilateral foreign aid across all sectors and that aid to the Humanitarian sector is less conditional on pre-existing relationships than others. Results for latent effects on aid vary by sector.

We further find that isolating epidemics in our analysis suggests that certain diseases prompt a different aid response wherein aid to non-health sectors falls.

Conclusions

We find that epidemics do indeed engender changes in foreign aid behavior.

  • To be specific, epidemics have a positive and significant effect on foreign aid commitments to all sectors. Our results are unable to shed light on the hypothesis of reallocation between sectors. However, they do illustrate that aid to both health-related and non-health-related sectors increases.
  • Aid in this context is also persistent. That is, our results, robust to numerous checks, show that the positive effects of epidemics may be observed not only in the year of the outbreak but also in the following year.
  • By analyzing each disease independently, we further find that certain diseases prompt a different aid response and may suggest the presence of a foreign-aid reallocation due to epidemics.

However, our study does not measure the effectiveness of aid which is necessary for the design of productive policy measures that could save countless lives. Naturally, this presents new opportunities for research and raises important questions regarding the optimal allocation of aid given shocks to global health. That is, does increasing aid to all sectors serve as an effective one-size-fits-all solution? Or would a more efficient policy consist of donors reallocating aid across sectors to account for short and long-term changes in the demand for healthcare caused by an epidemic?

Connect with the authors

About the BSE Master’s Program in International Trade, Finance, and Development

Deep Vector Autoregression for Macroeconomic Data

Data Science master project by Marc Agustí, Patrick Altmeyer, and Ignacio Vidal-Quadras Costa ’21

Photo by Uriel SC on Unsplash

Editor’s note: This post is part of a series showcasing BSE master projects. The project is a required component of all Master’s programs at the Barcelona School of Economics.

Abstract

Vector autoregression (VAR) models are a popular choice for forecasting of macroeconomic time series data. Due to their simplicity and success at modelling the monetary economic indicators VARs have become a standard tool for central bankers to construct economic forecasts. Impulse response functions can be readily retrieved and are used extensively to investigate the monetary transmission mechanism. In light of the recent advancements in computational power and the development of advanced machine learning and deep learning algorithms we propose a simple way to integrate these tools into the VAR framework.

This paper aims to contribute to the time series literature by introducing a ground-breaking methodology which we refer to as DeepVector Autoregression (Deep VAR). By fitting each equation of the VAR system with a deep neural network, the Deep VAR outperforms the VAR in terms of in-sample fit, out-of-sample fit and point forecasting accuracy. In particular, we find that the Deep VAR is able to better capture the structural economic changes during periods of uncertainty and recession.

Conclusions

To assess the modelling performance of Deep VARs compared to linear VARs we investigate a sample of monthly US economic data in the period 1959-2021. In particular, we look at variables typically analysed in the context of the monetary transmission mechanism including output, inflation, interest rates and unemployment.

Our empirical findings show a consistent and significant improvement in modelling performance associated with Deep VARs. Specifically, our proposed Deep VAR produces much lower cumulative loss measures than the VAR over the entire period and for all of the analysed time series. The improvements in modelling performance are particularly striking during subsample periods of economic downturn and uncertainty. This appears to confirm or initial hypothesis that by modelling time series through Deep VARs it is possible to capture complex, non-linear dependencies that seem to characterize periods of structural economic change.

Chart shows that improvement in performance of Deep VAR over VAR model
Credit: the authors

When it comes to the out-of-sample performance, a priori it may seem that the Deep VAR is prone to overfitting, since it is much less parsimonious that the conventional VAR. On the contrary, we find that by using default hyperparameters the Deep VAR clearly dominates the conventional VAR in terms of out-of-sample prediction and forecast errors. An exercise in hyperparameter tuning shows that its out-of-sample performance can be further improved by appropriate regularization through adequate dropout rates and appropriate choices for the width and depth of the neural. Interestingly, we also find that the Deep VAR actually benefits from very high lag order choices at which the conventional VAR is prone to overfitting.

In summary, we provide solid evidence that the introduction of deep learning into the VAR framework can be expected to lead to a significant boost in overall modelling performance. We therefore conclude that time series econometrics as an academic discipline can draw substantial benefits from further work on introducing machine learning and deep learning into its tool kit.

We also point out a number of shortcomings of our paper and proposed Deep VAR framework, which we believe can be alleviated through future research. Firstly, policy-makers are typically concerned with uncertainty quantification, inference and overall model interpretability. Future research on Deep VARs should therefore address the estimation of confidence intervals, impulse response functions as well as variance decompositions typically analysed in the context of VAR models. We point to a number of possible avenues, most notably Monte Carlo dropout and a Bayesian approach to modelling deep neural networks. Secondly, in our initial paper we benchmarked the Deep VAR only against the conventional VAR. In future work we will introduce other non-linear approaches to allow for a fairer comparison.

Code

To facilitate further research on Deep VAR, we also contribute a companion R package deepvars that can be installed from GitHub. We aim to continue working on the package as we develop our research further and want to ultimately move it onto CRAN. For any package related questions feel free to contact Patrick, who authored and maintains the package. The is also a paper specific GitHub repository that uses the deepvars package.

Connect with the authors

About the BSE Master’s Program in Data Science Methodology