I am working on a platform where lenders can lend an amount of money and there are borrowers who can borrow from that pool. All borrow amounts are subject to a yearly interest rate (4%) compounded on a daily basis and an initial borrow fee (0.05%) that is treated as interest.
For example:
- If you borrow \$10,000, the loan would show initially as \$10,005 and the interest will start accruing.
So the question is: what is the APY formula for the lenders? We could easily deduce it if there is only an interest rate, but how would the borrow fee enter the formula? We can add other variables if needed, I'm happy to provide more details.
EDIT: I thought of different solutions and came to this:
$$ APY = (1 + b + \dfrac{r}{N}) * (1 + \dfrac{r}{N})^{N-1} - 1 $$
Where $b$ is the initial borrow fee, $r$ is the annual rate and $N$ is the number of compounding periods. Since only the first period has the base fee, I added that in the first paranthesis, and using the usual APY formula for the rest of the periods. Does that make sense?
Let $r_0$ be daily interest rate. In our case $r_0 = 0.04/365$ (ignoring leap years here). Also let $f$ be the initial fee rate (=0.0005 in our case). If the loan last $N$ days then the effective daily rate can be computed from the equation:
$$ (1+f)(1+r_0)^N = (1+r_1)^N $$ or $$ r_1 = \left( (1+f)(1+r_0)^N\right)^{\frac{1}{N}} - 1 \;\;\; =(1+r_0)(1+f)^{\frac{1}{N}} - 1 $$ As usual, the daily interest of $r_1$ corresponds to the effective APY of $R_1 = \left(1+r_1 \right)^{365}-1$ .For example, while APY for a plain daily-compounded $4\%$ loan is about 0.40808, the effective APYs caused by the initial fee of $0.05\%$ are listed below for different number of years: