GitHub

@@ -53,7 +53,7 @@ An asset is a claim on one or more future payoffs.

53535454

The spot price of an asset depends primarily on

555556-

* the anticipated income stream

56+

* the anticipated income stream

5757

* attitudes about risk

5858

* rates of time preference

5959

@@ -313,7 +313,8 @@ The next figure shows a simulation, where

313313

* $g_t = \exp(X_t)$, so that $\ln g_t = X_t$ is the growth rate.

314314315315

```{code-cell} ipython

316-

mc = qe.tauchen(0.96, 0.25, n=25)

316+

n = 7

317+

mc = qe.tauchen(n, 0.96, 0.25)

317318

sim_length = 80

318319319320

x_series = mc.simulate(sim_length, init=np.median(mc.state_values))

@@ -404,7 +405,7 @@ Here's the code, including a test of the spectral radius condition

404405

```{code-cell} python3

405406

n = 25 # Size of state space

406407

β = 0.9

407-

mc = qe.tauchen(0.96, 0.02, n=n)

408+

mc = qe.tauchen(n, 0.96, 0.02)

408409409410

K = mc.P * np.exp(mc.state_values)

410411

@@ -566,7 +567,7 @@ class AssetPriceModel:

566567

if mc is None:

567568

self.ρ = 0.9

568569

self.σ = 0.02

569-

self.mc = qe.tauchen(self.ρ, self.σ, n=25)

570+

self.mc = qe.tauchen(n, self.ρ, self.σ)

570571

else:

571572

self.mc = mc

572573

@@ -962,7 +963,7 @@ $$

962963

Consider the following primitives

963964964965

```{code-cell} python3

965-

n = 5

966+

n = 5 # Size of State Space

966967

P = np.full((n, n), 0.0125)

967968

P[range(n), range(n)] += 1 - P.sum(1)

968969

# State values of the Markov chain

Read the original on github.com ↗