Skip to content

Commit c13115a

Browse files
Tom's June 18 edits of knowing_forecasts lecture
1 parent 6904c6b commit c13115a

File tree

1 file changed

+179
-59
lines changed

1 file changed

+179
-59
lines changed

lectures/knowing_forecasts_of_others.md

+179-59
Original file line numberDiff line numberDiff line change
@@ -1369,39 +1369,151 @@ set in Townsend's original model equals its information set in a pooling equilib
13691369

13701370
Therefore, equilibrium prices and quantities in Townsend's original model equal those in a pooling equilibrium.
13711371

1372-
## Comparison of Two Signal Structures
13731372

1374-
It is enlightening side by side to plot impulse response functions for capital in an industry for the two
1375-
information noisy-signal information structures.
1373+
+++
13761374

1377-
Please remember that the two-signal structure corresponds to the **pooling equilibrium** and also
1378-
**Townsend's original model**.
1375+
## An observed common shock benchmark
13791376

1380-
```{code-cell} python3
1381-
fig_comb = go.Figure(data=[*fig1.data,
1382-
*fig2.update_traces(xaxis='x2', yaxis='y2').data]).set_subplots(1, 2,
1383-
subplot_titles=("One noisy-signal structure", "Two noisy-signal structure"),
1384-
horizontal_spacing=0.1,
1385-
shared_yaxes=True)
1377+
1378+
For purposes of comparison, it is useful to construct a model in which demand disturbance in both industries
1379+
still both share have a common persistent component $\theta_t$, but in which the persistent component $\theta$ is observed each period.
1380+
1381+
In this case, firms share the same information immediately and have no need to deploy signal-extraction techniques.
1382+
1383+
Thus, consider a version of our model in which histories of both $\epsilon_t^i$ and $\theta_t$ are observed by a representative firm.
1384+
1385+
In this case, the firm's optimal decision rule is described by
1386+
1387+
$$
1388+
k_{t+1}^i = \tilde \lambda k_t^i + \frac{1}{\lambda - \rho} \hat \theta_{t+1}
1389+
$$
1390+
1391+
where $\hat \theta_{t+1} = E_t \theta_{t+1}$ is given by
1392+
1393+
$$
1394+
\hat \theta_{t+1} = \rho \theta_t
1395+
$$
1396+
1397+
Thus, the firm's decision rule can be expressed
1398+
1399+
1400+
$$
1401+
k_{t+1}^i = \tilde \lambda k_t^i + \frac{\rho}{\lambda - \rho} \theta_t
1402+
$$
1403+
1404+
1405+
Consequently, when a history $\theta_s, s \leq t$ is observed without noise,
1406+
the following state space system prevails:
1407+
1408+
$$
1409+
\begin{aligned}
1410+
\begin{bmatrix} \theta_{t+1} \cr k_{t+1}^i \end{bmatrix} & =
1411+
\begin{bmatrix} \rho & 0 \cr
1412+
\frac{\rho}{\lambda -\rho} & \tilde \lambda \end{bmatrix}
1413+
\begin{bmatrix} \theta_t \cr k_t^i \end{bmatrix}
1414+
+ \begin{bmatrix} \sigma_v \cr 0 \end{bmatrix} z_{1,t+1} \cr
1415+
\begin{bmatrix} \theta_t \cr k_t^i \end{bmatrix} & = \begin{bmatrix} 1 & 0 \cr 0 & 1 \end{bmatrix}
1416+
\begin{bmatrix} \theta_t \cr k_t^i \end{bmatrix} +
1417+
\begin{bmatrix} 0 \cr 0 \end{bmatrix} z_{1,t+1}
1418+
\end{aligned}
1419+
$$
1420+
1421+
where $z_{t,t+1} $ is a scalar iid standardized Gaussian process.
1422+
1423+
As usual, the system can be written as
1424+
1425+
$$
1426+
\begin{aligned}
1427+
x_{t+1} & = A x_t + C z_{t+1} \cr
1428+
y_t & = G x_t + H w_{t+1}
1429+
\end{aligned}
1430+
$$
1431+
1432+
In order once again to use the quantecon class `quantecon.LinearStateSpace`, let's form pertinent state-space matrices
1433+
1434+
```{code-cell} ipython3
1435+
Ao_lss = np.array([[ρ, 0.],
1436+
[ρ / (λ - ρ), λ_tilde]])
1437+
1438+
Co_lss = np.array([[σ_v], [0.]])
1439+
1440+
Go_lss = np.identity(2)
1441+
```
1442+
1443+
```{code-cell} ipython3
1444+
muo_0 = np.array([0., 0.])
1445+
1446+
lsso = qe.LinearStateSpace(Ao_lss, Co_lss, Go_lss, mu_0=muo_0)
1447+
```
1448+
1449+
Now let's form and plot an impulse response function of $k_t^i$ to shocks $v_t$ to $\theta_{t+1}$
1450+
1451+
```{code-cell} ipython3
1452+
xcoef, ycoef = lsso.impulse_response(j=21)
1453+
data = np.array([ycoef])[0, :, 1, :]
1454+
1455+
fig = go.Figure(data=go.Scatter(y=data[:-1, 0], name=r'$z_{t+1}$'))
1456+
fig.update_layout(title=r'Impulse Response Function',
1457+
xaxis_title= r'lag $j$',
1458+
yaxis_title=r'$k^{i}_{t}$')
1459+
fig3 = fig
1460+
# Export to PNG file
1461+
Image(fig3.to_image(format="png"))
1462+
# fig1.show() will provide interactive plot when running
1463+
# notebook locally
1464+
```
1465+
1466+
## Comparison of All Signal Structures
1467+
1468+
It is enlightening side by side to plot impulse response functions for capital for the two
1469+
noisy-signal information structures and the noiseless signal on $\theta$ that we have just presented.
1470+
1471+
Please remember that the two-signal structure corresponds to the **pooling equilibrium** and also
1472+
**Townsend’s original model**.
1473+
1474+
```{code-cell} ipython3
1475+
:hide-output: false
1476+
1477+
fig_comb = go.Figure(data=[
1478+
*fig1.data,
1479+
*fig2.update_traces(xaxis='x2', yaxis='y2').data,
1480+
*fig3.update_traces(xaxis='x3', yaxis='y3').data
1481+
]).set_subplots(1, 3,
1482+
subplot_titles=("One noisy-signal",
1483+
"Two noisy-signal",
1484+
"No Noise"),
1485+
horizontal_spacing=0.02,
1486+
shared_yaxes=True)
13861487
# Export to PNG file
13871488
Image(fig_comb.to_image(format="png"))
1388-
# fig_comb.show() will provide interactive plot when running
1489+
# fig_comb.show() # will provide interactive plot when running
13891490
# notebook locally
13901491
```
13911492

1392-
The graphs above show that
1493+
The three panels in the graph above show that
1494+
1495+
- responses of $ k_t^i $ to shocks $ v_t $ to the hidden Markov demand state $ \theta_t $ process are **largest** in the no-noisy-signal structure in which the firm observes $\theta_t$ at time $t$
1496+
- responses of $ k_t^i $ to shocks $ v_t $ to the hidden Markov demand state $ \theta_t $ process are **smaller** in the two-noisy-signal structure
1497+
- responses of $ k_t^i $ to shocks $ v_t $ to the hidden Markov demand state $ \theta_t $ process are **smallest** in the one-noisy-signal structure
1498+
1499+
With respect to the iid demand shocks $e_t$ the graphs show that
1500+
1501+
- responses of $ k_t^i $ to shocks $ e_t $ to the hidden Markov demand state $ \theta_t $ process are **smallest** (i.e., nonexistent) in the no-noisy-signal structure in which the firm observes $\theta_t$ at time $t$
1502+
- responses of $ k_t^i $ to shocks $ e_t $ to the hidden Markov demand state $ \theta_t $ process are **larger** in the two-noisy-signal structure
1503+
- responses of $ k_t^i $ to idiosyncratic *own-market* noise-shocks $ e_t $ are **largest** in the one-noisy-signal structure
1504+
1505+
13931506

1394-
* responses of $k_t^i$ to shocks $v_t$ to the hidden Markov demand state $\theta_t$ process are **larger** in the two-noisy=signal structure
1395-
* responses of $k_t^i$ to idiosyncratic *own-market* noise-shocks $e_t$ are **smaller** in the two-noisy-signal structure
13961507

1397-
Taken together, these findings in turn can be shown to imply that time series correlations and coherences between outputs in
1398-
the two industries are higher in the two-noisy-signals or **pooling** model.
1508+
Among other things, these findings indicate that time series correlations and coherences between outputs in the two industries are higher in the two-noisy-signals or **pooling** model than they are in the one-noisy signal model.
13991509

1400-
The enhanced influence of the shocks $v_t$ to the hidden Markov demand state $\theta_t$ process that
1510+
The enhanced influence of the shocks $ v_t $ to the hidden Markov demand state $ \theta_t $ process that
14011511
emerges from the two-noisy-signal model relative to the one-noisy-signal model is a symptom of a lower
14021512
equilibrium hidden-state reconstruction error variance in the two-signal model:
14031513

1404-
```{code-cell} python3
1514+
```{code-cell} ipython3
1515+
:hide-output: false
1516+
14051517
display(Latex('$\\textbf{Reconstruction error variances}$'))
14061518
display(Latex(f'One-noise structure: {round(p_one, 6)}'))
14071519
display(Latex(f'Two-noise structure: {round(p_two, 6)}'))
@@ -1410,12 +1522,19 @@ display(Latex(f'Two-noise structure: {round(p_two, 6)}'))
14101522
Kalman gains for the two
14111523
structures are
14121524

1413-
```{code-cell} python3
1525+
```{code-cell} ipython3
1526+
:hide-output: false
1527+
14141528
display(Latex('$\\textbf{Kalman Gains}$'))
14151529
display(Latex(f'One noisy-signal structure: {round(κ_one, 6)}'))
14161530
display(Latex(f'Two noisy-signals structure: {round(κ_two, 6)}'))
14171531
```
14181532

