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

tubedude / finance-elixir
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Repo Added 22 Nov 2015 03:11AM UTC
Files 13
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

LAST BUILD ON BRANCH main
branch: SELECT
CHANGE BRANCH
x
  • No branch selected
  • 1.6.1
  • 1.7.0
  • bracket-interior-scan
  • ex-money-support
  • fix-optional-decimal-compile
  • fix-solver-doc
  • main
  • master
  • readme-brent-bench
  • readme-polish
  • regression-issue-corpus
  • solver-brent

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

Relevant lines Covered
Build:
Build:
495 RELEVANT LINES 495 COVERED LINES
65492.88 HITS PER LINE
Source Files on master
  • Tree
  • List 13
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
b1daf2b8... main 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 ... push 07 Jul 2026 08:47PM UTC web-flow github
100.0
8716f977... 1.7.0 Add cross-library regression anchors Cases drawn from other XIRR/financial libraries' issue trackers, pinned so a solver or day-count change can't silently regress them: - XIRR: java-xirr #5b (a yield below -83%) and #20 (a series with no real I... Pull #29 07 Jul 2026 01:27PM UTC tubedude github
100.0
a73ef080... 1.7.0 Validate options per function; accept Decimal in Returns Options: - Four compiled schemas (dated rate, rate, dated value, value): each function validates only the options it uses, so an inapplicable option — :basis on periodic irr, :guess on ... Pull #29 07 Jul 2026 11:09AM UTC tubedude github
100.0
696ebfa1... 1.7.0 Release-readiness pass from the whole-library review Options: - Every function validates only the options it uses (four compiled schemas: dated rate, rate, dated value, value), so an inapplicable option — :basis on periodic irr, :guess on xnp... Pull #29 07 Jul 2026 02:26AM UTC tubedude github
100.0
f8c0e419... 1.7.0 Address idiomatic review: doc drift and edge notes - The CashFlow moduledoc and xnpv docs still described Actual/365 as fixed; it's the default now, selectable via :basis. xnpv/3's doc and the :basis schema doc omitted :basis and xnfv. Correc... Pull #29 07 Jul 2026 01:46AM UTC tubedude github
100.0
f720d42e... 1.7.0 Apply day-count review from Kip Cole - year_fraction callback becomes /3 (from, to, opts) so conventions that need context — Actual/Actual ICMA, 30E/360 ISDA — fit later without a breaking change; the built-in static conventions ignore opts. ... Pull #29 07 Jul 2026 01:37AM UTC tubedude github
100.0
ededb426... main Guard against rates at or below -100% and fix rounding in ytm (#28) * Domain guards, discounting cleanup, and review fixes (1.6.1) Correctness: - A rate at or below -100% returns {:error, :undefined} instead of raising ArithmeticError or retur... push 06 Jul 2026 07:04AM UTC web-flow github
100.0
aa5ee2a5... 1.6.1 Update docs for the ~> 1.15 Elixir floor CLAUDE.md and the 1.6.1 changelog reflect the lowered requirement and the widened CI matrix. The 1.0.0 changelog entry keeps ~> 1.18 as the historical record. Co-Authored-By: Claude Opus 4.8 (1M context) ... Pull #28 06 Jul 2026 07:01AM UTC tubedude github
100.0
975f2c0a... 1.6.1 Lower the Elixir floor to ~> 1.15 and test it in CI The only feature gating < 1.18 was Enum.sum_by/2 (Elixir 1.18), introduced in the 1.6.1 review pass; revert those six sites to Enum.reduce. The rest of the code is ~1.12 vintage. Widen the CI ma... Pull #28 06 Jul 2026 06:56AM UTC tubedude github
100.0
6125d682... 1.6.1 Domain guards, discounting cleanup, and review fixes (1.6.1) Correctness: - A rate at or below -100% returns {:error, :undefined} instead of raising ArithmeticError or returning garbage everywhere (1 + rate)^t is computed: xnpv/npv/mirr, TVM ... Pull #28 06 Jul 2026 06:46AM UTC tubedude github
100.0
See All Builds (41)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc