So I have an account that provides a 2.02% annual return plus rf%, which is just the annual deposit rate given in this list below. I first made the principle deposit of $2500 in July 2018 at 11:59pm. On the last day of every month I make an additional $800 deposit, ex: on August 31 '18 at 11:59pm I deposit $800 and so on. The list starts from August' 18 till Jan'22.
rate = [1.91, 1.95, 2.19, 2.20, 2.27, 2.40, 2.40, 2.41, 2.42, 2.39, 2.38, 2.40, 2.13, 2.04, 1.83, 1.55, 1.55, 1.55, 1.58, 0.65, 0.05, 0.05, 0.08, 0.09, 0.10, 0.09, 0.09, 0.09, 0.09, 0.09, 0.08, 0.07, 0.07, 0.06, 0.08, 0.10, 0.09, 0.08, 0.08, 0.08, 0.08, 0.08]
The code I have created is very simplistic in nature and when i run it doesn't give me the exact number up to two decimal points as I want. I also want to implement the list of rates I have to correspond to the months I want to know the amount. In this case it's Ocotober '18 which it's rate is 2.19, and for Feb'22 it's 0.08.
P =int(2500)
r =1.91
r2=0.08
FV1= P*(1+(r+2.02)//(100//12))+800
FV2= P*(1+(r2+2.02)//(100//12))+800
print("The value of my account on September 1st 2018, 00:00 am is",FV1)
print("The value of my account on February 1st 2022, 00:00 am is",FV2)
For example, if all goes well for september '18 the value should be; 2500*(1+(1.91+2.02)/100/12)+800 = 3308.19.