Introduction

How India’s External Debt Stocks Stand Among The BRICS (Brazil, Russia, India, Chna and South Africa)?

Overview

In this research project I am exploring the World Bank’s recent report, “International Debt Statistic 2020” and focus on how India’s external debt has changed since India fully opened its economy in 1991 (called the “Liberalization, Privatization and Globalization (LPG)”) and compare it with the BRICS countries (an acronymn given to the group of countries consisting of : Brazil, Russia, India, China and South Africa). We look at the nominal value of the eternal debt stocks in USD as well as proportion to India’s Gross National Income (GNI). And the numbers are staggering

According to the World Bank , “Total external debt is debt owed to nonresidents repayable in currency, goods, or services. Total external debt is the sum of public, publicly guaranteed, and private nonguaranteed long-term debt, use of IMF credit, and short-term debt. Short-term debt includes all debt having an original maturity of one year or less and interest in arrears on long-term debt”. In other words, total external debt is India’s creditors outside the domestic territory to whom India has an obligation to repay.

The primary goal of this project is to learn how to extract World Bank data using the API in R. Secondary goal, is whether we can tell a story with the data?

Extract data & organize data for further exploration

First we download an updated list of inidicators. Both packages come with a downloaded list. That list appears to be still current for wbstats, as it is a newer package, for WDI however it is not up to date.

  • First, load library(wbstats) and store its indicators
  • Second, search using regular expressions of what you want
## Load Library wbstats and store its indicators
library(wbstats)
new_wb_cache <- wbcache()
# Find What you are looking for:
wbsearch("external.debt.*total", cache = new_wb_cache) 
#External debt stocks, total (DOD, current US$) DT.DOD.DECT.CD
#External debt stocks (% of GNI) DT.DOD.DECT.GN.ZS
  • Now that you know the indicator ID, download what you need.
  • Look at the columns of the data generated.
## Download Data

wb_dat <- wb(indicator = c("DT.DOD.DECT.CD", "DT.DOD.DECT.GN.ZS")) 
names(wb_dat)  ## What All Variables DO we have?
  • Remember to do “Data Cleaning”. Here I have done the following:
  • Merging with WB countries detail list to get additional information like “regions”, “latitude and longitude”.
  • Removing Aggregates as we are interested in country-specific numbers.
  • Renaming our indicators for easy interpretation
wb_countries <- wbcountries() 
names(wb_countries)

wb_dat <- merge(wb_dat, y = wb_countries[c("iso2c", "region", "long", "lat")], by = "iso2c", all.x = TRUE)


head(wb_dat)
table(wb_dat$region)

wb_dat <- subset(wb_dat, region != "Aggregates") # this also removes NAs


##wbstats
head(wb_dat)
table(wb_dat$indicatorID)


wb_dat$indicatorID[wb_dat$indicatorID == "DT.DOD.DECT.CD"] <- "Ext.Debt.CurrUSD"
wb_dat$indicatorID[wb_dat$indicatorID == "DT.DOD.DECT.GN.ZS"] <- "ExDebt.PctGNI"
  • After Data Cleaning, restructure your data:
  • Converting long form data to wide
  • Adjusting the value of the external debts stocks to easy readability.
  • Creating a subset data only for INDIA
wb_dat.wide <- dcast(wb_dat, iso2c + country + date + region + long + lat ~ indicatorID,  value.var = 'value')  ##CAST INTO WIDE USING RESHAPE2


mydata = wb_dat.wide[wb_dat.wide$date>="1991",]
mydata = mydata[order(mydata$country, mydata$date),]
mydata$Ext.Debt.CurrUSD = mydata$Ext.Debt.CurrUSD/1000000000


mydata.india <- subset(mydata, country=="India" & date>=1991)
mydata.india$date = as.numeric(mydata.india$date)


summary(mydata.india)

Graphical Exploration : India’s External Debt Stocks

## BASE PLOT

par(mgp=c(2,0.5,0),
    mar = c(8, 5, 3, 5),
    bg = "white",
    font.main=1, 
    font.lab=1, 
    family="Georgia",
    col.main="black",
    col.sub ="black", 
    col.lab= "black",
    cex.main=0.9, 
    cex.lab=0.9, 
    tck=-0.0, tcl = -0.0,
    xpd=T)
plot(mydata.india$date, (mydata.india$Ext.Debt.CurrUSD),
     type="n",
     main ="External Debt Stocks of India \n(in Billions, Current USD) 1991-2018",
     xlab = "Years", 
     ylab = "External Debt Stocks \n(Billions, Curr. USD)",
     las = 2,
     xaxt="n", yaxt="n", xaxs="i", yaxs="i", ylim=c(0,600),
     frame.plot=FALSE
       ) 
## ADDING RECTANGLES : THEY MAKE IT LOOK PROFESSIONAL:
rect(1992,0,1996,600,col= rgb(241/255,241/255,241/255),border = "transparent")
rect(2000,0,2004,600,col= rgb(241/255,241/255,241/255),border = "transparent")
rect(2008,0,2012,600,col= rgb(241/255,241/255,241/255),border = "transparent")
rect(2016,0,2018,600,col= rgb(241/255,241/255,241/255),border = "transparent")
## ADDING AXIS STRUCTURE
axis(1, at=seq(1991, 2018, 1), las=2, cex.axis=0.8)
axis(2, at=seq(0, 600, 50), las=2, cex.axis=0.8)

##ADDING LINE:
lines(mydata.india$date, (mydata.india$Ext.Debt.CurrUSD),
      type = 'o', pch=22,col = "#E75D53",lwd = 2.5)
## ADDING LINE INDICATING KINK AT 2005
par(xpd=FALSE)
abline(v=2005, col=  "#FB8072")
par(new = T)
plot(mydata.india$date, mydata.india$ExDebt.PctGNI, 
     type="n", axes = FALSE, xlab ="", ylab ="",
     xaxt="n", yaxt="n", xaxs="i", yaxs="i", ylim=c(10,40))
axis(side = 4, at=seq(10, 40, 5), las=2,  cex.axis=0.8)
mtext(side = 4, line=1.5,'External Debt (% of GNI)')
lines(mydata.india$date, mydata.india$ExDebt.PctGNI,
      type = 'o', pch=22,col = "#474747",lwd = 2.5)
par(xpd=T)
legend(1991, 2,
       c("External Debt Stocks (Billions Current USD)","External Debt as % of GNI"), 
       lty=c(1,1),
       pch =c(22,22),
       col=c("#E75D53", "#474747"),
       horiz=F,
       box.lty = 0, cex=0.9,
       bg=rgb(241/255,241/255,241/255,alpha=0.5))

  • The nominal values are staggering. India has about USD 521 billion in external debt as of 2018.
  • However, these external debt stocks are 20% of the Gross National Income (GNI).
  • Looking at the entire trend of external debts as % of GNI, India has managed
  • Another interesting point to note is that, India’s external debt increased much prior to the Global Recession of 2008.
  • We can see that beginning 2005 a steep increase in external debts in current USD as well as % of GNI.
  • Moreover, the 2008 Recession didn’t change the trajectory of the external debt stock as we can see it follows an upward trend since 2005.

India’s External Debts Compared To BRICS [Brazil, Russia, India, China & South Africa]

Here, we see where India stands in external debt compared to other developing countries.

## BASE PLOT
##, out.width="500px", out.height="500px"
par(mgp=c(2,0.5,0),
    mar = c(8, 5, 3, 5),
    bg = "white",
    font.main=1, 
    font.lab=1, 
    family="Georgia",
    col.main="black",
    col.sub ="black", 
    col.lab= "black",
    cex.main=0.9, 
    cex.lab=0.9, 
    tck=-0.0, tcl = -0.0,
    xpd=T)
plot(mydata.india$date, mydata.india$Ext.Debt.CurrUSD,
     type="n",
     main ="External Debt Stocks of Brazil, Russia, India, China and South Africa \n(in Billions, Current USD) 1991-2018",
     xlab = "Years", 
     ylab = "External Debt Stocks \n(Billions, Curr. USD)",
     las = 2,
     xaxt="n", yaxt="n", xaxs="i", yaxs="i", ylim=c(0,1000),
     frame.plot=FALSE
       ) 
