From 31684f211f7ff87c3183af6d61ef383fc7b3b35a Mon Sep 17 00:00:00 2001 From: robertmartin8 Date: Fri, 10 Apr 2020 11:08:15 +0800 Subject: [PATCH] updated docs --- docs/Roadmap.rst | 5 +++++ pypfopt/base_optimizer.py | 4 ++-- pypfopt/efficient_frontier.py | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/Roadmap.rst b/docs/Roadmap.rst index 701dd5e..e23bb61 100644 --- a/docs/Roadmap.rst +++ b/docs/Roadmap.rst @@ -45,6 +45,11 @@ have any other feature requests, please raise them using GitHub Fixed minor issues in CLA: weight bound bug, ``efficient_frontier`` needed weights to be called, ``set_weights`` not needed. +1.0.2 +----- + +Fixed small but important bug where passing ``expected_returns=None`` fails. According to the docs, users +should be able to only pass covariance if they want to only optimise min volatility. 0.5.0 ===== diff --git a/pypfopt/base_optimizer.py b/pypfopt/base_optimizer.py index faaeb36..e821047 100644 --- a/pypfopt/base_optimizer.py +++ b/pypfopt/base_optimizer.py @@ -351,8 +351,8 @@ def portfolio_performance( After optimising, calculate (and optionally print) the performance of the optimal portfolio. Currently calculates expected return, volatility, and the Sharpe ratio. - :param expected_returns: expected returns for each asset. Set to None if - optimising for volatility only. + :param expected_returns: expected returns for each asset. Can be None if + optimising for volatility only (but not recommended). :type expected_returns: np.ndarray or pd.Series :param cov_matrix: covariance of returns for each asset :type cov_matrix: np.array or pd.DataFrame diff --git a/pypfopt/efficient_frontier.py b/pypfopt/efficient_frontier.py index 1661d01..f351832 100644 --- a/pypfopt/efficient_frontier.py +++ b/pypfopt/efficient_frontier.py @@ -55,8 +55,8 @@ class EfficientFrontier(base_optimizer.BaseConvexOptimizer): def __init__(self, expected_returns, cov_matrix, weight_bounds=(0, 1), gamma=0): """ - :param expected_returns: expected returns for each asset. Set to None if - optimising for volatility only. + :param expected_returns: expected returns for each asset. Can be None if + optimising for volatility only (but not recommended). :type expected_returns: pd.Series, list, np.ndarray :param cov_matrix: covariance of returns for each asset :type cov_matrix: pd.DataFrame or np.array