Skip to content
neumanndev, Home

Own venture · simulator and portfolio tracker

Obligacje.dev

A profit simulator for Polish retail treasury bonds. Six series, compound interest, Belka tax, IKE/IKZE, inflation scenarios and a personal portfolio tracker. The financial logic is checked by automated tests.

obligacje.dev
Screenshot of the Obligacje.dev website (obligacje.dev)
bond series in the calculator
6
logic tests in Vitest
51
lines across 82 TS/TSX files
≈10,500
routes, fully static
14
  • Finance
  • Business logic
  • Testing
  • SEO

Context

Obligacje.dev is a profit simulator of its own for Polish retail treasury bonds. It contains a calculator for the EDO, COI, TOS, ROR, DOR and OTS series, tracking of a personal portfolio, interest rate history, currency and gold rates from NBP data, and a market section with news, a blog, an FAQ and a changelog.

In November 2026 the service was renamed from Obligacje.tech to Obligacje.dev and got a new look laid out like a financial newspaper: a masthead with the issue date, a table of the current offer with the rate of every series, a chart of interest rates and inflation since 2020, and the latest market notices on the home page. It runs at obligacje.dev.

The site has no backend. Market data comes from the public NBP API, and the user's portfolio is stored in their browser (localStorage). All pages are generated statically.

Scale: 82 TS/TSX files, about 10,500 lines of code, 14 routes and 100 commits.

Problem

Each series has its own rules: the capitalisation period, the interest rate in successive periods and the link to inflation or to the reference rate. The Belka tax is collected once at redemption in some series and on an ongoing basis in others. The Ministry of Finance's offer also changes every month.

A mistake in such a place is not cosmetic: the user sees the wrong amount and may base a decision about their money on it.

Technical decisions

  • Calculations separated from the interface. The maths is in lib/bond-math.ts and lib/portfolio-math.ts. The calculator and the portfolio use the same functions, and each of them can be checked separately. The whole is covered by 51 tests in Vitest.
  • Actual rules instead of simplifications. Capitalisation periods are defined for each series, inflation-linked series count inflation plus a margin from the second year, and the Belka tax is collected once at redemption in capitalising series and on an ongoing basis in the others. IKE and IKZE, inflation scenarios and a comparison of series are also included.
  • Portfolio value calculated for the given day. Initially the portfolio's value grew in jumps, only at the end of an interest period. Linear accrual of interest day by day was introduced, so the portfolio shows its current value.
  • Terms from the day of purchase. The offer changes every month, but a bond that has been bought keeps its terms, so the terms from that day are saved when a bond is added to the portfolio.
  • A backup of the portfolio. Because the portfolio is stored only in the browser, export and import to a JSON file were added.
  • One convention for amounts. Amounts before and after tax were mixed on one screen, so net amounts are shown everywhere.
  • Errors detected. One function modified in place a date passed as an argument (setHours), which could distort dates in other parts of the application. The second case was a regression in mobile navigation: after an icon was added, the page on a 320 px screen was 7 px too wide.
  • Visibility in search engines. Full static generation with generateStaticParams, a sitemap, robots, JSON-LD structured data, dynamic OG images via next/og and canonical addresses.
  • Checks before every commit. Type checking, tests and a build, as well as manual verification of numerical scenarios.

Result

The site calculates the profit for six series according to their actual rules, taking into account tax and interest accrued to the current day. The logic is covered by tests and does not depend on the interface, so changes in appearance do not affect the results.

The number of users and traffic are not yet given. They will be added once data from a longer period has been gathered.

A product that is hard to price over the phone?

A description of the business and its current way of quoting orders is enough. On that basis we assess whether and how it can be moved to a website.