Optimal Portfolio Theory

 I will be using Blogger from now on, as it can allow me to better express hard notation more easily than in the readme.

After reading this you should find yourself familiar with MPT, the risk-return trade-off and the importance of diversification to reduce risk.

Before we begin with the math we need to address the assumptions of the model, this is important as if these are vialated you must see where to alter the theory to make it fit your new assumptions, but for now they are fairly lenient; N>=2 assets, start with £w wealth, no changing portfolio until T, assets can be anything tradable.

We will be using wealth to balance our portfolio, where: 

Now we must either choose the risk or expected return of our portfolio in order to get a closed-form solution;
-Returns (m):
    
first order conditions



For simplicity lets create a few matrices such that:
        A=
𝟏Σ−1𝟏
        B=𝜇Σ−1𝟏
        C=𝜇Σ−1𝜇
 
B𝜆+AΥ=1

&     C𝜆+BΥ=m


now this is easy to code in python.

to add the RFA, find the tangency point such that the gradient from the RFA to the tangent is the Sharpe ratio. Remember, the above will give you sigma in terms of m so do the inverse before continuing 








-Risk












Comments