Midterm Practice Problems

Author

Jesse Perla, UBC

Student Name/Number:

Instructions

The following are example directions for an exam.

  • Ensure you modify the field above with your name and student number above immediately
  • The exam has XXXXX questions, each with multiple parts for a total of XXXXX points. You may not finish the exam, so best to do your best answering all questions to the extent possible and not get stuck on any one question.
  • This exam is closed book and accessing the internet is not permitted
    • See the formula “sheet” embedded at the end of this notebook for reference
    • You can the internal help as required (see the Jupyterhub menu, use Settings/Show Contextual Help)
  • Execute the file to begin, which will also check your setup. To do this in Jupyter, in the menu go > Run > Run All Cells or the equivalent buttons
  • Edit this file directly, and in-place as an ipynb file, which we will automatically download at the end of the exam time directly. In particular
    • DO NOT rename this file with your name. It is automatically associated with your canvas account
    • DO NOT save-as the file, move it, or export to pdf or html
    • DO NOT add any additional packages
  • Save the notebook as you are working
    • We will only grade what is saved at the end of the exam in this exact file, and it is your responsibility to ensure the file is saved
    • We will not execute the notebook, so ensure all code, figures, etc. are ready as-is upon saving for submission
  • Ensure you edit the results in the code blocks or markup blocks indicated as we will not grade anything outside of those
    • You will not be judged on code quality directly, but code clarity may be required for us to ensure you understood the problem directly
    • If a question requires math, you can try to put latex inside of the cells but will not be judged on whether you write latex vs. math in text that doesn’t quite match latex. But it should be clear
# Packages available
# DO NOT MODIFY OR ADD PACKAGES
using Distributions, Plots, LaTeXStrings, LinearAlgebra, Statistics, Random
Precompiling packages...
    980.0 msStatsAPI
   1330.8 msStatistics
   1897.1 msFillArrays
   1016.4 msReexport
   1362.9 msDocStringExtensions
   1092.3 msPtrArrays
   3866.1 msOrderedCollections
   1045.1 msDataAPI
   1754.1 msPDMats
   1282.7 msPreferences
   1036.3 msFillArrays → FillArraysStatisticsExt
   1340.3 msStatistics → SparseArraysExt
   6090.4 msIrrationalConstants
   1599.6 msFillArrays → FillArraysSparseArraysExt
   1431.6 msAliasTables
   1495.6 msFillArrays → FillArraysPDMatsExt
   3158.4 msDataStructures
   1220.9 msJLLWrappers
   1261.2 msLogExpFunctions
   4021.1 msMissings
   1288.6 msSortingAlgorithms
   1397.6 msRmath_jll
   1467.3 msOpenSpecFun_jll
   1606.2 msRmath
   4905.6 msQuadGK
   5811.3 msStatsBase
   4217.6 msSpecialFunctions
    922.3 msPDMats → StatsBaseExt
   1187.9 msHypergeometricFunctions
   2637.1 msStatsFuns
   4749.0 msDistributions
  31 dependencies successfully precompiled in 29 seconds. 10 already precompiled.
