Introduction to Financial Concepts in Python
Dakota Wixom
Quantitative Finance Analyst
Your budget will have to take into account the following:
You will have to adjust for the following:
What is the cumulative growth of an investment that grows by 3% per year for 3 years?
import numpy as np
np.cumprod(1 + np.repeat(0.03, 3)) - 1
array([ 0.03, 0.0609, 0.0927])
Compute the value at each point in time of an initial $100 investment that grows by 3% per year for 3 years?
import numpy as np
100*np.cumprod(1 + np.repeat(0.03, 3))
array([ 103, 106.09, 109.27])
Introduction to Financial Concepts in Python