eqlx.aiOpen research

eqlx.org / eqlx-bankmath

Python library · MCP server · v0.1 · Apache-2.0

The number a bank assistant must not guess.

An instalment, an interest charge or a commission has one right value, down to the kuruş (a hundredth of a lira). eqlx-bankmath computes it for bank products in Türkiye, so an AI agent asks for the number instead of working it out itself.

What goes in, what comes out

No model inside, no network. Same input, same answer.

You give

  • the product and its amounts
  • the rate and the dates
  • fees, payments, balances
  • the bank's conventions, if you know them

eqlx-bankmath computes

  • the levies in force on that date
  • interest, period by period
  • every row rounded to the kuruş
  • the yearly cost of the whole deal

You get

  • the number, and the rows behind it
  • the decree or article it rests on
  • the conventions that were used
  • whether a fee or rate is over its ceiling

One loan, start to finish

A consumer loan of 100,000 TL. What you enter, what the tool computes, what comes back.

1You enter the loan

Five values.

Amount100,000 TL
Repayment24 monthly instalments
Interest rate3.99 % a month
Paid out on10 November 2026
Allocation fee500 TL

2The tool looks up the levies

Two levies are charged on the interest. Their rates change by decree, so they depend on the date.

KKDF, a fund levyCouncil of Ministers Decision 2010/97415 %
BSMV, a tax on bankingPresidential Decision 7345 (Official Gazette 07.07.2023)15 %
Highest allocation fee allowed0.5 % of the amount, TCMB Communiqué 2020/7500.00

3The first instalment, split

7,379.48 is paid. Less than a third of it reduces the debt.

Interest 3,990.00KKDF 598.50BSMV 598.50Principal 2,192.48

4How the debt falls

Slowly at first, then faster: each month less interest, more principal.

At the start
100,000.00
After 6
85,016.62
After 12
64,721.93
After 18
37,233.20
After 24
0.00

5What is paid in total

177,607.76 for 100,000 borrowed.

Principal 100,000.00Interest 59,313.62KKDF 8,897.07BSMV 8,897.07Fee 500.00

6The rate on the poster, and the real one

The annual cost rate counts the levies and the fee too.

Interest alone3.99 % a month
59.92 %
Cost ratewhat is paid
84.55 %
+24.64 points two levies and one fee
7,379.48TL a month · the last one 7,379.72

What comes back

Total repayment 177,607.76 TL, of which 77,607.76 is cost. Annual cost rate 84.5548 %. All 24 rows, each split as in step 3.

Legal basis: KKDF 15 %, Council of Ministers Decision 2010/974 · BSMV 15 %, Presidential Decision 7345 (Official Gazette 07.07.2023)

84.55 % a year

One command: bankmath plan 100000 0.0399 24 --product consumer --date 2026-11-10 --fee 500. Every figure above is its output.

The same question, different answers

Where no rule fixes the method, the method is a choice. The tool makes you name it.

A letter of guarantee, returned early

A teminat mektubu is a bank's written promise to pay if its customer does not. 10,000,000 TL at 2.40 % a year, reduced by 4,000,000 after five months, returned after ten. Commission and tax, in TL:

Started quarters in fullno refund
201,600.00
By daysonly the days it was out
164,500.00
37,100.00 TL apart both are bank practice

No law sets this formula. Neither figure is "the" answer.

A card statement, paid short

Statement 12,000 TL, minimum payment 2,400, only 1,000 paid. Which part of the debt gets the higher late rate? Interest on the next statement, in TL:

The Regulationthe unpaid 1,400 of the minimum
372.36
The Law's wordingthe whole 11,000 left
392.52
20.16 TL apart two texts, two readings

The tool follows the Regulation unless told otherwise. Which one a court would apply is not for it to say.

Every result lists the conventions it used.

What it covers

Six families of products.

Loans

Instalment loans

Repayment plan with levies, annual cost rate, early and partial repayment, late interest, "what can I borrow for 5,000 a month?"

Daily balances

Overdraft, revolving, spot

Interest day by day on a retail overdraft (KMH, the credit line on a current account), a business credit line or a loan repaid at maturity.

Cards

Credit cards

Minimum payment, rate ceilings, and the interest one statement puts on the next.

Trade

Bills and variable rates

Discounting a bill or cheque, plans that reprice, an overnight reference rate compounded.

Guarantees

Letters of guarantee

Commission period by period, under the convention you choose.

Ceilings

Regulated maximums

Is a quoted fee or rate within the maximum, and under which rule?

How an agent uses it

The agent decides what to ask. The tool computes. It reads no file, writes none, sends nothing.

Plan"What is the instalment?"
LeviesWhich rates applied on that date, and why
Early repaymentWhat closes the loan today, what is saved
CeilingIs this fee above the maximum?
ExplainWhich conventions gave this number

18 read-only tools, none reads or writes a file. To connect it to Claude Code:

pip install "eqlx-bankmath[mcp]"
claude mcp add bankmath -- bankmath mcp

How it was tested

Two groups, kept apart: figures an authority printed, and parts where no authority printed any.

Matched to official figures

✓899.75 and 899.81Consumer credit regulation · 12-month plan, every row
✓1,718.61 and 1,718.72Same regulation · 36-month plan
✓888.49Housing finance regulation · Annex 1
✓1,345.94 and 1,344.88Partial prepayment · two examples
✓5.40Late interest · instalment 10 days late
✓8 of 8Directive 98/7/EC · cost rate examples
✓1.64 % and 2.23 %TCMB · early repayment fee examples
✓1 November 2026TCMB · card rate ceiling table
✓1.018229476Borsa İstanbul · TLREF example

TCMB is the central bank; TLREF is the overnight lira reference rate.

Checked against their definition; no official example exists

Card statementsNo regulator prints a full statement. Checked by arithmetic written out in the tests.
Overdraft monthsDaily balances added up by hand in the tests.
Revolving linesTextbook interest-number method, worked by hand.
Guarantee commissionNo rule fixes the formula. Each convention is worked by hand.

Found on the way

Two printed figures in the regulation's annexes do not add up. The tests assert the right value and say why.

45.24KKDF: 301.59 x 15 %the annex prints 45.23
16.4872 %annual rate from the annex's own cash flowsthe annex prints 16.4870 %

The whole

230 testsrun on every change
1 reviewindependent, before release; its fixes are in
0 dependenciesthe library and command line need only Python

What it does not do

Not an offer, not legal adviceA calculation on the numbers you give. It never suggests a rate.
Rates are dated tablesLevies and ceilings change by decree. Last checked on 10 November 2026; each lookup says so.
Bank practice is an argumentDay basis, accrual dates, started periods: defaults are common practice, not facts.
Not coveredLetters of credit, KGF (state credit guarantee fund) guarantees, card debt restructuring.
pip install "eqlx-bankmath[mcp]"
bankmath plan 100000 0.0399 24 --product consumer --date 2026-11-10 --fee 500
bankmath levies consumer 2026-11-10
bankmath tools        # all 18 calculations with their arguments