General government finance ratios #
This category group contains public finance ratios according to IMF methodology. The focus is on semi-official (IMF) point-in-time early estimates of various types of balances as well as revenue and expenditure ratios to concurrent GDP.
These indicators are indicative of government default risk, governments’ scope for intervening in the economy and the public sector influence on private sector activity, and hence give an investor valuable information on how different governments behave in different periods of health of an economy. As with most indicators in the macroeconomic balance sheets theme, the general government finance ratios are indicative of underlying risks to financial stability that could escalate when funding conditions deteriorate.
General government balance ratios #
Ticker : GGOBGDPRATIO_NSA / GGPBGDPRATIO_NSA / GGSBGDPRATIO_NSA
Label : General government balance, % of GDP: overall / primary / structural
Definition : General government balance, current year, IMF estimate, as % of GDP: overall / primary / structural
Notes :
-
General government is defined as the total of central, state and local governments including the social security funds controlled by these units.
-
The observation period is always the current year. The values are estimates, typically based on the budget law and the IMF staff economic analysis. For instance, for a December 30, 2022 real-time date, the observation period would 2022. For a January 2, 2023 real-time date the observation period would be 2023. Moreover, the IMF typically updates annual estimates in early spring and autumn.
-
The overall balance is defined as the difference between overall government revenues and expenditures. Expenditures include interest spending, i.e. they are affected by debt servicing costs.
-
The primary balance is defined as the difference between overall government revenues and non-interest expenditures. Conceptually it is “the difference between the amount of revenue a government collects and the amount it spends on providing public goods and services” (OECD).
-
The structural balance is defined as the difference between overall government revenues and expenditures, adjusted by the estimated effect of a broad set of transitory factors such as commodity shocks, housing, stock, and other asset price cycles, output composition and absorption effects and one-off factors. The adjustment is based on estimates by IMF staff.
-
Primary balances for China only have vintages going back to 2015.
-
There is no primary balance data for Taiwan.
-
Singapore’s primary balance estimates have not been released in The October 2017 and October 2019 reviews and have not been updated since October 2021.
-
Primary balances for the US miss some observation dates for release dates 2011-2013.
-
Structural balances for Thailand are missing the April 2020 data point.
-
See also source data notes in Appendix 1 .
General government revenue ratio #
Ticker : GGRGDPRATIO_NSA
Label : General government revenues, % of GDP
Definition : Estimated general government revenues, current year, as % of GDP
Notes :
-
General government is defined as the total of central, state and local governments including the social security funds controlled by these units.
-
The observation period is always the current year. The values are estimates, typically based on the budget law and the IMF staff economic analysis.
-
Revenues include taxes, typically as the largest item. In addition, Other revenues include property income derived from the ownership of assets, sales of goods and services, and voluntary transfers received from other units.
-
Taiwan has no vintage data prior to 2011.
-
Likewise, in Spain vintages before 2010 have too many missing values to be used.
-
See also source data notes in Appendix 1 .
General government expenditure ratio #
Ticker : GGEGDPRATIO_NSA
Label : General government expenditures, % of GDP
Definition : Estimated general government expenditures, current year, as % of GDP
Notes :
-
General government is defined as the total of central, state and local governments including the social security funds controlled by these units.
-
The observation period is always the current year. The values are estimates, typically based on the budget law and the IMF staff economic analysis.
-
Expenditures are defined as the expenses incurred by government for the delivery of public goods, services, and social protection.
-
For Taiwan, we did not add the 2020 vintage as there are too many missing observation dates.
-
For the US, the IMF has not stored values for pre-2000 observation dates for release dates from 2002 to 2012.
-
See also source data notes in Appendix 1 .
General government debt ratios #
Ticker : GGDGDPRATIO_NSA / GGNDGDPRATIO_NSA
Label : General government debt, % of GDP: gross / net
Definition : General government debt, current year, IMF estimate, as % of GDP: gross / net
Notes :
-
General government is defined as the total of central, state and local governments including the social security funds controlled by these units.
-
The observation period is always the current year. The values are estimates, typically based on the budget law and the IMF staff economic analysis.
-
Gross government debt is defined as the total of liabilities that require payment of interest and/or principal at any time in the future. This includes debt securities, loans, insurances, special drawing rights, deposits, pensions and standardized guarantee schemes.
-
Net government debt is calculated as gross debt minus financial assets.
-
For each release date, the observation period of the value is the concurrent year’s estimate, which is based on the budget and the IMF’s economic analysis. For instance, for the October 2022 release, the observation period will be 2022.
-
Net debt calculations for Norway were revised by the IMF starting with the October 2017 publication, excluding the equity and shares from financial assets and including accounts receivable in the financial assets, following Government Finance Statistics and the Maastricht definition.
-
Net debt data are not available for China, India, Russia, Singapore and Thailand.
-
See also source data notes in Appendix 1 .
General government fiscal thrust #
Ticker : GGFTGDPRATIO_NSA
Label : Fiscal thrust, % of GDP: gross / net
Definition : General government fiscal thrust, current year versus previous, IMF estimate, as % of GDP.
Notes :
-
Fiscal thrust, also called fiscal impulse, measures the direct impact of fiscal policy on aggregate demand in the economy.
-
It is approximated by the negative of the difference between a country’s (expected or estimated) structural balance as % of GDP in the current years versus the previous year.
-
Since structural balances are adjusted for the impact of business cycles and terms-of-trade they are indicative of the stance of fiscal policy, i.e. the effect of discretionary fiscal measures on the economy. A positive value means that the structural balance shifts towards deficit and that policy is expansionary. A negative value means that the structural balance has shifts towards surplus and that policy is restrictive.
-
General government is defined as the total of central, state and local governments including the social security funds controlled by these units.
-
The observation period is always the current year. The values are estimates, typically based on the budget law and the IMF staff economic analysis.
-
See also source data notes in Appendix 1 .
Imports #
Only the standard Python data science packages and the specialized
macrosynergy
package are needed.
import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import math
import json
import yaml
import macrosynergy.management as msm
import macrosynergy.panel as msp
import macrosynergy.signal as mss
import macrosynergy.pnl as msn
from macrosynergy.download import JPMaQSDownload
from timeit import default_timer as timer
from datetime import timedelta, date, datetime
import warnings
warnings.simplefilter("ignore")
The
JPMaQS
indicators we consider are downloaded using the J.P. Morgan Dataquery API interface within the
macrosynergy
package. This is done by specifying
ticker strings
, formed by appending an indicator category code
<category>
to a currency area code
<cross_section>
. These constitute the main part of a full quantamental indicator ticker, taking the form
DB(JPMAQS,<cross_section>_<category>,<info>)
, where
<info>
denotes the time series of information for the given cross-section and category. The following types of information are available:
-
value
giving the latest available values for the indicator -
eop_lag
referring to days elapsed since the end of the observation period -
mop_lag
referring to the number of days elapsed since the mean observation period -
grade
denoting a grade of the observation, giving a metric of real time information quality.
After instantiating the
JPMaQSDownload
class within the
macrosynergy.download
module, one can use the
download(tickers,start_date,metrics)
method to easily download the necessary data, where
tickers
is an array of ticker strings,
start_date
is the first collection date to be considered and
metrics
is an array comprising the times series information to be downloaded.
# Cross-sections of interest
cids_dmca = [
"AUD",
"CAD",
"CHF",
"EUR",
"GBP",
"JPY",
"NOK",
"SEK",
"USD",
] # DM currency areas
cids_dmec = ["DEM", "ESP", "FRF", "ITL"] # DM euro area countries
cids_latm = ["COP", "CLP", "MXN", "PEN"] # Latam countries
cids_emea = ["ILS", "PLN", "RON", "RUB", "ZAR"] # EMEA countries
cids_emas = [
"CNY",
"IDR",
"INR",
"KRW",
"SGD",
"THB",
"TWD",
"NZD",
] # EM Asia countries
cids_dm = cids_dmca + cids_dmec
cids_em = cids_latm + cids_emea + cids_emas
cids = sorted(cids_dm + cids_em)
cids_fx = set(cids) - set(cids_dmec + ["EUR", "USD", "CNY"])
# Quantamental categories of interest
main = [
"GGOBGDPRATIO_NSA",
"GGPBGDPRATIO_NSA",
"GGSBGDPRATIO_NSA",
"GGRGDPRATIO_NSA",
"GGEGDPRATIO_NSA",
"GGFTGDPRATIO_NSA",
"GGDGDPRATIO_NSA",
"GGNDGDPRATIO_NSA",
]
econ = []
mark = ["EQXR_NSA", "EQXR_VT10", "DU05YXR_NSA", "DU05YXR_VT10"] # market links
xcats = main + econ + mark
# Download series from J.P. Morgan DataQuery by tickers
start_date = "1990-01-01"
tickers = [cid + "_" + xcat for cid in cids for xcat in xcats]
print(f"Maximum number of tickers is {len(tickers)}")
# Retrieve credentials
client_id: str = os.getenv("DQ_CLIENT_ID")
client_secret: str = os.getenv("DQ_CLIENT_SECRET")
# Download from DataQuery
with JPMaQSDownload(client_id=client_id, client_secret=client_secret) as downloader:
start = timer()
df = downloader.download(
tickers=tickers,
start_date=start_date,
metrics=["value", "eop_lag", "mop_lag", "grading"],
suppress_warning=True,
show_progress=True,
)
end = timer()
dfd = df
print("Download time from DQ: " + str(timedelta(seconds=end - start)))
Maximum number of tickers is 360
Downloading data from JPMaQS.
Timestamp UTC: 2023-09-07 10:57:55
Connection successful!
Number of expressions requested: 1440
Requesting data: 100%|█████████████████████████████████████████████████████████████████| 72/72 [00:22<00:00, 3.15it/s]
Downloading data: 100%|████████████████████████████████████████████████████████████████| 72/72 [00:54<00:00, 1.33it/s]
Download time from DQ: 0:01:52.828204
Availability #
cids_exp = cids # cids expected in category panels
msm.missing_in_df(dfd, xcats=main, cids=cids_exp)
Missing xcats across df: []
Missing cids for GGDGDPRATIO_NSA: []
Missing cids for GGEGDPRATIO_NSA: []
Missing cids for GGFTGDPRATIO_NSA: []
Missing cids for GGNDGDPRATIO_NSA: ['RUB', 'CNY', 'INR', 'THB', 'SGD']
Missing cids for GGOBGDPRATIO_NSA: []
Missing cids for GGPBGDPRATIO_NSA: ['TWD']
Missing cids for GGRGDPRATIO_NSA: []
Missing cids for GGSBGDPRATIO_NSA: []
Real-time data of general government balances go back to the 1990s for most developed markets and some emerging market categories. Roughly half of the vintages are actual originally published data, whilst the rest are estimated based on earliest available vintages. The IMF does not estimate net government debt for some EM countries.
For the explanation of currency symbols, which are related to currency areas or countries for which categories are available, please view Appendix 2 .
xcatx = main
cidx = cids_exp
dfx = msm.reduce_df(dfd, xcats=xcatx, cids=cidx)
dfs = msm.check_startyears(
dfx,
)
msm.visual_paneldates(dfs, size=(20, 3))
print("Last updated:", date.today())
Last updated: 2023-09-07
plot = msm.check_availability(
dfd, xcats=main, cids=cids_exp, start_size=(20, 2), start_years=False
)
Vintage grading has been mixed, with top grades mainly achieved for the time after 2000.
plot = msp.heatmap_grades(
dfd,
xcats=main,
cids=cids_exp,
size=(19, 4),
title=f"Average vintage grades from {start_date} onwards",
)
msp.view_ranges(
dfd,
xcats=main,
cids=cids_exp,
val="eop_lag",
title="End of observation period lags (ranges of time elapsed since end of observation period in days)",
start=start_date,
kind="box",
size=(16, 4),
)
msp.view_ranges(
dfd,
xcats=main,
cids=cids_exp,
val="mop_lag",
title="Median of observation period lags (ranges of time elapsed since end of observation period in days)",
start=start_date,
kind="box",
size=(16, 4),
)
History #
Overall and primary balance ratios #
Government balances have typically been in a range of +10% to -10% of GDP. Overall balances since 1992 have posted deficits of 1-5% of GDP for most countries. Primary balances averaged close to zero for many countries.
xcatx = ["GGOBGDPRATIO_NSA", "GGPBGDPRATIO_NSA"]
cidx = cids
msp.view_ranges(
dfd,
xcats=xcatx,
cids=cidx,
sort_cids_by="mean",
start="1991-01-01",
title="Means and standard deviations of general government balance ratios (% of GDP) since 1991",
xcat_labels=["Overall balance", "Primary balance"],
kind="bar",
size=(16, 8),
)
For many countries, government balances posted have pronounced cyclical swings, deteriorating after financial crises and recessions and recovering thereafter. This illustrates that fiscal policy had a tendency to smooth growth performance. Most conspicuously, all countries ran sizable deficits during the COVID-19 pandemic.
xcatx = ["GGOBGDPRATIO_NSA", "GGPBGDPRATIO_NSA"]
cidx = cids
msp.view_timelines(
dfd,
xcats=xcatx,
cids=cidx,
start="1991-01-01",
title="General government overall and primary balances, % of GDP",
title_adj=1.03,
title_fontsize=27,
legend_fontsize=17,
title_xadj=0.455,
label_adj=0.075,
xcat_labels=["Overall balance", "Primary balance"],
ncol=4,
same_y=True,
size=(16, 8),
aspect=1.7,
all_xticks=True,
)
Structural balance ratios #
For most countries, structural balances have fluctuated around the headline balance, depending largely on financial, economic and commodity cycles. Norway is a notable exception, whose large surplus has not been classified as structural according to IMF methodology.
xcatx = ["GGSBGDPRATIO_NSA", "GGOBGDPRATIO_NSA"]
cidx = cids
msp.view_timelines(
dfd,
xcats=xcatx,
cids=cidx,
start="1991-01-01",
title="General government structural (and ordinary) balances, % of GDP",
title_adj=1.02,
title_fontsize=27,
legend_fontsize=17,
title_xadj=0.47,
label_adj=0.075,
xcat_labels=["Structural", "Overall"],
ncol=4,
same_y=True,
size=(16, 8),
aspect=1.7,
all_xticks=True,
)
Revenue and expenditure ratios #
General government revenue and expenditure ratios have mostly averaged between 20% and 50% of GDP across countries.
xcatx = ["GGRGDPRATIO_NSA", "GGEGDPRATIO_NSA"]
cidx = cids
msp.view_ranges(
dfd,
xcats=xcatx,
cids=cidx,
sort_cids_by="mean",
start="1991-01-01",
title="Means and standard deviations of general government flows (as % of GDP) since 1991",
xcat_labels=["Revenues", "Expenditures"],
kind="bar",
size=(16, 8),
)
Secular trends in the size of the general government flows to GDP have been very different across countries.
During recessions and recoveries, revenues and expenditure ratios often shift in opposite directions, indicating a counter-cyclical fiscal stance, whether through active policy or automatic stabilizers.
xcatx = ["GGRGDPRATIO_NSA", "GGEGDPRATIO_NSA"]
cidx = cids
msp.view_timelines(
dfd,
xcats=xcatx,
cids=cidx,
start="1991-01-01",
title="General government revenues and expenditures (% of GDP)",
title_adj=1.03,
title_fontsize=27,
legend_fontsize=17,
title_xadj=0.455,
label_adj=0.075,
xcat_labels=["Revenues", "Expenditures"],
ncol=4,
same_y=False,
size=(16, 8),
aspect=1.7,
all_xticks=True,
)
General government debt ratios #
Gross government debt ratios have typically between 30% and 100% of GDP since the early 1990s. There have been two notable outliers. Japan’s debt statistics had exceeded 250% of GDP by the 2020s, whilst Norway’s substantial negative debt ratio is attributed to its sovereign wealth fund.
xcatx = ["GGDGDPRATIO_NSA", "GGNDGDPRATIO_NSA"]
cidx = cids
msp.view_ranges(
dfd,
xcats=xcatx,
cids=cidx,
sort_cids_by="mean",
start="1991-01-01",
kind="bar",
title="Means and standard deviations of general government debt (as % of GDP) since 1991",
xcat_labels=["Gross", "Net"],
size=(16, 8),
)
Long-term trends in government debt ratios have been quite diverse across countries in past decades. Most developed countries posted an upward drift, while many EM countries reduced debt ratios in the 2000s and early 2010s. Both the great financial crisis and the COVID-19 pandemic triggered notable increases in debt ratios.
Real-time measures of net debt ratios have displayed a greater proclivity to instability overtime, due typically to methodological adjustments. Few countries have achieved negative net debt ratios. Norway has been a notable example.
xcatx = ["GGDGDPRATIO_NSA", "GGNDGDPRATIO_NSA"]
msp.view_timelines(
dfd,
xcats=xcatx,
cids=cidx,
start="1991-01-01",
title="General government debt, % of GDP",
title_adj=1.03,
title_fontsize=27,
legend_fontsize=17,
title_xadj=0.465,
label_adj=0.075,
xcat_labels=["Gross", "Net"],
ncol=4,
same_y=False,
size=(16, 8),
aspect=1.7,
all_xticks=True,
)
Fiscal thrust #
Typical fiscal thrust has been contained in a range of +/- 1% of GDP for most countries and years, but has witnessed many outlier values. The COVID-19 pandemic coerced much greater temporary fiscal stimulus in many countries.
xcatx = ["GGFTGDPRATIO_NSA"]
cidx = cids
msp.view_ranges(
dfd,
xcats=xcatx,
cids=cidx,
sort_cids_by="mean",
start="1991-01-01",
kind="box",
title="Means and standard deviations of fiscal thrust (as % of GDP) since 1991",
size=(16, 8),
)
Fiscal thrust has been historically volatile, reflecting changes in fiscal policy as much as changes in economic conditions.
xcatx = ["GGFTGDPRATIO_NSA"]
cids = cidx
msp.view_timelines(
dfd,
xcats=xcatx,
cids=cidx,
start="1991-01-01",
title="General government fiscal thrust in current fiscal year, % of GDP",
title_adj=1.03,
title_fontsize=27,
title_xadj=0.5,
ncol=4,
same_y=True,
size=(16, 8),
aspect=1.7,
all_xticks=True,
)
Importance #
Research links #
“This paper re-examines the impact of fiscal deficits and public debt on long-term interest rates…for a panel of 31 advanced and emerging market economies…Higher deficits and public debt lead to a significant increase in long-term interest rates, with the precise magnitude dependent on initial fiscal, institutional and other structural conditions, as well as spillovers from global financial markets…Large fiscal deficits and public debts are likely to put substantial upward pressures on sovereign bond yields in many advanced economies over the medium term.” Kumar and Baldacci
“Fiscal impulse measures…indicate the changing impact of the budget on the economy. Such measures are intended to provide more accurate indications of whether the budget is becoming more or less expansionary than would just observing moments in the actual budget balance.” Chand
“It is always the joint behavior of monetary and fiscal policies that determine inflation and stabilize debt. While this point might seem obvious…it is easily missed in the classes of models and descriptions of policy typically employed in modern macroeconomic policy analyses…Expectations of fiscal policy are equally important to those of monetary policy in determining prices.” Leeper and Leith
Empirical clues #
There is evidence that stronger reported general government balances, in terms of lower deficits or higher surpluses have coincided with and entailed better fixed income returns since 2000 across developed and emerging countries. The relation holds across all types of government balances, but predictive power has been strongest for primary balances.
cidx = list(set(cids) - set(["PEN", "RON", "RUB"] + cids_dmec)) # tradable countries
cr = msp.CategoryRelations(
dfd,
xcats=["GGOBGDPRATIO_NSA", "DU05YXR_NSA"],
cids=cidx,
freq="A",
lag=0,
xcat_aggs=["mean", "sum"],
start="2000-01-01",
years=5,
)
cr.reg_scatter(
title="Government balances as % of GDP and concurrent duration returns, 5-year periods since 2000",
labels=True,
coef_box="lower right",
ylab="Cumulative local-currency 5-year IRS receiver return",
xlab="Average overall government balance as % of GDP",
)
Formally, reported general government balances have also been predictors of subsequent duration returns. However, that relation has not been stable across time and concentrated on the 2020s.
cidx = list(set(cids) - set(["PEN", "RON", "RUB"] + cids_dmec))
cr = msp.CategoryRelations(
dfd,
xcats=["GGOBGDPRATIO_NSA", "DU05YXR_VT10"],
cids=cidx,
freq="Q",
lag=1,
xcat_aggs=["last", "sum"],
start="2000-01-01",
years=None,
)
cr.reg_scatter(
title="Estimated government balances as % of GDP and subsequent duration returns since 2000",
labels=False,
separator=2020,
coef_box="upper left",
ylab="Next quarter local-currency 5-year IRS receiver return, for 10% vol target",
xlab="Reported overall government balance as % of GDP",
)
There is better evidence suggesting a negative correlation exists between average fiscal thrust and next quarters’ local currency 5-year duration returns. The relation has been subtle but relatively stable. Fiscal thrust indicators are meaningful mainly for developed markets.
cidx = list(set(cids_dm) - set(cids_dmec))
cr = msp.CategoryRelations(
dfd,
xcats=["GGFTGDPRATIO_NSA", "DU05YXR_VT10"],
cids=cidx,
freq="Q",
lag=1,
xcat_aggs=["last", "sum"],
start="2000-01-01",
years=None,
)
cr.reg_scatter(
title="Government fiscal thrust and subsequent quarterly duration returns in developed markets",
labels=True,
separator=2010,
coef_box="lower left",
ylab="Next quarter local-currency 5-year IRS receiver return, 10% vol target",
xlab="Estimated fiscal thrust as % of GDP",
)
Appendices #
Appendix 1: Source data notes #
IMF data is taken from two sources: the IMF Fiscal Monitor and the World Economic Outlook. The IMF publishes the Fiscal Monitor twice a year, usually in April and October. It also publishes the World Economic Outlook at least twice a year. It tends to be released a couple of days before the IMF Fiscal Monitor publication. The government finance data in the IMF Fiscal Monitor match that published in the World Economic Outlook.
Detailed notes are provided by the IMF on various terms used in the indicator definitions.
-
Primary balance: https://www.imf.org/external/np/fad/histdb
-
Structural balance: https://www.imf.org/external/np/fad/strfiscbal/index.htm
-
Revenues: https://www.imf.org/external/pubs/ft/gfs/manual/pdf/ch5.pdf
-
Expenditures: https://www.imf.org/-/media/Files/Publications/fiscal-monitor/2022/October/English/msa.ashx
The notes on government balance ratios (see primary balance and structural balance notes) apply to fiscal thrust.
Appendix 2: Currency symbols #
The word ‘cross-section’ refers to currencies, currency areas or economic areas. In alphabetical order, these are AUD (Australian dollar), BRL (Brazilian real), CAD (Canadian dollar), CHF (Swiss franc), CLP (Chilean peso), CNY (Chinese yuan renminbi), COP (Colombian peso), CZK (Czech Republic koruna), DEM (German mark), ESP (Spanish peseta), EUR (Euro), FRF (French franc), GBP (British pound), HKD (Hong Kong dollar), HUF (Hungarian forint), IDR (Indonesian rupiah), ITL (Italian lira), JPY (Japanese yen), KRW (Korean won), MXN (Mexican peso), MYR (Malaysian ringgit), NLG (Dutch guilder), NOK (Norwegian krone), NZD (New Zealand dollar), PEN (Peruvian sol), PHP (Phillipine peso), PLN (Polish zloty), RON (Romanian leu), RUB (Russian ruble), SEK (Swedish krona), SGD (Singaporean dollar), THB (Thai baht), TRY (Turkish lira), TWD (Taiwanese dollar), USD (U.S. dollar), ZAR (South African rand).