Added portfolio generation code