## ADDING RECTANGLES : THEY MAKE IT LOOK PROFESSIONAL:
rect(1992,0,1996,1000,col= rgb(241/255,241/255,241/255),border = "transparent")
rect(2000,0,2004,1000,col= rgb(241/255,241/255,241/255),border = "transparent")
rect(2008,0,2012,1000,col= rgb(241/255,241/255,241/255),border = "transparent")
rect(2016,0,2018,1000,col= rgb(241/255,241/255,241/255),border = "transparent")
## ADDING AXIS STRUCTURE
axis(1, at=seq(1991, 2018, 1), las=2, cex.axis=0.8)
axis(2, at=seq(0, 1000, 100), las=2, cex.axis=0.8)

##ADDING LINE:
lines(mydata.india$date, (mydata.india$Ext.Debt.CurrUSD),
      type = 'o', pch=22,col = "#E75D53",lwd = 3.5)
lines(mydata$date[mydata$country=="Brazil"], 
      mydata$Ext.Debt.CurrUSD[mydata$country=="Brazil"],
      type = 'l',col = "#1C2498",lwd = 2.5)
lines(mydata$date[mydata$country=="Russian Federation"], 
      mydata$Ext.Debt.CurrUSD[mydata$country=="Russian Federation"],
      type = 'l',col = "#13F2A7",lwd = 2.5)
lines(mydata$date[mydata$country=="South Africa"], 
      mydata$Ext.Debt.CurrUSD[mydata$country=="South Africa"],
      type = 'l',col = "#763A3A",lwd = 2.5)
par(new = T)
plot(mydata$date[mydata$country=="China"], 
      mydata$Ext.Debt.CurrUSD[mydata$country=="China"], 
     type="n", axes = FALSE, xlab ="", ylab ="",
     xaxt="n", yaxt="n", xaxs="i", yaxs="i", ylim=c(0,2000))
axis(side = 4, at=seq(0, 2000, 100), las=2,  cex.axis=0.8)
mtext(side = 4, line=1.8,'External Debt for China')
lines(mydata$date[mydata$country=="China"], 
      mydata$Ext.Debt.CurrUSD[mydata$country=="China"],
      type = 'l',col = "#135C07",lwd = 2.5)
##LEGEND
par(xpd=T)
legend(1991, -500,
       c("India","Brazil","Russian Federation", "South Africa", "China"), 
       lty=c(1,1,1,1,1),
       pch =c(22,NA,NA,NA,NA),
       col=c("#E75D53", "#1C2498", "#13F2A7", "#763A3A","#135C07"),
       horiz=F,ncol=3,
       box.lty = 0, cex=1,
       bg=rgb(241/255,241/255,241/255,alpha=0.5))

FINDINGS:
- China has the largest external debt stocks in current USD since 2012. - As of 2018, China’s external debt stocks stand at USD 1.9 Trillion. - Brazil is marginally higher in external debt stocks to India. - Russia has experienced quite a voltility in its external debt stocks. - South Africa is the lowest among the BRICS standing about 100 billion USD as of 2018.

External Debts As A Percent of GNI Among the BRICS:

  • Here, we look at how the external debts measure as a percent of a country’s Gross National Income. Here, we present for all the BRICS countries.
  • We see that since 1991 to 2018 , external debts as a percent of GNI has stayed between 19%-30%.
  • As of 2018:
    • South Africa’s external debt stock as a percent of GNI is about 50%
    • Russian and Brazil hover about the same at 30%
    • India’s external debt stocks as a % of GNI is at 20%
    • China is much lower in terms of % of GNI , i.e. 14%.
## BASE PLOT

par(mgp=c(2,0.5,0),
    mar = c(8, 5, 3, 5),
    bg = "white",
    font.main=1, 
    font.lab=1, 
    family="Georgia",
    col.main="black",
    col.sub ="black", 
    col.lab= "black",
    cex.main=0.9, 
    cex.lab=0.9, 
    tck=-0.0, tcl = -0.0,
    xpd=T)
