You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a project for dealing with an efficient portfolio by using python.
1. Definition of Efficient Portfolio
An efficient portfolio is a portfolio (a combination of various financial assets) that offers the highest expected return for a given level of risk, or the lowest level of risk for a given expected return.
We can express the above sentence as the next mathematical formula
$$
\min_{\mu_{p}=c}\sigma_{p}^{2}\text{ or }\max_{\sigma_{p}^{2}=c}\mu_{p}
$$
2. Virtual example of Efficient Portfolio
To understand the above condition formulas vividly, I'm going to set a portfolio comprised of two virtual stocks: $A$ and $B$
Let $x_{A}$ and $x_{B}$ as portions of stock A and B each. That is, $x_{A} + x_{B} = 1$. So portfolio $R = x_{A}A + x_{B}B$.
A mean and variance of $R$ (a.k.a return and volatility) is as follow:
Because $X_{B} = 2 - 3x_{A}$ and $0\leq x_{B} \leq 1$, so the range of $x_{A}$ is like that. Fortunately, the root of the above formula is $\frac{4}{7}$, whici is in the range of $x_{A}$. In conclusion, an efficieint portfolio is comprised of $\frac{4}{7}A$ and $\frac{3}{7}B$
3. Generalized Efficient Portfolio
We don't have to confine ourselves to a portfolio comprised of two shares. We can deal with arbitrary numbers of stocks through matrix algebra.
Let's assume that stocks $S_i, i\in I=(1,2,...,k)$ has its own mean and standard deviation ($\mu_i, \sigma_i$). So a mean vector and variance-covariance matrix is as follows.