Precompiling packages...
    913.3 msTensorCore
    928.9 msContour
   1186.2 msLaTeXStrings
   1359.9 msMeasures
   3134.9 msFormat
   2188.6 msRequires
   1038.6 msStableRNGs
   5683.0 msGrisu
   8064.6 msMacroTools
   1523.4 msURIs
   1056.3 msSimpleBufferStream
   1379.1 msTranscodingStreams
   4374.6 msUnzip
   1020.0 msDelimitedFiles
   1017.9 msBitFlags
   3515.0 msNaNMath
   2347.6 msConcurrentUtilities
   1210.7 msLoggingExtras
   1385.1 msPrecompileTools
   4121.7 msStructUtils
   1011.9 msExceptionUnwrapping
   2704.9 msUnicodeFun
   1668.6 msGraphite2_jll
   1241.4 msLibmount_jll
   1149.6 msEpollShim_jll
   1881.3 msLLVMOpenMP_jll
  10049.8 msFixedPointNumbers
   1289.2 msBzip2_jll
   1372.0 msXorg_libXau_jll
   1595.3 msXorg_libICE_jll
   1623.0 mslibpng_jll
   1682.9 mslibfdk_aac_jll
   1268.3 msLERC_jll
   1948.2 msLAME_jll
   1517.0 msfzf_jll
   1919.5 msJpegTurbo_jll
   1659.9 msXZ_jll
   1544.8 msOgg_jll
   1368.2 msmtdev_jll
   1883.6 msXorg_libXdmcp_jll
   1404.3 msx265_jll
   1646.6 msx264_jll
   1385.1 mslibaom_jll
   1820.7 msMbedTLS_jll
   1425.1 msZstd_jll
   1957.6 msExpat_jll
   1289.6 msLZO_jll
   1399.3 msOpus_jll
   1352.0 msXorg_xtrans_jll
   1770.5 mslibevdev_jll
   1829.2 msLibiconv_jll
   1192.1 msLibffi_jll
   1687.8 mseudev_jll
   1399.3 msFriBidi_jll
   1589.6 msLibuuid_jll
   1148.3 msShowoff
   1353.6 msCodecZlib
   4746.2 msOpenSSL
   4380.1 msRecipesBase
   1665.8 msPixman_jll
   1826.7 msFreeType2_jll
   1482.6 msXorg_libSM_jll
   5122.6 msColorTypes
   1822.0 msJLFzf
   1618.4 mslibvorbis_jll
   3049.7 msGhostscript_jll
   2983.7 msMbedTLS
   4326.0 msXorg_libxcb_jll
   1725.2 msLibtiff_jll
   1289.8 msDbus_jll
   1764.3 msGettextRuntime_jll
   1986.1 msWayland_jll
   1142.9 mslibinput_jll
   2183.9 msFontconfig_jll
    994.3 msColorTypes → StyledStringsExt
   7131.3 msColorVectorSpace
  13003.7 msColors
  10537.8 msLatexify
   1158.2 msXorg_xcb_util_jll
   1443.3 msXorg_libX11_jll
   1666.0 msGlib_jll
  42836.8 msParsers
   1774.8 msLatexify → SparseArraysExt
   1552.3 msXorg_xcb_util_image_jll
   1994.8 msXorg_xcb_util_keysyms_jll
   1571.8 msXorg_xcb_util_renderutil_jll
   8960.0 msColorSchemes
   1347.2 msXorg_xcb_util_wm_jll
   1528.6 msXorg_libXrender_jll
   1200.3 msXorg_libXext_jll
   1234.1 msXorg_libXfixes_jll
   1842.0 msXorg_libxkbfile_jll
   1807.6 msXorg_xcb_util_cursor_jll
  12502.3 msJSON
   1732.9 msXorg_libXinerama_jll
   1782.6 msXorg_libXrandr_jll
   2267.9 msLibglvnd_jll
   2064.3 msCairo_jll
   1066.0 msXorg_libXcursor_jll
   1768.2 msXorg_libXi_jll
   1897.9 msXorg_xkbcomp_jll
   1962.7 msHarfBuzz_jll
   1529.7 msXorg_xkeyboard_config_jll
   1496.2 mslibass_jll
   2040.7 msPango_jll
  30642.1 msPlotUtils
   1804.7 msxkbcommon_jll
   2310.1 msFFMPEG_jll
  56360.7 msHTTP
   1820.2 msVulkan_Loader_jll
   7445.4 msPlotThemes
   1636.5 mslibdecor_jll
   1561.3 msFFMPEG
   2866.5 msQt6Base_jll
   2094.5 msGLFW_jll
   1654.2 msQt6ShaderTools_jll
   2060.1 msGR_jll
  12913.7 msRecipesPipeline
   3407.6 msQt6Declarative_jll
    769.1 msQt6Wayland_jll
   5191.7 msGR
  82652.3 msPlots
  122 dependencies successfully precompiled in 231 seconds. 55 already precompiled.
Precompiling packages...
    696.4 msColorVectorSpace → SpecialFunctionsExt
  1 dependency successfully precompiled in 1 seconds. 20 already precompiled.
