QuantEcon / QuantEcon.notebooks

Jupyter notebooks contributed by QuantEcon developers, users and the community
BSD 3-Clause "New" or "Revised" License
122 stars 105 forks source link

adding black litterman notebook #45

Closed jstac closed 7 years ago

jstac commented 7 years ago

A couple of issues to be fixed:

First, you are missing some brackets in your definition of the operator T, on both the left and right.

Second, when I use the slider for tau after the heading "Adding views" I get

ValueError                                Traceback (most recent call last)
<ipython-input-15-6497718eb9b3> in BL_plot(tau)
      8     fig, ax = plt.subplots(1, 2, figsize = (16, 6))
      9     ax[0].set_title(r'Relationship between $\hat{\mu}$, $\mu_{BL}$ and $\tilde{\mu}$', fontsize = 15)
---> 10     ax[0].plot(np.arange(N) + 1, Mu_est, 'o', color = 'k', label = r'$\hat{\mu}$ (subj view)')
     11     ax[0].plot(np.arange(N) + 1, mu_m, 'o', color = 'r', label = r'$\mu_{BL}$ (market)')
     12     ax[0].plot(np.arange(N) + 1, mu_tilde, 'o', color = 'y', label = r'$\tilde{\mu}$ (mixture)')

/home/john/anaconda3/lib/python3.5/site-packages/matplotlib/__init__.py in inner(ax, *args, **kwargs)
   1817                     warnings.warn(msg % (label_namer, func.__name__),
   1818                                   RuntimeWarning, stacklevel=2)
-> 1819             return func(ax, *args, **kwargs)
   1820         pre_doc = inner.__doc__
   1821         if pre_doc is None:

/home/john/anaconda3/lib/python3.5/site-packages/matplotlib/axes/_axes.py in plot(self, *args, **kwargs)
   1380         kwargs = cbook.normalize_kwargs(kwargs, _alias_map)
   1381 
-> 1382         for line in self._get_lines(*args, **kwargs):
   1383             self.add_line(line)
   1384             lines.append(line)

/home/john/anaconda3/lib/

Some of the other sliders give similar errors. It might be worth testing them again.