for loop to iterate over the basket of stocks