@@ -197,8 +197,7 @@ sample = excess_return.rvs(T)
197197w = np.linalg.solve(δ * Σ_est, μ_est)
198198
199199fig, ax = plt.subplots(figsize=(8, 5))
200- ax.set_title('Mean-variance portfolio weights recommendation \
201- and the market portfolio')
200+ ax.set_title('Mean-variance portfolio weights recommendation and the market portfolio')
202201ax.plot(np.arange(N)+1, w, 'o', c='k', label='$w$ (mean-variance)')
203202ax.plot(np.arange(N)+1, w_m, 'o', c='r', label='$w_m$ (market portfolio)')
204203ax.vlines(np.arange(N)+1, 0, w, lw=1)
@@ -219,7 +218,7 @@ Black and Litterman's responded to this situation in the following way:
219218- They want to continue to allow the customer to express his or her
220219 risk tolerance by setting $\delta$.
221220- Leaving $\Sigma$ at its maximum-likelihood value, they push
222- $\mu$ away from its maximum value in a way designed to make
221+ $\mu$ away from its maximum-likelihood value in a way designed to make
223222 portfolio choices that are more plausible in terms of conforming to
224223 what most people actually do.
225224
@@ -314,8 +313,7 @@ d_m = r_m / σ_m
314313μ_m = (d_m * Σ_est @ w_m).reshape(N, 1)
315314
316315fig, ax = plt.subplots(figsize=(8, 5))
317- ax.set_title(r'Difference between $\hat{\mu}$ (estimate) and \
318- $\mu_{BL}$ (market implied)')
316+ ax.set_title(r'Difference between $\hat{\mu}$ (estimate) and $\mu_{BL}$ (market implied)')
319317ax.plot(np.arange(N)+1, μ_est, 'o', c='k', label='$\hat{\mu}$')
320318ax.plot(np.arange(N)+1, μ_m, 'o', c='r', label='$\mu_{BL}$')
321319ax.vlines(np.arange(N) + 1, μ_m, μ_est, lw=1)
@@ -418,8 +416,7 @@ def BL_plot(τ):
418416 ax[0].vlines(np.arange(N)+1, μ_m, μ_est, lw=1)
419417 ax[0].axhline(0, c='k', ls='--')
420418 ax[0].set(xlim=(0, N+1), xlabel='Assets',
421- title=r'Relationship between $\hat{\mu}$, \
422- $\mu_{BL}$and$\tilde{\mu}$')
419+ title=r'Relationship between $\hat{\mu}$, $\mu_{BL}$, and $ \tilde{\mu}$')
423420 ax[0].xaxis.set_ticks(np.arange(1, N+1, 1))
424421 ax[0].legend(numpoints=1)
425422
0 commit comments