Calculating investment projections
Let’s start from the basics using some simple assumptions to calculate how interest will increase our investment value over 1 year:
expectedReturn = 0.08 initialInvestment = 5000 years = 1 valuePrincipal = initialInvestment * (1 + expectedReturn) print(valuePrincipal)
In this example, I used an 8% expected return for my portfolio and an initial investment of 5,000. So the result would be 5,400 if the interest from our portfolio return is applied at the end of the year. If we generalized this formula for monthly interest instead, we would get the following:
valuePrincipal = initialInvestment * pow(1 + expectedReturn/12, (years*12)) print(valuePrincipal)
Here, we make use of the pow
function to implement the power used in the original formula. Due to the more frequent compounding, the result would be slightly higher at 5414.99
. If we were to allow only one-time investments into our portfolios, this would be all we need. In reality...