1533+
Another lesson that comes from the preceding three-panel graph is that the presence of iid noise
1534+
$\epsilon_t^i$ in industry $i$ generates a response in $k_t^{-i}$ in the two-noisy-signal structure, but not in the one-noisy-signal structure.
1535+
1536+
+++
1537+
14191538
## Notes on History of the Problem
14201539

14211540
To truncate what he saw as an intractable, infinite dimensional state space,
@@ -1424,47 +1543,46 @@ is revealed to all firms after a fixed number of periods.
14241543

14251544
Thus,
14261545

1427-
* Townsend wanted to assume that at time $t$ firms in industry $i$ observe
1428-
$k_t^i, Y_t^i, P_t^i, (P^{-i})^t$, where $(P^{-i})^t$ is the history of prices in
1429-
the other market up to time $t$.
1430-
* Because that turned out to be too challenging, Townsend made a sensible
1546+
- Townsend wanted to assume that at time $ t $ firms in industry $ i $ observe
1547+
$ k_t^i, Y_t^i, P_t^i, (P^{-i})^t $, where $ (P^{-i})^t $ is the history of prices in
1548+
the other market up to time $ t $.
1549+
- Because that turned out to be too challenging, Townsend made a sensible
14311550
alternative assumption that eased his calculations: that after a large
1432-
number $S$ of periods, firms in industry $i$ observe the
1433-
hidden Markov component of the demand shock $\theta_{t-S}$.
1551+
number $ S $ of periods, firms in industry $ i $ observe the
1552+
hidden Markov component of the demand shock $ \theta_{t-S} $.
14341553

