Let's says I have unequal monthly interest rates (1,5% in the first month, 1,7% in the second, -0,8% in the third...) is there a way I can calculate what was my interest rate in the semester or in the year? On all the formulas I could manage to find it is taken into consideration that monthly rates are always the same.
You can use the geometric mean, e.g.
quarterly return = (1 + 0.015)*(1 + 0.017)*(1 - 0.008) - 1 = 2.3997 %
Using the geometric mean
gm = 1.007935842 quarterly return = gm^3 - 1 = 2.3997 %
So the average monthly return is
gm - 1 = 0.7935842 %
The effective annual interest rate would be
gm^12 - 1 = 9.94986 % and the nominal annual rate compounded monthly would be
(gm - 1)*12 = 9.52301 %.
APY = (1+r1)*(1+r2) *(1+r3) *(1+r4) *(1+r5) *(1+r6) *(1+r7) *(1+r8) *(1+r9) *(1+r10) *(1+r11) *(1+r12) – 1where r1-r12 are the 12 different monthly rates. If you're talking about variable rate debt, then the above neglects compounding interest.
1+(r1/12)and so on, assuming the interest rates are quoted as annual rates, which they almost certainly are.