portfolio optimizer for homework 1 and scratch work from IPython notebook