1435-
>
14361554

14371555
Townsend argued that the more manageable model could do a good job of
14381556
approximating the intractable model in which the Markov component of the demand shock remains unobserved
14391557
for ever.
14401558

1441-
By applying technical machinery of {cite}`PCL`,
1442-
{cite}`Pearlman_Sargent2005` showed that there is a recursive
1559+
By applying technical machinery of [[PCL86](https://python-advanced.quantecon.org/zreferences.html#id23)],
1560+
[[PS05](https://python-advanced.quantecon.org/zreferences.html#id22)] showed that there is a recursive
14431561
representation of the equilibrium of the perpetually and symmetrically
14441562
uninformed model that Townsend wanted to solve
1445-
{cite}`townsend`.
1563+
[[Tow83](https://python-advanced.quantecon.org/zreferences.html#id25)].
14461564

1447-
A reader of {cite}`Pearlman_Sargent2005` will notice that their representation of the equilibrium of
1448-
Townsend's model exactly matches that of the **pooling equilibrium** presented here.
1565+
A reader of [[PS05](https://python-advanced.quantecon.org/zreferences.html#id22)] will notice that their representation of the equilibrium of
1566+
Townsends model exactly matches that of the **pooling equilibrium** presented here.
14491567

14501568
We have structured our notation in this lecture to faciliate comparison of the **pooling equilibrium**
1451-
constructed here with the equilibrium of Townsend's model reported in {cite}`Pearlman_Sargent2005`.
1569+
constructed here with the equilibrium of Townsends model reported in [[PS05](https://python-advanced.quantecon.org/zreferences.html#id22)].
14521570

1453-
The computational method of {cite}`Pearlman_Sargent2005` is recursive:
1571+
The computational method of [[PS05](https://python-advanced.quantecon.org/zreferences.html#id22)] is recursive:
14541572
it enlists the Kalman filter and invariant subspace methods for
14551573
solving systems of Euler
1456-
equations [^footnote1] .
1574+
equations <sup><a href=#footnote1 id=footnote1-link>[5]</a></sup> .
14571575

1458-
As {cite}`singleton`,
1459-
{cite}`kasa`, and {cite}`sargent91` also
1576+
As [[Sin87](https://python-advanced.quantecon.org/zreferences.html#id27)],
1577+
[[Kas00](https://python-advanced.quantecon.org/zreferences.html#id24)], and [[Sar91](https://python-advanced.quantecon.org/zreferences.html#id26)] also
14601578
found, the equilibrium is fully revealing: observed prices tell
1461-
participants in industry $i$ all of the information held by
1462-
participants in market $-i$ ($-i$ means not $i$).
1579+
participants in industry $ i $ all of the information held by
1580+
participants in market $ -i $ ($ -i $ means not $ i $).
14631581

14641582
This
14651583
means that higher-order beliefs play no role: observing equilibrium prices
14661584
in effect lets decision makers pool their information
1467-
sets [^footnote2] .
1585+
sets <sup><a href=#footnote2 id=footnote2-link>[6]</a></sup> .
14681586

14691587
The disappearance of higher order beliefs means that
14701588
decision makers in this model do not really face a problem of
@@ -1473,12 +1591,14 @@ forecasting the forecasts of others.
14731591
Because
14741592
those forecasts are the same as their own, they know them.
14751593

1594+
+++
1595+
14761596
### Further historical remarks
14771597

1478-
Sargent {cite}`sargent91` proposed a way to compute an equilibrium
1598+
Sargent [[Sar91](https://python-advanced.quantecon.org/zreferences.html#id26)] proposed a way to compute an equilibrium
14791599
without making Townsend’s approximation.
14801600

1481-
Extending the reasoning of {cite}`Muth1960`, Sargent noticed that it is possible to
1601+
Extending the reasoning of [[Mut60](https://python-advanced.quantecon.org/zreferences.html#id110)], Sargent noticed that it is possible to
14821602
summarize the relevant history with a low dimensional object, namely, a
14831603
small number of current and lagged forecasting errors.
14841604

@@ -1494,16 +1614,16 @@ appropriate orders of the autoregressive and moving average pieces of
14941614
the equilibrium representation.
14951615

14961616
By working in the frequency
1497-
domain {cite}`kasa` showed how to discover the appropriate
1617+
domain [[Kas00](https://python-advanced.quantecon.org/zreferences.html#id24)] showed how to discover the appropriate
14981618
orders of the autoregressive and moving average parts, and also how to
14991619
compute an equilibrium.
15001620

1501-
The {cite}`Pearlman_Sargent2005` recursive computational method, which stays in the time domain, also
1621+
The [[PS05](https://python-advanced.quantecon.org/zreferences.html#id22)] recursive computational method, which stays in the time domain, also
15021622
discovered appropriate orders of the autoregressive and moving
15031623
average pieces.
15041624

15051625
In addition, by displaying equilibrium representations
1506-
in the form of {cite}`PCL`, {cite}`Pearlman_Sargent2005`
1626+
in the form of [[PCL86](https://python-advanced.quantecon.org/zreferences.html#id23)], [[PS05](https://python-advanced.quantecon.org/zreferences.html#id22)]
15071627
showed how the moving average piece is linked to the innovation process
15081628
of the hidden persistent component of the demand shock.
15091629

@@ -1512,26 +1632,26 @@ innovation process is the additional state variable contributed by the
15121632
problem of extracting a signal from equilibrium prices that decision
15131633
makers face in Townsend’s model.
15141634

1515-
[^footnote0]: {cite}`Pearlman_Sargent2005` verified this assertion using a different tactic, namely, by constructing
1635+
<p><a id=footnote0 href=#footnote0-link><strong>[1]</strong></a> [[PS05](https://python-advanced.quantecon.org/zreferences.html#id22)] verified this assertion using a different tactic, namely, by constructing
15161636
analytic formulas for an equilibrium under the incomplete
15171637
information structure and confirming that they match the pooling equilibrium formulas derived here.
15181638

1519-
[^footnote1]: See {cite}`ahms` for an account of invariant subspace methods.
1520-
1521-
[^footnote2]: See {cite}`ams` for a discussion
1522-
of information assumptions needed to create a situation
1523-
in which higher order beliefs appear in equilibrium decision rules. A way
1524-
to read our findings in light of {cite}`ams` is that, relative
1525-
to the number of signals agents observe, Townsend's
1526-
section 8 model has too few random shocks to get higher order beliefs to
1527-
play a role.
1528-
1529-
[^footnote3]: See {cite}`Sargent1987`, especially
1639+
<p><a id=footnote3 href=#footnote3-link><strong>[2]</strong></a> See [[Sar87](https://python-advanced.quantecon.org/zreferences.html#id197)], especially
15301640
chapters IX and XIV, for principles that guide solving some roots backwards and others forwards.
15311641

1532-
[^footnote4]: As noted by {cite}`Sargent1987`, this difference equation is the Euler equation for
1642+
<p><a id=footnote4 href=#footnote4-link><strong>[3]</strong></a> As noted by [[Sar87](https://python-advanced.quantecon.org/zreferences.html#id197)], this difference equation is the Euler equation for
15331643
a planning problem that maximizes the discounted sum of consumer plus
15341644
producer surplus.
15351645

1536-
[^footnote5]: {cite}`Pearlman_Sargent2005` verify the same claim by applying machinery of {cite}`PCL`.
1646+
<p><a id=footnote5 href=#footnote5-link><strong>[4]</strong></a> [[PS05](https://python-advanced.quantecon.org/zreferences.html#id22)] verify the same claim by applying machinery of [[PCL86](https://python-advanced.quantecon.org/zreferences.html#id23)].
1647+
1648+
<p><a id=footnote1 href=#footnote1-link><strong>[5]</strong></a> See [[AHMS96](https://python-advanced.quantecon.org/zreferences.html#id135)] for an account of invariant subspace methods.
1649+
1650+
<p><a id=footnote2 href=#footnote2-link><strong>[6]</strong></a> See [[AMS02](https://python-advanced.quantecon.org/zreferences.html#id28)] for a discussion
1651+
of information assumptions needed to create a situation
1652+
in which higher order beliefs appear in equilibrium decision rules. A way
1653+
to read our findings in light of [[AMS02](https://python-advanced.quantecon.org/zreferences.html#id28)] is that, relative
1654+
to the number of signals agents observe, Townsend’s
1655+
section 8 model has too few random shocks to get higher order beliefs to
1656+
play a role.
15371657

0 commit comments

Comments
 (0)