How to compute the present value of an annuity in Python
Land Your First Data Science Job
A proven roadmap to prepare for $75K+ entry-level data roles. Perfect for Data Scientist ready to level up their career.
What is an annuity?
An annuity is a series of payments made at equal intervals.
In the real world, for example, it can be understood as regular deposits to a savings account.
As you can find on Wikipedia here is the ordinary annuity formula:
Where
- PV: The present value of an ordinary annuity
- PMT: Value of each payment
- r: interest rate per period
- n: number of periods
And in Python?
If we literally transpose this formula in Python.
If we take an example with
- PMT = 100$ : Value at each payment
- r = 7% or 0.07 : interest rate per period here 7% per annum.
- n = 5 : 5 years
Here you are! You now know how to compute the present value of an annuity.
More on financial analysis
If you want to know more about Financial Analysis in Python and avoid the headaches... check out the other articles I wrote by clicking just here:
Land Your First Data Science Job
A proven roadmap to prepare for $75K+ entry-level data roles. Perfect for Data Scientist ready to level up their career.
Related Articles
Continue your learning journey with these related topics
Master Data Science in Days, Not Months 🚀
Skip the theoretical rabbit holes. Get practical data science skills delivered in bite-sized lessons – Approach used by real data scientist. Not bookworms. 📚