Precompiling packages...
   1261.6 msQuartoNotebookWorkerJSONExt (serial)
  1 dependency successfully precompiled in 1 seconds
Precompiling packages...
   2616.8 msQuartoNotebookWorkerPlotsExt (serial)
  1 dependency successfully precompiled in 3 seconds
Precompiling packages...
   1013.5 msQuartoNotebookWorkerLaTeXStringsExt (serial)
  1 dependency successfully precompiled in 1 seconds

Take the following functions from our previous lectures

# DO NOT MODIFY
function lorenz(v)  # assumed sorted vector
    S = cumsum(v)  # cumulative sums: [v[1], v[1] + v[2], ... ]
    F = (1:length(v)) / length(v)
    L = S ./ S[end]
    return (; F, L) # returns named tuple
end
# Assumes that v is sorted!
gini(v) = (2 * sum(i * y for (i,y) in enumerate(v))/sum(v)
           - (length(v) + 1))/length(v)

function simple_regression(x, y)
  x_bar = mean(x)
  y_bar = mean(y)
  a = sum((x .- x_bar).*(y .- y_bar)) / sum((x .- x_bar).^2)
  b = y_bar - a * x_bar
  return (;a, b)
end
simple_regression (generic function with 1 method)

Short Question 1

With a CDF of a distribution \(F(x)\) with an accompanying counter-cdf \(1-F(x)\), what is the definition of a power-law tail? For a stochastic process \(X_t\), what features of that stochastic process might lead to a power-law tail in the stationary distribution?

Answer:

(double click to edit your answer)

Short Question 2

If you are trying to understand wealth inequality, what features of the distribution are ideal to examine using (a) Lorenz Curves; (b) Gini Coefficients; and (c) Power Law Tails

Answer:

(double click to edit your answer)

Short Question 3

If I calculate a log-log plot of a distribution to examine whether it has heavy tails, what should I plot for the x-axis and y-axis? If I did a linear regression and found that the slope was -2, would that necessarily say that the distribution was a power-law distribution? Why or why not?

Answer:

(double click to edit your answer)

Short Question 4

If a log-log plot showed a slope of -1.5 with a clear linear relationship in the right tail, what is the implied power-law exponent? What does this tell us about moments of the underlying distribution?

Answer:

(double click to edit your answer)

Short Question 5

Compare stochastic processes:

  1. \(X_{t+1} = a_{t+1} X_t + b\)
  2. \(X_{t+1} = X_t + a_{t+1} + b\)

where in both cases \(a_{t+1}\) are IID shocks. Which stochastic process would you expect may have power-law tails in their stationary distribution, and why? What if \(b = 0\) in both cases? Provide intuition for the differences.

Answer:

(double click to edit your answer)

Short Question 6

Take the following figure showing the Lorenz Curves for data from two different distributions. What can you infer about the inequality in the two distributions? Roughly what would you expect the Gini coefficients to be for the two distributions?

Answer:

(double click to edit your answer)

Short Question 7

Given a mapping \(F : \mathbb{R}^N \to \mathbb{R}^N\) what is the definition of a fixed point \(x^*\) of this mapping? Does it always exist? If it exists, is it unique?

Answer:

(double click to edit your answer)

Short Question 8

Explain the importance of the fixed factor of production, land, in the Malthusian growth model

Answer:

(double click to edit your answer)

Short Question 9

An asset pays off a deterministic stream of income, \(\{y_{t+j}\}_{j=0}^{\infty}\), and a risk-neutral agent prices this using a discount factor \(0 < \beta < 1\). The PDV of the income is then \(p_t = \sum_{j = 0}^{\infty}\beta^j y_{t+j}\) The agent prices this asset using the recursive formulation

\[ p_t = y_t + \beta p_{t+1} \]

Briefly interpret this recursive equation from the agent’s perspective.

Answer:

(double click to edit your answer)

Short Question 10

What is a state space model? Explain what type of problem a Kalman Filter solves. What are the key assumptions on the stochastic processes, priors, etc. that make it applicable?

Answer:

(double click to edit your answer)

Question 0

Consider for some \(X_t \sim F\) IID draws from a distribution the log-log plot using the empirical CDF. The dotted line plots the linear regression with this data, with the intercept and slope shown on the legend.

