Yield math for tokenized real-world assets. Day-count conventions, accrued interest, duration, convexity. It runs. In this page, as a CLI, and as an MCP server your agent can call.
Every tokenized treasury product quotes a yield. Almost none publish the day-count convention behind it. Same principal, same rate, same dates, six conventions, six different numbers. The spread is not rounding, it is money, and it is the first thing a settlement desk checks and the last thing a deck mentions.
Runs entirely in this page. Nothing is sent anywhere, there is no analytics and no network call. Change a field and the numbers move.
| convention | year fraction | days |
|---|
| convention | interest | vs ACT/360 |
|---|
investment yield, the one you earn
| yield shock | price | change |
|---|
level payment, principal and interest
| payment | interest | principal | balance |
|---|
per period, interest only. no principal is repaid until maturity
| structure | per period | final payment | total interest |
|---|
the one that actually pays more, on an effective annual basis
| offer | nominal | compounding | effective annual |
|---|
the rate you are actually paying, solved from the payment
One package, no dependencies. npm install accrual adds exactly one
entry to your tree, which you can check yourself. Node 20 or newer.
$ npm install accrual added 1 package
// the same numbers the calculator above runs on import { accrueSimple, bondMetrics } from 'accrual'; accrueSimple({ principal: 1_000_000, rate: 0.0525, from: '2025-01-31', to: '2025-07-31', convention: 'ACT/365F', }); // interest 26034.25
Every number above is a claim, and the good news is you don't have to take my word for any of it. These four commands verify them in about a minute. Nothing here asks for your trust, only a terminal.
// the zero-dependency claim, in the install output itself $ npm install accrual added 1 package // the whole tree, one entry deep $ npm ls --all └── accrual@0.1.1 // who built the tarball, and from which commit $ npm audit signatures 1 package has a verified registry signature 1 package has a verified attestation // every import in the source, none leaving its own directory $ grep -rn "^import" node_modules/accrual/src/
The same math as an MCP server over stdio, thirteen tools. It is a pure function over numbers: no RPC client, no signer, no key material anywhere in the package. It can value a position and cannot move one. Verify by reading the imports, there are none outside the source directory.
// claude_desktop_config.json, or any MCP client { "mcpServers": { "accrual": { "command": "npx", "args": ["-y", "accrual", "accrual-mcp"] } } }
// tools exposed day_count every convention for one date pair, and the spread accrue_simple simple interest, plus the same result under all six accrue_compound compound interest and the effective annual rate bill_yields discount yield vs the yield you actually earn bond_metrics price, duration, convexity, cashflow schedule present_value one future cashflow, discounted compare_products two offers on the same footing year_fraction one convention, when you know which you need loan_payment level payment, total interest, first-payment split loan_schedule every row, closing at exactly zero loan_payoff what overpaying saves, in money and in months loan_implied_rate the rate behind a payment, nominal and effective loan_affordable what a given payment can borrow
// or from a shell
$ accrual days --from 2025-02-28 --to 2025-03-31
$ accrual bill --face 100 --price 97.80 --settle 2025-01-02 --maturity 2025-07-03
$ accrual loan --principal 200000 --rate 6% --years 30
$ accrual payoff --principal 200000 --rate 6% --years 30 --extra 200
The token contract address is published below. The tools above remain the product; a token does not represent a claim on their calculations or on any underlying asset.
0xd3F5371ED630BAAbDAfa592Bd26f391D73C57D7B