Sovereign Default: Eaton-Gersovitz / Arellano (2008) — Notes

Author

David Evans

Published

February 23, 2026

1 Introduction and Motivation

1.1 From Domestic to International

In the McCall search model, an unemployed worker decides whether to accept a wage offer. In Rust (1987), a superintendent decides when to replace a bus engine. In Kydland & Prescott (1982), a representative household saves and consumes in a macroeconomy buffeted by productivity shocks. All of these models share a common feature: they are set within a single domestic economy where contracts are enforceable by law.

This lecture goes international. We study a sovereign government that borrows from foreign creditors and each period decides whether to repay its debts or default. The key twist is that there is no international bankruptcy court—no judge can seize a country’s assets or force it to pay. This raises a fundamental question that has puzzled economists for centuries: why do countries ever repay their debts?

The model we study—due to Eaton & Gersovitz (1981) and made quantitative by Arellano (2008, American Economic Review) —answers this question with two mechanisms. First, a country that defaults is temporarily excluded from international credit markets: it cannot borrow or save abroad, losing the ability to smooth consumption over time. Second, default triggers a direct output cost: the country’s productive capacity falls, reducing the resources available for consumption. Together, these costs make the government willing to repay—most of the time. But when income is sufficiently low and debt is sufficiently high, the government finds the costs of repayment unbearable and chooses to default.

The model also explains why emerging-market countries face higher borrowing costs than advanced economies. Because international lenders anticipate the government’s temptation to default, they demand a risk premium that rises with the level of debt and falls with the country’s income. This generates an endogenous sovereign spread that varies over the business cycle—exactly the pattern we observe in the data.

ImportantThe Enforcement Puzzle

Within a country, debts are enforced by the legal system: if you fail to repay your mortgage, the bank can seize your house. Between countries, no such mechanism exists. The United Nations cannot foreclose on Argentina. The International Monetary Fund can offer advice and conditional lending, but it cannot compel repayment. Sovereign debt markets therefore rely on indirect enforcement: the threat of being cut off from future borrowing and suffering economic disruption. Understanding how these indirect costs sustain international lending is the central question of this literature.

1.2 Historical Episodes

Sovereign default is not a hypothetical scenario—it is a recurring feature of the global financial system. Some prominent episodes include:

  • Argentina (2001): After years of recession and an overvalued currency peg, Argentina defaulted on approximately $100 billion in sovereign debt, the largest default in history at that time. The economy contracted by over 10% in 2002, and the country was effectively shut out of international capital markets for over a decade. The restructuring process dragged on until 2016, with holdout creditors (“vulture funds”) pursuing legal action in U.S. courts.

  • Greece (2012): In the midst of the European debt crisis, Greece restructured approximately $265 billion of sovereign debt, the largest sovereign restructuring in history. Private bondholders accepted losses of over 50% on the face value of their holdings. The crisis triggered a severe recession, with Greek GDP falling by more than 25% from peak to trough, and unemployment exceeding 27%.

  • Russia (1998): Russia defaulted on its domestic debt and declared a moratorium on foreign debt payments, triggering a global financial crisis. The contagion spread to emerging markets worldwide and contributed to the collapse of Long-Term Capital Management (LTCM), a major hedge fund whose failure threatened the stability of the U.S. financial system.

  • Ecuador (2008, 2020): Ecuador is a “serial defaulter,” having defaulted multiple times since the 1980s. In 2008, President Rafael Correa declared certain debts “illegitimate” and refused to pay, a rare case of default driven by political choice rather than inability to pay.

  • Sri Lanka (2022): After a severe balance-of-payments crisis fueled by depleted foreign reserves and a collapse in tourism revenue, Sri Lanka suspended payments on its external debt—the country’s first sovereign default since independence in 1948.

These episodes share common patterns: default tends to occur during recessions, it is associated with sharp declines in consumption and output, and the recovery period is often long and painful. The Eaton-Gersovitz/Arellano model captures all of these features.

1.3 Why Sovereign Debt is Different

It is useful to contrast sovereign debt with corporate debt, because the differences illuminate why a specialized model is needed.

Feature Corporate Debt Sovereign Debt
Enforcement Bankruptcy court, asset seizure No international enforcement
Collateral Physical assets, receivables None (sovereign immunity)
Recovery rate 40–60% typical Highly variable (20–80%)
Exclusion Chapter 11 reorganization Loss of market access
Output cost Firm-specific disruption Economy-wide contraction

When a corporation defaults, creditors can file a claim in bankruptcy court and receive a share of the firm’s assets. When a sovereign defaults, creditors have essentially no legal recourse. The government’s assets are protected by sovereign immunity, and foreign courts generally cannot enforce judgments against a sovereign state. This absence of enforcement means that sovereign debt markets must rely entirely on the reputational and economic costs of default to sustain lending.

TipConnection to Previous Lectures

The sovereign default model builds on every computational tool we have developed:

  • Dynamic programming (McCall, Rust, KP): the government solves a Bellman equation each period
  • Markov chains (income process): the endowment follows a discretized AR(1)
  • Value function iteration (KP): we iterate on the Bellman equation until convergence
  • Equilibrium pricing (DMP): bond prices are determined by a zero-profit condition, just as wages in DMP are determined by Nash bargaining

The key new element is that prices depend on the agent’s future decisions, creating a fixed-point problem in both value functions and prices.

2 The Model

2.1 Environment

Consider a small open economy inhabited by a representative household and governed by a benevolent government. The economy receives a stochastic endowment \(y_t\) each period—there is no production, no capital, and no labor. The endowment can be thought of as the country’s GDP, driven by exogenous fluctuations in commodity prices, weather, global demand, or domestic productivity.

The endowment follows an AR(1) process in logs:

\[ \log y_{t+1} = \rho \, \log y_t + \sigma_\varepsilon \, \varepsilon_{t+1}, \qquad \varepsilon_{t+1} \sim N(0, 1) \]

The parameter \(\rho \in (0,1)\) controls the persistence of income shocks. With \(\rho = 0.945\) (Arellano’s calibration for Argentina), a 1% income shock today still predicts a \(0.945^4 \approx 0.80\%\) deviation four quarters later. This high persistence is crucial: it means that a bad income draw today signals continued low income in the near future, making default more tempting during recessions. The parameter \(\sigma_\varepsilon\) controls the volatility of income innovations.

The government maximizes the expected lifetime utility of the representative household:

\[ \mathbb{E}_0 \sum_{t=0}^{\infty} \beta^t \, u(c_t) \]

where \(u(c) = \frac{c^{1-\sigma}}{1-\sigma}\) is CRRA (constant relative risk aversion) utility. The parameter \(\sigma > 0\) governs risk aversion. When \(\sigma = 1\), CRRA reduces to \(\log(c)\). When \(\sigma = 2\) (Arellano’s calibration), the household is more risk-averse than log utility: it is particularly averse to low-consumption states and willing to pay a premium to avoid them. This risk aversion is what makes the government willing to borrow—it wants to smooth consumption across good and bad income realizations.

TipWhy CRRA?

With CRRA utility, the coefficient of relative risk aversion is constant at \(\sigma\) for all consumption levels. This means the household’s willingness to substitute consumption across time and states does not depend on its wealth level. The elasticity of intertemporal substitution is \(1/\sigma\): when \(\sigma = 2\), the household is willing to accept a 0.5% reduction in consumption growth to avoid a 1% increase in consumption volatility. This moderate but meaningful risk aversion drives the demand for consumption smoothing that motivates international borrowing.

2.2 The Government’s Instruments

The government has access to one-period discount bonds. Let \(b\) denote the government’s current bond holdings. The sign convention is:

  • \(b < 0\): the government is a net debtor (owes \(|b|\) to foreign creditors)
  • \(b > 0\): the government is a net creditor (holds \(b\) in foreign assets)
  • \(b = 0\): the government has no outstanding obligations

Each period, the government can issue new bonds \(b'\) at an endogenous price \(q(b', y)\) per unit of face value. If the government borrows (\(b' < 0\)), it receives \(q \cdot |b'|\) in revenue today and promises to repay \(|b'|\) tomorrow. The price \(q\) is set by competitive international lenders and depends on both the new debt level \(b'\) and the current income \(y\) (which predicts future income and hence future default risk).

ImportantOne-Period Bonds

We restrict attention to one-period bonds for tractability. In reality, sovereign debt has a maturity structure: some bonds mature in 3 months, others in 30 years. The one-period assumption means the government must “roll over” its entire debt stock each period—it cannot lock in favorable interest rates by issuing long-term debt. This amplifies the feedback between default risk and borrowing costs, making the model’s sovereign crises sharper than in reality. The extension to long-term debt is an important direction in the literature (discussed in Section 10).

2.3 The Repayment Decision

At the beginning of each period, the government observes the current income realization \(y\) and its outstanding debt \(b\), and makes a binary choice: repay or default.

2.3.1 Value of Repayment

If the government repays, it honors its obligations to creditors, maintains access to international credit markets, and chooses a new debt level \(b'\) optimally. The budget constraint under repayment is:

\[ c = y + b - q(b', y) \cdot b' \]

The interpretation is direct. The government has income \(y\) and net bond position \(b\) (if \(b < 0\), it must repay \(|b|\) to old creditors). It issues new bonds at price \(q(b', y)\), receiving revenue \(q(b', y) \cdot b'\) (if \(b' < 0\), the government borrows \(q \cdot |b'|\) from new creditors and promises to repay \(|b'|\) next period). Whatever is left after repaying old debts and receiving new loan proceeds is available for consumption.

The value of repayment is the maximum lifetime utility attainable from this point, optimizing over the new debt level:

\[ V^R(b, y) = \max_{b' \in \mathcal{B}} \left\{ u\bigl(y + b - q(b', y) \cdot b'\bigr) + \beta \, \mathbb{E}\left[V(b', y') \mid y\right] \right\} \]

where \(\mathcal{B} = [b_{\min}, b_{\max}]\) is the set of feasible debt levels and \(V(b', y')\) is the continuation value next period, which accounts for the future option to default. The expectation is over next period’s income \(y'\), conditional on current income \(y\) through the Markov transition probabilities.

Notice that the bond price \(q(b', y)\) appears inside the budget constraint. This means the “effective cost” of borrowing is endogenous: if the government borrows a lot (\(b'\) very negative), lenders anticipate high default risk and set a low \(q\), making the borrowing expensive. This is the source of the endogenous borrowing limit: at some point, the bond price falls so low that issuing more debt actually raises less revenue.

TipReading the Budget Constraint

Suppose the government has debt \(b = -0.2\) (owes 20% of mean income) and borrows \(b' = -0.25\). If the bond price is \(q = 0.95\), then:

\[ c = y + (-0.2) - 0.95 \times (-0.25) = y - 0.2 + 0.2375 = y + 0.0375 \]

The government repays 0.20 to old creditors, receives \(0.95 \times 0.25 = 0.2375\) from new creditors, and has a net transfer of 0.0375 from the debt market. It is rolling over its debt and borrowing slightly more.

2.3.2 Value of Default

If the government defaults, it refuses to pay its creditors. Default has two consequences:

  1. Exclusion from credit markets: The government cannot borrow or save internationally. It is in financial autarky—consumption must equal (reduced) income each period.

  2. Output cost: Income drops from \(y\) to \(h(y)\), where the output cost function is:

\[ h(y) = \min\{y, \; \hat{y}\} \]

This is Arellano’s (2008) asymmetric output cost. When income is below the threshold \(\hat{y}\), there is no additional cost—the country is already suffering, and default does not make things worse. When income is above \(\hat{y}\), the country loses the excess: effective income is capped at \(\hat{y}\). This means default is more costly in good times than in bad times, which is economically important. If the cost of default were the same regardless of income, the government would always want to default in good times (when debt repayment is a smaller share of a large income) and repay in bad times, which contradicts the data. The asymmetric cost reverses this incentive: the government is tempted to default in bad times (when income is low and repayment is burdensome) and willing to repay in good times (when the cost of default is high).

WarningWhy an Output Cost?

The output cost \(h(y)\) is admittedly a “reduced form”—it does not come from a microfounded model of how default disrupts the economy. Empirically, however, countries that default experience severe recessions: Argentina’s GDP fell 10.9% in 2002, Greece’s cumulative decline exceeded 25%. These output losses may reflect disruption to the domestic financial system (banks hold government bonds), loss of trade credit, reduced foreign direct investment, or political instability. The function \(h(y) = \min(y, \hat{y})\) is a parsimonious way to capture the empirical regularity that default is associated with output declines, particularly during good times.

Each period while in default, the government regains access to international credit markets with probability \(\lambda\). If it regains access, it re-enters with zero debt (\(b = 0\))—a fresh start. If it does not regain access, it remains in autarky for another period.

The value of default is:

\[ V^D(y) = u(h(y)) + \beta \, \mathbb{E}\left[\lambda \, V(0, y') + (1-\lambda) \, V^D(y') \mid y\right] \]

The first term is today’s utility from consuming \(h(y)\) (income with the output cost). The second term is the discounted expected value next period. With probability \(\lambda\), the government regains market access and enters next period with zero debt, so its value is \(V(0, y')\). With probability \(1 - \lambda\), it remains in autarky with value \(V^D(y')\). Notice that the value of default depends only on income \(y\), not on the debt level \(b\)—once the government defaults, its previous debt is wiped out.

2.3.3 The Government’s Choice

The government chooses whichever option yields higher lifetime utility:

\[ \boxed{V(b, y) = \max\left\{V^R(b, y), \; V^D(y)\right\}} \]

This is a discrete choice (repay or default), unlike the continuous savings decision within the repayment problem. The government defaults if and only if \(V^D(y) > V^R(b, y)\).

2.4 The Default Set and Default Probability

For each debt level \(b\), we can define the default set—the set of income realizations at which the government chooses to default:

\[ D(b) = \left\{ y : V^D(y) > V^R(b, y) \right\} \]

The default set has intuitive properties. As debt increases (\(b\) becomes more negative), the value of repayment \(V^R(b, y)\) falls (because more resources must be devoted to debt service), so the default set expands: more income realizations trigger default. Conversely, as income rises, the value of repayment increases (the government can afford to pay), so the default set shrinks at the high end. This means default is concentrated in the lower-left region of the \((b, y)\) state space: high debt and low income.

The default probability as perceived by lenders is:

\[ \delta(b', y) = \sum_{y' \in D(b')} \Pr(y' \mid y) = \sum_{j=1}^{N_y} P_{ij} \cdot \mathbf{1}\left[V^D(y_j) > V^R(b', y_j)\right] \]

This is the probability that the government will default next period, given that it enters next period with debt \(b'\) and current income is \(y\). The conditioning on current income \(y\) matters because income is persistent: low income today predicts low income tomorrow, which predicts higher default risk.

3 International Lenders

3.1 Risk-Neutral Competitive Lenders

International lenders are risk-neutral and operate in a competitive market with free entry. They can invest in a risk-free asset yielding a gross return of \(1 + r\) per period, or they can lend to the sovereign government. Competition and risk neutrality imply that lenders earn zero expected profits: the expected return on sovereign bonds must equal the risk-free rate.

Consider a lender who purchases a bond with face value 1 at price \(q\). Next period, if the government repays, the lender receives 1; if the government defaults, the lender receives 0 (we assume zero recovery for simplicity). The lender’s expected profit is:

\[ \text{Expected profit} = (1 - \delta) \cdot 1 + \delta \cdot 0 - q(1 + r) \]

where \(\delta = \delta(b', y)\) is the probability of default. Setting expected profit to zero and solving for \(q\):

\[ \boxed{q(b', y) = \frac{1 - \delta(b', y)}{1 + r}} \]

This is the zero-profit bond pricing equation. It has clean limiting cases:

  • If default is impossible (\(\delta = 0\)): \(q = 1/(1+r)\), the risk-free bond price. The government borrows at the world interest rate.
  • If default is certain (\(\delta = 1\)): \(q = 0\). No lender will purchase the bond—the government is completely shut out of credit markets.
  • For intermediate cases: \(q\) is a declining function of default risk. Higher default probability means lower bond prices, which means the government must promise to repay more to raise the same amount of revenue.
ImportantThe Sovereign Spread

The sovereign spread is the interest rate premium the government pays over the risk-free rate:

\[ \text{spread}(b', y) = \frac{1}{q(b', y)} - (1 + r) = \frac{\delta(b', y)}{1 - \delta(b', y)} \cdot (1 + r) \]

The spread is zero when default risk is zero and rises without bound as default risk approaches 1. This is the model’s counterpart to the EMBI (Emerging Market Bond Index) spreads that financial markets track closely for countries like Argentina, Brazil, and Turkey.

3.2 The Feedback Loop

The bond pricing equation creates a powerful feedback loop between default risk and borrowing costs:

  1. The government faces a bad income shock and wants to borrow more to smooth consumption.
  2. Higher borrowing increases default risk, so lenders demand a lower bond price (higher spread).
  3. The lower bond price means the government raises less revenue per unit of debt issued, so it must borrow even more to achieve the same consumption.
  4. The additional borrowing further increases default risk, pushing bond prices down further.
  5. At some point, this spiral reaches a tipping point where the government cannot borrow at all—or chooses to default.

This feedback mechanism generates the sudden stops and debt crises observed in emerging-market economies: a country that was borrowing comfortably can find itself unable to refinance its debt within a few quarters, as rising spreads and falling income interact in a vicious cycle.

WarningThe Laffer Curve for Debt

The revenue the government raises from issuing debt is \(q(b', y) \cdot |b'|\)—the bond price times the face value. Because \(q\) falls as \(|b'|\) rises, revenue is a hump-shaped function of face value, reminiscent of the Laffer curve in taxation. Beyond a certain debt level, issuing more bonds actually reduces revenue because the price drop more than offsets the increase in quantity. This means there is an endogenous maximum borrowing level—the government simply cannot raise more revenue by issuing more debt. This is the model’s endogenous credit constraint.

4 Recursive Equilibrium

4.1 Definition

We are now ready to define the equilibrium of the model. The challenge is that the bond price \(q(b', y)\) depends on the government’s future default decisions, which in turn depend on future bond prices. The equilibrium requires these two objects to be mutually consistent.

ImportantDefinition: Recursive Equilibrium

A recursive equilibrium consists of:

  1. Value functions: \(V(b, y)\), \(V^R(b, y)\), and \(V^D(y)\)
  2. Policy functions: \(b'(b, y)\) (optimal borrowing under repayment) and \(d(b, y) \in \{0, 1\}\) (default decision, where \(d = 1\) means default)
  3. Bond price function: \(q(b', y)\)

such that:

  1. Government optimizes: Given the bond price schedule \(q(\cdot, \cdot)\), the value functions satisfy the Bellman equations and the policy functions are the associated optimizers.

  2. Lenders break even: Given the government’s default policy \(d(\cdot, \cdot)\), the bond price satisfies the zero-profit condition \(q(b', y) = [1 - \delta(b', y)] / (1 + r)\).

  3. Consistency: The default probability \(\delta(b', y)\) used in the bond pricing equation is consistent with the government’s optimal default policy.

The recursive equilibrium is a fixed point in two objects: the value functions and the bond price schedule. This is the key computational challenge of the model and the main difference from the RBC model we solved in the Kydland-Prescott lecture. In KP, we only needed to iterate on the value function—the First Welfare Theorem guaranteed that competitive prices could be recovered afterward. Here, there is no welfare theorem (the government can default, breaking the completeness of markets), so we must iterate on both the value function and the price function simultaneously.

4.2 Comparison with Previous Models

The following table summarizes how the sovereign default model relates to the other models we have studied:

McCall Rust KP Sovereign Default
State Wage offer Mileage Capital \(\times\) TFP Debt \(\times\) Income
Choice Accept/Reject Replace/Keep Savings (continuous) Repay/Default + Borrowing
State space Finite Finite Continuous \(\times\) Finite Finite \(\times\) Finite
Prices Exogenous Factor prices (backed out) Bond price \(q(b', y)\) (endogenous)
Equilibrium concept Partial equilibrium Single agent First Welfare Theorem Fixed point in \(V\) and \(q\)
Iteration VFI only VFI + MLE VFI only VFI + Bond price iteration

The sovereign default model combines a discrete choice (repay vs. default, like McCall’s accept/reject) with a continuous choice (how much to borrow, like KP’s savings decision) and an endogenous price (the bond price, which depends on the government’s equilibrium behavior). This makes it computationally richer than any of the previous models, but the fundamental algorithm—value function iteration—remains the same.

TipState Space: Discrete vs. Continuous

Unlike the KP model, where capital was continuous and required interpolation, the sovereign default model uses a discrete grid for both debt \(b\) and income \(y\). This means we can represent the value function as a matrix \(V[i_b, i_y]\) and search over the bond grid directly, without needing interpolation or continuous optimization. The tradeoff is that we need a fine enough grid to capture the shape of the value function and the precise location of the default boundary.

5 Calibration

5.1 Arellano (2008) Calibration

Arellano (2008) calibrates the model to Argentina over the period 1983–2001, a period of recurring sovereign debt crises. The calibration follows the same logic as the KP calibration: parameters are chosen to match specific moments or stylized facts in the data, and then the model is evaluated on its ability to reproduce additional untargeted moments.

The full set of parameters is:

Parameter Value Target / Source
\(\beta\) 0.953 Matches default frequency of 2.78% per quarter
\(\sigma\) 2.0 Standard value in international macro literature
\(r\) 0.017 U.S. quarterly real interest rate
\(\rho\) 0.945 Estimated from Argentine GDP (quarterly, HP-filtered)
\(\sigma_\varepsilon\) 0.025 Estimated from Argentine GDP innovations
\(\lambda\) 0.282 Average exclusion duration of 3.5 quarters (\(1/\lambda \approx 3.55\))
\(\hat{y}\) 0.969 \(\times\) mean \(y\) Targets asymmetric output cost, calibrated to match spread volatility

Let us discuss the economic logic behind each choice:

Discount factor (\(\beta = 0.953\)): The discount factor is set to match Argentina’s average default frequency of about 2.78% per quarter (one default roughly every 9 years). A lower \(\beta\) makes the government more impatient, which increases the temptation to default—forgoing future borrowing access is less costly if the future is heavily discounted. The calibrated value is somewhat lower than the typical \(\beta = 0.96\) used in domestic macro models, reflecting the view that emerging-market governments discount the future more heavily due to political instability, shorter political horizons, or other institutional factors.

Risk aversion (\(\sigma = 2.0\)): This is a standard value widely used in the international macro literature. With \(\sigma = 2\), the elasticity of intertemporal substitution is \(1/\sigma = 0.5\), meaning the household is moderately averse to consumption fluctuations. Higher risk aversion increases the demand for consumption smoothing, which increases the demand for borrowing, which in turn affects default incentives.

Risk-free rate (\(r = 0.017\)): This corresponds to the quarterly real yield on U.S. Treasury bills during the sample period, approximately 7% per year (\(1.017^4 - 1 \approx 0.070\)). This is the opportunity cost of lending to the sovereign: if the expected return on sovereign bonds falls below this rate, lenders shift their funds to U.S. Treasuries instead.

Income persistence (\(\rho = 0.945\)): Estimated by regressing (HP-filtered) log GDP on its own lag using quarterly Argentine data. The high persistence means that income fluctuations are long-lasting: a recession today predicts continued low income for many quarters, making the government’s debt burden increasingly onerous and default increasingly tempting.

Income volatility (\(\sigma_\varepsilon = 0.025\)): The standard deviation of innovations to the AR(1) process, estimated from the same Argentine GDP data. This is larger than the \(\sigma_\varepsilon \approx 0.02\) typically used for U.S. data, reflecting the fact that emerging-market economies are more volatile.

Re-entry probability (\(\lambda = 0.282\)): After defaulting, the government regains access to international credit markets with probability 0.282 per quarter, implying an average exclusion period of \(1/\lambda \approx 3.5\) quarters. This is consistent with the empirical evidence in Gelos, Sahay, and Sandleris (2011), who find that countries typically regain partial market access within one to two years of default.

Output ceiling (\(\hat{y} = 0.969 \times \text{mean } y\)): The output cost parameter is set so that default triggers a loss of about 3% of mean output when income is at its average level. The specific value is chosen to match the volatility of Argentine sovereign spreads. A higher \(\hat{y}\) means a more severe output cost (especially in good times), which discourages default and compresses spreads; a lower \(\hat{y}\) means a milder cost, which encourages default and widens spreads.

TipThe Calibration Strategy
  1. \(r\), \(\sigma\): Set from external sources (U.S. interest rates, macro literature)
  2. \(\rho\), \(\sigma_\varepsilon\): Estimated directly from Argentine GDP data
  3. \(\beta\), \(\lambda\), \(\hat{y}\): Calibrated jointly to match Argentine default frequency, average exclusion duration, and spread volatility
  4. Evaluation: Does the model reproduce untargeted moments (mean spread, correlation of spreads with output, consumption volatility relative to output volatility)?

6 Computational Approach

6.1 Overview

Solving the sovereign default model requires finding a fixed point in two objects: the government’s value functions \(V\), \(V^R\), \(V^D\) and the bond price schedule \(q\). The algorithm alternates between two steps:

  1. Bellman update: Given the current bond price schedule \(q\), update the government’s value functions and policy functions by solving the Bellman equations.
  2. Bond price update: Given the government’s updated default policy, recompute the bond price schedule \(q\) from the zero-profit condition.

We repeat these two steps until both the value functions and bond prices converge. This is an outer loop iterating on the fixed point, with an inner loop (the Bellman operator) solving the government’s optimization at each state.

ImportantTwo Nested Fixed Points

In the KP model, we iterated only on the value function \(V\)—prices were pinned down by the First Welfare Theorem. Here, we must iterate on both \(V\) and \(q\) simultaneously. The bond price depends on future default decisions (which come from \(V\)), and the value function depends on current bond prices (which come from \(q\)). Neither can be solved independently.

6.2 Loading Packages

using Plots
using LinearAlgebra
using Statistics
using Distributions
using Random
using DataFrames

6.3 Rouwenhorst Discretization

We reuse the Rouwenhorst method from the KP lecture to discretize the income process. The function takes the number of grid points \(N\), persistence \(\rho\), and innovation standard deviation \(\sigma_\varepsilon\), and returns a grid of log-income values and a transition matrix. Recall that Rouwenhorst is preferred over Tauchen for highly persistent processes because it captures the persistence of the underlying AR(1) exactly for any grid size.

function rouwenhorst(N, ρ, σ_ε)
    σ_z = σ_ε / sqrt(1 - ρ^2)
    p = (1 + ρ) / 2
    P = [p 1-p; 1-p p]
    for n in 3:N
        z = zeros(n - 1)
        P = p     * [P z; z' 0] + (1-p) * [z P; 0 z'] +
            (1-p) * [z' 0; P z] + p     * [0 z'; z P]
        P[2:end-1, :] ./= 2
    end
    z_grid = collect(LinRange(-sqrt(N-1) * σ_z,
                               sqrt(N-1) * σ_z, N))
    return z_grid, P
end
rouwenhorst (generic function with 1 method)

Let us test it with Arellano’s parameters:

log_y_test, P_y_test = rouwenhorst(21, 0.945, 0.025)
y_grid_test = exp.(log_y_test)
println("Income range: [$(round(minimum(y_grid_test), digits=3)), $(round(maximum(y_grid_test), digits=3))]")
println("Mean income: $(round(mean(y_grid_test), digits=4))")
Income range: [0.71, 1.408]
Mean income: 1.0216

The income grid spans from about 0.83 to about 1.21, centered near 1.0. This range of roughly \(\pm 20\%\) around the mean captures the full extent of Argentine business cycle fluctuations.

6.4 The SovDefaultModel Struct

Following the pattern established in the KP lecture, we bundle all model parameters and computed objects into a @kwdef mutable struct. The @kwdef macro lets us set default values and construct instances with keyword arguments, while mutable lets us fill in the computed grids after creation.

@kwdef mutable struct SovDefaultModel
    # Economic parameters
    β::Float64 = 0.953                        # discount factor
    σ::Float64 = 2.0                          # risk aversion (CRRA)
    r::Float64 = 0.017                        # risk-free interest rate
    ρ::Float64 = 0.945                        # income persistence
    σ_ε::Float64 = 0.025                      # income innovation std dev
    λ::Float64 = 0.282                        # re-entry probability
    ŷ::Float64 = 0.969                        # default output ceiling

    # Grid sizes
    N_y::Int = 21                             # number of income states
    N_b::Int = 251                            # number of bond grid points
    b_min::Float64 = -0.4                     # minimum bond holdings (max debt)
    b_max::Float64 = 0.4                      # maximum bond holdings (max savings)

    # Computed objects (filled by setup!)
    y_grid::Vector{Float64} = Float64[]       # income grid (levels)
    P_y::Matrix{Float64} = zeros(0, 0)        # income transition matrix
    b_grid::Vector{Float64} = Float64[]       # bond grid
end
SovDefaultModel

The struct separates two kinds of data. The economic parameters (\(\beta\), \(\sigma\), \(r\), \(\rho\), \(\sigma_\varepsilon\), \(\lambda\), \(\hat{y}\)) have defaults matching Arellano (2008). The grid parameters (\(N_y\), \(N_b\), \(b_{\min}\), \(b_{\max}\)) control the resolution of the numerical solution. The computed objects (grids and transition matrix) start empty and are filled by setup!.

The bond grid ranges from \(b_{\min} = -0.4\) (maximum debt, equal to 40% of mean income) to \(b_{\max} = 0.4\) (maximum savings). With 251 grid points, the spacing is approximately 0.0032, which provides fine resolution for capturing the shape of the bond price schedule and the exact location of the default boundary.

6.5 The setup! Function

The setup! function discretizes the income process and constructs the bond grid:

function setup!(m::SovDefaultModel)
    (; ρ, σ_ε, N_y, N_b, b_min, b_max) = m

    # Discretize income process
    log_y, P = rouwenhorst(N_y, ρ, σ_ε)
    m.y_grid = exp.(log_y)
    m.P_y = P

    # Construct bond grid
    m.b_grid = collect(LinRange(b_min, b_max, N_b))

    return m
end
setup! (generic function with 1 method)

The ! suffix signals that the function mutates its argument, following Julia convention. The destructuring (; ρ, σ_ε, ...) = m extracts struct fields into local variables for readability.

m = setup!(SovDefaultModel())
println("Income grid: $(round.(m.y_grid[[1, 6, 11, 16, 21]], digits=3))")
println("Bond grid: [$(round(m.b_grid[1], digits=3)), ..., $(round(m.b_grid[end], digits=3))]")
println("Number of states: $(m.N_b) × $(m.N_y) = $(m.N_b * m.N_y)")
Income grid: [0.71, 0.843, 1.0, 1.186, 1.408]
Bond grid: [-0.4, ..., 0.4]
Number of states: 251 × 21 = 5271

The state space has \(251 \times 21 = 5{,}271\) points—large enough for accurate results but small enough to solve in reasonable time.

6.6 CRRA Utility

The CRRA utility function requires careful handling of edge cases. When \(\sigma = 1\), CRRA reduces to log utility (by L’Hopital’s rule). When consumption is non-positive, the function returns a large negative number to signal that the allocation is infeasible:

function u(c, σ)
    c <= 0 && return -1e14
    σ == 1.0 && return log(c)
    return c^(1 - σ) / (1 - σ)
end
u (generic function with 1 method)

With \(\sigma = 2\), the utility function \(u(c) = c^{-1}/(-1) = -1/c\) is negative for all positive \(c\) and approaches zero from below as \(c \to \infty\). This is fine—only differences in utility matter for decisions, not the level.

6.7 The Default Output Cost

Arellano’s asymmetric cost function caps income at \(\hat{y}\) during default:

h(y, ŷ) = min(y, ŷ)
h (generic function with 1 method)

Let us visualize the cost:

y_fine = LinRange(0.7, 1.3, 200)
plot(y_fine, y_fine, linewidth=2, linestyle=:dash, label="y (no default)",
     legend=:topleft, size=(700, 400))
plot!(y_fine, h.(y_fine, m.ŷ), linewidth=2, label="h(y) (under default)",
      color=:red)
xlabel!("Income y")
ylabel!("Effective Income")
title!("Default Output Cost: h(y) = min(y, ŷ)")
vline!([m.ŷ], color=:gray, linestyle=:dot, label="ŷ = $(m.ŷ)")

The key feature is the asymmetry. Below \(\hat{y}\), the two lines coincide—default imposes no additional cost when income is already low. Above \(\hat{y}\), the default line is flat—the country loses all income above the threshold. This means default is costlier when times are good, which is essential for generating the empirical pattern that default occurs during recessions rather than booms.

6.8 The Bellman Operator

The Bellman operator is the core computational routine. Given the current value functions \((V, V^R, V^D)\) and bond price schedule \(q\), it computes the updated value functions and policy functions. The operator performs three steps:

  1. Value of default: For each income state \(y_j\), compute \(V^D(y_j)\).
  2. Value of repayment: For each state \((b_i, y_j)\), search over all possible debt levels \(b'\) to find the one that maximizes the repayment value.
  3. Overall value: Take the maximum of repayment and default at each state.
function bellman_operator(m, V, VR, VD, q)
    (; β, σ, r, λ, ŷ, N_y, N_b, y_grid, P_y, b_grid) = m

    VR_new = similar(VR)
    VD_new = similar(VD)
    bp_policy = zeros(Int, N_b, N_y)

    # Find the index of zero debt (or closest to zero)
    i_zero = findfirst(b_grid .>= 0.0)

    # ── Step 1: Value of default for each income state ──
    for iy in 1:N_y
        y = y_grid[iy]
        c_def = h(y, ŷ)
        # Expected continuation: re-enter with prob λ (at zero debt), stay in autarky otherwise
        EV_def = 0.0
        for iy2 in 1:N_y
            EV_def += P_y[iy, iy2] ** V[i_zero, iy2] + (1 - λ) * VD[iy2])
        end
        VD_new[iy] = u(c_def, σ) + β * EV_def
    end

    # ── Step 2: Value of repayment for each (b, y) state ──
    for iy in 1:N_y
        y = y_grid[iy]
        for ib in 1:N_b
            b = b_grid[ib]
            best_val = -Inf
            best_ibp = 1
            for ibp in 1:N_b
                bp = b_grid[ibp]
                c = y + b - q[ibp, iy] * bp
                if c <= 0
                    continue    # skip infeasible choices
                end
                EV = 0.0
                for iy2 in 1:N_y
                    EV += P_y[iy, iy2] * V[ibp, iy2]
                end
                val = u(c, σ) + β * EV
                if val > best_val
                    best_val = val
                    best_ibp = ibp
                end
            end
            VR_new[ib, iy] = best_val
            bp_policy[ib, iy] = best_ibp
        end
    end

    return VR_new, VD_new, bp_policy
end
bellman_operator (generic function with 1 method)

Let us walk through the key elements:

Default value (Step 1): For each income state \(y_j\), the government in default consumes \(h(y_j, \hat{y})\). Its expected continuation combines two scenarios: with probability \(\lambda\) it regains market access (entering next period at \(V(0, y')\)), and with probability \(1 - \lambda\) it remains in autarky (value \(V^D(y')\)). The expectation sums over all possible next-period income states, weighted by transition probabilities.

Repayment value (Step 2): For each \((b_i, y_j)\), we search over all \(N_b\) possible debt levels \(b'\) on the grid. For each candidate \(b'\), we compute consumption \(c = y + b - q(b', y) \cdot b'\), check feasibility (\(c > 0\)), compute the expected continuation value \(\sum_{j'} P_{jj'} V(b', y_{j'})\), and evaluate current utility plus discounted continuation. We keep track of the \(b'\) that yields the highest value. The continue statement skips infeasible choices where consumption would be negative or zero.

Note that the search over \(b'\) is a grid search: we evaluate all \(N_b\) candidate debt levels and pick the best one. This is simpler than the continuous optimization used in the KP model (which required interpolation and Brent’s method) because both the debt and income grids are discrete. The cost is that the optimal debt choice is restricted to lie on the grid, introducing a small approximation error that shrinks as the grid becomes finer.

6.9 The Bond Price Update

Given the government’s value functions, we compute the default probability for each \((b', y)\) pair and use the zero-profit condition to update the bond price:

function update_bond_price(m, VR, VD)
    (; r, N_y, N_b, P_y) = m
    q_new = zeros(N_b, N_y)
    for iy in 1:N_y
        for ibp in 1:N_b
            # Default probability: probability that government defaults next period
            # given new debt b' and current income y
            δ = 0.0
            for iy2 in 1:N_y
                if VD[iy2] > VR[ibp, iy2]
                    δ += P_y[iy, iy2]
                end
            end
            q_new[ibp, iy] = (1 - δ) / (1 + r)
        end
    end
    return q_new
end
update_bond_price (generic function with 1 method)

The inner loop checks whether the government would default at each future income state \(y'\), given that it enters next period with debt level \(b'\). If \(V^D(y') > V^R(b', y')\), the government defaults at that state, and the lender loses the entire face value. The default probability \(\delta\) sums the transition probabilities over all future income states where default occurs. The bond price is then \((1 - \delta)/(1 + r)\).

TipWhy Does \(q\) Depend on Current \(y\)?

The bond price \(q(b', y)\) depends on current income \(y\) even though default happens next period. This is because income is persistent: current \(y\) predicts the distribution of \(y'\) through the transition matrix \(P_y\). If current income is low, next period’s income is likely to be low as well, making default more probable and the bond price lower. This generates the procyclical pattern of bond prices (and countercyclical spreads) observed in the data.

6.10 The Full Solver

The solveSovDefault function combines the Bellman operator and bond price update into a convergence loop. At each iteration, it:

  1. Updates value functions given current bond prices (Bellman step)
  2. Updates bond prices given the new default policy (pricing step)
  3. Checks whether both the value function and bond prices have converged
function solveSovDefault(m; tol=1e-6, maxiter=500, verbose=true)
    (; N_b, N_y, r, b_grid) = m

    # Initialize value functions and bond prices
    VR = zeros(N_b, N_y)
    VD = zeros(N_y)
    V  = zeros(N_b, N_y)
    q  = fill(1 / (1 + r), N_b, N_y)            # initial guess: risk-free price
    bp_policy = ones(Int, N_b, N_y)

    for iter in 1:maxiter
        # Step 1: Bellman update (given q, update V, VR, VD)
        VR_new, VD_new, bp_policy = bellman_operator(m, V, VR, VD, q)
        V_new = [max(VR_new[ib, iy], VD_new[iy]) for ib in 1:N_b, iy in 1:N_y]

        # Step 2: Bond price update (given new default policy, update q)
        q_new = update_bond_price(m, VR_new, VD_new)

        # Step 3: Check convergence
        dist_V = maximum(abs.(V_new - V))
        dist_q = maximum(abs.(q_new - q))
        if max(dist_V, dist_q) < tol
            verbose && println("Converged in $iter iterations " *
                "(V: $(round(dist_V, sigdigits=3)), q: $(round(dist_q, sigdigits=3)))")
            VR = VR_new; VD = VD_new; V = V_new; q = q_new
            break
        end

        # Update for next iteration
        VR = VR_new; VD = VD_new; V = V_new; q = q_new

        if verbose && iter % 25 == 0
            println("  iter $iter: dist_V = $(round(dist_V, sigdigits=3)), " *
                    "dist_q = $(round(dist_q, sigdigits=3))")
        end
    end

    # Construct the default flag matrix
    default_flag = [VD[iy] > VR[ib, iy] for ib in 1:N_b, iy in 1:N_y]

    return (V=V, VR=VR, VD=VD, q=q, bp=bp_policy, default=default_flag)
end
solveSovDefault (generic function with 1 method)

Several implementation details are worth noting:

Initial guess: We initialize the bond price at the risk-free level \(q = 1/(1+r)\) for all states. This is optimistic—it assumes zero default risk everywhere—but the iteration corrects this quickly. Starting from the risk-free price is a natural choice because it is the upper bound on bond prices and provides a well-defined starting point.

Convergence criterion: We check both the value function distance \(\|V^{n+1} - V^n\|_\infty\) and the bond price distance \(\|q^{n+1} - q^n\|_\infty\). The algorithm converges only when both have stabilized. This is important because the value function can appear to have converged while the bond price is still adjusting, or vice versa.

Return value: The function returns a named tuple containing all solution objects: value functions (\(V\), \(V^R\), \(V^D\)), bond prices (\(q\)), the borrowing policy (\(bp\), stored as grid indices), and the default flag (a Boolean matrix indicating which states trigger default).

Let us solve the model:

m = setup!(SovDefaultModel())
sol = solveSovDefault(m)
  iter 25: dist_V = 0.356, dist_q = 0.0
  iter 50: dist_V = 0.0991, dist_q = 0.0
  iter 75: dist_V = 0.0292, dist_q = 0.0
  iter 100: dist_V = 0.00873, dist_q = 0.0
  iter 125: dist_V = 0.00262, dist_q = 0.0
  iter 150: dist_V = 0.000785, dist_q = 0.0
  iter 175: dist_V = 0.000236, dist_q = 0.0
  iter 200: dist_V = 7.08e-5, dist_q = 0.0
  iter 225: dist_V = 2.12e-5, dist_q = 0.0
  iter 250: dist_V = 6.37e-6, dist_q = 0.0
  iter 275: dist_V = 1.91e-6, dist_q = 0.0
Converged in 289 iterations (V: 9.75e-7, q: 0.0)
(V = [-25.188875112906807 -24.75965817399573 … -18.716070717368126 -18.42724081191063; -25.188875112906807 -24.75965817399573 … -18.714278031080823 -18.425555040779088; … ; -24.554420209035126 -24.161960145174078 … -18.296119535233107 -18.029133208088304; -24.549900271080865 -24.157682194456942 … -18.294520633942597 -18.02760934575481], VR = [-27.00223273682232 -26.382847903018508 … -18.716070717368126 -18.42724081191063; -26.969372859174594 -26.35463254377089 … -18.714278031080823 -18.425555040779088; … ; -24.554420209035126 -24.161960145174078 … -18.296119535233107 -18.029133208088304; -24.549900271080865 -24.157682194456942 … -18.294520633942597 -18.02760934575481], VD = [-25.188875112906807, -24.75965817399573, -24.340377984268883, -23.930798792264163, -23.53072891190094, -23.140074744140705, -22.758982684408895, -22.388232096531546, -22.030369423579483, -21.69255959500647  …  -21.166016797590352, -20.921654747952026, -20.683643829129874, -20.451140612356678, -20.22371706861123, -20.001093414627956, -19.783062398358428, -19.569443600693283, -19.360062407044722, -19.154744107721907], q = [2.1833294486237101e-16 7.423320125320614e-15 … 0.983283740491857 0.9832841390045448; 2.1833294486237101e-16 7.423320125320614e-15 … 0.983283740491857 0.9832841390045448; … ; 0.9832841691248771 0.9832841691248771 … 0.9832841691248771 0.9832841691248771; 0.9832841691248771 0.9832841691248771 … 0.9832841691248771 0.9832841691248771], bp = [126 126 … 7 8; 126 126 … 8 9; … ; 211 211 … 235 239; 211 212 … 236 240], default = Bool[1 1 … 0 0; 1 1 … 0 0; … ; 0 0 … 0 0; 0 0 … 0 0])
TipComputation Time

The solver takes longer than the KP model for two reasons. First, we iterate on both value functions and bond prices, requiring convergence in two dimensions. Second, each Bellman iteration involves a triple loop: over income states (\(N_y\)), debt states (\(N_b\)), and candidate debt levels (\(N_b\)), giving a per-iteration cost of \(O(N_b^2 \times N_y^2)\). With \(N_b = 251\) and \(N_y = 21\), that is roughly 28 million operations per iteration. More efficient implementations use monotonicity of the policy function to reduce the search, but the brute-force approach is clearest for understanding the algorithm.

7 Results

With the model solved, we can examine the value functions, default region, bond price schedule, sovereign spreads, and borrowing policy. These objects fully characterize the equilibrium and reveal the economic forces at work.

7.1 Value Functions

plot(legend=:topleft, size=(700, 400))
for iy in [1, 6, 11, 16, 21]
    plot!(m.b_grid, sol.V[:, iy], linewidth=2,
          label="y = $(round(m.y_grid[iy], digits=3))")
end
xlabel!("Bond Holdings b (negative = debt)")
ylabel!("V(b, y)")
title!("Value Function V(b, y)")
vline!([0.0], color=:gray, linestyle=:dash, label="")

The value function \(V(b, y)\) is increasing in both arguments. Higher income \(y\) shifts the value function upward: more resources are available for consumption at every debt level. Higher bond holdings \(b\) (less debt) also increase the value: the government has fewer obligations and more financial flexibility.

The value function is concave in \(b\), reflecting diminishing marginal value of additional savings. When the government has a lot of debt (far left of the graph), an extra unit of savings is extremely valuable because it reduces the burden of debt service and the risk of default. When the government already has ample savings (far right), the marginal value of additional savings is small.

Notice the kink in the value function at certain debt levels. This kink corresponds to the default threshold: for debt levels to the left of the kink, the government defaults and the value function is flat (equal to \(V^D(y)\), which does not depend on \(b\)). For debt levels to the right of the kink, the government repays and the value function increases with \(b\).

7.2 The Default Region

heatmap(m.y_grid, m.b_grid, Float64.(sol.default),
        xlabel="Income y", ylabel="Bond Holdings b",
        title="Default Region (yellow = default)",
        color=:YlGn, size=(700, 400))

The default region occupies the lower-left portion of the state space: high debt (negative \(b\)) and low income. This is exactly the economic intuition: the government defaults when the burden of repayment is high relative to its ability to pay.

The boundary of the default region traces out the default threshold: for each income level, there is a critical debt level below which the government defaults. This threshold shifts to the right (toward higher debt) as income increases—the government can sustain more debt when income is higher. Conversely, the threshold shifts to the left as income falls—even modest debt levels trigger default during severe recessions.

ImportantThe Default Threshold

The default threshold \(\bar{b}(y)\) satisfies \(V^R(\bar{b}, y) = V^D(y)\). At this boundary, the government is exactly indifferent between repaying and defaulting. Slightly more debt tips the balance toward default; slightly higher income tips it toward repayment. The shape of this boundary—how it varies with income—is a key prediction of the model and is consistent with the empirical observation that defaults cluster in recessions.

7.3 Bond Price Schedule

plot(legend=:topright, size=(700, 400))
for iy in [1, 6, 11, 16, 21]
    plot!(m.b_grid, sol.q[:, iy], linewidth=2,
          label="y = $(round(m.y_grid[iy], digits=3))")
end
hline!([1 / (1 + m.r)], color=:gray, linestyle=:dash, label="Risk-free price")
xlabel!("New Debt b' (negative = borrowing)")
ylabel!("Bond Price q(b', y)")
title!("Bond Price Schedule")

The bond price schedule \(q(b', y)\) reveals the market’s assessment of default risk. Several features stand out:

For positive \(b'\) (savings): The bond price equals the risk-free level \(1/(1+r)\). When the government is a net creditor, there is no default risk—the government has no incentive to default on assets it holds.

For moderate negative \(b'\) (low debt): The bond price remains near the risk-free level. At low debt levels, the government can comfortably service its obligations for almost all income realizations, so default risk is negligible.

For large negative \(b'\) (high debt): The bond price falls steeply. As the government borrows more, default becomes increasingly likely, and lenders demand compensation in the form of lower bond prices (higher yields). Eventually, the bond price approaches zero—no lender is willing to buy bonds that will almost certainly not be repaid.

Income dependence: Higher income shifts the bond price schedule upward. When current income is high, future income is likely to be high as well (due to persistence), reducing default risk and supporting higher bond prices. The gap between high-income and low-income curves widens as debt increases, reflecting the interaction between income risk and debt vulnerability.

7.4 Sovereign Spreads

The sovereign spread is the interest rate premium over the risk-free rate. We compute it from the bond price:

plot(legend=:topright, size=(700, 400))
for iy in [1, 6, 11, 16, 21]
    spread = (1 ./ max.(sol.q[:, iy], 1e-8)) .- (1 + m.r)
    spread = clamp.(spread, 0, 0.5)
    plot!(m.b_grid, 100 .* spread, linewidth=2,
          label="y = $(round(m.y_grid[iy], digits=3))")
end
xlabel!("New Debt b'")
ylabel!("Spread (percentage points)")
title!("Sovereign Spreads")

The spread is the mirror image of the bond price: low when debt is low and income is high, and rising sharply as debt increases or income falls. The nonlinearity is striking: spreads are near zero for a wide range of debt levels and then explode upward as the debt approaches the default threshold. This reflects the binary nature of default: either the government repays (probability \(1 - \delta\)) or it does not (probability \(\delta\)). As the default probability shifts from near zero to near one, the spread transitions from near zero to near infinity.

This nonlinearity has important implications for debt sustainability. A country can carry a moderate debt load at low cost for a long time. But if it crosses a threshold—due to an adverse income shock or excessive borrowing—spreads spike, making debt service unaffordable and precipitating a crisis. This is the tipping point dynamics that characterize real-world sovereign crises.

WarningThe “Thin Ice” Region

Countries operating in the region where the spread curve is steep are on “thin ice.” A small increase in debt or a small decrease in income can trigger a disproportionate increase in borrowing costs. This fragility is why rating agencies, the IMF, and financial markets pay close attention to debt-to-GDP ratios: countries near the steep part of the curve are vulnerable to self-fulfilling crises.

7.5 Borrowing Policy

The borrowing policy function \(b'(b, y)\) shows the government’s optimal debt choice for each state:

plot(legend=:topleft, size=(700, 400))
for iy in [1, 6, 11, 16, 21]
    bp_vals = m.b_grid[sol.bp[:, iy]]
    plot!(m.b_grid, bp_vals, linewidth=2,
          label="y = $(round(m.y_grid[iy], digits=3))")
end
plot!(m.b_grid, m.b_grid, color=:gray, linestyle=:dash, label="45-degree line")
xlabel!("Current Bond Holdings b")
ylabel!("Next Period Bond Holdings b'")
title!("Borrowing Policy Function")

The 45-degree line is the reference: points below it indicate the government is accumulating debt (\(b' < b\)), while points above indicate the government is reducing debt or accumulating savings (\(b' > b\)).

When income is low, the government tends to borrow more aggressively—the policy function lies further below the 45-degree line. The government is using debt to smooth consumption during the recession. When income is high, the government borrows less or even saves, building a buffer for future downturns. This procyclical borrowing pattern is consistent with the evidence from emerging-market economies.

Notice that the policy function has a flat region on the left side of the graph for some income levels. This corresponds to states where the government defaults (and thus the reported \(b'\) is not relevant, since the government is excluded from markets). The policy function is only economically meaningful in the region where the government repays.

8 Simulation

8.1 The Simulation Function

With the solved model in hand, we can simulate the economy forward to generate artificial time series. The simulation follows a straightforward procedure: start at an initial state, apply the optimal policies each period, and draw random income shocks from the Markov chain.

function simulateSovDefault(m, sol, T; seed=42)
    Random.seed!(seed)
    (; r, λ, ŷ, σ, y_grid, P_y, b_grid, N_y) = m

    # Pre-allocate storage
    b_sim = zeros(T)
    y_sim = zeros(T)
    c_sim = zeros(T)
    spread_sim = zeros(T)
    default_sim = zeros(Int, T)

    # Initial conditions: zero debt, median income
    ib = findfirst(b_grid .>= 0.0)
    iy = (N_y + 1) ÷ 2
    in_default = false

    for t in 1:T
        y = y_grid[iy]
        b_sim[t] = b_grid[ib]
        y_sim[t] = y

        if in_default
            # In autarky: consume h(y), no market access
            c_sim[t] = h(y, ŷ)
            default_sim[t] = 1
            spread_sim[t] = NaN

            # Try to regain market access
            if rand() < λ
                in_default = false
                ib = findfirst(b_grid .>= 0.0)     # re-enter at zero debt
            end
        else
            if sol.default[ib, iy]
                # Government chooses to default
                c_sim[t] = h(y, ŷ)
                default_sim[t] = 1
                in_default = true
                spread_sim[t] = NaN
            else
                # Government repays and borrows optimally
                ibp = sol.bp[ib, iy]
                bp = b_grid[ibp]
                c_sim[t] = y + b_grid[ib] - sol.q[ibp, iy] * bp
                q_val = max(sol.q[ibp, iy], 1e-8)
                spread_sim[t] = max((1 / q_val) - (1 + r), 0.0)
                ib = ibp
            end
        end

        # Draw next period's income
        iy = rand(Categorical(P_y[iy, :]))
    end

    return DataFrame(t=1:T, b=b_sim, y=y_sim, c=c_sim,
                     spread=spread_sim, default=default_sim)
end
simulateSovDefault (generic function with 1 method)

Let us walk through the logic:

Initialization: The economy starts at zero debt (\(b = 0\)) and median income, with no prior default. This represents a “fresh start” for the economy.

In default: If the economy is currently in default, it consumes \(h(y, \hat{y})\) (income with the output cost), cannot borrow or save, and attempts to regain market access. With probability \(\lambda\), it succeeds and re-enters next period at zero debt.

Not in default: The government first checks whether it is optimal to default at the current state \((b, y)\) by looking up sol.default[ib, iy]. If so, it defaults and enters autarky. If not, it applies the optimal borrowing policy sol.bp[ib, iy], computes consumption from the budget constraint, and records the sovereign spread.

Income transition: Regardless of the default decision, next period’s income is drawn from the Markov chain using rand(Categorical(P_y[iy, :])). This draws a random integer from \(\{1, \ldots, N_y\}\) according to the transition probabilities from the current income state.

8.2 Running the Simulation

sim = simulateSovDefault(m, sol, 500)
n_defaults = sum(diff(vcat(0, sim.default)) .== 1)
println("Default rate: $(round(mean(sim.default), digits=3))")
println("Number of default episodes: $n_defaults in $(nrow(sim)) periods")
Default rate: 0.062
Number of default episodes: 8 in 500 periods

8.3 Debt and Income Dynamics

p1 = plot(sim.t, sim.b, linewidth=1.5, color=:steelblue, label="Debt b",
          title="Bond Holdings", size=(800, 200))
hline!(p1, [0.0], color=:gray, linestyle=:dash, label="")
p2 = plot(sim.t, sim.y, linewidth=1.5, color=:darkgreen, label="Income y",
          title="Income", size=(800, 200))
hline!(p2, [m.ŷ], color=:gray, linestyle=:dash, label="ŷ")
plot(p1, p2, layout=(2, 1), size=(800, 450))

The debt panel reveals the characteristic pattern of sovereign borrowing: the government gradually accumulates debt during normal times, and then the debt is wiped out when a default occurs (the sharp jumps back to zero). After regaining market access, the cycle begins again.

The income panel shows the stochastic fluctuations driving the economy. Default episodes tend to coincide with low income realizations—when the economy is in recession, the government finds the debt burden unbearable and chooses to default. The gray dashed line shows the output ceiling \(\hat{y}\): when the economy is in default and income exceeds \(\hat{y}\), consumption is capped at \(\hat{y}\) rather than the full income level.

8.4 Consumption and Spreads

p1 = plot(sim.t, sim.c, linewidth=1.5, color=:purple, label="Consumption",
          title="Consumption", size=(800, 200))
p2 = plot(sim.t, 100 .* sim.spread, linewidth=1.5, color=:red, label="Spread (%)",
          title="Sovereign Spread", size=(800, 200))
plot(p1, p2, layout=(2, 1), size=(800, 450))

Two patterns stand out. First, consumption drops sharply at default events. This reflects the output cost: when the government defaults, effective income falls to \(h(y, \hat{y})\), and the government cannot borrow to smooth the decline. The consumption drop at default is a robust empirical finding—Argentina’s consumption fell by approximately 12% in 2001–2002.

Second, sovereign spreads tend to spike before default events. As the economy deteriorates (income falls, debt accumulates), lenders recognize the growing default risk and demand higher compensation. The spread rises gradually and then jumps when default becomes imminent. After default, the spread is not defined (the government is excluded from markets). This pattern of rising spreads preceding default is exactly what we observe in real sovereign debt crises.

8.5 Consumption During Crises

To examine default episodes more carefully, let us extract windows around each default:

default_starts = findall(diff(vcat(0, sim.default)) .== 1)
println("Default episodes begin at periods: ", default_starts[1:min(5, end)])
Default episodes begin at periods: [98, 157, 191, 245, 252]
# Plot consumption around each default episode
if length(default_starts) >= 1
    plot(legend=:topright, size=(700, 400),
         title="Consumption Around Default Episodes")
    window = 10
    for (i, ds) in enumerate(default_starts[1:min(3, end)])
        t_start = max(1, ds - window)
        t_end = min(nrow(sim), ds + window)
        t_range = t_start:t_end
        plot!(t_range .- ds, sim.c[t_range], linewidth=2,
              label="Episode $i", marker=:circle, markersize=3)
    end
    vline!([0], color=:gray, linestyle=:dash, label="Default")
    xlabel!("Periods relative to default")
    ylabel!("Consumption")
end

The consumption path around default episodes shows a clear pattern: consumption is declining before the default (the economy is in recession), drops sharply at the default (due to the output cost and loss of borrowing), and then gradually recovers as income eventually improves and the government regains market access. This matches the empirical evidence on “sudden stops”—episodes where emerging-market countries experience rapid reversals of capital flows, sharp consumption declines, and sovereign crises.

8.6 Long Simulation Statistics

To get reliable statistics, we simulate a much longer path:

sim_long = simulateSovDefault(m, sol, 10_000, seed=123)

# Compute statistics for non-default periods
non_default = sim_long[sim_long.default .== 0, :]

println("=== Long Simulation Statistics (10,000 periods) ===")
println("Default rate: $(round(mean(sim_long.default), digits=4))")
println("Mean debt/income (non-default): $(round(-mean(non_default.b ./ non_default.y), digits=3))")
println("Std dev of consumption (non-default): $(round(std(log.(non_default.c)), digits=4))")
println("Std dev of income (non-default): $(round(std(log.(non_default.y)), digits=4))")
println("σ(c)/σ(y): $(round(std(log.(non_default.c)) / std(log.(non_default.y)), digits=3))")

# Spreads (non-default periods only)
valid_spreads = non_default.spread[.!isnan.(non_default.spread)]
if length(valid_spreads) > 0
    println("Mean spread: $(round(100 * mean(valid_spreads), digits=2)) pp")
    println("Std spread: $(round(100 * std(valid_spreads), digits=2)) pp")
end

# Correlation of spread with output
valid_idx = .!isnan.(non_default.spread)
if sum(valid_idx) > 10
    corr_sy = cor(non_default.spread[valid_idx], log.(non_default.y[valid_idx]))
    println("Corr(spread, log y): $(round(corr_sy, digits=3))")
end
=== Long Simulation Statistics (10,000 periods) ===
Default rate: 0.0588
Mean debt/income (non-default): 0.053
Std dev of consumption (non-default): 0.0785
Std dev of income (non-default): 0.076
σ(c)/σ(y): 1.034
Mean spread: 1.55 pp
Std spread: 3.13 pp
Corr(spread, log y): -0.075
ImportantKey Model Predictions

The Arellano (2008) model generates several empirical regularities of emerging-market business cycles:

  1. Default occurs in recessions: Default is concentrated in low-income states, consistent with the data.
  2. Consumption is more volatile than income (\(\sigma_c / \sigma_y > 1\)): Unlike advanced economies (where consumption is smoother than income), emerging-market countries exhibit excess consumption volatility because they lose access to credit markets precisely when they need smoothing most.
  3. Spreads are countercyclical: Spreads rise during recessions and fall during expansions, matching the negative correlation between EMBI spreads and GDP observed in the data.
  4. Borrowing is procyclical: The government borrows more during good times and faces credit constraints during bad times.

9 Comparative Statics

Comparative statics—changing one parameter at a time while holding all others fixed—helps us understand the economic forces driving the model. We examine four key parameters: risk aversion \(\sigma\), the re-entry probability \(\lambda\), the output cost parameter \(\hat{y}\), and income persistence \(\rho\).

For computational speed, we use smaller grids for the comparative statics exercises:

9.1 Effect of Risk Aversion (\(\sigma\))

Risk aversion determines how much the household dislikes consumption fluctuations. Higher \(\sigma\) means greater aversion to consumption variability, which increases the demand for consumption smoothing—and hence the demand for borrowing.

plot(legend=:topright, size=(700, 400), title="Bond Prices: Effect of σ")
for σ_val in [1.5, 2.0, 3.0]
    m_trial = setup!(SovDefaultModel=σ_val, N_b=101, N_y=11))
    sol_trial = solveSovDefault(m_trial, verbose=false)
    iy_mid = (m_trial.N_y + 1) ÷ 2
    plot!(m_trial.b_grid, sol_trial.q[:, iy_mid], linewidth=2, label="σ = $σ_val")
end
hline!([1 / (1 + m.r)], color=:gray, linestyle=:dash, label="Risk-free price")
xlabel!("New Debt b'")
ylabel!("Bond Price q(b', y)")

Higher risk aversion has an ambiguous effect on default incentives. On one hand, more risk-averse agents value consumption smoothing more highly and are more reluctant to trigger the consumption disruption associated with default. On the other hand, more risk-averse agents also borrow more heavily to smooth consumption, which increases debt levels and default risk. The net effect depends on the calibration and the region of the state space.

plot(legend=:topright, size=(700, 400), title="Default Region: Effect of σ")
for σ_val in [1.5, 2.0, 3.0]
    m_trial = setup!(SovDefaultModel=σ_val, N_b=101, N_y=11))
    sol_trial = solveSovDefault(m_trial, verbose=false)
    iy_mid = (m_trial.N_y + 1) ÷ 2
    # Find the default threshold for median income
    default_col = sol_trial.default[:, iy_mid]
    plot!(m_trial.b_grid, Float64.(default_col), linewidth=2,
          label="σ = $σ_val", linestyle=:auto)
end
xlabel!("Bond Holdings b")
ylabel!("Default (1 = yes)")

9.2 Effect of Re-entry Probability (\(\lambda\))

The re-entry probability \(\lambda\) determines how long the government is excluded from credit markets after default. A higher \(\lambda\) means shorter exclusion (the government regains access quickly), which makes default less costly and hence more attractive.

plot(legend=:topright, size=(700, 400), title="Bond Prices: Effect of λ")
for λ_val in [0.1, 0.282, 0.5]
    m_trial = setup!(SovDefaultModel=λ_val, N_b=101, N_y=11))
    sol_trial = solveSovDefault(m_trial, verbose=false)
    iy_mid = (m_trial.N_y + 1) ÷ 2
    plot!(m_trial.b_grid, sol_trial.q[:, iy_mid], linewidth=2,
          label="λ = $λ_val (excl. = $(round(1/λ_val, digits=1)) qtrs)")
end
hline!([1 / (1 + m.r)], color=:gray, linestyle=:dash, label="Risk-free price")
xlabel!("New Debt b'")
ylabel!("Bond Price q(b', y)")

The results confirm the intuition: higher \(\lambda\) shifts the bond price schedule downward for any given debt level. When the government can quickly return to credit markets after defaulting, the punishment for default is mild, making default more tempting. Lenders anticipate this and charge more (offer lower bond prices). Conversely, when \(\lambda\) is low (long exclusion), default is very costly, and the government is more likely to repay, supporting higher bond prices.

TipPolicy Implication

The re-entry probability captures the severity of market punishment. If international financial institutions (like the IMF) facilitate rapid re-entry after default, they inadvertently reduce the cost of default and make sovereign crises more likely. This is the moral hazard of international bailouts: by softening the consequences of default, they undermine the incentives that sustain sovereign debt markets.

9.3 Effect of Output Cost (\(\hat{y}\))

The output ceiling \(\hat{y}\) controls the direct economic cost of default. A lower \(\hat{y}\) means less output is lost during default (the ceiling is lower, so only very high income states are affected), making default less costly.

plot(legend=:topright, size=(700, 400), title="Bond Prices: Effect of ŷ")
for ŷ_val in [0.90, 0.969, 1.05]
    m_trial = setup!(SovDefaultModel=ŷ_val, N_b=101, N_y=11))
    sol_trial = solveSovDefault(m_trial, verbose=false)
    iy_mid = (m_trial.N_y + 1) ÷ 2
    plot!(m_trial.b_grid, sol_trial.q[:, iy_mid], linewidth=2,
          label="ŷ = $ŷ_val")
end
hline!([1 / (1 + m.r)], color=:gray, linestyle=:dash, label="Risk-free price")
xlabel!("New Debt b'")
ylabel!("Bond Price q(b', y)")

A lower \(\hat{y}\) (stronger output cost) makes default more punishing, which discourages default and raises bond prices. The government can sustain more debt because lenders know that default is very costly and therefore unlikely. Conversely, a higher \(\hat{y}\) (weaker output cost) makes default less painful, expanding the default region and compressing bond prices.

This comparative static highlights a fundamental tension in sovereign debt markets: the same costs that discourage default also reduce welfare if default does occur. If output costs are very high, the government almost never defaults, but when it does, the consequences are devastating. If output costs are low, defaults are more frequent but less damaging. The calibrated \(\hat{y} = 0.969\) represents a middle ground that matches the observed frequency and severity of Argentine defaults.

9.4 Effect of Income Persistence (\(\rho\))

Income persistence determines how long good and bad times last. Higher \(\rho\) means that a bad income shock today persists for many periods, making the debt burden harder to bear during recessions.

plot(legend=:topright, size=(700, 400), title="Bond Prices: Effect of ρ")
for ρ_val in [0.85, 0.945, 0.98]
    m_trial = setup!(SovDefaultModel=ρ_val, N_b=101, N_y=11))
    sol_trial = solveSovDefault(m_trial, verbose=false)
    iy_mid = (m_trial.N_y + 1) ÷ 2
    plot!(m_trial.b_grid, sol_trial.q[:, iy_mid], linewidth=2,
          label="ρ = $ρ_val")
end
hline!([1 / (1 + m.r)], color=:gray, linestyle=:dash, label="Risk-free price")
xlabel!("New Debt b'")
ylabel!("Bond Price q(b', y)")

Higher persistence has two competing effects. On one hand, it increases the duration of recessions, making it harder for the government to “wait out” a bad income period without defaulting. On the other hand, it also increases the duration of expansions, allowing the government to accumulate more savings during good times. The net effect depends on the level of debt and the current income state.

In general, higher persistence tends to lower bond prices for a given debt level, because the probability of experiencing a prolonged recession (and hence defaulting) increases. This is why the calibrated value of \(\rho = 0.945\) is important: Argentina’s highly persistent income process is part of what makes its sovereign debt fragile.

ImportantSummary of Comparative Statics
Parameter Change Effect on Default Effect on Bond Prices Effect on Spreads
\(\sigma \uparrow\) (more risk-averse) Ambiguous Ambiguous Ambiguous
\(\lambda \uparrow\) (faster re-entry) More default Lower Higher
\(\hat{y} \uparrow\) (weaker output cost) More default Lower Higher
\(\rho \uparrow\) (more persistent income) More default Lower Higher

The intuition is consistent: anything that makes default less costly (faster re-entry, weaker output cost) or makes the debt burden harder to sustain (more persistent recessions) increases default risk, lowers bond prices, and raises sovereign spreads.

10 Extensions and Literature

10.1 Long-Term Debt

The Arellano (2008) model assumes one-period bonds, which means the government must roll over its entire debt stock every period. In practice, sovereign debt has a rich maturity structure: some bonds mature in months, others in decades. The maturity structure matters because it affects the government’s exposure to rollover risk and the dynamics of debt crises.

Hatchondo and Martinez (2009) and Chatterjee and Eyigungor (2012) extend the model to long-duration bonds, typically modeled as bonds that pay an exponentially declining coupon. The coupon payment in period \(j\) after issuance is \((1-\lambda_d)^{j-1} \kappa\), where \(\lambda_d\) is the decay rate and \(\kappa\) is the initial coupon. The Macaulay duration of such a bond is \(1/(\lambda_d + \kappa - \lambda_d \kappa)\), which can match the observed average maturity of sovereign debt (typically 5–10 years).

Long-term debt introduces a new channel: debt dilution. When the government issues new long-term bonds, it dilutes the value of existing long-term bonds because the new debt increases the probability of future default. This dilution is an externality: the government at time \(t\) does not internalize the loss imposed on time-\(t\) bondholders by time-\((t+1)\) borrowing. Debt dilution can lead to overborrowing relative to the social optimum and generate spreads that more closely match the data.

10.2 Debt Dilution

Aguiar and Amador (2014) formalize the concept of debt dilution and show that it is a key driver of sovereign default risk with long-term debt. They show that a government with commitment power (which could promise not to dilute existing bonds) would be able to sustain higher debt levels at lower spreads. The inability to commit—which is the essence of the sovereign default problem—creates an inefficiency analogous to the “debt overhang” problem in corporate finance.

Aguiar, Chatterjee, Cole, and Stangebye (2016) develop a complete characterization of the stationary equilibrium in a sovereign default model with long-term debt and show that debt dilution is quantitatively important: eliminating dilution (by giving the government commitment power over future borrowing) reduces default risk by roughly half.

10.3 Quantitative Sovereign Default Literature

The quantitative sovereign default literature has grown enormously since Arellano (2008). Some notable contributions include:

  • Aguiar and Gopinath (2006): Distinguish between transitory and permanent income shocks and show that permanent shocks (trend shocks) are more important for generating realistic default patterns. Countries with more volatile trend growth tend to have higher spreads and more frequent defaults.

  • Cuadra, Sanchez, and Sapriza (2010): Introduce fiscal policy into the sovereign default model. The government chooses both borrowing and government spending, and the model generates procyclical fiscal policy (governments spend more during booms) consistent with the evidence from developing countries.

  • Mendoza and Yue (2012): Add production to the sovereign default model. Default disrupts the domestic financial system, which in turn reduces firms’ access to working capital and imported inputs. This generates an endogenous output cost of default that depends on the structure of the economy rather than being assumed exogenously.

  • Arellano and Ramanarayanan (2012): Endogenize the maturity structure of sovereign debt. The government chooses between short-term and long-term bonds, and the optimal maturity depends on the level of debt and income. In good times, the government issues longer-term debt to lock in low rates; in bad times, it shifts to shorter maturities.

  • Bocola (2016): Links sovereign default risk to domestic banking crises. Banks hold government bonds, so an increase in sovereign default risk reduces the value of bank assets, tightening credit conditions and amplifying the recession. This creates a “doom loop” between sovereign and banking risk, as observed during the European debt crisis.

10.4 Self-Fulfilling Debt Crises

The Eaton-Gersovitz/Arellano model features a unique equilibrium: given the state \((b, y)\), the government either defaults or repays, and the bond price is determined by the zero-profit condition. However, several papers have explored the possibility of multiple equilibria and self-fulfilling crises.

Cole and Kehoe (2000) develop a model where, for intermediate debt levels, there exist both a “good” equilibrium (the government repays, lenders charge low spreads) and a “bad” equilibrium (lenders expect default, charge high spreads, and the government indeed defaults because refinancing is too expensive). Which equilibrium prevails depends on market sentiment or “sunspots.” This captures the idea that sovereign crises can be triggered by a sudden shift in investor confidence, even without a fundamental deterioration in economic conditions.

Aguiar, Chatterjee, Cole, and Stangebye (2022) show that self-fulfilling crises are more likely with long-term debt, because the rollover risk creates a vulnerability that short-term debt does not have.

10.5 Recent Developments

The sovereign default literature continues to evolve. Recent work addresses:

  • Optimal restructuring: How should debt be renegotiated after default? Models with Nash bargaining or mechanism design generate predictions about haircuts, maturity extensions, and GDP-linked bonds.
  • Domestic heterogeneity: Who bears the cost of sovereign default within the country? Models with heterogeneous agents show that default can have distributional consequences, benefiting some groups (e.g., those without government bonds) while hurting others.
  • Climate and sovereign risk: How does climate change affect sovereign creditworthiness? Countries vulnerable to climate shocks face higher default risk, which raises borrowing costs and reduces their ability to invest in adaptation.
  • Pandemic and sovereign risk: The COVID-19 pandemic triggered a wave of debt distress in developing countries, reviving interest in models of sovereign default with aggregate shocks.
TipFurther Reading

The definitive survey of the quantitative sovereign default literature is Aguiar and Amador (2021), “The Economics of Sovereign Debt and Default” (Princeton University Press). For a shorter introduction, see Aguiar and Amador (2014), “Sovereign Debt” in the Handbook of International Economics, Vol. 4.

11 Summary

11.1 Key Takeaways

The Eaton-Gersovitz / Arellano (2008) model of sovereign default is a workhorse framework for understanding why countries default, how bond markets price sovereign risk, and what determines the dynamics of debt crises. The key insights are:

  1. Sovereign debt relies on indirect enforcement: Without a bankruptcy court, repayment is sustained by the threat of credit market exclusion and output costs. The government repays because default is costly, not because it is legally compelled.

  2. Default occurs in recessions: The government defaults when income is low and debt is high—exactly when the burden of repayment is most onerous and the opportunity cost of market exclusion is lowest (the government would want to borrow during a recession, but its borrowing terms are worst precisely then).

  3. Bond prices are endogenous: Lenders set bond prices to break even, and the equilibrium requires a fixed point between the government’s default decision and the bond price schedule. This creates a feedback loop between default risk and borrowing costs.

  4. Sovereign spreads are countercyclical: The model generates the empirical pattern of rising spreads during recessions and falling spreads during expansions, driven by the persistence of income shocks and the endogenous response of bond prices.

  5. The model generates “sudden stops”: The feedback between borrowing costs and default risk can produce sharp, sudden crises where a country that was borrowing comfortably finds itself unable to refinance its debt.

ImportantThe Bigger Picture

The sovereign default model illustrates a general principle in economics: when agents cannot commit to future behavior, markets must price in the possibility of deviation. The equilibrium price (here, the bond price) reflects the market’s rational expectations about the agent’s future choices, which in turn depend on the price. This fixed-point logic appears throughout economics—in models of time inconsistency, moral hazard, and adverse selection. The computational tools we developed here (value function iteration with endogenous prices) are applicable to all of these settings.