Skip to content

A live script to perform numerical simulations and find the best portfolio composition in accordance with the latest Modern Portfolio Theory

Notifications You must be signed in to change notification settings

gahoccode/ModernPorfolioTheory

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Modern Porfolio Theory: the optimal portfolio

#https://medium.com/@akjha22/portfolio-simulation-efficient-frontier-mpt-using-python-1ab99dd47efb A live script to perform numerical simulations and find the best portfolio composition in accordance with the Modern Portfolio Theory by Harry Markowitz.

"Modern portfolio theory (MPT), or mean-variance analysis, is a mathematical framework for assembling a portfolio of assets such that the expected return is maximized for a given level of risk. It is a formalization and extension of diversification in investing, the idea that owning different kinds of financial assets is less risky than owning only one type. Its key insight is that an asset's risk and return should not be assessed by itself, but by how it contributes to a portfolio's overall risk and return. It uses the variance of asset prices as a proxy for risk. Economist Harry Markowitz introduced MPT in a 1952 essay, for which he was later awarded a Nobel Prize in Economics." Source: wikipedia.org

The implementation is made in Python 3 and the download of the data is made throught the FINNHUB Application Programming Interface (API). More details about the API can be found at: https://finnhub.io/docs/api. The user will need to register (registration is free) to obtain a presonal API key.

Enjoy, and happy trading!

Riccardo Poli

https://www.linkedin.com/in/riccardopoli/

PS: feel free to reach out if you have ideas for improvement or if you spot bugs

Disclaimer: investing in the stock market involves risk and can lead to monetary loss. The content of this article is not to be taken as financial advice.

About

A live script to perform numerical simulations and find the best portfolio composition in accordance with the latest Modern Portfolio Theory

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 100.0%