@sheetxl/formulas-extended 0.8.0-beta.12 → 0.8.0-beta.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/browser/esm/{B2E-ZG8fILqD-sK1.mjs → B8SoM9jQdDXwtgKl.mjs} +1 -1
  2. package/browser/esm/{Ci4ASx39Ynmcu_Rv.mjs → BBakdOGC1cqfF6Iu.mjs} +1 -1
  3. package/{node/esm/l_mAU10VLex7MbNS.mjs → browser/esm/BKOSUaPOspNA3UiR.mjs} +1 -1
  4. package/browser/esm/{3YF5WqtiNL_6UP5n.mjs → BYB98ngJrP8aUEUh.mjs} +1 -1
  5. package/{node/esm/Ho2ku6yiOsikJBtk.mjs → browser/esm/Bg9SWNEspWJ7vEAh.mjs} +1 -1
  6. package/browser/esm/{Cc7LIKPWiyCgJqYn.mjs → BjazhB-rkLGqWTP9.mjs} +1 -1
  7. package/{node/esm/DVbiWA-_uacThTwT.mjs → browser/esm/BnqqSrfJVCEx19PQ.mjs} +1 -1
  8. package/{node/esm/BDqS1P5pTbn9aAV_.mjs → browser/esm/BtNcXw7rVlHo7gOf.mjs} +1 -1
  9. package/{node/esm/CZJOUlr4oLNPJITg.mjs → browser/esm/BymHQ6d0GuLbbJvM.mjs} +1 -1
  10. package/{node/esm/BB1d7qGfuPz7e-f7.mjs → browser/esm/C0LxMpWsn2I0bY9l.mjs} +1 -1
  11. package/{node/esm/Bv61jGkVgv0dkZ5e.mjs → browser/esm/CA-J-CuKvqHcKua5.mjs} +1 -1
  12. package/browser/esm/{pUCLFwRpkkiUF_c2.mjs → CQpm3BBIhHls0ymg.mjs} +1 -1
  13. package/browser/esm/{BB3P4ykXH-rBCOGY.mjs → CZssZc0NRsK86rhA.mjs} +1 -1
  14. package/browser/esm/{BckB_3BgZOuSlZFK.mjs → CayxCfr6Req5OBnt.mjs} +1 -1
  15. package/{node/esm/kTIyJgfiglzdgupY.mjs → browser/esm/CwLe_zJj5hXFWIYA.mjs} +1 -1
  16. package/browser/esm/{BdRI3Llx4gJRAgEK.mjs → CwfGkuVMc5cxV4zD.mjs} +1 -1
  17. package/browser/esm/{C_iF7M9kaGbs3TCH.mjs → DDAPeOZHl2lPDy8F.mjs} +1 -1
  18. package/browser/esm/{D4OUOSNs4L6CaX6_.mjs → DGL-3YiIvZL1aezr.mjs} +1 -1
  19. package/browser/esm/{D0-OgCQX5hIZ6lNv.mjs → DnC76PQFsjGNd0ED.mjs} +1 -1
  20. package/browser/esm/{5VSZrR_zA2OmxqwM.mjs → La5T3OKHn32uWF7E.mjs} +1 -1
  21. package/{node/esm/Bv-tN3y9Dc4WI9P_.mjs → browser/esm/XHM3EQlFTOHq3jQP.mjs} +1 -1
  22. package/browser/esm/declarations.mjs +2 -2
  23. package/browser/esm/index.mjs +59 -56
  24. package/{node/esm/QPgwxV6CKVRfiMgU.mjs → browser/esm/lPwbrKEbLIYzRLFP.mjs} +1 -1
  25. package/node/esm/{B2E-ZG8fILqD-sK1.mjs → B8SoM9jQdDXwtgKl.mjs} +1 -1
  26. package/node/esm/{Ci4ASx39Ynmcu_Rv.mjs → BBakdOGC1cqfF6Iu.mjs} +1 -1
  27. package/{browser/esm/l_mAU10VLex7MbNS.mjs → node/esm/BKOSUaPOspNA3UiR.mjs} +1 -1
  28. package/node/esm/{3YF5WqtiNL_6UP5n.mjs → BYB98ngJrP8aUEUh.mjs} +1 -1
  29. package/{browser/esm/Ho2ku6yiOsikJBtk.mjs → node/esm/Bg9SWNEspWJ7vEAh.mjs} +1 -1
  30. package/{browser/esm/DVbiWA-_uacThTwT.mjs → node/esm/BnqqSrfJVCEx19PQ.mjs} +1 -1
  31. package/{browser/esm/BDqS1P5pTbn9aAV_.mjs → node/esm/BtNcXw7rVlHo7gOf.mjs} +1 -1
  32. package/{browser/esm/CZJOUlr4oLNPJITg.mjs → node/esm/BymHQ6d0GuLbbJvM.mjs} +1 -1
  33. package/{browser/esm/BB1d7qGfuPz7e-f7.mjs → node/esm/C0LxMpWsn2I0bY9l.mjs} +1 -1
  34. package/{browser/esm/Bv61jGkVgv0dkZ5e.mjs → node/esm/CA-J-CuKvqHcKua5.mjs} +1 -1
  35. package/node/esm/{pUCLFwRpkkiUF_c2.mjs → CQpm3BBIhHls0ymg.mjs} +1 -1
  36. package/node/esm/{BckB_3BgZOuSlZFK.mjs → CayxCfr6Req5OBnt.mjs} +1 -1
  37. package/node/esm/{CNXBMkJ9KPYEmoGF.mjs → CiAc0OZCRv1uRsiF.mjs} +1 -1
  38. package/{browser/esm/kTIyJgfiglzdgupY.mjs → node/esm/CwLe_zJj5hXFWIYA.mjs} +1 -1
  39. package/node/esm/{C_iF7M9kaGbs3TCH.mjs → DDAPeOZHl2lPDy8F.mjs} +1 -1
  40. package/node/esm/{D4OUOSNs4L6CaX6_.mjs → DGL-3YiIvZL1aezr.mjs} +1 -1
  41. package/node/esm/{Mdb0g5H17I3Oon-f.mjs → D_YJXQ3IoCVzkEWy.mjs} +1 -1
  42. package/node/esm/{D0-OgCQX5hIZ6lNv.mjs → DnC76PQFsjGNd0ED.mjs} +1 -1
  43. package/node/esm/{5VSZrR_zA2OmxqwM.mjs → La5T3OKHn32uWF7E.mjs} +1 -1
  44. package/{browser/esm/Bv-tN3y9Dc4WI9P_.mjs → node/esm/XHM3EQlFTOHq3jQP.mjs} +1 -1
  45. package/node/esm/declarations.mjs +2 -2
  46. package/node/esm/index.mjs +153 -150
  47. package/{browser/esm/QPgwxV6CKVRfiMgU.mjs → node/esm/lPwbrKEbLIYzRLFP.mjs} +1 -1
  48. package/node/esm/{CoiYUgAPry1qUyhB.mjs → shH8FSZ-wXbrxVx7.mjs} +1 -1
  49. package/package.json +3 -3
  50. package/types/src/_utils/AnyArgs.d.ts +0 -12
  51. package/types/src/_utils/FinanaceSolver.d.ts +0 -27
  52. package/types/src/_utils/FinanceAmor.d.ts +0 -9
  53. package/types/src/_utils/FinanceCashflow.d.ts +0 -17
  54. package/types/src/_utils/FinanceCoupon.d.ts +0 -63
  55. package/types/src/_utils/FinanceDate.d.ts +0 -7
  56. package/types/src/_utils/FinanceDayCount.d.ts +0 -74
  57. package/types/src/_utils/FinanceOdd.d.ts +0 -62
  58. package/types/src/_utils/FinanceSecurity.d.ts +0 -21
  59. package/types/src/_utils/FinanceUtils.d.ts +0 -34
  60. package/types/src/financial/ACCRINT.d.ts +0 -23
  61. package/types/src/financial/AMORDEGRC.d.ts +0 -22
  62. package/types/src/financial/Cashflow.d.ts +0 -49
  63. package/types/src/financial/Coupon.d.ts +0 -14
  64. package/types/src/financial/Date.d.ts +0 -29
  65. package/types/src/financial/Depreciation.d.ts +0 -9
  66. package/types/src/financial/Odd.d.ts +0 -18
  67. package/types/src/financial/Security.d.ts +0 -10
  68. package/types/src/financial/SecurityMaturity.d.ts +0 -40
  69. package/types/src/financial/TBill.d.ts +0 -17
  70. package/types/src/financial/VDB.d.ts +0 -17
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/formulas-extended - Formulas Enterprise - TypeScript formulas compatible with Excel built-ins. - v0.8.0-beta.12
2
+ * @license @sheetxl/formulas-extended - Formulas Enterprise - TypeScript formulas compatible with Excel built-ins. - v0.8.0-beta.14
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/formulas-extended - Formulas Enterprise - TypeScript formulas compatible with Excel built-ins. - v0.8.0-beta.12
2
+ * @license @sheetxl/formulas-extended - Formulas Enterprise - TypeScript formulas compatible with Excel built-ins. - v0.8.0-beta.14
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sheetxl/formulas-extended",
3
3
  "description": "Formulas Enterprise - TypeScript formulas compatible with Excel built-ins.",
4
- "version": "0.8.0-beta.12",
4
+ "version": "0.8.0-beta.14",
5
5
  "license": "SEE LICENSE IN <LICENSE>",
6
6
  "type": "module",
7
7
  "exports": {
@@ -42,7 +42,7 @@
42
42
  "formulas"
43
43
  ],
44
44
  "dependencies": {
45
- "@sheetxl/primitives": "^0.8.0-beta.12",
46
- "@sheetxl/scripting": "^0.8.0-beta.12"
45
+ "@sheetxl/primitives": "^0.8.0-beta.14",
46
+ "@sheetxl/scripting": "^0.8.0-beta.14"
47
47
  }
48
48
  }
@@ -15,18 +15,6 @@ import { Scalar, Omittable } from '@sheetxl/primitives';
15
15
  * This package does not depend on that one, so the rule is duplicated rather than imported;
16
16
  * change both together.
17
17
  */
18
- /**
19
- * Reads a DATE argument declared `any`.
20
- *
21
- * Text is accepted in two steps, as `WEEKNUM` does it: numeric text is a SERIAL
22
- * (`EOMONTH("36556",0)` = 36556) and only non-numeric text goes to the date parser.
23
- * `parseAsSerialDate` supplies the refusal — `#VALUE!` for a boolean, whether it arrived as a
24
- * literal or as a cell, and an incoming error rethrown with its own identity.
25
- *
26
- * A blank CELL is serial 0. A genuinely empty SLOT is `#N/A` in Excel (`EOMONTH(,0)`,
27
- * `YEARFRAC(,39814)` — fn-battery financial/YEARFRAC, 2026-08-28); a parameter declared
28
- * `Omittable<Scalar>` sees that slot as `undefined` and reads it through {@link anyDateRequired}.
29
- */
30
18
  export declare function anyDate(value: Scalar): number;
31
19
  /**
32
20
  * A REQUIRED date parameter Excel declares `any` (`Omittable<Scalar>` on the declaration): an
@@ -1,32 +1,5 @@
1
1
  type IterFn = (x: number) => number;
2
- /**
3
- * The approximate yield a bond-yield iteration starts from: the annual coupon plus the pull to par
4
- * spread over `years`, against a denominator that is the mid-point of par and the price less a
5
- * `years`-scaled share of the same pull. At par it returns the coupon rate exactly, which is why
6
- * a bond priced at 100 answers in one step.
7
- *
8
- * `years` is {@link getYearsToMaturity}, never the coupon count over the frequency. Measured on
9
- * 1,154 rows of fn-battery financial/adhoc-yield-start, -n, -n2 and -n3 — bonds whose redemption
10
- * dwarfs the price, where a hundred Newton steps carry the start out to a number that inverts.
11
- *
12
- * Used by: YIELD, ODDFYIELD.
13
- */
14
2
  export declare function approximateYield(rate: number, pr: number, years: number): number;
15
- /**
16
- * Excel's bond-yield iteration: Newton on the price with its ANALYTIC slope, at most a hundred
17
- * steps from {@link approximateYield}, stopping the first time a step moves the yield by less than
18
- * `1e-5` and answering the iterate the step just produced — so the answer is a PARTIALLY converged
19
- * one, ~1e-10 from the root on an ordinary bond, and on a bond that cannot converge it is simply
20
- * where the walk stood after a hundred steps.
21
- *
22
- * A slope that overflows to infinity, or a step that lands where the price cannot be evaluated
23
- * (a `1 + y/f` at or below zero), is `NaN` — the caller's #NUM!.
24
- *
25
- * Measured on YIELD's 1,134-row battery and fn-battery financial/adhoc-yield-fingerprint,
26
- * -start, -n, -n2, -n3, -domain (2026-09-09).
27
- *
28
- * Used by: YIELD, ODDFYIELD.
29
- */
30
3
  export declare function solveYieldByNewton(start: number, priceFn: IterFn, slopeFn: IterFn): number;
31
4
  export {};
32
5
  /**
@@ -10,14 +10,5 @@ export interface AmorArgs {
10
10
  days: number;
11
11
  yearDays: number;
12
12
  }
13
- /**
14
- * The seven arguments of AMORLINC/AMORDEGRC — measured against Excel 16.0 (fn-battery
15
- * financial/AMORLINC, /AMORDEGRC, 2026-08-28). Every one is Excel-declared `any`, so they are
16
- * read here in declaration order, with the basis read AFTER the dates are validated (a reversed
17
- * date pair beats a text basis: `…, DATE(2008,12,31), DATE(2008,8,19), …, "x")` is #NUM!). The
18
- * serials truncate; the shared domain is `cost > 0`, `0 ≤ salvage ≤ cost`, `period ≥ 0`,
19
- * `rate > 0`, both dates in the calendar and in order, and a truncated basis of 0, 1, 3 or 4.
20
- * Returns `null` for #NUM!.
21
- */
22
13
  export declare function amorArgs(cost: Omittable<Scalar>, datePurchased: Omittable<Scalar>, firstPeriod: Omittable<Scalar>, salvage: Omittable<Scalar>, period: Omittable<Scalar>, rate: Omittable<Scalar>, basis: Omittable<Scalar>): AmorArgs | null;
23
14
  //# sourceMappingURL=FinanceAmor.d.ts.map
@@ -1,21 +1,4 @@
1
1
  import { IRange } from '@sheetxl/primitives';
2
- /**
3
- * The dated cash-flow operands of XNPV and XIRR, read the way Excel reads them (measured against
4
- * Excel 16.0, fn-battery financial/XNPV, 2026-08-29).
5
- *
6
- * @remarks
7
- * Both functions take two operands that are read TOGETHER, member by member, by flattened
8
- * row-major ordinal — a 3x1 pairs fully with a 1x3 and a 2x2 pairs with a 4x1
9
- * (DESIGN-RANGE-PAIRING). That makes the reading order a pair scan rather than a slot order, and
10
- * it is one pass that stops at the first fault: a bad ordinal 2 is answered before ordinal 3's
11
- * error is looked at.
12
- *
13
- * Ordinal 0 is not like the rest. Its DATE is read before its value (an error there wins over an
14
- * error in the first flow) and range-checked before either, and a member of EITHER operand that
15
- * is not a number is `#VALUE!` there where the same member at any later ordinal is `#NUM!` —
16
- * so a whole operand of numeric text, or of blanks, answers `#VALUE!` while one number among
17
- * them answers `#NUM!`.
18
- */
19
2
  export interface DatedFlows {
20
3
  /** The flow at each ordinal. */
21
4
  values: number[];
@@ -32,35 +32,7 @@ export declare function calculateCoupnum(settlementSerial: number, maturitySeria
32
32
  * basis 0, actual days for 1–3, the European 30/360 for 4.
33
33
  */
34
34
  export declare function calculateCoupdaybs(settlementSerial: number, maturitySerial: number, frequency: number, basis: number): number;
35
- /**
36
- * Days from settlement to the next coupon date (COUPDAYSNC). Actual days for bases 1–3. The
37
- * 30/360 bases are NOT `getDayCount`'s (measured, 556 of 556 rows): the count runs from the
38
- * settlement's own day — a 31 is 30, and a February month end is NOT 30 unless the
39
- * settlement IS the previous coupon date, in which case the coupon date's unclamped day is
40
- * read instead (`COUPDAYSNC(DATE(2011,2,28),DATE(2011,5,31),2,0)` is 92, from day 28;
41
- * `COUPDAYSNC(DATE(2011,2,28),DATE(2011,8,29),2,0)` is 179, from the chain's `Feb 29`) — to
42
- * the next coupon date carrying the maturity's day unclamped: at basis 0 a February day at or
43
- * past the month's end is 30 and a 31 is 30 with no advance into the next month; basis 4
44
- * caps both ends at 30.
45
- */
46
35
  export declare function calculateCoupdaysnc(settlementSerial: number, maturitySerial: number, frequency: number, basis: number): number;
47
- /**
48
- * Days in the coupon period that contains settlement (COUPDAYS). Basis 3 is `365/frequency`
49
- * and the 30/360 bases `360/frequency`. Basis 1 is Excel's own construction, measured on
50
- * 2,302 rows (fn-battery financial/COUPDAYS + adhoc-coupdays-b1 + adhoc-coupdays-sweep) and
51
- * NOT the next coupon minus the previous one (LibreOffice's reading; wrong on 30 of the
52
- * battery's 225 rows). Excel walks TWO chains back from maturity: one whose day of month
53
- * decays as it is clamped (`Aug 30 → Feb 29 → Aug 29 → Feb 28 → Aug 28`) and one that stays
54
- * on the month's last day once a clamp lands there (`Aug 30 → Feb 29 → Aug 31 → Feb 28 →
55
- * Aug 31`). The decaying chain is walked to the first date on or before the settlement; if
56
- * the coupon after that date is not the same date in both chains, the period is the decaying
57
- * chain's, otherwise it is the month-end chain's period around the settlement. So for a Nov 30
58
- * maturity paid twice a year a settlement of Dec 15 sits in `Nov 30 → May 30` (181) while a
59
- * settlement of May 30 sits in `Nov 30 → May 31` (182) and one of May 31 in `May 31 → Nov 30`
60
- * (183). A period that begins below serial 1 is counted in real days (`_periodDays`).
61
- *
62
- * Used by: COUPDAYS and {@link couponPeriod}.
63
- */
64
36
  export declare function calculateCoupdays(settlementSerial: number, maturitySerial: number, frequency: number, basis: number): number;
65
37
  /**
66
38
  * The four arguments of the six coupon functions, read in Excel's order — every one is
@@ -79,48 +51,13 @@ export declare function readCouponArgs(settlement: Omittable<Scalar>, maturity:
79
51
  frequency: number;
80
52
  basis: number;
81
53
  };
82
- /**
83
- * The coupon-period numbers PRICE, YIELD, DURATION and MDURATION are built on, as Excel
84
- * composes them (measured against Excel's own COUPNUM/COUPDAYBS/COUPDAYS/COUPDAYSNC answers on
85
- * 572 shapes, fn-battery financial/PRICE + /DURATION, 2026-08-28): `N` is COUPNUM (NaN, the
86
- * caller's #NUM!, when the previous coupon is below the calendar), `A` is COUPDAYBS, and the
87
- * period length `E` is COUPDAYS — EXCEPT at basis 1, where it is the real span from the
88
- * previous coupon to the next (`COUPDAYBS + COUPDAYSNC`), not COUPDAYS' two-chain value; the
89
- * two differ on the month-end and February maturities (22 of the 225 basis-1 shapes). `DSC` is
90
- * `E − A`, never COUPDAYSNC.
91
- */
92
54
  export declare function couponPeriod(settlementSerial: number, maturitySerial: number, frequency: number, basis: number): {
93
55
  N: number;
94
56
  A: number;
95
57
  E: number;
96
58
  DSC: number;
97
59
  };
98
- /**
99
- * Standard coupon bond price per $100 face value — the doc's closed form over
100
- * {@link couponPeriod}'s numbers: with one coupon left `(coupon + redemption) / (1 + DSC/E ·
101
- * yld/f) − coupon · A/E` (linear, not the power form), otherwise the redemption and each coupon
102
- * discounted by `(1 + yld/f)^(k − 1 + DSC/E)` less the accrued coupon. Measured bit-for-bit on
103
- * PRICE's battery (fn-battery financial/PRICE, 2026-08-28).
104
- *
105
- * The grouping is measured too, as ODDFPRICE's is: the coupon sum is accumulated on its own,
106
- * forward, then the redemption term is added to it and the accrued coupon subtracted. Starting
107
- * the accumulator at the redemption instead costs 146 of PRICE's 779 census rows and 74 of
108
- * YIELD's 785 (SXL_CENSUS over the financial suite, 2026-09-09) — the terms and the divisions
109
- * are identical either way, only the order the additions round in differs. It is visible in
110
- * YIELD because that answer is a PARTIAL iterate.
111
- *
112
- * Used by: PRICE, YIELD.
113
- */
114
60
  export declare function calculatePrice(settlementSerial: number, maturitySerial: number, rate: number, yld: number, redemption: number, frequency: number, basis: number): number;
115
- /**
116
- * `d/dy` of {@link calculatePrice}, term by term — the slope YIELD's Newton divides by. Analytic,
117
- * not a difference quotient: a finite difference of any step reproduces neither the hundred-step
118
- * answers of a redemption that dwarfs the price nor the partially-converged ones (fn-battery
119
- * financial/adhoc-yield-fingerprint, 2026-09-09). A term that overflows makes the slope infinite,
120
- * which the caller answers as #NUM!.
121
- *
122
- * Used by: YIELD.
123
- */
124
61
  export declare function calculatePriceSlope(settlementSerial: number, maturitySerial: number, rate: number, yld: number, redemption: number, frequency: number, basis: number): number;
125
62
  /**
126
63
  * Macaulay duration of a coupon bond.
@@ -37,13 +37,6 @@ export declare const daysInMonth: (y: number, m: number) => number;
37
37
  export declare const isMonthEnd: (x: DateFields) => boolean;
38
38
  /** The workbook calendar's fields for a serial. */
39
39
  export declare function getDateFields(serial: number): DateFields;
40
- /**
41
- * The serial of calendar fields, extended linearly BELOW the calendar (1899-12-31 is 0, and on
42
- * down) and with a day past the month's end OVERFLOWING into the next month — a "Feb 30" is
43
- * Mar 1. The coupon chains that walk off either end of the calendar are measured against Excel
44
- * on those extended values, so they need an arithmetic that keeps producing them
45
- * (fn-battery financial/ACCRINT and /ODDLPRICE).
46
- */
47
40
  export declare function getSerialOfFields(y: number, m: number, d: number): number;
48
41
  /** The fields `months` months on from `x`, the day clamped to the destination month. */
49
42
  export declare function addMonthsClamped(x: DateFields, months: number): DateFields;
@@ -42,85 +42,11 @@ export interface DayCount {
42
42
  *
43
43
  */
44
44
  export declare function getDayCount(startSerial: number, endSerial: number, basis: number): DayCount;
45
- /**
46
- * Calculates the DAYS360 US method — signed integer day count.
47
- *
48
- * @see {@link getDayCount} (specifically `_getNasd30_360`) for the correct basis 0
49
- * implementation used by financial formulas.
50
- *
51
- * @param startSerial The Excel serial date representing the start date.
52
- * @param endSerial The Excel serial date representing the end date.
53
- * @returns The signed number of days between the dates (negative if endSerial < startSerial).
54
- *
55
- * @remarks
56
- * **Implementation Note:** This function is strictly for the `DAYS360` formula.
57
- * It must NOT be used for standard financial functions like `YEARFRAC`, `ACCRINT`, or `PRICE`.
58
- *
59
- * It deliberately differs from the standard NASD 30/360 convention (basis 0) on two points,
60
- * both measured against Excel:
61
- *
62
- * 1. The February End-of-Month conversion (startDay → 30) CASCADES into the end-day rule.
63
- * Feb 28 to Mar 31 in 2011 is 30 days here and 31 days under basis 0.
64
- * 2. End-of-February is decided on the LEGACY calendar — the day after the start falls in
65
- * March — where basis 0 asks the REAL calendar. The two disagree only across the phantom
66
- * `1900-02-29`: `DAYS360(59,91)` is 33 and `DAYS360(60,91)` is 30, while the same pairs
67
- * under basis 0 are 31/360 and 32/360.
68
- *
69
- * The arguments are NOT swapped into order first. `DAYS360` is not antisymmetric — the rules
70
- * apply to (start, end) as given, so `DAYS360(3/15, 3/31)` is 16 but `DAYS360(3/31, 3/15)`
71
- * is −15, and `DAYS360(43496, 0)` is −42870 against `DAYS360(0, 43496)` = 42871.
72
- *
73
- * We replicate Excel's exact behavior, which utilizes different 30/360 rulesets
74
- * for DAYS360 vs. NASD-based functions.
75
- *
76
- * https://en.wikipedia.org/wiki/Day_count_convention
77
- *
78
- */
79
45
  export declare function getDays360US(startSerial: number, endSerial: number): number;
80
46
  /** The last serial of the 1900 calendar (9999-12-31). */
81
47
  export declare const MAX_SERIAL_DATE = 2958465;
82
- /**
83
- * Excel's date-slot domain for the day-count family, measured on DAYS360, YEARFRAC, DATEDIF
84
- * and the six coupon functions (fn-battery financial/*, 2026-08-28): the RAW value must not be
85
- * negative (`-1E-9` is #NUM!) and the truncated serial must not pass 9999-12-31 (`2958465.9` is
86
- * a legal 9999-12-31). The fraction is otherwise discarded by every function in the family.
87
- */
88
48
  export declare function isSerialDateInRange(serial: number): boolean;
89
- /**
90
- * `YEARFRAC` — measured against Excel 16.0 (fn-battery financial/YEARFRAC, 2026-08-28). Both
91
- * serials are truncated first, the earlier date becomes the start, and basis 0 is then the
92
- * SIGNED NASD count: Excel orders the dates but never takes a magnitude, so
93
- * `YEARFRAC(59,60,0)` — 1900-02-28, a real month end, against the phantom 1900-02-29 that is
94
- * not — is `-1/360`. The other bases cannot go negative once ordered. The caller has validated
95
- * the serials and the basis.
96
- */
97
49
  export declare function getYearFrac(startSerial: number, endSerial: number, basis: number): number;
98
- /**
99
- * The years to maturity a bond-yield ITERATION starts from — not `YEARFRAC`, and not the coupon
100
- * count over the frequency. Whole years are stepped off the settlement (the day clamped to each
101
- * destination month) and the remainder is the basis's own day count over the basis's year: the
102
- * 30/360 counts over 360 at bases 0 and 4, real days over 360 at basis 2 and over 365 at basis 3,
103
- * and real days over the MATURITY'S OWN year at basis 1 — 366 out of a leap year, whatever the
104
- * remainder itself covers. Basis 0's February here is the LEGACY calendar's: a Feb 29 start is a
105
- * month end and a Feb 28 is not, which is neither `getDayCount`'s rule (the real calendar's month
106
- * end, so Feb 28 counts too) nor `getDays360US`'s (which also lets the conversion steer the end).
107
- *
108
- * Measured on 1,154 rows where the answer depends on nothing else (fn-battery
109
- * financial/adhoc-yield-n, -n2, -n3), 2026-09-09.
110
- *
111
- * Used by: YIELD, ODDFYIELD.
112
- */
113
50
  export declare function getYearsToMaturity(settlement: number, maturity: number, basis: number): number;
114
- /**
115
- * The stub-period day count of AMORLINC/AMORDEGRC (the year fraction is `days / yearDays`, and
116
- * the caller groups that as Excel does) — measured against Excel 16.0 (fn-battery
117
- * financial/AMORLINC, /AMORDEGRC, 2026-08-28), and NOT YEARFRAC's: serials are truncated, the
118
- * 30/360 bases count days as `getDayCount` does over 360, basis 3 is actual days over 365, and
119
- * basis 1 is actual days over the length of the PURCHASE year (366 only when that year is a
120
- * Gregorian leap year — 1900 is not — whatever the span crosses; 2007-12-31 → 2008-12-31 is
121
- * 366/365), and in both actual bases a real Feb 29 counts as the 28th (`_feb29AsFeb28`). A zero-day stub is a whole period (`purchase = first period`, or Dec 30 → Dec 31
122
- * at basis 0), and a stub longer than a year is not capped. Basis 2 is not accepted by either
123
- * function; the caller has refused it before this is called.
124
- */
125
51
  export declare function getAmorDayCount(purchased: number, firstPeriod: number, basis: number): DayCount;
126
52
  //# sourceMappingURL=FinanceDayCount.d.ts.map
@@ -1,10 +1,4 @@
1
1
  import { Omittable, Scalar } from '@sheetxl/primitives';
2
- /**
3
- * The odd-coupon securities' shared machinery — the quasi-coupon chain of an irregular period
4
- * and the day-count sums the price and yield forms are built from, measured against Excel 16.0
5
- * (fn-battery financial/ODDLPRICE + /ODDLYIELD + /ODDFPRICE and the `adhoc-oddl-*` /
6
- * `adhoc-oddf-*` probes, 2026-08-28/29).
7
- */
8
2
  /**
9
3
  * `(settlement, maturity, …dates, …numbers, frequency, [basis])` as the four ODD functions read
10
4
  * it: every slot is Excel-declared `any` (a boolean is #VALUE!, an empty argument #N/A, a blank
@@ -21,67 +15,11 @@ export declare function readOddArgs(dates: Omittable<Scalar>[], numbers: Omittab
21
15
  frequency: number;
22
16
  basis: number;
23
17
  };
24
- /**
25
- * The three day-count sums of the odd LAST period `[lastInterest, maturity]`, in coupon-period
26
- * units — the numbers ODDLPRICE and ODDLYIELD are built from. Measured on 1,780
27
- * (shape, frequency, basis) triples, each sum exact (`fn-battery/financial/fit-oddl.mjs`).
28
- *
29
- * It takes TWO chains, as COUPDAYS' basis 1 did (batch 3): the DECAYING chain anchored at
30
- * `lastInterest` gives the period ends and their lengths, while the STICKY chain decides only
31
- * which period the maturity lands in — so an Aug 31 maturity against a decayed Aug 28 boundary
32
- * is still inside the period that ENDS there and overhangs it by three days.
33
- *
34
- * Over the periods `[B₀ = lastInterest, B₁] … [B_{J−1}, B_J]`:
35
- *
36
- * - `A` and `DSC` walk their span (`lastInterest → settlement`, `settlement → maturity`) period
37
- * by period, no period contributing more than itself — a 31st period end counted raw runs one
38
- * day past its own length.
39
- * - `DC` counts every period 1 except the last, which is measured BACKWARD from its end,
40
- * `(NL − count(maturity, B_J)) / NL`. That is what makes `DC ≠ A + DSC` at basis 0.
41
- *
42
- * A chain that leaves the calendar is #NUM!: past its end going forward, and — stepping BACK
43
- * from the MATURITY to the first date at or below `lastInterest` — below serial 1 going back
44
- * (measured: a ladder landing on serial 1 computes, one landing on serial 0 is #NUM!).
45
- */
46
18
  export declare function oddLastSums(settlement: number, maturity: number, lastInterest: number, frequency: number, basis: number): {
47
19
  A: number;
48
20
  DC: number;
49
21
  DSC: number;
50
22
  };
51
- /**
52
- * The numbers ODDFPRICE's form is built from — `N` regular coupons after `firstCoupon`, the
53
- * accrued sum `A` and the first coupon's sum `DC` (both in coupon-period units), and `u`, the
54
- * fractional exponent every cash flow after the settlement is discounted by. Measured on 1,125
55
- * (shape, frequency, basis) triples, the four sums solved out of Excel by linearity
56
- * (`fn-battery/financial/oddf-model.mjs`, `verify-oddf.mjs`, `adhoc-oddf-*`, 2026-08-29).
57
- *
58
- * The maturity must sit on `firstCoupon`'s grid — `COUPPCD(firstCoupon, maturity) = firstCoupon`
59
- * — and the doc's two branches are real, on DIFFERENT date machinery. `E` is the regular period
60
- * around the settlement on that grid, PRICE's {@link couponPeriod} (`COUPDAYBS + COUPDAYSNC` at
61
- * basis 1); `DFC` the basis's count issue → firstCoupon:
62
- *
63
- * - `DFC = E` is #NUM! — an odd period that is exactly a regular one.
64
- * - SHORT (`DFC < E`): one period, every count over `E` — `A = issue→settlement`, `DC = DFC`,
65
- * `u = settlement→firstCoupon`, the last straight from the settlement (the NASD advance
66
- * included). `N` is `COUPNUM(settlement, maturity) − 1`, which counts a grid date between the
67
- * settlement and the first coupon when there is one (a settlement in the gap between a
68
- * decayed boundary and its sticky twin).
69
- * - LONG (`DFC > E`): `COUPNUM(issue, firstCoupon)` quasi periods on the STICKY grid, their
70
- * boundaries walked DECAYED back from `firstCoupon` (each step subtracts `12/f` months from
71
- * the previous date and clamps: an Aug 31 anchor semiannual is Feb 28, then Aug 28) — so the
72
- * earliest period can end at or before the issue and count nothing. `NL` is each period's
73
- * own actual span at basis 1, `360/f` or `365/f` elsewhere; `A` walks issue → settlement as
74
- * days over `NL`; `DC` is the issue's period as days over `NL` and every later period exactly
75
- * 1 (the doc's DCᵢ — visible at bases 2 and 3). The exponent `u = Nq + DSC/E` is on the
76
- * sticky grid instead: `DSC = E − COUPDAYBS` at bases 0/1/4 and the actual days to the next
77
- * grid date at 2/3, and `Nq` is `COUPNUM(settlement, firstCoupon) − 1` PLUS ONE on a
78
- * month-end first coupon — Excel discounts every cash flow one period too far — unless the
79
- * settlement is itself a month end or its month holds an earlier quasi-coupon date
80
- * (`adhoc-oddf-nq`, 957 settlements swept day by day).
81
- *
82
- * A chain that walks below the calendar is #NUM! in either branch (a settlement in the first
83
- * days of 1900 has quasi dates in 1899).
84
- */
85
23
  export declare function oddFirstSums(settlement: number, maturity: number, issue: number, firstCoupon: number, frequency: number, basis: number): {
86
24
  N: number;
87
25
  A: number;
@@ -1,13 +1,4 @@
1
1
  import { Omittable, Scalar } from '@sheetxl/primitives';
2
- /**
3
- * Argument readers for the securities functions — every slot Excel-declared `any`, read in the
4
- * order Excel reads them (measured against Excel 16.0, fn-battery financial/*, 2026-08-28).
5
- *
6
- * Two orders exist in the family. The discount securities (DISC PRICEDISC YIELDDISC INTRATE
7
- * RECEIVED) CONVERT from the last slot to the first and only then look for errors in slot
8
- * order; ACCRINTM, ACCRINT and the coupon functions convert and validate each slot from the
9
- * first. Each function names its own.
10
- */
11
2
  /** The basis slot: omitted or blank is 0, text parses, a boolean is #VALUE!, out of 0–4 after truncation is #NUM!. */
12
3
  export declare function readBasis(basis: Omittable<Scalar>): number;
13
4
  /** The two dates of a security, truncated, both in the calendar and the settlement strictly first — else #NUM!. */
@@ -61,17 +52,6 @@ export declare function readMatArgs(settlement: Omittable<Scalar>, maturity: Omi
61
52
  A: number;
62
53
  B: number;
63
54
  };
64
- /**
65
- * `(settlement, maturity, …numbers, frequency, [basis])` as PRICE, YIELD, DURATION and
66
- * MDURATION read it (measured on all four, fn-battery 2026-08-28). PRICE and YIELD read the
67
- * basis FIRST — coerced and range-checked, so a text basis is #VALUE! and a 5 is #NUM! whatever
68
- * else is wrong, and an error there wins over an error in the settlement; DURATION and
69
- * MDURATION read it LAST (`basisLast`), the coupon functions' way. In between, the settlement
70
- * and the maturity are each coerced and checked against the calendar before the next slot is
71
- * read (a negative settlement is #NUM! over a text frequency), then the numeric slots are
72
- * coerced, then the frequency is coerced and validated (1, 2 or 4 after truncation); the date
73
- * order (`settlement < maturity` once truncated) and the signs of the numbers come last.
74
- */
75
55
  export declare function readBondArgs(settlement: Omittable<Scalar>, maturity: Omittable<Scalar>, numbers: Omittable<Scalar>[], frequency: Omittable<Scalar>, basis: Omittable<Scalar>, basisLast?: boolean): {
76
56
  settlement: number;
77
57
  maturity: number;
@@ -79,6 +59,5 @@ export declare function readBondArgs(settlement: Omittable<Scalar>, maturity: Om
79
59
  frequency: number;
80
60
  basis: number;
81
61
  };
82
- /** Excel's Analysis-ToolPak arithmetic answers 0 for a product that overflowed (measured on ACCRINTM, TBILLEQ, TBILLPRICE, PRICEMAT). */
83
62
  export declare const overflowIsZero: (value: number) => number;
84
63
  //# sourceMappingURL=FinanceSecurity.d.ts.map
@@ -1,9 +1,4 @@
1
1
  import { IRuntime } from '@sheetxl/primitives';
2
- /**
3
- * The secant step cap shared by RATE and IRR — Excel gives up after 200, not the documented 20
4
- * (measured on one 24-period loan: a path of 200 steps converges, one of 203 is #NUM!). IRR runs
5
- * the same iteration on the discount factor rather than the rate, so the cap is one fact.
6
- */
7
2
  export declare const RATE_MAX_ITERATIONS = 200;
8
3
  /**
9
4
  * The currency format Excel gives a financial result cell, in the runtime's locale.
@@ -21,36 +16,7 @@ export declare const RATE_MAX_ITERATIONS = 200;
21
16
  * body instead of following the domain guards.
22
17
  */
23
18
  export declare const defaultCurrencyFormat: (runtime: IRuntime) => string;
24
- /**
25
- * `base ^ exponent` as Excel evaluates it (the `^` operator, POWER, and the powers inside the
26
- * time-value-of-money functions all agree — measured 2026-08-26, Excel 16.0 build 20326).
27
- *
28
- * For an INTEGER exponent of magnitude up to 4294967294 (2^32 − 2) Excel does not call a
29
- * correctly rounded pow: it multiplies — right-to-left binary exponentiation, a negative exponent
30
- * as the reciprocal of the positive power — and the rounding of every intermediate product is
31
- * carried into the result. That is invisible at the 15th digit of `(1+r)^n` itself, but a caller
32
- * that divides `(1+r)^n − 1` by a small `r` amplifies the last bits: `FV(1E-9,360,-100,-1000)`
33
- * agrees with Excel to 8 digits on `Math.pow` and is bit-exact on this form. From 2^32 − 1 up, and
34
- * for every non-integer exponent, Excel is `exp(y · ln x)` in double — closer to it than libm pow
35
- * on the sensitive rows (`FV(1E-15,12.5,…)` is 2 digits on `Math.pow`, exact here), and equal to
36
- * it everywhere else measured.
37
- *
38
- * A zero base follows the `^` operator: `0^0` is #NUM! and `0^negative` is #DIV/0!. So does a
39
- * negative base under a fractional exponent: real only when the exponent's reciprocal, read at 15
40
- * significant digits, is an odd integer — `FV(-3,1/3,1)` is -0.7533 — and #NUM! otherwise.
41
- */
42
19
  export declare const excelPow: (base: number, exponent: number) => number;
43
- /**
44
- * Excel's C `(int)` cast of an argument: truncation toward zero, and INT_MIN for anything out of
45
- * the 32-bit range (the x64 `cvttsd2si` convention), NaN included. Measured on DB (fn-battery,
46
- * 2026-08-28): `DB(…,3E9,2E9)` is #NUM! because only `life` overflows to INT_MIN while
47
- * `DB(…,1E10,5E9)` is 0 because both do.
48
- */
49
20
  export declare const excelInt32: (value: number) => number;
50
- /**
51
- * Round to `digits` decimals as Excel's ROUND does: ties away from zero, decided on the value's
52
- * 15-significant-digit decimal form rather than its binary one — `550 · 0.45` is
53
- * 247.49999999999997 in double and Excel rounds it to 248 (AMORDEGRC, measured 2026-08-28).
54
- */
55
21
  export declare const excelRound: (value: number, digits?: number) => number;
56
22
  //# sourceMappingURL=FinanceUtils.d.ts.map
@@ -9,19 +9,6 @@ import { AcceptError, Omittable, Scalar, NoLift } from '@sheetxl/primitives';
9
9
  * @param frequency is the number of coupon payments per year.
10
10
  * @param basis is the type of day count basis to use.
11
11
  * @param calcMethod is a logical value: to accrued interest from issue date = TRUE; to calculate from last coupon payment date = FALSE.
12
- *
13
- * @remarks
14
- * `par · rate/frequency · Σ(Aᵢ/NLᵢ)` over the quasi-coupon periods anchored at `first_interest`,
15
- * as Excel 16.0 composes it (fn-battery financial/ACCRINT and adhoc-accrint-clamped, 1,796 rows,
16
- * 2026-08-28 / 2026-09-09) — see {@link accruedPeriods}.
17
- * The seven leading slots are Excel-declared `any` (a boolean is #VALUE!, an empty slot #N/A —
18
- * except `par`, which is 1000 when omitted — a blank cell 0); `calc_method` is a logical read
19
- * FIRST: any number is accepted (nonzero is TRUE), text — `"TRUE"` included — is #VALUE!. Then
20
- * the slots are read from the first, each coerced and validated before the next (a negative
21
- * issue is #NUM! over a text frequency, a frequency of 3 over a text basis): every date in the
22
- * calendar, the frequency 1/2/4 and the basis 0–4 after truncation; then `issue < settlement`,
23
- * `rate > 0`, `par > 0`, and a quasi-coupon date the walk needs below serial 1 or past the
24
- * calendar's end is #NUM!. A product that overflows is 0.
25
12
  */
26
13
  export declare function ACCRINT(issue: NoLift<Omittable<AcceptError<Scalar>>>, firstInterest: NoLift<Omittable<AcceptError<Scalar>>>, settlement: NoLift<Omittable<AcceptError<Scalar>>>, rate: NoLift<Omittable<AcceptError<Scalar>>>, par: NoLift<Omittable<AcceptError<Scalar>>>, frequency: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>, calcMethod?: NoLift<Omittable<AcceptError<Scalar>>>): number;
27
14
  /**
@@ -31,16 +18,6 @@ export declare function ACCRINT(issue: NoLift<Omittable<AcceptError<Scalar>>>, f
31
18
  * @param rate is the security's annual coupon rate.
32
19
  * @param par is the security's par value.
33
20
  * @param basis is the type of day count basis to use.
34
- *
35
- * @remarks
36
- * `par · rate · yearfrac(issue, settlement)` with YEARFRAC's year fraction (the signed NASD
37
- * count at basis 0), measured against Excel 16.0 (fn-battery financial/ACCRINTM, 2026-08-28).
38
- * There is no quasi-coupon walk here — a security paying at maturity has one period — so the
39
- * two share their reading and nothing else. The slots read from the first: each date is coerced
40
- * and checked against the calendar before the next slot is looked at, then the rate, the par and
41
- * the basis are coerced, and only then the date order (`issue ≤ settlement` once truncated —
42
- * equal is 0) and the signs of the rate and the par. An OMITTED par is 1000 (a blank cell is 0,
43
- * and #NUM!). A product that overflows is 0.
44
21
  */
45
22
  export declare function ACCRINTM(issue: NoLift<Omittable<AcceptError<Scalar>>>, settlement: NoLift<Omittable<AcceptError<Scalar>>>, rate: NoLift<Omittable<AcceptError<Scalar>>>, par: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
46
23
  //# sourceMappingURL=ACCRINT.d.ts.map
@@ -8,28 +8,6 @@ import { Scalar, Omittable, NoLift } from '@sheetxl/primitives';
8
8
  * @param period is the period.
9
9
  * @param rate is the depreciation rate.
10
10
  * @param basis is the type of day count basis to use.
11
- *
12
- * @remarks
13
- * Measured against Excel 16.0 (fn-battery financial/AMORDEGRC, 2026-08-28), where it differs from
14
- * the documentation in most places:
15
- *
16
- * - The life is `1/rate`. A life of 2 or less is #NUM!; the coefficient is 1.5 up to a life of 4,
17
- * 2 up to 6, 2.5 beyond (the documented "1 to 2 years" and "4 to 5 years" bands do not exist).
18
- * - Period 0 is `cost · rate · coefficient · stub fraction` (the AMORLINC stub, see
19
- * `getAmorDayCount`), capped at `cost − salvage`, ROUNDED — half away from zero, not
20
- * floored — and carried into the balance rounded.
21
- * - Each later period is the declining charge `balance · rate · coefficient`, except the LAST
22
- * TWO periods of `ceil(life)`, which split the balance in two and then take the rest. There is
23
- * no other straight-line switch (a 10-year asset stays on the declining charge in period 7
24
- * although straight line is larger). Every returned charge is rounded, but the balance carries
25
- * the UNROUNDED charge.
26
- * - A balance already below salvage at the start of a period returns 0; one equal to salvage is
27
- * still depreciated (`AMORDEGRC(2400,…,2399,1,0.15,1)` is 900).
28
- * - A period under 1 is period 1 and above 1 truncates — except that Excel answers other
29
- * periods' values for some fractions below 1 (0.1 and 1E-300 answer period 5, 0.5 answers 0);
30
- * those rows are accepted differences.
31
- * - Every argument is Excel-declared `any`: a boolean is refused, an empty argument is missing, a
32
- * multi-cell reference does not broadcast. Basis truncates and 2 is refused; 4 is accepted.
33
11
  */
34
12
  export declare function AMORDEGRC(cost: NoLift<Omittable<Scalar>>, datePurchased: NoLift<Omittable<Scalar>>, firstPeriod: NoLift<Omittable<Scalar>>, salvage: NoLift<Omittable<Scalar>>, period: NoLift<Omittable<Scalar>>, rate: NoLift<Omittable<Scalar>>, basis?: NoLift<Omittable<Scalar>>): number;
35
13
  //# sourceMappingURL=AMORDEGRC.d.ts.map
@@ -9,17 +9,6 @@ export declare function NPV(rate: number, value: IRange<number>[]): number;
9
9
  * Returns the internal rate of return for a series of cash flows.
10
10
  * @param values is an array or a reference to cells that contain numbers for which you want to calculate the internal rate of return.
11
11
  * @param guess is a number that you guess is close to the result of IRR.
12
- *
13
- * @remarks
14
- * Measured against Excel 16.0 (fn-battery financial/IRR plus `adhoc-irr-iterates` and
15
- * `adhoc-irr-guess`, 2026-08-29). The member rule is NPV's — a text, boolean, blank or
16
- * empty-string member is SKIPPED and the periods close up behind it, so `{-100,TRUE,110}` is the
17
- * two-flow 10% — while an error member is `#VALUE!` whatever its own identity was. An error handed
18
- * as the whole argument is not a member and keeps its identity (`IRR(NA())` is `#N/A`). `guess` is
19
- * declared `number` (a boolean coerces, a text is `#VALUE!`), an ABSENT argument is 0.1 where an
20
- * EMPTY slot and a blank cell are 0, and the domain is the one RATE has at both ends:
21
- * `guess <= -1` is `#VALUE!`, and so is a guess so large that `1 + guess` is `guess` again
22
- * (the turn is at 2^53 — `IRR(…,9.007E15)` answers and `IRR(…,9.008E15)` does not).
23
12
  */
24
13
  export declare function IRR(values: Omittable<Flatten<AcceptError<Scalar>>>, guess?: number): number;
25
14
  /**
@@ -27,19 +16,6 @@ export declare function IRR(values: Omittable<Flatten<AcceptError<Scalar>>>, gue
27
16
  * @param values An array of cash flows; must contain at least one positive and one negative value.
28
17
  * @param financeRate The interest rate paid on negative cash flows (cost of capital).
29
18
  * @param reinvestRate The interest rate received on positive cash flows (reinvestment rate).
30
- *
31
- * @remarks
32
- * Measured against Excel 16.0 (fn-battery financial/MIRR, 2026-08-29). The member rule is IRR's —
33
- * a text, boolean, blank or empty-string member is SKIPPED and the periods close up, so it also
34
- * shortens the `n` the exponent counts — but an error member keeps its own identity here where
35
- * IRR flattens every one to `#VALUE!`. The two rates are declared `number` (a boolean coerces, an
36
- * empty slot and a blank cell are 0) and are read before the members, so a text rate beats an
37
- * `#N/A` in the schedule.
38
- *
39
- * The form is the documented one, and each side DIVIDES by its own compounding — which is where
40
- * `#DIV/0!` comes from at a rate of −1 (a flow at period 0 divides by `(1+r)^0` and survives one:
41
- * `MIRR({-100,110},-1,0)` is 10% while `MIRR({-100,110},0,-1)` is not). Fewer than two flows, or
42
- * no outflow at all, divides by zero as well.
43
19
  */
44
20
  export declare function MIRR(values: Omittable<Flatten<AcceptError<Scalar>>>, financeRate: number, reinvestRate: number): number;
45
21
  /**
@@ -47,14 +23,6 @@ export declare function MIRR(values: Omittable<Flatten<AcceptError<Scalar>>>, fi
47
23
  * @param rate is the discount rate to apply to the cash flows.
48
24
  * @param values is a series of cash flows that correspond to a schedule of payments in dates.
49
25
  * @param dates is a schedule of payment dates that corresponds to the cash flow payments.
50
- *
51
- * @remarks
52
- * Measured against Excel 16.0 (fn-battery financial/XNPV, 2026-08-29). Each flow is discounted
53
- * over ACTUAL days from the FIRST date on a 365-day year — `(trunc(dᵢ) − trunc(d₀))/365`, each
54
- * serial truncated on its own, so a fractional date changes nothing. The dates need not be
55
- * sorted; they need only fall at or after `d₀`, and a date before it is #NUM!. The rate is
56
- * strictly positive (0 and below are #NUM!, 1E-300 is an answer), and a discount factor or a
57
- * sum that overflows is #NUM!. The operands read as {@link readDatedFlows} describes.
58
26
  */
59
27
  export declare function XNPV(rate: NoLift<Omittable<Scalar>>, values: Omittable<IRange>, dates: Omittable<IRange>): number;
60
28
  /**
@@ -62,23 +30,6 @@ export declare function XNPV(rate: NoLift<Omittable<Scalar>>, values: Omittable<
62
30
  * @param values is a series of cash flows that correspond to a schedule of payments in dates.
63
31
  * @param dates is a schedule of payment dates that corresponds to the cash flow payments.
64
32
  * @param guess is a number that you guess is close to the result of XIRR.
65
- *
66
- * @remarks
67
- * Measured against Excel 16.0 (fn-battery financial/XIRR, 2026-08-29). XIRR is XNPV's equation
68
- * solved for the rate — the same `(trunc(dᵢ) − trunc(d₀))/365` day count — but neither its
69
- * operands nor its answer are XNPV's. The members are COERCED rather than refused (numeric text
70
- * and date text parse; a boolean or a true text is `#VALUE!`), a pair whose VALUE is blank is
71
- * DROPPED, serial 0 is legal, and the dates need not be ordered at all: a flow before `d₀` is
72
- * discounted by a negative exponent. Fewer than two surviving pairs is `#N/A`; two of the same
73
- * sign is `#NUM!`. `guess` is ATP `any` — a boolean is `#VALUE!`, an EMPTY slot is the 0.1
74
- * default where a blank cell is 0, and a reference does not lift.
75
- *
76
- * Excel's own answer is only accurate to about eight digits and moves with the guess in the
77
- * ninth, so the fixture's numeric rows carry a `precision` (CALC-ISSUES 26): its
78
- * iteration is unidentified, as YIELD's and ODDFYIELD's are. What IS reproduced is the search's
79
- * one directional rule — from a NEGATIVE guess Excel never reaches a positive root
80
- * (`XIRR({-100,110},…,-0.5)` is `#NUM!` while the same call at guess 0 answers 10%), though a
81
- * non-negative guess reaches a negative root freely.
82
33
  */
83
34
  export declare function XIRR(values: Omittable<IRange>, dates: Omittable<IRange>, guess?: NoLift<Omittable<Scalar>>): number;
84
35
  //# sourceMappingURL=Cashflow.d.ts.map