Calculating value of investments