Code to do ETF financial portfolio optimization.
Most of it has been adapted from here and here. Plenty of other articles can be found via a simple google search. For example check out this article for one involving interactive plots.
This is just an introduction into a vast field of finance. Check out the pyportfolioopt package for more advanced implementations, and this list of github packages for countless other implementations. Also this article is full of ideas into how machine learning is advancing this field.