Modern portfolio theory is based on a simple concept: lowering risks of a portfolio through diversification. Assuming you have a list of hardly correlated assets, or (ideally) even negatively correlated assets, you will be able to build a portfolio of these assets in a way that its reward to risk ratio is higher than each one of those assets.
The questions is then: What should be the weights of each asset in that optimum portfolio?
This is what we see in this video. I show basic math & statistic calculations to determine gains, variances and correlations of different assets. In the end, we run our simple optimization on a portfolio of Long Term bonds, Stock Market, Medium Term bonds, Gold and Other Commodities. These are the five major asset classes of Ray Dalio’s “All Weather” portfolio. You can easily find good reads and deep analysis of this portfolio over internet; but here we see with some coding how it is constructed.
I have also programmed a tool that does these portfolio optimization for a combination of assets online; check it here: Portfolio optimization tool
Really wonderful information can be found on web blog.