Skip to content

Instantly share code, notes, and snippets.

@PyDataBlog
Last active October 3, 2017 17:33
Show Gist options
  • Save PyDataBlog/1932fe9b7a71d3c891ee4e69e7d05cb8 to your computer and use it in GitHub Desktop.
Save PyDataBlog/1932fe9b7a71d3c891ee4e69e7d05cb8 to your computer and use it in GitHub Desktop.
# expected return of the equally weighted portfolio
weights = np.array([0.5, 0.5])
individual_returns = np.array([rate_1, rate_2])
portfolio_returns = np.dot(weights, individual_returns)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment