• 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: main
CHANGE BRANCH
x
Reset
  • main
  • 1.6.1
  • 1.7.0
  • bracket-interior-scan
  • ex-money-support
  • fix-optional-decimal-compile
  • fix-solver-doc
  • 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 main
  • 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
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
cc30d2ea... main Correct stale docs surfaced by the lib review - :tolerance and :max_iterations option docs: tolerance thresholds the rate step/bracket width (not the NPV), and the solver returns the bracketed estimate on exhaustion rather than "giving up". -... push 06 Jul 2026 03:01AM UTC tubedude github
100.0
d1140b15... main Add Brent to the solver benchmark table in the README (#27) The comparison listed safeguarded Newton, plain Newton, and bisection but not the shipped Brent solver. Regenerate all columns from one run and add Brent: it ties the default on short fl... push 06 Jul 2026 01:01AM UTC web-flow github
100.0
32e69234... main (chore) bump version push 06 Jul 2026 12:52AM UTC tubedude github
100.0
8aeabef3... main Correct the solver description in the docs The default is a safeguarded Newton-Raphson (rtsafe), not "Newton-Raphson with a bisection fallback" — bisection is interleaved per step, not a separate fallback. Fix both the CashFlow moduledoc and the ... push 05 Jul 2026 09:52PM UTC tubedude github
100.0
7792d664... main Correct the solver description in the CashFlow moduledoc (#26) The default is a safeguarded Newton-Raphson (rtsafe), not "Newton-Raphson with a bisection fallback" — bisection is interleaved per step, not a separate fallback. Name the Brent alter... push 05 Jul 2026 09:50PM UTC web-flow github
100.0
6d1a89b4... main Add regression corpus from numpy-financial and java-xirr issues (#25) Cash flows from closed issues where those libraries returned a wrong rate, raised, or failed to converge, each now pinned against finance-elixir: - numpy-financial: #44 (negat... push 05 Jul 2026 07:42PM UTC web-flow github
100.0
4c2ee038... main Scan the bracket interior so even-crossing series find a root (#24) Bracketing compared only the two ends of the rate domain, so a series with more than one IRR — where both ends share a sign — reported did_not_converge even though a real rate ex... push 05 Jul 2026 07:26PM UTC web-flow github
100.0
71264743... main Add Finance.Solver.Brent, a derivative-free solver (#23) * bench: add safeguarded-secant and Brent to the solver comparison * Add Finance.Solver.Brent, a derivative-free solver Brent's method (bracketing secant + inverse-quadratic interpolation... push 05 Jul 2026 05:14PM UTC web-flow github
100.0
See All Builds (41)
  • Repo on GitHub
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