updated inventory calculation and efficient frontier plot