GitHub

@@ -50,14 +50,14 @@ These themes appear repeatedly below.

50505151

Mathematically, LQ control problems are closely related to {doc}`the Kalman filter <kalman>`

525253-

* Recursive formulations of linear-quadratic control problems and Kalman filtering problems both involve matrix **Riccati equations**.

54-

* Classical formulations of linear control and linear filtering problems make use of similar matrix decompositions (see for example [this lecture](https://python-advanced.quantecon.org/lu_tricks.html) and [this lecture](https://python-advanced.quantecon.org/classical_filtering.html)).

53+

* Recursive formulations of linear-quadratic control problems and Kalman filtering problems both involve matrix [Riccati equations](https://en.wikipedia.org/wiki/Riccati_equation).

54+

* Classical formulations of linear control and linear filtering problems make use of similar matrix decompositions (see for example[Classical Control with Linear Algebra](https://python-advanced.quantecon.org/lu_tricks.html) and [Classical Prediction and Filtering With Linear Algebra](https://python-advanced.quantecon.org/classical_filtering.html)).

55555656

In reading what follows, it will be useful to have some familiarity with

57575858

* matrix manipulations

5959

* vectors of random variables

60-

* dynamic programming and the Bellman equation (see for example {doc}`this lecture <intro:short_path>` and {doc}`this lecture <optgrowth>`)

60+

* dynamic programming and the Bellman equation (see for example {doc}`Shortest Paths <intro:short_path>` and {doc}`Optimal Growth <optgrowth>`)

61616262

For additional reading on LQ control, see, for example,

6363

@@ -98,7 +98,7 @@ x_{t+1} = A x_t + B u_t + C w_{t+1},

9898

Here

9999100100

* $u_t$ is a "control" vector, incorporating choices available to a decision-maker confronting the current state $x_t$

101-

* $\{w_t\}$ is an uncorrelated zero mean shock process satisfying $\mathbb E w_t w_t' = I$, where the right-hand side is the identity matrix

101+

* $\{w_t\}$ is a sequence of uncorrelated zero mean shock process satisfying $\mathbb E w_t w_t' = I$, where the right-hand side is the identity matrix

102102103103

Regarding the dimensions

104104

@@ -117,8 +117,8 @@ $$

117117

Here $a_t$ is assets, $r$ is a fixed interest rate, $c_t$ is

118118

current consumption, and $y_t$ is current non-financial income.

119119120-

If we suppose that $\{ y_t \}$ is serially uncorrelated and $N(0,

121-

\sigma^2)$, then, taking $\{ w_t \}$ to be standard normal, we can write

120+

If we suppose that $\{y_t\}$ is serially uncorrelated and $N(0,

121+

\sigma^2)$, then, taking $\{w_t\}$ to be standard normal, we can write

122122

the system as

123123124124

$$

@@ -254,13 +254,20 @@ In the LQ model, the aim is to minimize flow of losses, where time-$t$ loss is g

254254

x_t' R x_t + u_t' Q u_t

255255

```

256256257+

Where the entries in matrices $R$ and $Q$ are chosen to match the specific problem that is being studied.

258+257259

Here

258260259261

* $R$ is assumed to be $n \times n$, symmetric and nonnegative definite.

260262

* $Q$ is assumed to be $k \times k$, symmetric and positive definite.

261263262264

```{note}

263265

In fact, for many economic problems, the definiteness conditions on $R$ and $Q$ can be relaxed. It is sufficient that certain submatrices of $R$ and $Q$ be nonnegative definite. See {cite}`HansenSargent2008` for details.

266+267+

```

268+269+

```{note}

270+

The use of $R$ and $Q$ notations may differ depending on the source. Some authors use $Q$ to be the matrix associated with the state variables and $R$ with the control variables.

264271

```

265272266273

#### Example 1

@@ -328,7 +335,7 @@ Comments:

328335329336

* We assume $R_f$ to be $n \times n$, symmetric and nonnegative definite.

330337

* We allow $\beta = 1$, and hence include the undiscounted case.

331-

* $x_0$ may itself be random, in which case we require it to be independent of the shock sequence $w_1, \ldots, w_T$.

338+

* $x_0$ may itself be random, in which case we require it to be independent of the shock sequence $\{w_1, \ldots, w_T\}$.

332339333340

(lq_cp)=

334341

### Information

@@ -369,7 +376,7 @@ What's special about the LQ case is that -- as we shall soon see --- the optima

369376

### Solution

370377371378

To solve the finite horizon LQ problem we can use a dynamic programming

372-

strategy based on backward induction that is conceptually similar to the approach adopted in {doc}`this lecture <intro:short_path>`.

379+

strategy based on backward induction that is conceptually similar to the approach adopted in {doc}`Shortest Paths <intro:short_path>`.

373380374381

For reasons that will soon become clear, we first introduce the notation $J_T(x) = x' R_f x$.

375382

@@ -388,6 +395,8 @@ x_{T-1}' R x_{T-1} + u' Q u + \beta \,

388395

\}

389396

$$

390397398+

We use $u$ instead of $u_{T-1}$ here to simplify notation.

399+391400

At this stage, it is convenient to define the function

392401393402

```{math}

@@ -506,7 +515,7 @@ d_{T-1} := \beta \mathop{\mathrm{trace}}(C' P_T C)

506515507516

(The algebra is a good exercise --- we'll leave it up to you.)

508517509-

If we continue working backwards in this manner, it soon becomes clear that $J_t (x) = x' P_t x + d_t$ as claimed, where $\{P_t\}$ and $\{d_t\}$ satisfy the recursions

518+

If we continue working backwards in this manner, it soon becomes clear that $J_t (x) = x' P_t x + d_t$ as claimed, where $P_t$ and $d_t$ satisfy the recursions

510519511520

```{math}

512521

:label: lq_pr

@@ -541,7 +550,7 @@ These are the linear optimal control policies we {ref}`discussed above <lq_cp>`.

541550542551

In particular, the sequence of controls given by {eq}`lq_oc` and {eq}`lq_lom` solves our finite horizon LQ problem.

543552544-

Rephrasing this more precisely, the sequence $u_0, \ldots, u_{T-1}$ given by

553+

Rephrasing this more precisely, the sequence $\{u_0, \ldots, u_{T-1}\}$ given by

545554546555

```{math}

547556

:label: lq_xud

@@ -639,7 +648,7 @@ $$

639648

Now that the problem is expressed in LQ form, we can proceed to the solution

640649

by applying {eq}`lq_pr` and {eq}`lq_oc`.

641650642-

After generating shocks $w_1, \ldots, w_T$, the dynamics for assets and

651+

After generating shocks $\{w_1, \ldots, w_T\}$, the dynamics for assets and

643652

consumption can be simulated via {eq}`lq_xud`.

644653645654

The following figure was computed using $r = 0.05, \beta = 1 / (1+ r),

Read the original on github.com ↗