Interest, APR, fees and amortisation
A rate is only comparable once every fee and every payment date is inside it. Flat, reducing, nominal and compounded rates can differ by a factor of three for the same loan
Owoleaf's salary advance in the lab charges 5% interest for one 30-day period and a 1% fee taken from the amount when the money is paid out. A customer asks for ₦17,000. What is the cost of the loan as an annual rate, with compounding, assuming 365 days a year?
A loan is two lists of dated amounts. One list is what the lender pays out. The other is what the borrower pays back. Everything in this chapter, from flat rates to APR, is a way of summarising those two lists in one number, and every dispute about “the real rate” is a dispute about what was left out of one list or how the summary was built.
The words first. The principal is the amount borrowed. Interest is the price of using it, set as a rate per period (4.5% a month). The tenor is the loan’s length. An instalment is one scheduled payment, and the schedule is the table of all of them, each split into the part that repays principal and the part that is interest. Amortisation is the process of paying a loan off through that schedule. All money below is shown in naira for reading and kept in integer kobo (a kobo is a hundredth of a naira) in code, as the finance lab does.
Flat interest and reducing-balance interest
There are two ways to charge 4.5% a month, and they are not close.
Flat interest charges the rate on the original principal for every period, however much has been repaid. For ₦310,000 over six months at 4.5% flat, the interest is 310,000 × 0.045 × 6 = ₦83,700. The total repayable is ₦393,700, so each of six instalments is ₦65,616.67. (In kobo that does not divide evenly: 39,370,000 kobo ÷ 6 is 6,561,666 with 4 kobo left over. Someone has to absorb the 4 kobo, which is the first rounding decision of the chapter.)
Reducing-balance interest charges the rate on what is still owed at the start of each period. Early instalments are mostly interest, later ones mostly principal. The first month’s interest on ₦310,000 is 310,000 × 0.045 = ₦13,950. If the borrower repays ₦46,152.30 of principal that month, the next month’s interest is charged on ₦263,847.70, not ₦310,000.
For the same 4.5%, the reducing-balance loan in the lab costs ₦50,613.80 in interest and the flat one ₦83,700. The flat loan costs 65% more, and it is easy to hide that in a sentence like “4.5% a month”, because both loans are honestly described by those words. The reason is that a flat borrower is charged for money they have already given back. By month six they owe ₦57,514.16 of principal but still pay interest as if they owed ₦310,000. Solving for the monthly rate that the flat loan really charges, as you will in the lab, gives 7.29%, and compounded over a year that is 132.61%.
Flat quotes are not forbidden and they are not always dishonest: some lenders use them because the arithmetic is easy for customers and agents to check. What goes wrong is a flat rate sitting next to a reducing-balance rate in a comparison table, each labelled “4.5%”. Before you compare any two rates, ask which balance the interest is charged on.
The instalment formula
Equal instalments on a reducing balance are called an annuity schedule. If P is the principal, r the rate per period and n the number of instalments, the instalment is
instalment = P · r / (1 − (1 + r)^−n)
Redo the lab’s first loan by hand. P = 310,000, r = 0.045, n = 6. Then (1.045)^6 = 1.302260, so (1.045)^−6 = 0.767896 and the denominator is 1 − 0.767896 = 0.232104. The numerator is 310,000 × 0.045 = 13,950. And 13,950 ÷ 0.232104 = ₦60,102.30. Six instalments of ₦60,102.30 total ₦360,613.80, which is the principal plus ₦50,613.80 interest, matching the figure above.
The schedule then runs period by period:
- Interest for the period = balance × r, rounded to the kobo.
- Principal repaid = instalment − interest.
- New balance = old balance − principal repaid.
For L000043 the first line is interest ₦13,950.00 and principal ₦46,152.30, leaving ₦263,847.70.
| Instalment | Due | Principal | Interest | Total |
|---|---|---|---|---|
| 1 | 2026-07-20 | ₦46,152.30 | ₦13,950.00 | ₦60,102.30 |
| 2 | 2026-08-19 | ₦48,229.15 | ₦11,873.15 | ₦60,102.30 |
| 3 | 2026-09-18 | ₦50,399.47 | ₦9,702.83 | ₦60,102.30 |
| 4 | 2026-10-18 | ₦52,667.44 | ₦7,434.86 | ₦60,102.30 |
| 5 | 2026-11-17 | ₦55,037.48 | ₦5,064.82 | ₦60,102.30 |
| 6 | 2026-12-17 | ₦57,514.16 | ₦2,588.14 | ₦60,102.30 |
Each interest figure is 4.5% of the balance before it, rounded. The interest column falls and the principal column rises, but the total never moves.
Rounding to the kobo
Real money moves in whole kobo, so every figure in a schedule is rounded somewhere, and the rules for where decide whether two systems agree. The lab’s rules are:
- Round the instalment once, to the nearest kobo. Do it before the schedule starts, so every instalment is identical.
- Round each period’s interest to the nearest kobo (ties go to the even kobo, which is what Python’s
rounddoes). - Take principal as instalment minus interest, except in the last period, where principal is whatever balance remains.
The last rule is the one people forget. Rounding errors accumulate, so after five periods the balance is rarely exactly what the instalment would clear. If the sixth instalment is forced to equal the others, the loan ends a few kobo over or under. Letting the last period’s principal take the balance means principal always sums to the loan exactly, and the last instalment differs from the others by a few kobo of interest rounding. For L000043 it does not differ at all, but across the book the last instalment differs from the first in 77 of the 97 interest-bearing loans with more than one instalment, by a few kobo.
The other trap is the float. A floating-point number cannot hold 0.045 exactly, and sums of rounded floats drift. The lab’s code uses Python’s Fraction (exact arithmetic on whole-number ratios) for the rate and balance calculation, and round to produce integer kobo. If you want to see how little it takes to break agreement, change one rule. In the lab’s break step, cutting every figure instead of rounding it changes 90 of the 287 interest-bearing schedules. Nobody would call that a different loan; it would still fail every reconciliation against the system that rounds.
Fees at disbursement and the true cost
Owoleaf’s products take their fee out of the money at the moment of disbursement. A ₦310,000 personal loan carries a 1% fee, ₦3,100. The borrower owes ₦310,000 and interest is charged on ₦310,000, but the amount paid out is ₦306,900.
This is the second trap, and a bigger one for short loans. The instalments were set by the formula for ₦310,000. They now repay only ₦306,900 in real money. The rate that makes six instalments of ₦60,102.30 equal to ₦306,900 is higher than 4.5%. To find it, solve for the rate r such that
306,900 = Σ 60,102.30 / (1 + r)^t for t = 1 … 6
There is no formula for r, so you solve it numerically. In the lab the answer is 4.8124% a month, against 4.5000% without the fee. The fee has added 0.31 of a percentage point a month. For this loan that is modest, because the loan lasts six months and the fee is paid once. For a 30-day loan the same 1% fee is spread over a single period and matters much more: on the salary advance the fee lifts the cost from 5% to 6.06% for the period.
The rate that does this job, equating what was paid out with what is paid back, is called the internal rate of return (IRR). Lenders usually call the result the all-in rate or the APR. You met the idea in the economics chapter as the break-even rate: the lender’s side of the same equation.
APR, effective rate and what an annual rate means
Take the 4.8124% monthly rate. There are two honest ways to put it on an annual scale.
- Nominal annual rate: multiply by the periods in a year. 4.8124% × 12 = 57.75%. This is the usual shape of an annual percentage rate (APR).
- Effective annual rate (EAR): compound it. (1 + 0.048124)^12 − 1 = 75.77%. This is what a balance would grow by in a year if the rate were applied to interest as well as principal.
Both describe the same loan. Neither is wrong. What goes wrong is a number with no convention. “57.75% APR” and “75.77% a year” are the same loan priced two ways, and someone comparing them will conclude one lender is cheaper than the other when they are the same.
Jurisdictions fix the convention in law, which is why the definition of APR is a rule and not a matter of taste. As one example, the United States’ Regulation Z measures the annual percentage rate by the actuarial method (set out in its Appendix J) and treats a disclosed rate as accurate if it is within one eighth of a percentage point of that figure on a regular transaction (a wider tolerance applies to irregular ones)as of 2026-11. The actuarial method is the IRR you compute in this chapter’s lab, with the amount financed (what the borrower actually receives) as the starting cash flow.
Irregular payments and day counts
The loan above has equal monthly steps, so t can be 1, 2, 3 and so on. Real loans do not: a payment lands on day 19 instead of day 14, a late fee arrives with it. The same method works with time measured in days. Take a daily rate d and discount each payment by (1 + d)^days. The result is a daily rate, which you compound over 365 days. This is how you price a loan with a late fee: add the fee to the payment it came with and solve again.
Short loans: why annualising misleads and why you do it anyway
The salary advance in the lab lends for one 30-day period. Take L000002: ₦17,000 asked, ₦170 fee, ₦16,830 paid out, ₦17,850 due 30 days later. The cost of the loan is ₦17,850 − ₦16,830 = ₦1,020, or 6.06% of what the borrower received.
Annualise it and the answer depends on the convention you choose:
| Convention | Working | Annual figure |
|---|---|---|
| Interest only, times 12 | 5% × 12 | 60.00% |
| True cost, scaled by days | 6.06% × 365/30 | 73.74% |
| Interest only, compounded | 1.05^(365/30) − 1 | 81.05% |
| True cost, compounded | 1.0606^(365/30) − 1 | 104.60% |
All four are arithmetic a reviewer can redo. The last is the closest to an effective rate: it includes the fee and assumes the borrower could re-borrow on the same terms every 30 days. That assumption is the weak point. A customer taking one salary advance does not pay 104.60% a year; they pay ₦1,020 on ₦16,830 once. Annualising a short loan makes it comparable with a twelve-month loan, and the comparison is useful, but it overstates what any single borrower pays.
So a clear disclosure for a short loan gives both: the naira cost of this loan (₦1,020) and an annual rate on a stated convention. Neither alone is a full answer. Leaving out the first hides the size of the transaction. Leaving out the second hides the price of the money.
A 0% loan with a late fee
Owoleaf’s buy-now-pay-later (BNPL) product has no interest and no fee for the customer. Its price is the late fee: ₦500 for any instalment paid more than three days after its due date. That is a cost only some borrowers pay.
Take L000017: ₦64,000 in four fortnightly instalments of ₦16,000, as in Fola’s checkout. The first instalment was due on day 14 and paid on day 19, five days late, with a ₦500 fee. The other three were on time. The customer paid ₦64,500 in total on ₦64,000 borrowed. Solving the day-count IRR gives a daily rate of 0.0216%, which compounds to 8.19% over a year.
Two conclusions follow. For the borrower who pays on time, the APR is exactly 0%, so “0% interest” is accurate for that customer. For the borrower who paid five days late, the loan cost ₦500, and the annual rate looks large for a small amount of money. There is no single APR for this product: it depends on what the borrower does. That is why a BNPL disclosure usually needs a table of conditions (the fee, when it applies, the total payable if every date is met) rather than one rate. It is also why the question “what is the real rate?” has no answer until you say whose repayment pattern you are pricing.
What Nigeria requires you to say
Disclosure of the cost of credit is regulated, and for Nigerian consumer lending two regulators matter most in this build: the Federal Competition and Consumer Protection Commission (FCCPC) and the Central Bank of Nigeria (CBN). Read the status notes as carefully as the rules.
The FCCPC’s Digital, Electronic, Online or Non-Traditional Consumer Lending Regulations 2025 (the “DEON” Regulations) list a Regulation 17, titled “Disclosure and Transparency”, under their consumer-protection part; law-firm summaries say it requires lending terms (interest rates, repayment terms and fees) to be disclosed before the transaction is completed, and some add that the total cost of credit, including interest, fees and charges, must be disclosed before the borrower acceptsas of 2026-11. The summaries agree on the gist and differ on detail, and this chapter has not quoted the Regulation’s own wording, because the text itself could not be read while it was written (only a search listing of its contents). Read Regulation 17 itself before you rely on its words.
The sources also disagree on dates. Commentators give different commencement dates for the Regulations (21 July 2025 in most summaries, 3 September 2025 in one), and the FCCPC also published DEON Consumer Lending Guidelines on its site in November 2025; one law-firm summary gives 18 November 2025 as their effective dateas of 2026-11. Which date applies to a particular obligation, such as a transition period, depends on the instrument’s own commencement and transition provisions. Check those too.
For banks and other CBN-licensed institutions, the CBN’s Guide to Charges by Banks, Other Financial and Non-Financial Institutions took effect on 1 January 2020as of 2026-11. Press reports describe later reviews of some of its charges, and this chapter does not state what any review says, because a press report is not the rule. Look for the CBN’s own current circular.
Which instrument applies to Owoleaf’s lending is a licensing question, and the Lending and Credit course takes it up in module 4 (licences and structures) and module 2 (consumer protection and digital lending rules). Until then, treat the disclosure rules as a floor for any consumer product and the IRR as the check on whatever number is put on the screen.
Where it goes wrong
Comparing a flat rate with a reducing-balance rate. Both are “4.5% a month”. One is 4.5% and the other is 7.29%. Always ask what balance the interest is charged on.
Leaving the fee out of the rate. A rate that ignores a fee taken at disbursement describes a loan the customer never received. Put the fee in the first cash flow: what they received, not what they owe.
Calling a number an APR without a convention. Say whether it is nominal or compounded, which fees it contains, and the day count. Two reasonable analysts will otherwise differ by twenty percentage points.
Annualising a one-off. A 104.60% annualised rate on a 30-day advance is not what one borrower pays. State the naira cost beside it.
Pricing a late fee as if everyone pays it. A product whose price is a conditional fee has a range of APRs, from 0% upwards. Say what the fee is, when it applies, and the total payable on time.
Rounding differently from the other system. The rate used, the rounding of interest and instalment, and the treatment of the last instalment all have to match, or schedules drift by kobo and then by naira, and the finance team spends a month finding out why. Write the rule down in code and test it against the data, as the lab does.
Money in floats. 0.045 is not exactly 0.045. Keep money in integer kobo and use exact arithmetic for the steps between.
You work in labs/finance. The loan book is Owoleaf’s, generated from seed 42; every price and rate in it is illustrative. Money stays in integer kobo until the moment you print it.
1. Make sure the loan book exists, then look at two loans. If data/finance.sqlite already has the loan tables, skip the first line.
cd labs/finance
python3 generate.py && python3 loans.py && python3 check.py
python3 - <<'EOF'
import sqlite3
db = sqlite3.connect("data/finance.sqlite")
cols = "id, product, principal_kobo, fee_kobo, disbursed_net_kobo, rate_bps_per_period, instalments, disbursed_at, status, days_past_due"
for row in db.execute(f"SELECT {cols} FROM loans WHERE id IN ('L000043', 'L000002')"):
print(row)
for row in db.execute("SELECT instalment, due_date, principal_kobo, interest_kobo, total_kobo FROM schedule WHERE loan_id='L000043'"):
print(row)
EOF('L000002', 'SAL', 1700000, 17000, 1683000, 500, 1, '2026-04-16', 'default', 165)
('L000043', 'PL', 31000000, 310000, 30690000, 450, 6, '2026-06-20', 'arrears', 70)
(1, '2026-07-20', 4615230, 1395000, 6010230)
(2, '2026-08-19', 4822915, 1187315, 6010230)
(3, '2026-09-18', 5039947, 970283, 6010230)
(4, '2026-10-18', 5266744, 743486, 6010230)
(5, '2026-11-17', 5503748, 506482, 6010230)
(6, '2026-12-17', 5751416, 258814, 6010230)The product codes are PL (personal loan), SAL (salary advance), BNPL (buy now, pay later) and SME (working capital for merchants). L000043 is a ₦310,000 personal loan (31,000,000 kobo) at 450 basis points (4.5%) a month for six months, with a ₦3,100 fee and ₦306,900 paid out. L000002 is a ₦17,000 salary advance. The rate is in basis points, hundredths of a percentage point. The schedule’s kobo figures are the target you rebuild next.
2. Write the amortisation function and rebuild L000043. Save this as amort.py in labs/finance; later steps import it. Then rebuild the schedule from the formula and compare it with schedule.csv.
cat > amort.py <<'EOF'
import csv
from fractions import Fraction
def reducing(principal, rate_bps, n):
"""Equal instalments on a reducing balance. Money is integer kobo throughout.
Fractions keep the sums exact; every rounding to the kobo is explicit."""
if rate_bps == 0: # 0% (BNPL): equal parts, the last takes the remainder
each = principal // n
return [(i, each if i < n else principal - each * (n - 1), 0) for i in range(1, n + 1)]
r = Fraction(rate_bps, 10_000)
payment = round(principal * r / (1 - (1 + r) ** -n)) # round() on a Fraction: half to even
balance, rows = principal, []
for i in range(1, n + 1):
interest = round(balance * r)
principal_part = payment - interest if i < n else balance # the last one clears the balance
rows.append((i, principal_part, interest))
balance -= principal_part
return rows
def load_schedule(path="data/schedule.csv"):
out = {}
for row in csv.DictReader(open(path)):
out.setdefault(row["loan_id"], []).append(
(int(row["instalment"]), int(row["principal_kobo"]), int(row["interest_kobo"])))
return out
def naira(kobo):
return f"₦{kobo / 100:,.2f}" # for printing only; never keep money in this form
def irr(flows):
"""Rate per period that makes the discounted flows sum to zero.
flows = [(t, kobo)], t in periods (or days), negative = cash out of the lender.
The rate is a ratio, not money, so a float is fine here; bisection is easy to audit."""
lo, hi = 0.0, 1.0
for _ in range(200):
mid = (lo + hi) / 2
value = sum(c / (1 + mid) ** t for t, c in flows)
lo, hi = (mid, hi) if value > 0 else (lo, mid)
return mid
EOF
python3 - <<'EOF'
from amort import reducing, load_schedule, naira
sched = load_schedule()
mine = reducing(31_000_000, 450, 6)
print("instalment", naira(mine[0][1] + mine[0][2]))
for i, p, it in mine:
print(i, naira(p), naira(it), naira(p + it))
print("matches schedule.csv:", mine == sched["L000043"])
EOFinstalment ₦60,102.30
1 ₦46,152.30 ₦13,950.00 ₦60,102.30
2 ₦48,229.15 ₦11,873.15 ₦60,102.30
3 ₦50,399.47 ₦9,702.83 ₦60,102.30
4 ₦52,667.44 ₦7,434.86 ₦60,102.30
5 ₦55,037.48 ₦5,064.82 ₦60,102.30
6 ₦57,514.16 ₦2,588.14 ₦60,102.30
matches schedule.csv: TrueThe instalment is ₦60,102.30, the same as your hand calculation, and the table is the one in the chapter. mine == sched[...] compares every principal and interest figure in kobo, so True means an exact match, not a close one.
3. Check every loan in the book. The same function should reproduce all 372 schedules: the personal loans, the salary advances, the merchant loans, and the 0% BNPL ones.
python3 - <<'EOF'
import sqlite3
from amort import reducing, load_schedule
sched = load_schedule()
db = sqlite3.connect("data/finance.sqlite")
tally = {}
for loan_id, product, principal, bps, n in db.execute(
"SELECT id, product, principal_kobo, rate_bps_per_period, instalments FROM loans"):
ok = reducing(principal, bps, n) == sched[loan_id]
good, total = tally.get(product, (0, 0))
tally[product] = (good + ok, total + 1)
for product, (good, total) in sorted(tally.items()):
print(f"{product:5} {good} of {total} schedules match")
EOFBNPL 85 of 85 schedules match
PL 52 of 52 schedules match
SAL 190 of 190 schedules match
SME 45 of 45 schedules matchAll 372 loans match (85 + 52 + 190 + 45). One formula and one rounding rule explain every instalment in the book. The 287 loans that charge interest are the 52, 190 and 45; the 85 BNPL loans are split into equal parts.
4. Flat against reducing. Charge the same 4.5% a month on the original ₦310,000, find the true monthly rate of the flat version, and see where the odd kobo goes.
python3 - <<'EOF'
from amort import reducing, naira, irr
P, bps, n = 31_000_000, 450, 6
rows = reducing(P, bps, n)
red_interest = sum(it for _, _, it in rows)
flat_interest = P * bps * n // 10_000 # 4.5% of the original amount, every month
print("reducing balance interest:", naira(red_interest))
print("flat interest at the same 4.5%:", naira(flat_interest))
whole, left = divmod(P + flat_interest, n)
print("flat instalment:", whole, "kobo and", left, "kobo left over")
flows = [(0, -P)] + [(i, whole + (left if i == n else 0)) for i in range(1, n + 1)]
r = irr(flows)
print(f"flat 4.5% a month, true monthly rate {r:.4%}, compounded {(1 + r) ** 12 - 1:.2%}")
EOFreducing balance interest: ₦50,613.80
flat interest at the same 4.5%: ₦83,700.00
flat instalment: 6561666 kobo and 4 kobo left over
flat 4.5% a month, true monthly rate 7.2883%, compounded 132.61%The flat loan charges ₦33,086.20 more interest for the same headline rate. Its true monthly rate is 7.2883%. The 4 kobo that do not divide are put on the last instalment here; any rule would do, as long as it is written down.
5. Put the fee in. Solve for the rate that equates the cash paid out with the six instalments, first without the fee (paid out ₦310,000) and then with it (paid out ₦306,900).
python3 - <<'EOF'
from amort import reducing, irr
P, fee, bps, n = 31_000_000, 310_000, 450, 6
rows = reducing(P, bps, n)
pay = rows[0][1] + rows[0][2]
for label, out in (("without the fee", P), ("with the fee", P - fee)):
r = irr([(0, -out)] + [(i, pay) for i in range(1, n + 1)])
print(f"{label:16} monthly {r:.4%} x12 {12 * r:.2%} compounded {(1 + r) ** 12 - 1:.2%}")
EOFwithout the fee monthly 4.5000% x12 54.00% compounded 69.59%
with the fee monthly 4.8124% x12 57.75% compounded 75.77%Without the fee the solved rate is the stated one, 4.5000%, which is a good check on the solver. With the ₦3,100 fee it is 4.8124% a month: 57.75% nominal and 75.77% compounded, the figures in the chapter. The same loan has four annual numbers, two with the fee and two without.
6. The salary advance, annualised four ways. L000002 is ₦17,000 with a ₦170 fee, repayable once after 30 days with 5% interest.
python3 - <<'EOF'
import sqlite3
from amort import irr
db = sqlite3.connect("data/finance.sqlite")
principal, fee, bps = db.execute(
"SELECT principal_kobo, fee_kobo, rate_bps_per_period FROM loans WHERE id='L000002'").fetchone()
due = principal + principal * bps // 10_000
r = irr([(0, -(principal - fee)), (1, due)])
print("paid out", principal - fee, "kobo, repays", due, "kobo after 30 days")
print(f"cost for the 30 days: {r:.2%}")
print(f"x (365/30): {r * 365 / 30:.2%} compounded: {(1 + r) ** (365 / 30) - 1:.2%}")
print(f"headline 5% compounded the same way: {1.05 ** (365 / 30) - 1:.2%}")
EOFpaid out 1683000 kobo, repays 1785000 kobo after 30 days
cost for the 30 days: 6.06%
x (365/30): 73.74% compounded: 104.60%
headline 5% compounded the same way: 81.05%The borrower receives ₦16,830 and repays ₦17,850: a cost of ₦1,020, or 6.06% for the period. Annualised that is 73.74% (scaled) or 104.60% (compounded). The headline 5% would give 81.05% compounded, and 60% if you multiplied by 12. Those are the four answers from the opening and from the Predict question. This loan was never repaid (165 days past due at the cut-off), so the borrower actually paid nothing back; the rates describe the contract, not the outcome.
7. A 0% loan with a late fee. L000017 is a ₦64,000 BNPL loan. Read what the borrower paid and when, then solve for the daily rate.
python3 - <<'EOF'
import datetime as dt, sqlite3
from amort import irr
db = sqlite3.connect("data/finance.sqlite")
principal, disbursed = db.execute(
"SELECT principal_kobo, disbursed_at FROM loans WHERE id='L000017'").fetchone()
d0 = dt.date.fromisoformat(disbursed)
flows = [(0, -principal)]
for inst, paid_at, amount, late in db.execute(
"SELECT instalment, paid_at, amount_kobo, late_fee_kobo FROM repayments WHERE loan_id='L000017' ORDER BY paid_at"):
day = (dt.date.fromisoformat(paid_at) - d0).days
print(f"instalment {inst}: day {day:2} paid {amount} kobo (late fee {late})")
flows.append((day, amount))
d = irr(flows)
print(f"daily rate {d:.4%} compounded over 365 days {(1 + d) ** 365 - 1:.2%}")
EOFinstalment 1: day 19 paid 1650000 kobo (late fee 50000)
instalment 2: day 28 paid 1600000 kobo (late fee 0)
instalment 3: day 42 paid 1600000 kobo (late fee 0)
instalment 4: day 56 paid 1600000 kobo (late fee 0)
daily rate 0.0216% compounded over 365 days 8.19%Instalment 1 was due on day 14 and paid on day 19, so it carries the ₦500 fee (50,000 kobo). The borrower paid ₦64,500 on ₦64,000. Priced by day, the loan costs 8.19% a year. Had every instalment been on time, the same code would give 0.00%. The product’s price depends on the customer’s behaviour.
Break it. Change the rounding rule and count the damage. This version cuts every figure to a whole kobo (int) instead of rounding it, and compares against all 287 loans that charge interest.
python3 - <<'EOF'
import sqlite3
from fractions import Fraction
from amort import load_schedule
sched = load_schedule()
db = sqlite3.connect("data/finance.sqlite")
def truncating(principal, bps, n):
r = Fraction(bps, 10_000)
payment = int(principal * r / (1 - (1 + r) ** -n)) # int() cuts instead of rounding
balance, rows = principal, []
for i in range(1, n + 1):
interest = int(balance * r)
p = payment - interest if i < n else balance
rows.append((i, p, interest)); balance -= p
return rows
bad = total = 0
for loan_id, principal, bps, n in db.execute(
"SELECT id, principal_kobo, rate_bps_per_period, instalments FROM loans WHERE rate_bps_per_period > 0"):
total += 1
bad += truncating(principal, bps, n) != sched[loan_id]
print(f"{bad} of {total} schedules differ when every figure is cut instead of rounded")
EOFYou get 90 of 287 schedules differ when every figure is cut instead of rounded. The differences are a kobo or two a line, which no customer would see on one loan. Across a book they are 90 schedules that would fail an exact comparison against the system that rounds. Delete amort.py when you are done, or keep it: the module’s project builds on it.
Template
# Key facts: <product name>, <customer segment>
Prepared by <pricing analyst>, product. Signed by <head of compliance or head of credit>. Version <date>.
## 1. The loan
- Amount borrowed: ₦<amount>
- Fee taken at payout: ₦<fee> (<rate> of the amount), charged <when>
- Amount you receive: ₦<amount minus fee>
- Term: <n> instalments, <frequency>, first due <date>
- Interest: <rate> per <period> on the <balance still owed | original amount>
## 2. Other fees and charges
| Fee | Amount | When it applies |
If there are none, write "none".
## 3. Repayment schedule
| No. | Due | Principal | Interest | Instalment |
Total repayable: ₦<sum of instalments>. Last instalment differs by <kobo>, because <rounding rule>.
## 4. Total cost of credit
Total repayable ₦<x> minus amount received ₦<y> = ₦<z>. Of which interest ₦<a>, fees ₦<b>.
## 5. APR and its working
- Rate per period that equates the amount received with the instalments: <r>%
- APR, <nominal | compounded>: <figure>%. Working: <the multiplication or compounding>.
- Day count and what is inside it: <fees included, 365 days or 12 months>
## 6. How this could be wrong
<one way, and what would show it>
## 7. Decision and sign-off
Approval asked: <what, from whom, by when>. Out of scope: <what this statement does not cover, for example the licence it is issued under>.
Prepared <name, date>. Approved <name, date>. WORKED EXAMPLE
At Owoleaf, a pricing analyst on Ekong’s team writes this statement; Owoleaf’s head of compliance signs it before the screen goes live. This one is for loan L000043, from the lab’s step 1, 2 and 5 figures.
The loan. Borrowed ₦310,000. Fee ₦3,100 (1%), taken at payout, so you receive ₦306,900. Six monthly instalments, the first due 2026-07-20. Interest is 4.5% a month on the balance still owed.
Other fees. None, an assumption: the lab’s loan table shows only the ₦3,100 payout fee for this loan.
Schedule. Six instalments of ₦60,102.30, due 2026-07-20, 08-19, 09-18, 10-18, 11-17 and 12-17. The first splits ₦46,152.30 principal and ₦13,950.00 interest; the sixth ₦57,514.16 and ₦2,588.14. Total repayable ₦360,613.80. The last period’s principal is the balance still owed, as in the lab.
Total cost of credit. ₦360,613.80 − ₦306,900 = ₦53,713.80: ₦50,613.80 interest plus ₦3,100 fee.
APR. Solving for the rate that equates ₦306,900 with six instalments of ₦60,102.30 gives 4.8124% a month. Nominal APR: 4.8124% × 12 = 57.75%. Compounded: 75.77%. Both include the fee and use twelve equal months.
Could be wrong. The schedule assumes every instalment is paid on its due date and rounds to the nearest kobo as the lab does. A loan system that rounds differently would print different kobo, which a comparison with schedule.csv would show.
Decision. Approve the statement as the pre-signing screen for this product. Out of scope: which licence Owoleaf lends under, and the exact wording of Regulation 17, which the chapter says to read in the source.
Now you
Owoleaf is putting the salary advance on a loan screen, and you are the pricing analyst asked to write its key facts statement for the customer who takes L000002. Use the lab’s step 1 and step 6 figures: ₦17,000 asked, a ₦170 fee, ₦16,830 paid out, and 5% interest for one 30-day period, so ₦17,850 due once, 30 days after payout. There is one instalment, so your schedule has one line. Decide which annual figure to show and say how you built it, because the lab prints four. Show the naira cost of this loan beside it, as the chapter advises for short loans. Ekong reads the draft, the head of compliance signs it, and the decision is whether the screen may show this wording to a customer before they accept.
Self-check
Ojaline's checkout will show Owoleaf's four-payment plan on a ₦64,000 order: four fortnightly payments of ₦16,000, no interest, no fee, and a ₦500 late fee on any instalment paid more than three days after its due date. Fola has to choose the wording under the price, with Ekong's numbers: 0.00% for a customer who pays every instalment on time, and 8.19% a year for the lab's customer who paid one instalment five days late. What goes on the screen?
- DOC Digital, Electronic, Online or Non-Traditional Consumer Lending Regulations 2025 FCCPC, 2025
The primary source for digital lending disclosure in Nigeria. Read Regulation 17 (Disclosure and Transparency) for the exact wording this chapter does not quote, and the commencement and transition provisions. Skip the registration and fee schedules until module 4.
- DOC DEON Consumer Lending Guidelines 2025 FCCPC, 2025
The FCCPC's guidelines issued alongside the Regulations, posted on its site in November 2025. Read it for how the commission expects lenders to comply, and check its own status and dates, because commentators give different ones.
- DOC Guide to Charges by Banks, Other Financial and Non-Financial Institutions (effective 1 January 2020) Central Bank of Nigeria, 2020
The CBN's guide for bank charges, in force from 2020. Later reviews of some charges have been reported, so check the CBN's site for the current version before relying on this one. Read the sections on lending charges.
- DOC 12 CFR 1026.22: Determination of annual percentage rate Consumer Financial Protection Bureau (Regulation Z)
A worked legal definition of an APR: the actuarial method and the tolerances. It is a United States rule, so read it for how a regulator pins down the convention, not as Nigerian law. Skip the mortgage-specific paragraphs.
- DOC fractions: Rational numbers Python documentation
The exact-arithmetic type the lab uses for the rate and balance, including how round() treats ties on a Fraction (to the even integer). Read the Fraction class description and its __round__ entry; skip the gcd notes.
- DOC decimal: Decimal fixed-point and floating-point arithmetic Python documentation
The other standard-library way to keep money exact, with explicit rounding modes. Read the rounding-modes section to see ROUND_HALF_EVEN and ROUND_HALF_UP and decide which your system needs; the rest is reference.
All companies and people in these examples are fictional. Any resemblance to a real business or person is unintended.