The function returns optimal portfolio weights based on timeseries ticker data.