Skip to content

Commit

Permalink
Merge pull request #7 from tamilselvanarjun/testing2
Browse files Browse the repository at this point in the history
Testing2
  • Loading branch information
tamilselvanarjun authored Mar 29, 2024
2 parents 2380c4c + d810257 commit 9ddada7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build/lib/finmodels/portfolio_optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def optimize_portfolio(expected_returns, covariance_matrix):
# Define the objective function (maximize return, minimize risk)
objective = cp.Maximize(expected_return - 0.5 * risk)

# Define the constraints (weights sum to 1, individual weights are non-negative)

constraints = [cp.sum(weights) == 1, weights >= 0]

# Formulate and solve the problem
Expand Down

0 comments on commit 9ddada7

Please sign in to comment.