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...
    945.6 msStatsAPI
   1303.6 msStatistics
   2117.4 msFillArrays
    824.1 msReexport
   1372.7 msDocStringExtensions
    887.8 msPtrArrays
   3535.4 msOrderedCollections
    896.3 msDataAPI
   1835.1 msPDMats
   1641.9 msPreferences
   1476.1 msStatistics → SparseArraysExt
    902.9 msFillArrays → FillArraysStatisticsExt
   6256.1 msIrrationalConstants
   1061.1 msAliasTables
   1686.5 msFillArrays → FillArraysSparseArraysExt
   1409.8 msFillArrays → FillArraysPDMatsExt
   2948.6 msMissings
   1075.4 msJLLWrappers
   4348.1 msDataStructures
   1467.8 msLogExpFunctions
   1391.0 msRmath_jll
   1413.7 msOpenSpecFun_jll
    952.7 msSortingAlgorithms
   1609.9 msRmath
   4934.1 msQuadGK
   5018.2 msSpecialFunctions
   1421.6 msHypergeometricFunctions
   5673.7 msStatsBase
    923.6 msPDMats → StatsBaseExt
   3029.5 msStatsFuns
   4805.5 msDistributions
  31 dependencies successfully precompiled in 29 seconds. 10 already precompiled.
Precompiling packages...
    821.7 msContour
    908.9 msLaTeXStrings
   1096.1 msTensorCore
   1170.0 msMeasures
   2615.9 msFormat
   2291.1 msRequires
    988.5 msStableRNGs
   4642.9 msGrisu
   1336.0 msURIs
    850.1 msSimpleBufferStream
   8888.8 msMacroTools
   3340.0 msUnzip
   1631.0 msTranscodingStreams
    904.6 msDelimitedFiles
    946.2 msBitFlags
   1802.2 msConcurrentUtilities
   3885.6 msNaNMath
   1276.7 msLoggingExtras
   1120.6 msPrecompileTools
   3891.7 msStructUtils
   1047.6 msExceptionUnwrapping
   2892.7 msUnicodeFun
   1708.7 msGraphite2_jll
   8271.3 msFixedPointNumbers
   1185.7 msEpollShim_jll
   1504.4 msLibmount_jll
   1419.5 msLLVMOpenMP_jll
   1302.6 msXorg_libICE_jll
   1580.8 msBzip2_jll
   1864.8 msXorg_libXau_jll
   1437.1 mslibpng_jll
   1399.7 mslibfdk_aac_jll
   1503.8 msLAME_jll
   1343.2 msLERC_jll
   1748.5 msfzf_jll
   1543.1 msJpegTurbo_jll
   1845.0 msXZ_jll
   1410.3 msOgg_jll
   1571.2 msmtdev_jll
   1502.5 msXorg_libXdmcp_jll
   1521.6 msx265_jll
   1495.0 msx264_jll
   1457.0 mslibaom_jll
   1770.3 msMbedTLS_jll
   1604.7 msZstd_jll
   1350.7 msExpat_jll
   1347.4 msLZO_jll
   1392.2 msXorg_xtrans_jll
   1539.0 msOpus_jll
   1415.4 mslibevdev_jll
   1508.5 msLibiconv_jll
   1567.2 msLibffi_jll
   1478.2 mseudev_jll
    850.5 msShowoff
   1530.2 msLibuuid_jll
   1511.6 msFriBidi_jll
    910.2 msCodecZlib
   4104.7 msRecipesBase
   4769.1 msOpenSSL
   1600.7 msPixman_jll
   1486.7 msXorg_libSM_jll
   1540.9 msFreeType2_jll
   5569.6 msColorTypes
   1468.7 msJLFzf
   1725.0 mslibvorbis_jll
   3637.1 msGhostscript_jll
   3096.7 msMbedTLS
   4578.4 msXorg_libxcb_jll
   1731.3 msLibtiff_jll
   1415.2 msDbus_jll
   1959.5 msGettextRuntime_jll
   1968.2 msWayland_jll
   1459.8 mslibinput_jll
   2473.7 msFontconfig_jll
   1272.4 msColorTypes → StyledStringsExt
   7752.8 msColorVectorSpace
  13773.1 msColors
  10956.0 msLatexify
  39654.1 msParsers
   1548.6 msXorg_libX11_jll
   1629.9 msXorg_xcb_util_jll
   2359.4 msGlib_jll
   1668.0 msLatexify → SparseArraysExt
   9503.3 msColorSchemes
   1537.3 msXorg_libXrender_jll
   1360.6 msXorg_libXext_jll
   1636.1 msXorg_libXfixes_jll
   1683.9 msXorg_libxkbfile_jll
  13136.8 msJSON
   1586.3 msXorg_xcb_util_image_jll
   1564.0 msXorg_xcb_util_keysyms_jll
   1645.4 msXorg_xcb_util_renderutil_jll
   1738.3 msXorg_xcb_util_wm_jll
   1603.1 msXorg_libXinerama_jll
   1592.9 msXorg_libXrandr_jll
   2359.8 msLibglvnd_jll
   2111.3 msCairo_jll
   1434.4 msXorg_libXcursor_jll
   1710.7 msXorg_libXi_jll
   1394.9 msXorg_xkbcomp_jll
   1579.1 msXorg_xcb_util_cursor_jll
   1973.4 msHarfBuzz_jll
   1173.1 msXorg_xkeyboard_config_jll
   1685.2 mslibass_jll
   2121.4 msPango_jll
   1690.4 msxkbcommon_jll
   2732.8 msFFMPEG_jll
   1458.1 msVulkan_Loader_jll
   1583.2 mslibdecor_jll
   1227.9 msFFMPEG
  31121.9 msPlotUtils
   1717.8 msGLFW_jll
   3345.1 msQt6Base_jll
  59850.2 msHTTP
   1525.2 msQt6ShaderTools_jll
   6815.2 msPlotThemes
   2356.2 msGR_jll
   4996.9 msQt6Declarative_jll
  10672.4 msRecipesPipeline
    785.9 msQt6Wayland_jll
   5323.2 msGR
  80697.8 msPlots
  122 dependencies successfully precompiled in 228 seconds. 55 already precompiled.
Precompiling packages...
    531.2 msColorVectorSpace → SpecialFunctionsExt
  1 dependency successfully precompiled in 1 seconds. 20 already precompiled.
Precompiling packages...
   1139.8 msQuartoNotebookWorkerJSONExt (serial)
  1 dependency successfully precompiled in 1 seconds
Precompiling packages...
   2421.3 msQuartoNotebookWorkerPlotsExt (serial)
  1 dependency successfully precompiled in 2 seconds
Precompiling packages...
    948.4 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.17455298508030972, 11.914564546821715, 2.7944437177735266)

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.2363872862042659

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}\) \(\,\) \(\,\)