plot(mydata.india$date, mydata.india$ExDebt.PctGNI,
     type="n",
     main ="External Debt Stocks of  Brazil, Russia, India, China and South Africa  \n(% of GNI) 1991-2018",
     xlab = "Years", 
     ylab = "External Debt Stocks \n(% of GNI)",
     las = 2,
     xaxt="n", yaxt="n", xaxs="i", yaxs="i", ylim=c(0,100),
     frame.plot=FALSE
       ) 
## ADDING RECTANGLES : THEY MAKE IT LOOK PROFESSIONAL:
rect(1992,0,1996,100,col= rgb(241/255,241/255,241/255),border = "transparent")
rect(2000,0,2004,100,col= rgb(241/255,241/255,241/255),border = "transparent")
rect(2008,0,2012,100,col= rgb(241/255,241/255,241/255),border = "transparent")
rect(2016,0,2018,100,col= rgb(241/255,241/255,241/255),border = "transparent")
## ADDING AXIS STRUCTURE
axis(1, at=seq(1991, 2018, 1), las=2, cex.axis=0.8)
axis(2, at=seq(0, 100, 10), las=2, cex.axis=0.8)

##ADDING LINE:
lines(mydata.india$date, mydata.india$ExDebt.PctGNI,
      type = 'o', pch=22,col = "#E75D53",lwd = 3.5)
lines(mydata$date[mydata$country=="Brazil"], 
      mydata$ExDebt.PctGNI[mydata$country=="Brazil"],
      type = 'l',col = "#1C2498",lwd = 2.0)
lines(mydata$date[mydata$country=="Russian Federation"], 
      mydata$ExDebt.PctGNI[mydata$country=="Russian Federation"],
      type = 'l',col = "#13F2A7",lwd = 2.0)
lines(mydata$date[mydata$country=="South Africa"], 
      mydata$ExDebt.PctGNI[mydata$country=="South Africa"],
      type = 'l',col = "#763A3A",lwd = 2.0)
lines(mydata$date[mydata$country=="China"], 
      mydata$ExDebt.PctGNI[mydata$country=="China"],
      type = 'l',col = "#135C07",lwd = 2.0)
##LEGEND
par(xpd=T)
legend(1991, -30,
       c("India","Brazil","Russian Federation", "South Africa", "China"), 
       lty=c(1,1,1,1,1),
       pch =c(22,NA,NA,NA,NA),
       col=c("#E75D53", "#1C2498", "#13F2A7", "#763A3A","#135C07"),
       horiz=F,ncol=3,
       box.lty = 0, cex=1,
       bg=rgb(241/255,241/255,241/255,alpha=0.5))

Findings:

Debt is a burden not only for a household but for an economy too. Debt holdings and repayment capacity indicate an economy’s holding in the world and to its creditors. Here, we have examined the “External Debt Stocks (Billions Current USD)” of India and compared it to Brazil, Russia, India, China and South Africa (aka BRICS). The findings are :

  • In nominal terms, India is among top 4 countries with a large external debt stocks as of 2018
  • India has about $521 billion external debt stocks as of 2018
  • The top 4 countries in order of rank with the largest external debt stocks are :
    • China has approx. $1.9 trillion.
    • Brazil has approx. $557 billion.
    • India has approx. $521 billion.
    • Russia has approx. $453 billion.

In nominal terms, these are staggering numbers. However, the true comparison comes through measuing these external debt stocks to the Gross National Income generated by an economy that measures its capacity to repay its debt. I find :

  • India’s external debt as a percent of GNI started with about 30% since it fully opened its economy in 1991. And has hovered at 20% as of 2018. The figures show that it has remained consistent at holding this percentage across the decades, without much fluctuations.
  • This could signal a strong economy that has assets/output to back its debt. However, the question is whether 20% external debt to GNI is a good thing? Looking at its trend over the decades it seems like India has been able to control its debt expansion with the need of the economy.