Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pypfopt/efficient_frontier/efficient_frontier.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def _validate_returns(self, returns):
Helper method to validate daily returns (needed for some efficient frontiers)
"""
if not isinstance(returns, (pd.DataFrame, np.ndarray)):
raise TypeError("returns should be a pd.Dataframe or np.ndarray")
raise TypeError("returns should be a pd.DataFrame or np.ndarray")

returns_df = pd.DataFrame(returns)
if returns_df.isnull().values.any():
Expand All @@ -163,10 +163,10 @@ def _validate_returns(self, returns):
def _make_weight_sum_constraint(self, is_market_neutral):
"""
Helper method to make the weight sum constraint. If market neutral,
validate the weights proided in the constructor.
validate the weights provided in the constructor.
"""
if is_market_neutral:
#  Check and fix bounds
# Check and fix bounds
portfolio_possible = np.any(self._lower_bounds < 0)
if not portfolio_possible:
warnings.warn(
Expand Down
Loading