diff --git a/pypfopt/discrete_allocation.py b/pypfopt/discrete_allocation.py index 11d00ee..d67f911 100644 --- a/pypfopt/discrete_allocation.py +++ b/pypfopt/discrete_allocation.py @@ -2,6 +2,7 @@ The ``discrete_allocation`` module contains the ``DiscreteAllocation`` class, which offers multiple methods to generate a discrete portfolio allocation from continuous weights. """ + import collections import cvxpy as cp diff --git a/pypfopt/plotting.py b/pypfopt/plotting.py index e46c663..54fcf48 100644 --- a/pypfopt/plotting.py +++ b/pypfopt/plotting.py @@ -174,7 +174,7 @@ def _plot_cla(cla, points, ax, show_assets, show_tickers, interactive): mode="markers", name="Max Sharpe Portfolio", marker=dict(size=12, symbol="x", color="coral"), - hovertemplate=f"Sharpe: %{{customdata[1]:.4}}
" + hovertemplate, + hovertemplate="Sharpe: %{{customdata[1]:.4}}
" + hovertemplate, ) ) else: