Disclaimer: this article is not to be taken as financial advice. I am not a qualified professional, so this article is only meant to be used for educational/entertainment purposes. Investing/trading can lead to losses.

Background

In this section we will discuss the theoretical background of the modern portfolio theory. If you want to read more about it, I suggest you to read the brilliant Wikipedia article, on which this section is based. If you just want to get to the Python implementation, you can safely skip to the next section.

Modern portfolio theory (MPT, for short) is a financial model, created by Harry Markowitz, for assembling an asset portfolio that optimizes the risk-return tradeoff.

Let _Rₚ _be a random variable that represents the return of a portfolio. Let Rᵢ be a random variable that represents the return of the i-th asset in the portfolio. Let _wᵢ _be the “weight” of the i-th asset in the portfolio, such that all weights are real numbers between 0 and 1 (inclusive), and they all sum up to 1.

#probability #python #finance #business

Modern portfolio theory model implementation in Python
2.75 GEEK