• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tubedude / finance-elixir / b1daf2b81037f40f7834cac07212c359cda19881
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 07 Jul 2026 08:47PM UTC
Jobs 1
Files 13
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Jul 2026 08:47PM UTC coverage: 100.0%. Remained the same
b1daf2b81037f40f7834cac07212c359cda19881

push

github

web-flow
Add day-count conventions with a pluggable seam (1.7.0) (#29)

Day-count conventions, xnfv/conventional?, and per-function options (1.7.0)

Add a pluggable day-count seam for dated cash flows. xirr/xnpv/xnfv take a
:basis option selecting how the year fraction between two dates is measured,
with five built-in conventions — actual_365 (the default, so existing results
are unchanged), actual_360, actual_actual (ISDA), thirty_360 (Excel DAYS360 US),
and thirty_e_360 (Eurobond). :basis also accepts any module implementing the new
Finance.DayCount behaviour, so a calendar-based convention this dependency-free
library can't carry — Brazilian Business/252, say — lives in the caller's app.
The behaviour's year_fraction/3 callback carries an opts argument so conventions
that need context (Actual/Actual ICMA, 30E/360 ISDA) can be added later without a
breaking change.

New CashFlow functions:
- xnfv/2,3 (+ xnfv!) — net future value of dated flows, the mirror of xnpv; a
  future value too large for a float comes back as {:error, :undefined}.
- conventional?/1 — whether a series changes sign exactly once (a single,
  unambiguous IRR); a false warns of possible multiple IRRs before solving.

Options are now validated per function: each validates only the options it uses,
so an inapplicable option — a :basis on periodic irr, a :guess on xnpv or a Bonds
metric — raises instead of being silently ignored. :precision is bounded to 0..15
in every schema, and Finance.option gains {:basis, _}.

The Finance.Returns cash-flow metrics coerce amounts via Shared.to_amount, so
Decimal and Money inputs work there as they do in CashFlow.

Docs: a README day-count section and module-map entry, precise convention notes
in Finance.DayCount (ISDA vs Excel, the 30/360 no-EOM rule, the 30E/360 Feb
quirk, the Business/252 recipe), and ExDoc source_ref plus module grouping.

Tests: cross-library regression anchors from the java-xirr, Apache POI, and
QuantLib issue trackers (steep-negativ... (continued)

65 of 65 new or added lines in 6 files covered. (100.0%)

495 of 495 relevant lines covered (100.0%)

65492.88 hits per line

Jobs
ID Job ID Ran Files Coverage
1 b1daf2b81037f40f7834cac07212c359cda19881.1 07 Jul 2026 08:47PM UTC 13
100.0
GitHub Action Run
Source Files on build b1daf2b81037f40f7834cac07212c359cda19881
  • Tree
  • List 13
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • b1daf2b8 on github
  • Prev Build on main (#EDEDB426...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc