Calculating the compounding interest formula for an overnight rate
I am VERY NEW to all this industry, so I apologize in advance if my question is too simple.
I am given the formula to calculate the compounded rate, where Ri is the effective rate and k is the compounding period.
If I understood correctly from this source:
GREEK CAPITAL LETTER PI means a product in my formula, k = compounding period (days), i = 1 means that I start from 1 go till k.
Does it mean that my formula in a programming language should be (for instance):
rate = 10%
k = 100
Then I will have:
(1 * 2 * 3 ... * 99 * 100 * (1 + 0.1/360) - 1) * 360/100
How the initial formula above is different from this general formula
Thanks!
1 Comments
Sorted by latest first Latest Oldest Best
The 1st formula could be described as Nominal Interest Rate of 1 Year annualized from Effective Interest Rate over k number of days.
A potential use case is this:
We are a bank that gives customers loans that are repaid after k number of days. We charge an interest rate based on the overnight rate of the central bank and compounded daily. We have to display a annualized interest rate instead of the interest rate over k days.
Descriptive Example:
A customer wants to borrow $P for 3 days. The annualized overnight interest rate quoted by Federal Reserve for each of the 3 days is 0.25%, 0.30%, 0.20%. What is the annualized interest rate for the customer to get an idea of the annual intrest rate?
(((1 + r1/360) x (1 + r2/360) x (1 + r3/360)) - 1) x (360 / 3)
= (((1 + 0.25%/360) x (1 + 0.30%/360) x (1 + 0.20%/360)) - 1) x (360 / 3)
= (((1 + 0.0025/360) x (1 + 0.0030/360) x (1 + 0.0020/360)) - 1) x (360 / 3)
= 0.002500017129668209876543 = 0.25%
The Python code with this example is:
R = [0.0025, 0.0030, 0.0020]
k = len(R)
pi = 1
for i in R:
pi = pi * (1 + i/360)
result = (pi - 1)*(360/k)
print(str(round(result*100,2)) + "%")
Terms of Use Privacy policy Contact About Cancellation policy © freshhoot.com2026 All Rights reserved.