Adjustments to Original Portfolio Code