Consider the log-log plot of 100 IID draws from a different distribution \(Y_t \sim F\).

Compare the \(X_t\) and \(Y_t\) log-log plots. What can you infer about these distributions?

Answer:

(double click to edit your answer)

Now consider the log-log plot of draws from a third distribution \(Z_t \sim F\)

The log-log plot of the \(Z_t\) draws

What can you infer about this distribution compared to the other two?

Answer:

(double click to edit your answer)

Question 1

Following the notes on AR(1) processes rather than plotting the distribution as normal instead lets see what the stationary distribution looks like with simulation.

Part (a)

From \(X_0 = 1.0\) simulate up to \(T=2000\) using the process

\[ X_t = a X_{t-1} + b + c W_t \]

Where \(a=0.98, b=0.1, c=0.02\).

T = 2000
X_0 = 1.0
a = 0.98
b = 0.1
c = 0.02
# Add code here
0.02

Part (b)

On the same graph plot the histogram of those simulated values (i.e., \(\{X_0, \ldots X_T\}\)) then plot the density of the stationary distribution calculated in closed form in those notes (i.e. create a normal distribution with \(\mu^* = b/(1-a)\) and \(v^* = c^2/(1 - a^2)\)

Hint: histogram(X, normed=true) normalizes the empirical draws so they are a proper PMF.

# Add code here

Part (c)

Now, do the same plot using the 10th to 500th observations (i.e., \(\{X_{10}, \ldots X_{500}\}\))

# Add code here

And then a separate plot using the rest

# Add code here

Compare how these line up? Explain why each is better or worse?

Answer:

(double click to edit your answer)

Part (d)

Change the c parameter to be 0.2.

Now repeat the display of the two histograms (1) split of the 10th to 500th ; and (2) the remainder

T = 2000
X_0 = 1.0
a = 0.98
b = 0.1
c = 0.2
# Add code here, creating new cells as required
0.2

Compare this to part (c)? Have the results changed and if so, then why?

Answer:

(double click to edit your answer)

Question 2

In this problem we will examine wealth dynamics for a simpler setup. Log income, \(\log y_t\) follows an AR(1) process,

\[ \log y_{t+1} = \mu_y + \rho_y \log y_t + \sigma_y \epsilon_{1,t+1} \]

and

\[ \log R_{t+1} = \mu_r + \sigma_r \epsilon_{2,t+1} \]

where \(\epsilon_{1,t+1} \sim N(0,1)\) and \(\epsilon_{2,t+1} \sim N(0,1)\) are IID shocks.

As in the wealth dynamics problem from before, the evolution of wealth is given by

\[ w_{t+1} = R_{t+1}s(w_t) + y_{t+1} \]

where \(s(w_t)\) is the exogenously given savings function from before,

\[ s(w) = s_0 w \cdot \mathbb 1\{w \geq \hat w\} = \begin{cases} s_0 w & w \geq \hat{w}\\ 0 & w < \hat{w} \end{cases} \]

For a constant \(s_0 \in (0,1)\) which is savings rate and \(\hat{w}\geq 0\) is a minimum wealth threshold below which they do not save and instead consume all of their income (since \(w_{t+1} = y_{t+1}\) in that case).

Take the following simpler structure for holding the parameters of the model

function simple_wealth_dynamics_model(;
                 w_hat=1.0, # savings parameter
                 s_0=0.75, # savings parameter
                 mu_y=0.1, # labor income parameter
                 sigma_y=0.1, # labor income parameter
                 rho_y=0.9, # labor income parameter
                 mu_r=0.0, # rate of return parameter
                 sigma_r=0.2, # rate of return parameter
                 )
    return (;w_hat, s_0, mu_y, sigma_y, rho_y, mu_r, sigma_r)
end
simple_wealth_dynamics_model (generic function with 1 method)

and a modified version of the simulate_panel function

function simulate_panel(N, T, p; y_0 = p.mu_y/(1-p.rho_y), w_0 = p.mu_y/(1-p.rho_y))
    # Setup initial conditions
    w = w_0 * ones(N) # start at same w_0
    logy = log.(y_0 * ones(N)) # start at same y_0
    logR = zeros(N) # not used in this exact example, but could be generalized
    
    # Preallocate next period states and R intermediates
    w_p = similar(w)
    logR_p = similar(w)
    logy_p = similar(w)    
    # Temporary used in calculations
    savings_proportion = similar(w) # include constant and R_{t+1}

    for t in 1:T
        R_shock = randn(N)
        y_shock = randn(N)
        @inbounds for i in 1:N
            logy_p[i] = p.mu_y + p.rho_y*logy[i] + p.sigma_y*y_shock[i]
            logR_p[i] = p.mu_r + p.sigma_r*R_shock[i] # no autocorrelation but could reference logR[i]
            savings_proportion[i]  = (w[i] >= p.w_hat) ? p.s_0 * exp(logR_p[i]) : 0.0
            w_p[i] = savings_proportion[i]*w[i] + exp(logy_p[i])
        end
        # Step forward
        w .= w_p
        logy .= logy_p
        logR .= logR_p
    end    
    sort!(w) # sorts the wealth so we can calculate gini/lorenz        
    F, L = lorenz(w)
    return (;w, y = exp.(logy_p), F, L, gini = gini(w))
end
simulate_panel (generic function with 1 method)

The following code shows a basic simulation,

p = simple_wealth_dynamics_model()# Or simple_wealth_dynamics_model(;w_hat = 2.0) to swap out a single parameter, etc.
N = 10_000
T = 200
w_0 = 10.0

res = simulate_panel(N, T, p; w_0) # uses the default y_0 but overrides the w_0 default
@show res.gini, mean(res.w), mean(res.y); # show some of the results
(res.gini, mean(res.w), mean(res.y)) = (0.17315479160633168, 11.95339606819605, 2.8017718145614534)

Part (a)

Using the above code and default parameter values, simulate the model to see the difference in the gini coefficients where you change the variance on the returns sigma_r 10 points between 0.0 to 0.3.

Using your simulations, plot the gini coefficient as a function of sigma_r and comment on the results.

# Modify/add code here, creating new cells as required
sigma_r_values = range(0.0, 0.3, 10)
N = 10_000
T = 200

# simple_wealth_dynamics_model(;sigma_r = sigma_r_values[1]) # etc. to create modified models
res = simulate_panel(N, T, simple_wealth_dynamics_model(;sigma_r = sigma_r_values[end])) # for example, this swaps the sigma_r with the last value in the range
@show res.gini;
res.gini = 0.23641318881795942

Can you provide a brief interpretation of the results?

Answer:

(double click to edit your answer)

Part (b)

Now, take the same model and lets shut off all variation on the income process to leave it as a fixed value so \(y_{t+1} = y_t\) by setting sigma_y = 0, rho_y = 1, mu_y = 0 and then initializing all of the agents with the y_0 = 5.0 and w_0 = 2.0 Calculate the gini coefficient for the same range of sigma_r values as above and plot the results.

 # Modify/add code here, creating new cells as required
p = simple_wealth_dynamics_model(;sigma_y = 0.0, rho_y = 1.0, mu_y = 0.0)
N = 10_000
T = 1000
y_0 = 5.0
w_0 = 2.0
# res = simulate_panel(N, T, p; y_0, w_0)  # adapt this, passing in the y_0 and w_0
2.0

Can you provide a brief interpretation of the results?

Answer:

(double click to edit your answer)

Question 3

A risk-neutral investor with discount factor \(\beta\) values a firm. The firm’s dividends (profits) each period are revenue minus operating costs: \(d_t = r_t - c_t\).

Both revenue and costs follow AR(1) processes driven by a single common macroeconomic shock \(w_{t+1} \sim \mathcal{N}(0,1)\):

\[ r_{t+1} = \mu_r + \rho_r r_t + \sigma_r w_{t+1} \]

\[ c_{t+1} = \mu_c + \rho_c c_t + \sigma_c w_{t+1} \]

The investor wants the expected present discounted value of dividends:

\[ p_0 = \mathbb{E}_0 \sum_{j=0}^{\infty} \beta^j d_{t+j} \]

Use the following parameters:

beta = 0.95
rho_r = 0.8; mu_r = 2.0; sigma_r = 0.5
rho_c = 0.7; mu_c = 1.0; sigma_c = 0.3
r_0 = 10.0; c_0 = 5.0
5.0

Part (a)

Define a state vector \(x_t\) and write down matrices \(A\), \(C\), and \(G\) such that the system can be written in LSS form:

\[ x_{t+1} = A x_t + C w_{t+1}, \quad d_t = G x_t \]

Hint: you will need a constant in the state vector to handle the intercepts \(\mu_r\) and \(\mu_c\).

Answer:

(double click to edit your answer)

Part (b)

Using the LSS form from part (a), compute the expected present discounted value of dividends using the closed-form formula from the formula sheet:

\[ p_0 = G (I - \beta A)^{-1} x_0 \]

# Construct the matrices A, C, G and the initial state x_0
# Then compute the EPDV using the formula above

# Add code here

Part (c)

Verify your closed-form answer by simulation. Simulate N = 5000 paths for T = 500 periods of the two AR(1) processes, compute dividends \(d_t = r_t - c_t\), discount them, and average across paths.

N = 5000
T = 500

# For each path:
#   1. Simulate r_t and c_t for T periods using the AR(1) equations
#   2. Compute d_t = r_t - c_t for each period
#   3. Compute the discounted sum: sum_{t=0}^{T-1} beta^t * d_t
# Average the discounted sums across all N paths

# Add code here
500

Does your simulation match the closed-form answer? What are the sources of any small discrepancy?

Additionally, try changing sigma_r or sigma_c and recomputing the closed-form price. Does the price change? Why or why not?

Answer:

(double click to edit your answer)

Part (d)

Investigate how the firm’s value depends on revenue persistence. Vary rho_r from 0.0 to 0.95 over 10 points, compute the EPDV for each value, and plot the result.

rho_r_values = range(0.0, 0.95, 10)

# For each rho_r value, construct A and compute the EPDV using the closed-form formula
# Plot rho_r_values vs. the EPDV values

# Add code here
0.0:0.10555555555555556:0.95

Provide a brief interpretation: why does higher revenue persistence increase the firm’s value? Hint: what happens to the long-run mean of revenue \(\mu_r/(1-\rho_r)\) as \(\rho_r\) increases?

Answer:

(double click to edit your answer)

Formulas

Use the following formulas as needed. Formulas are intentionally provided without complete definitions of each variable or conditions on convergence, which you should study using your notes.

YOU WILL NOT BE EXPECTED TO USE THE MAJORITY OF THESE FORMULAS - BUT SOME MAY HELP PROVIDE INTUITION

General and Stochastic Process Formulas

Description 1 Formula 1 Description 2 Formula 2
Partial Geometric Series \(\sum_{t=0}^T c^t = \frac{1 - c^{T+1}}{1-c}\) Geometric Series \(\sum_{t=0}^{\infty} c^t = \frac{1}{1 -c }\)
PDV \(p_t = \sum_{j = 0}^{\infty}\beta^j y_{t+j}\) Recursive Formulation of PDV \(p_t = y_t + \beta p_{t+1}\)
Univariate Linear Difference Equation \(x_{t+1} = a x_t + b\) Solution \(x_t = b \frac{1 - a^t}{1 - a} + a^t x_0\)
Linearity of Normals \(X \sim \mathcal{N}(\mu_X, \sigma_X^2), Y \sim \mathcal{N}(\mu_Y, \sigma_Y^2)\) then \(a X + b Y \sim \mathcal{N}(a \mu_X + b \mu_Y, a^2 \sigma_X^2 + b^2 \sigma_Y^2)\) Special Case \(Y \sim N(\mu, \sigma^2)\) then \(Y = \mu + \sigma X\) for \(X \sim N(0,1)\)
Partial Sums \(X_1,\ldots\) IID with \(\mu \equiv \mathbb{E}(X)\) \(\bar{X}_n \equiv \frac{1}{n} \sum_{i=1}^n X_i\) Strong LLN \(\mathbb{P} \left( \lim_{n \rightarrow \infty} \bar{X}_n = \mu \right) = 1\)
AR(1) Process \(X_{t+1} = a X_t + b + c W_{t+1}\) with \(W_{t+1} \sim \mathcal{N}(0, 1)\) Stationary Distribution \(X_{\infty} \sim \mathcal{N}(\frac{b}{1 - a}, \frac{c^2}{1 - a^2})\)
AR(1) Evolution \(X_t \sim \mathcal{N}(\mu_t, v_t)\), then \(X_{t+1} \sim \mathcal{N}(a \mu_t + b, a^2 v_t + c^2)\) Recursively \(\mu_{t+1} = a \mu_t + b, v_{t+1} = a^2 v_t + c^2\)
Mean Ergodic Definition Given Stationary \(X_{\infty}\) \(\lim_{T\to\infty}\frac{1}{T} \sum_{t=1}^T X_t = \mathbb{E}[X_{\infty}]\) ARCH (1) \(X_{t+1} = a X_t + \left(\beta + \gamma X_t^2\right)^{1/2} W_{t+1}\) with \(W_{t+1} \sim \mathcal{N}(0, 1)\)

Inequality and Power Law Formulas

Description 1 Formula 1 Description 2 Formula 2
Kesten Process for \(a_{t+1}, y_{t+1}\) IID \(X_{t+1} = a_{t+1} X_t + y_{t+1}\) Key Conditions for Kesten Stationarity \(\mathbb{E}(\log a_t) < 0\) and \(\mathbb{E}(y) < \infty\)
Counter-CDF \(\mathbb{P}(X > x) = 1 - \mathbb{P}(X \leq x)\) CCDF With density \(f(x)\) and CDF \(F(x)\) \(\int_{x}^{\infty} f(x) dx = 1 - F(x)\)
Pareto PDF with \(x_m\) minimum and tail parameter \(\alpha\) \(f(x) = \frac{\alpha x_m^\alpha}{x^{\alpha+1}},\text{for all } x \geq x_m\) CDF and CCDF \(F(x) = 1 - \left(\frac{x}{x_m}\right)^{-\alpha}\), \(1 - F(x) = \left(\frac{x}{x_m}\right)^{-\alpha}\)
Log-Log Plot with CDF \(F(x)\) \(\log(x)\) vs. \(\log(1 - F(x))\) For Pareto \(\log(1 - F(x)) = \alpha \log(x_m) - \alpha \log(x)\)
Power-law Tail \(\mathbb{P}(X > x) \propto x^{-\alpha}\) for large \(x\) With CCDF \(1 - F(x) \propto x^{-\alpha}\) for large \(x\)
Empirical CDF \(\hat{F}(x) = \frac{\text{number of observations } X_n \leq x}{N}\) Tail Parameter Regression where \(\alpha \approx - a\) \(\log(1 - \hat{F}(x_i)) = b + a \log(x_i) + \epsilon_i\)
Quantile Function \(x = F^{-1}(p)\equiv Q(p)\) Lorenz Curve \(L(p) = \frac{\int_{0}^{p} Q(s) ds}{\int_{0}^{1} Q(s) ds}\)
CDF with Ordered Data \({v_1, \ldots v_n}\) \(F(v_i) \equiv F_i = \frac{i}{n}\) Lorenz with Ordered Data \(S_i = \frac{1}{n}\sum_{j=1}^i v_j\), \(L(v_i) \equiv L_i = \frac{S_i}{S_n}\)
Gini Coefficient Area between Lorenz Curve and Line of Equality Gini with Ordered Data \(G = \frac{2\sum_{i=1}^n i v_i}{n \sum_{i=1}^n v_i} - \frac{n+1}{n}\)

Solow and Stochastic Growth Formulas

Description 1 Formula 1 Description 2 Formula 2
Production \(Y_t = z_t F(K_t, N_t)\) Constant Returns to Scale \(F(\alpha K, \alpha N) = \alpha F(K, N) \quad \forall \alpha > 0\)
Production per Capita \(k_t \equiv K_t/N_t, f(k_t) \equiv F(k_t, 1)\) Per-Capita Output \(y_t = z_t f(k_t)\)
Marginal Product of Capital \(z_t \frac{\partial F(K_t, N_t)}{\partial K_t}\) MPK with \(f(k) = k^\alpha\) \(z_t \frac{\partial F(K_t, N_t)}{\partial K_t} = \alpha z_t k_t^{\alpha - 1}\)
Consumption/Investment \(C_t + X_t = Y_t \equiv z_t F(K_t, N_t)\) Capital Accumulation \(K_{t+1} = (1 - \delta) K_t + X_t\)
Constant Population Growth \(N_{t+1} = (1+g_N) N_t\) Per-Capital Evolution \(k_{t+1} = \frac{1}{1+g_N} \left[(1-\delta) k_t + s z_t f(k_t)\right]\)
Steady State \((g_N + \delta)\bar{k} = s \bar{z} f(\bar{k})\) Steady State with \(f(k) = k^\alpha\) \(\bar{k} = \left(\frac{s \bar{z}}{g_N + \delta}\right)^{\frac{1}{1-\alpha}}\)
Real Rental Rate of Capital \(r_t = z_t f'(k_t)\) Real Wages (with \(f(k) = k^\alpha\)) \(w_t = (1-\alpha) z_t f(k_t)\)
Stochastic Growth Capital Evolution \(k_{t+1} = (1-\delta) k_t + s Z_t f(k_t),\quad \text{given } k_0\) Stochastic Growth Productivity Process \(\log Z_{t+1} = a \log Z_t + b + c W_{t+1}\) with \(W_{t+1} \sim \mathcal{N}(0, 1)\)

Linear State Space Models

Description 1 Formula 1 Description 2 Formula 2
LSS Model \(x_{t+1} = A x_t + C w_{t+1}, y_t = G x_t, w_{t+1} \sim \mathcal{N}(0,I)\) Forecast \(x_{t+1}\) \(x_{t+1} \sim \mathcal{N}(\mu_{t+1}, \Sigma_{t+1})\)
Forecast \(\mu_{t+1}\) \(\mu_{t+1} = A \mu_t\) Forecast \(\Sigma_{t+1}\) \(\Sigma_{t+1} = A \Sigma_t A^{\top} + C C^{\top}\)
Forecast \(y_{t+1}\) \(y_{t+1} \sim \mathcal{N}(G \mu_t, G \Sigma_t G^{\top})\) Expected \(x_{t+j}\) \(\mathbb{E}_t x_{t+j} = A^j \mu_t\)
Expected \(y_{t+j}\) \(\mathbb{E}_t y_{t+j} = G A^j \mu_t\) PDV of \(y_{t+j}\) \(\mathbb{E}_t \sum_{j=0}^{\infty} \beta^j y_{t+j} = G(I - \beta A)^{-1} \mu_t\)
Stationary Distribution \(x_{\infty} \sim \mathcal{N}(\mu_{\infty}, \Sigma_{\infty})\) Stationary \(\mu_{\infty}\) \(\mu_{\infty} = A \mu_{\infty}\)
Stationary \(\Sigma_{\infty}\) \(\Sigma_{\infty} = A \Sigma_{\infty} A^{\top} + C C^{\top}\) Noisy Observation \(y_t = G x_t + H v_t, v_t \sim \mathcal{N}(0, I)\)
Kalman Filter \(K_t\) \(K_t = A \Sigma_t G^{\top} (G \Sigma_t G^{\top} + H H^{\top})^{-1}\) Kalman Filter \(\mu_{t+1}\) \(\mu_{t+1} = A \mu_t + K_t (y_t - G \mu_t)\)
Kalman Filter \(\Sigma_{t+1}\) \(\Sigma_{t+1} = A \Sigma_t A^{\top} - K_t G \Sigma_t A^{\top} + C C^{\top}\) Forecast Error \(FE_{t,t+1} \equiv x_{t+1} - \mathbb{E}_t[x_{t+1}]\)
Var of LSS Forecast Error \(\mathbb{V}_t(FE_{t+1}) = G C C^{\top} G^{\top} + H H^{\top}\) \(\,\) \(\,\)