@sheetxl/formulas-extended 0.8.0-beta.1 → 0.8.0-beta.10

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 (136) hide show
  1. package/browser/esm/{BuGemmv84T8m0wqw.mjs → B8U2Eza2ZD4YA-kx.mjs} +1 -1
  2. package/browser/esm/{DpoZ7h1ScIJvbOY9.mjs → BFtgupqxZCxn0dyD.mjs} +5 -5
  3. package/{node/esm/vu0NRDeeTbEHPMYS.mjs → browser/esm/Bg1eKDrYnq3wm8Vk.mjs} +2 -2
  4. package/browser/esm/Bg54DWqi-iRcswhc.mjs +119 -0
  5. package/browser/esm/BiXqZc5QZjxe9VkT.mjs +32 -0
  6. package/browser/esm/BskZz_6FiOeOABjK.mjs +20 -0
  7. package/browser/esm/C2QrdSuGHG9jhlMh.mjs +23 -0
  8. package/{node/esm/BRwwvGaJ6HvkxjFC.mjs → browser/esm/C9G09aQXW2LLuPt3.mjs} +1 -1
  9. package/browser/esm/CFee1d5IBiv4fv1i.mjs +37 -0
  10. package/browser/esm/{BFnDPCjxJcoIItFa.mjs → CHIJMJGn8-ecsv3s.mjs} +3 -3
  11. package/browser/esm/CJjzoao3hDloxUGc.mjs +19 -0
  12. package/browser/esm/CcDbY4A8EXqKtmVV.mjs +47 -0
  13. package/{node/esm/DodhOXkSzelSxHmB.mjs → browser/esm/Cl3Yo2J4W4DMr8oz.mjs} +27 -29
  14. package/browser/esm/D02eJGMi5PwKHsoL.mjs +58 -0
  15. package/{node/esm/Bma3CN4_Nec6_4n7.mjs → browser/esm/DEQlCPiGb8bsBizr.mjs} +6 -6
  16. package/browser/esm/{B1VmvhXuEn7zaTB9.mjs → DSBsgMaUW3RQ6ceC.mjs} +1 -1
  17. package/{node/esm/COqdI1LYTHd9oLA6.mjs → browser/esm/Db0ejvxhdCFJuDKI.mjs} +1 -1
  18. package/{node/esm/srpVt74r2zbvm1N0.mjs → browser/esm/Dcl4zSjM1tlh53wy.mjs} +5 -5
  19. package/browser/esm/Djzfm7ZsIsQvtPGt.mjs +32 -0
  20. package/{node/esm/CnVJ8GAsshRjRGA-.mjs → browser/esm/WS_eaJSI0r2L5MVv.mjs} +2 -2
  21. package/browser/esm/g9IHvvfn4bYTwHgl.mjs +33 -0
  22. package/browser/esm/index.mjs +3818 -1682
  23. package/browser/esm/{DY3kG36QGyDbrANO.mjs → yS93vAhNdRw2bt-z.mjs} +1 -1
  24. package/node/esm/{BuGemmv84T8m0wqw.mjs → B8U2Eza2ZD4YA-kx.mjs} +1 -1
  25. package/node/esm/{DpoZ7h1ScIJvbOY9.mjs → BFtgupqxZCxn0dyD.mjs} +5 -5
  26. package/node/esm/BHHFJIl22DBeM9aP.mjs +19 -0
  27. package/{browser/esm/vu0NRDeeTbEHPMYS.mjs → node/esm/Bg1eKDrYnq3wm8Vk.mjs} +2 -2
  28. package/node/esm/Bg54DWqi-iRcswhc.mjs +119 -0
  29. package/node/esm/BiXqZc5QZjxe9VkT.mjs +32 -0
  30. package/node/esm/BskZz_6FiOeOABjK.mjs +20 -0
  31. package/node/esm/C2QrdSuGHG9jhlMh.mjs +23 -0
  32. package/{browser/esm/BRwwvGaJ6HvkxjFC.mjs → node/esm/C9G09aQXW2LLuPt3.mjs} +1 -1
  33. package/node/esm/CFee1d5IBiv4fv1i.mjs +37 -0
  34. package/node/esm/{BQyZVLTMNFLbjVap.mjs → C_IrfNxfWXKc8kjo.mjs} +3 -3
  35. package/node/esm/{LAkTk93odAfpvx50.mjs → Cc4Bkwtihl8DmEub.mjs} +1 -1
  36. package/node/esm/CcDbY4A8EXqKtmVV.mjs +47 -0
  37. package/{browser/esm/DodhOXkSzelSxHmB.mjs → node/esm/Cl3Yo2J4W4DMr8oz.mjs} +27 -29
  38. package/node/esm/D02eJGMi5PwKHsoL.mjs +58 -0
  39. package/{browser/esm/Bma3CN4_Nec6_4n7.mjs → node/esm/DEQlCPiGb8bsBizr.mjs} +6 -6
  40. package/node/esm/{B1VmvhXuEn7zaTB9.mjs → DSBsgMaUW3RQ6ceC.mjs} +1 -1
  41. package/{browser/esm/COqdI1LYTHd9oLA6.mjs → node/esm/Db0ejvxhdCFJuDKI.mjs} +1 -1
  42. package/{browser/esm/srpVt74r2zbvm1N0.mjs → node/esm/Dcl4zSjM1tlh53wy.mjs} +5 -5
  43. package/node/esm/Djzfm7ZsIsQvtPGt.mjs +32 -0
  44. package/{browser/esm/CnVJ8GAsshRjRGA-.mjs → node/esm/WS_eaJSI0r2L5MVv.mjs} +2 -2
  45. package/node/esm/g9IHvvfn4bYTwHgl.mjs +33 -0
  46. package/node/esm/index.mjs +4147 -1993
  47. package/package.json +5 -6
  48. package/types/src/.generated/decl/financial/Annuity.decl.d.ts +5 -0
  49. package/types/src/.generated/decl/financial/{Financial.decl.d.ts → Cashflow.decl.d.ts} +1 -1
  50. package/types/src/.generated/decl/financial/Convert.decl.d.ts +4 -0
  51. package/types/src/.generated/decl/financial/Coupon.decl.d.ts +4 -0
  52. package/types/src/.generated/decl/financial/{Financial2.decl.d.ts → Depreciation.decl.d.ts} +1 -1
  53. package/types/src/.generated/decl/financial/Growth.decl.d.ts +4 -0
  54. package/types/src/.generated/decl/financial/{ODD.decl.d.ts → Odd.decl.d.ts} +1 -1
  55. package/types/src/.generated/decl/financial/{Financial3.decl.d.ts → STOCKHISTORY.decl.d.ts} +1 -1
  56. package/types/src/.generated/decl/financial/Security.decl.d.ts +4 -0
  57. package/types/src/.generated/decl/financial/{Financial4.decl.d.ts → SecurityMaturity.decl.d.ts} +1 -1
  58. package/types/src/.generated/decl/{statistical/TTEST.decl.d.ts → financial/TBill.decl.d.ts} +1 -1
  59. package/types/src/.generated/decl/lookupReference/GroupBy.decl.d.ts +4 -0
  60. package/types/src/.generated/decl/lookupReference/PivotBy.decl.d.ts +4 -0
  61. package/types/src/.generated/decl/statistical/{ETS.decl.d.ts → Ets.decl.d.ts} +1 -1
  62. package/types/src/.generated/decl/statistical/TTest.decl.d.ts +4 -0
  63. package/types/src/.generated/desc/financial/Annuity.desc.d.ts +5 -0
  64. package/types/src/.generated/desc/financial/{Financial.desc.d.ts → Cashflow.desc.d.ts} +1 -1
  65. package/types/src/.generated/desc/financial/Convert.desc.d.ts +4 -0
  66. package/types/src/.generated/desc/financial/Coupon.desc.d.ts +4 -0
  67. package/types/src/.generated/desc/financial/{Financial2.desc.d.ts → Depreciation.desc.d.ts} +1 -1
  68. package/types/src/.generated/desc/financial/Growth.desc.d.ts +4 -0
  69. package/types/src/.generated/desc/financial/{ODD.desc.d.ts → Odd.desc.d.ts} +1 -1
  70. package/types/src/.generated/desc/financial/{Financial3.desc.d.ts → STOCKHISTORY.desc.d.ts} +1 -1
  71. package/types/src/.generated/desc/financial/Security.desc.d.ts +4 -0
  72. package/types/src/.generated/desc/financial/{Financial4.desc.d.ts → SecurityMaturity.desc.d.ts} +1 -1
  73. package/types/src/.generated/desc/{statistical/TTEST.desc.d.ts → financial/TBill.desc.d.ts} +1 -1
  74. package/types/src/.generated/desc/lookupReference/GroupBy.desc.d.ts +4 -0
  75. package/types/src/.generated/desc/lookupReference/PivotBy.desc.d.ts +4 -0
  76. package/types/src/.generated/desc/statistical/{ETS.desc.d.ts → Ets.desc.d.ts} +1 -1
  77. package/types/src/.generated/desc/statistical/TTest.desc.d.ts +4 -0
  78. package/types/src/_utils/AnyArgs.d.ts +17 -3
  79. package/types/src/_utils/FinanaceSolver.d.ts +39 -2
  80. package/types/src/_utils/FinanceAmor.d.ts +23 -0
  81. package/types/src/_utils/FinanceCashflow.d.ts +42 -0
  82. package/types/src/_utils/FinanceCoupon.d.ts +92 -82
  83. package/types/src/_utils/FinanceDate.d.ts +24 -0
  84. package/types/src/_utils/FinanceDayCount.d.ts +46 -0
  85. package/types/src/_utils/FinanceOdd.d.ts +93 -0
  86. package/types/src/_utils/FinanceSecurity.d.ts +84 -0
  87. package/types/src/_utils/FinanceUtils.d.ts +37 -1
  88. package/types/src/_utils/LeastSquares.d.ts +20 -22
  89. package/types/src/_utils/Pivot.d.ts +205 -0
  90. package/types/src/_utils/RegexCompile.d.ts +33 -0
  91. package/types/src/cube/Cube.d.ts +7 -7
  92. package/types/src/financial/ACCRINT.d.ts +33 -6
  93. package/types/src/financial/AMORDEGRC.d.ts +22 -40
  94. package/types/src/financial/Annuity.d.ts +118 -0
  95. package/types/src/financial/Cashflow.d.ts +84 -0
  96. package/types/src/financial/Convert.d.ts +26 -0
  97. package/types/src/financial/Coupon.d.ts +72 -0
  98. package/types/src/financial/Date.d.ts +34 -5
  99. package/types/src/financial/Depreciation.d.ts +58 -0
  100. package/types/src/financial/Growth.d.ts +22 -0
  101. package/types/src/financial/Odd.d.ts +82 -0
  102. package/types/src/financial/STOCKHISTORY.d.ts +17 -0
  103. package/types/src/financial/Security.d.ts +68 -0
  104. package/types/src/financial/SecurityMaturity.d.ts +107 -0
  105. package/types/src/financial/TBill.d.ts +40 -0
  106. package/types/src/financial/VDB.d.ts +15 -13
  107. package/types/src/lookupReference/GroupBy.d.ts +14 -0
  108. package/types/src/lookupReference/PivotBy.d.ts +17 -0
  109. package/types/src/statistical/{ETS.d.ts → Ets.d.ts} +14 -14
  110. package/types/src/statistical/Regression.d.ts +13 -18
  111. package/types/src/statistical/{TTEST.d.ts → TTest.d.ts} +5 -5
  112. package/types/src/text/RegEx.d.ts +34 -11
  113. package/browser/cjs/B4JJfKSI4ppwU855.cjs +0 -1
  114. package/browser/cjs/BWDfauDHqB6U_2ka.cjs +0 -1
  115. package/browser/cjs/BwLx9ix5Sq7suAYP.cjs +0 -1
  116. package/browser/cjs/C2uDl8VIJqh58YF_.cjs +0 -1
  117. package/browser/cjs/CW-b31_-r-_raT8Y.cjs +0 -1
  118. package/browser/cjs/Clu7XiAsCB48GDXN.cjs +0 -1
  119. package/browser/cjs/CnZfa45XxA-9Jhmp.cjs +0 -1
  120. package/browser/cjs/DsFZgtSQpC75d1M0.cjs +0 -1
  121. package/browser/cjs/JfM6P_qoQQTWakZf.cjs +0 -1
  122. package/browser/cjs/bM25C5avKgBAJVfk.cjs +0 -1
  123. package/browser/cjs/fqTQ_p3ehzUvc1tF.cjs +0 -1
  124. package/browser/cjs/h3dw1jAp2J5Pu4p3.cjs +0 -1
  125. package/browser/cjs/index.cjs +0 -1
  126. package/browser/cjs/jev6VGWTdgEgm4Yk.cjs +0 -1
  127. package/browser/cjs/lEQC21-Sk4lwHy2r.cjs +0 -1
  128. package/browser/esm/CwoMEzOtRihuYUTr.mjs +0 -20
  129. package/browser/esm/Dy6UD7hQRBsT0WNp.mjs +0 -304
  130. package/node/esm/CwoMEzOtRihuYUTr.mjs +0 -20
  131. package/node/esm/Dy6UD7hQRBsT0WNp.mjs +0 -304
  132. package/types/src/financial/Financial.d.ts +0 -288
  133. package/types/src/financial/Financial2.d.ts +0 -99
  134. package/types/src/financial/Financial3.d.ts +0 -95
  135. package/types/src/financial/Financial4.d.ts +0 -82
  136. package/types/src/financial/ODD.d.ts +0 -106
@@ -0,0 +1,22 @@
1
+ import { Scalar, Omittable, IRange, NoLift } from '@sheetxl/primitives';
2
+ /**
3
+ * Returns the future value of an initial principal after applying a series of compound interest rates.
4
+ * @param principal is the present value.
5
+ * @param schedule is an array of interest rates to apply.
6
+ */
7
+ export declare function FVSCHEDULE(principal: NoLift<Omittable<Scalar>>, schedule: Omittable<IRange>): number;
8
+ /**
9
+ * Returns an equivalent interest rate for the growth of an investment.
10
+ * @param nper is the total number of payment periods.
11
+ * @param pv is the present value of the investment.
12
+ * @param fv is the future value of the investment.
13
+ */
14
+ export declare function RRI(nper: number, pv: number, fv: number): number;
15
+ /**
16
+ * Returns the number of periods required by an investment to reach a specified value.
17
+ * @param rate is the interest rate.
18
+ * @param pv is the present value of the investment.
19
+ * @param fv is the desired future value of the investment.
20
+ */
21
+ export declare function PDURATION(rate: number, pv: number, fv: number): number;
22
+ //# sourceMappingURL=Growth.d.ts.map
@@ -0,0 +1,82 @@
1
+ import { AcceptError, Omittable, Scalar, NoLift } from '@sheetxl/primitives';
2
+ /**
3
+ * Returns the price per $100 face value of a security with an odd first period.
4
+ * @param settlement is the security's settlement date, expressed as a serial date number.
5
+ * @param maturity is the security's maturity date, expressed as a serial date number.
6
+ * @param issue is the security's issue date, expressed as a serial date number.
7
+ * @param firstCoupon is the security's first coupon date, expressed as a serial date number.
8
+ * @param rate is the security's interest rate.
9
+ * @param yld is the security's annual yield.
10
+ * @param redemption is the security's redemption value per $100 face value.
11
+ * @param frequency is the number of coupon payments per year.
12
+ * @param basis is the type of day count basis to use.
13
+ *
14
+ * @remarks
15
+ * The odd FIRST period `[issue, firstCoupon]` is short (a stub of one regular period) or long
16
+ * (several quasi-coupon periods); which, and the day-count sums of either, are
17
+ * {@link oddFirstSums} — measured against Excel 16.0 on 1,125 (shape, frequency, basis) triples
18
+ * and every row of its battery (fn-battery financial/ODDFPRICE, 2026-08-29), Excel's own
19
+ * month-end exponent quirk included. Reading and validation are {@link readOddArgs}'s, then
20
+ * `issue < settlement < firstCoupon < maturity` once truncated, the first coupon on the
21
+ * maturity's coupon grid, `rate ≥ 0`, `yld ≥ 0`, `redemption > 0`; an odd period exactly one
22
+ * regular period long is #NUM!.
23
+ */
24
+ export declare function ODDFPRICE(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, issue: NoLift<Omittable<AcceptError<Scalar>>>, firstCoupon: NoLift<Omittable<AcceptError<Scalar>>>, rate: NoLift<Omittable<AcceptError<Scalar>>>, yld: NoLift<Omittable<AcceptError<Scalar>>>, redemption: NoLift<Omittable<AcceptError<Scalar>>>, frequency: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
25
+ /**
26
+ * Returns the yield of a security with an odd first period.
27
+ * @param settlement is the security's settlement date, expressed as a serial date number.
28
+ * @param maturity is the security's maturity date, expressed as a serial date number.
29
+ * @param issue is the security's issue date, expressed as a serial date number.
30
+ * @param firstCoupon is the security's first coupon date, expressed as a serial date number.
31
+ * @param rate is the security's interest rate.
32
+ * @param pr is the security's price.
33
+ * @param redemption is the security's redemption value per $100 face value.
34
+ * @param frequency is the number of coupon payments per year.
35
+ * @param basis is the type of day count basis to use.
36
+ *
37
+ * @remarks
38
+ * The root of ODDFPRICE in the yield — a power form, so an iterate (Newton with a numerical
39
+ * derivative, bisection when that fails), not a closed form. Reads and validates as ODDFPRICE
40
+ * does, with `pr > 0` in place of the yield's sign.
41
+ */
42
+ export declare function ODDFYIELD(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, issue: NoLift<Omittable<AcceptError<Scalar>>>, firstCoupon: NoLift<Omittable<AcceptError<Scalar>>>, rate: NoLift<Omittable<AcceptError<Scalar>>>, pr: NoLift<Omittable<AcceptError<Scalar>>>, redemption: NoLift<Omittable<AcceptError<Scalar>>>, frequency: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
43
+ /**
44
+ * Returns the price per $100 face value of a security with an odd last period.
45
+ * @param settlement is the security's settlement date, expressed as a serial date number.
46
+ * @param maturity is the security's maturity date, expressed as a serial date number.
47
+ * @param lastInterest is the security's last coupon date, expressed as a serial date number.
48
+ * @param rate is the interest rate.
49
+ * @param yld is the security's annual yield.
50
+ * @param redemption is the amount to be received at maturity.
51
+ * @param frequency is the number of coupon payments per year.
52
+ * @param basis is the type of day count basis to use.
53
+ *
54
+ * @remarks
55
+ * `(redemption + C·ΣDCᵢ/NLᵢ) / (1 + yld/frequency · ΣDSCᵢ/NLᵢ) − C·ΣAᵢ/NLᵢ` with
56
+ * `C = 100·rate/frequency` — linear in the yield, since the whole bond is the one irregular
57
+ * period. The three sums are {@link oddLastSums}; a product that overflows is 0. Measured
58
+ * bit-for-bit on Excel 16.0 (fn-battery financial/ODDLPRICE, 556 numeric rows, 2026-08-28).
59
+ * Reading and validation are {@link readOddArgs}'s: `lastInterest < settlement < maturity` once
60
+ * truncated, `rate ≥ 0`, `yld ≥ 0`, `redemption > 0`.
61
+ */
62
+ export declare function ODDLPRICE(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, lastInterest: NoLift<Omittable<AcceptError<Scalar>>>, rate: NoLift<Omittable<AcceptError<Scalar>>>, yld: NoLift<Omittable<AcceptError<Scalar>>>, redemption: NoLift<Omittable<AcceptError<Scalar>>>, frequency: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
63
+ /**
64
+ * Returns the yield of a security with an odd last period.
65
+ * @param settlement is the security's settlement date, expressed as a serial date number.
66
+ * @param maturity is the security's maturity date, expressed as a serial date number.
67
+ * @param lastInterest is the security's last coupon date, expressed as a serial date number.
68
+ * @param rate is the interest rate.
69
+ * @param pr is the security's price.
70
+ * @param redemption is the amount to be received at maturity.
71
+ * @param frequency is the number of coupon payments per year.
72
+ * @param basis is the type of day count basis to use.
73
+ *
74
+ * @remarks
75
+ * ODDLPRICE inverted — a closed form, not an iterate, because the price is linear in the yield.
76
+ * The grouping is measured rather than derived: `(N − D)/D · (frequency/ΣDSC)` over
77
+ * `N = redemption + C·ΣDC`, `D = pr + C·ΣA` is bit-exact on all 560 numeric rows of the battery
78
+ * where `frequency·(N/D − 1)/ΣDSC` holds only 14.3 digits. Reads and validates as ODDLPRICE
79
+ * does, with `pr > 0` in place of the yield's sign.
80
+ */
81
+ export declare function ODDLYIELD(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, lastInterest: NoLift<Omittable<AcceptError<Scalar>>>, rate: NoLift<Omittable<AcceptError<Scalar>>>, pr: NoLift<Omittable<AcceptError<Scalar>>>, redemption: NoLift<Omittable<AcceptError<Scalar>>>, frequency: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
82
+ //# sourceMappingURL=Odd.d.ts.map
@@ -0,0 +1,17 @@
1
+ import { IRange, Flatten } from '@sheetxl/primitives';
2
+ /**
3
+ * Returns an array of historical quote data for a symbol and date range you specify..
4
+ * @hidden Unimplemented RichData
5
+ * @param stock Symbol of financial instrument to be considered or a Stock data type.
6
+ * @param startDate First date to return data from.
7
+ * @param endDate Last date to return data from.
8
+ * @param interval A number indicating the granularity of the data; 0 - Daily, 1 - Weekly, 2 - Monthly.
9
+ * @param headers A logical value to add column header data; 0 - No column header, 1 - Show column header, 2 - Show instrument identifier and column header.
10
+ * @param properties A number indicating which column of data to return; 0 through 5.
11
+ */
12
+ export declare function STOCKHISTORY(stock: string, startDate: number, // date
13
+ endDate?: number, // date
14
+ interval?: number, // 0=day, 1=week, 2=month
15
+ headers?: number, // 0=none, 1=field names, 2=field names and row numbers
16
+ properties?: Flatten<number>): Promise<IRange>;
17
+ //# sourceMappingURL=STOCKHISTORY.d.ts.map
@@ -0,0 +1,68 @@
1
+ import { AcceptError, Omittable, Scalar, NoLift } from '@sheetxl/primitives';
2
+ /**
3
+ * Returns the price per $100 face value of a security that pays periodic interest.
4
+ * @param settlement is the security's settlement date, expressed as a serial date number.
5
+ * @param maturity is the security's maturity date, expressed as a serial date number.
6
+ * @param rate is the interest rate.
7
+ * @param yld is the security's annual yield.
8
+ * @param redemption is the amount to be received at maturity.
9
+ * @param frequency is the number of coupon payments per year.
10
+ * @param basis is the type of day count basis to use.
11
+ *
12
+ * @remarks
13
+ * The doc's closed form over `calculatePrice`'s coupon-period numbers; a negative rate or
14
+ * yield, a redemption at or below zero, and a previous coupon date below the calendar are
15
+ * #NUM!.
16
+ */
17
+ export declare function PRICE(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, rate: NoLift<Omittable<AcceptError<Scalar>>>, yld: NoLift<Omittable<AcceptError<Scalar>>>, redemption: NoLift<Omittable<AcceptError<Scalar>>>, frequency: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
18
+ /**
19
+ * Returns the annual duration of a security with periodic interest payments.
20
+ * @param settlement is the security's settlement date, expressed as a serial date number.
21
+ * @param maturity is the security's maturity date, expressed as a serial date number.
22
+ * @param coupon is the security's annual coupon rate.
23
+ * @param yld is the security's annual yield.
24
+ * @param frequency is the number of coupon payments per year.
25
+ * @param basis is the type of day count basis to use.
26
+ *
27
+ * @remarks
28
+ * The Macaulay duration — the present-value-weighted mean time to each cash flow, in coupon
29
+ * periods offset by the fraction of the current period already elapsed, over the frequency. A
30
+ * negative coupon or yield is #NUM!; a settlement in the first days of 1900 computes. Unlike
31
+ * PRICE, the slots read from the first and the basis last (`readBondArgs`).
32
+ */
33
+ export declare function DURATION(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, coupon: NoLift<Omittable<AcceptError<Scalar>>>, yld: NoLift<Omittable<AcceptError<Scalar>>>, frequency: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
34
+ /**
35
+ * Returns the Macauley modified duration for a security with an assumed par value of $100.
36
+ * @param settlement is the security's settlement date, expressed as a serial date number.
37
+ * @param maturity is the security's maturity date, expressed as a serial date number.
38
+ * @param coupon is the security's annual coupon rate.
39
+ * @param yld is the security's annual yield.
40
+ * @param frequency is the number of coupon payments per year.
41
+ * @param basis is the type of day count basis to use.
42
+ *
43
+ * @remarks
44
+ * DURATION divided by `1 + yld/frequency`; the same reading and validation as DURATION.
45
+ */
46
+ export declare function MDURATION(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, coupon: NoLift<Omittable<AcceptError<Scalar>>>, yld: NoLift<Omittable<AcceptError<Scalar>>>, frequency: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
47
+ /**
48
+ * Returns the yield on a security that pays periodic interest.
49
+ * @param settlement is the security's settlement date, expressed as a serial date number.
50
+ * @param maturity is the security's maturity date, expressed as a serial date number.
51
+ * @param rate is the security's annual coupon rate.
52
+ * @param pr is the security's price per $100 face value.
53
+ * @param redemption is the security's redemption value per $100 face value.
54
+ * @param frequency is the number of coupon payments per year.
55
+ * @param basis is the type of day count basis to use.
56
+ *
57
+ * @remarks
58
+ * PRICE inverted: the yield `y` with `PRICE(…, y, …) = pr`. With one coupon left the doc's closed
59
+ * form is used, over a coupon period that is the real span from the previous coupon to the
60
+ * maturity (so at bases 2 and 3 the single-coupon yield does not invert PRICE's 360/f or 365/f
61
+ * period). With more than one it is `solveYieldByNewton` on `calculatePrice` from
62
+ * `approximateYield` — an iteration that STOPS SHORT of the root, so the answer sits ~1e-10 away
63
+ * from it, and on a bond it cannot converge on (a redemption that dwarfs the price) it is simply
64
+ * where the walk stood after a hundred steps. Measured, fn-battery financial/YIELD and
65
+ * /adhoc-yield-* (2026-08-28, iteration 2026-09-09).
66
+ */
67
+ export declare function YIELD(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, rate: NoLift<Omittable<AcceptError<Scalar>>>, pr: NoLift<Omittable<AcceptError<Scalar>>>, redemption: NoLift<Omittable<AcceptError<Scalar>>>, frequency: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
68
+ //# sourceMappingURL=Security.d.ts.map
@@ -0,0 +1,107 @@
1
+ import { AcceptError, Scalar, Omittable, NoLift } from '@sheetxl/primitives';
2
+ /**
3
+ * Returns the discount rate for a security.
4
+ * @param settlement is the security's settlement date, expressed as a serial date number.
5
+ * @param maturity is the security's maturity date, expressed as a serial date number.
6
+ * @param pr is the security's price per $100 face value.
7
+ * @param redemption is the security's redemption value per $100 face value.
8
+ * @param basis is the type of day count basis to use.
9
+ *
10
+ * @remarks
11
+ * `(1 − pr/redemption)` over YEARFRAC's year fraction of the two dates — the signed NASD count
12
+ * at basis 0, the 365/366 rules at basis 1 — measured against Excel 16.0 (fn-battery
13
+ * financial/DISC, 2026-08-28); a price above the redemption is a negative rate, and a
14
+ * zero-day 30/360 span (Mar 30 → Mar 31) is #NUM!. The arguments read as
15
+ * {@link readDiscountArgs} describes.
16
+ */
17
+ export declare function DISC(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, pr: NoLift<Omittable<AcceptError<Scalar>>>, redemption: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
18
+ /**
19
+ * Returns the price per $100 face value of a discounted security.
20
+ * @param settlement is the security's settlement date, expressed as a serial date number.
21
+ * @param maturity is the security's maturity date, expressed as a serial date number.
22
+ * @param discount is the security's discount rate.
23
+ * @param redemption is the amount to be received at maturity.
24
+ * @param basis is the type of day count basis to use.
25
+ *
26
+ * @remarks
27
+ * `redemption − discount · redemption · yearfrac` with YEARFRAC's year fraction, measured
28
+ * against Excel 16.0 (fn-battery financial/PRICEDISC, 2026-08-28): a discount that exhausts
29
+ * the redemption gives a negative price, and the product overflowing is #NUM!. The arguments
30
+ * read as {@link readDiscountArgs} describes.
31
+ */
32
+ export declare function PRICEDISC(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, discount: NoLift<Omittable<AcceptError<Scalar>>>, redemption: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
33
+ /**
34
+ * Returns the annual yield for a discounted security. For example, a treasury bill.
35
+ * @param settlement is the security's settlement date, expressed as a serial date number.
36
+ * @param maturity is the security's maturity date, expressed as a serial date number.
37
+ * @param pr is the security's price per $100 face value.
38
+ * @param redemption is the security's redemption value per $100 face value.
39
+ * @param basis is the type of day count basis to use.
40
+ *
41
+ * @remarks
42
+ * `(redemption − pr)/pr` over YEARFRAC's year fraction, measured against Excel 16.0 (fn-battery
43
+ * financial/YIELDDISC, 2026-08-28); a price above the redemption is a negative yield. The
44
+ * arguments read as {@link readDiscountArgs} describes.
45
+ */
46
+ export declare function YIELDDISC(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, pr: NoLift<Omittable<AcceptError<Scalar>>>, redemption: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
47
+ /**
48
+ * Returns the interest rate for a fully invested security.
49
+ * @param settlement is the security's settlement date, expressed as a serial date number.
50
+ * @param maturity is the security's maturity date, expressed as a serial date number.
51
+ * @param investment is the amount invested in the security.
52
+ * @param redemption is the amount to be received at maturity.
53
+ * @param basis is the type of day count basis to use.
54
+ *
55
+ * @remarks
56
+ * `(redemption − investment)/investment` over YEARFRAC's year fraction, measured against Excel 16.0
57
+ * (fn-battery financial/INTRATE, 2026-08-28); a redemption below the investment is a negative
58
+ * rate. The arguments read as {@link readDiscountArgs} describes.
59
+ */
60
+ export declare function INTRATE(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, investment: NoLift<Omittable<AcceptError<Scalar>>>, redemption: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
61
+ /**
62
+ * Returns the amount received at maturity for a fully invested security.
63
+ * @param settlement is the security's settlement date, expressed as a serial date number.
64
+ * @param maturity is the security's maturity date, expressed as a serial date number.
65
+ * @param investment is the amount invested in the security.
66
+ * @param discount is the security's discount rate.
67
+ * @param basis is the type of day count basis to use.
68
+ *
69
+ * @remarks
70
+ * `investment / (1 − discount · yearfrac)` with YEARFRAC's year fraction, measured against
71
+ * Excel 16.0 (fn-battery financial/RECEIVED, 2026-08-28); a denominator at or below zero (a
72
+ * discount of 4 over a 90/360 quarter) is #NUM!. The arguments read as
73
+ * {@link readDiscountArgs} describes.
74
+ */
75
+ export declare function RECEIVED(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, investment: NoLift<Omittable<AcceptError<Scalar>>>, discount: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
76
+ /**
77
+ * Returns the price per $100 face value of a security that pays interest at maturity.
78
+ * @param settlement is the security's settlement date, expressed as a serial date number.
79
+ * @param maturity is the security's maturity date, expressed as a serial date number.
80
+ * @param issue is the security's issue date, expressed as a serial date number.
81
+ * @param rate is the interest rate.
82
+ * @param yld is the security's annual yield.
83
+ * @param basis is the type of day count basis to use.
84
+ *
85
+ * @remarks
86
+ * The doc's `(100 + DIM/B·rate·100) / (1 + DSM/B·yld) − A/B·rate·100`, measured against Excel
87
+ * 16.0 (fn-battery financial/PRICEMAT, 2026-08-28) with the counts {@link readMatArgs}
88
+ * describes (DSM is `DIM − A`); a coupon term that overflows is 0, so a rate of 1E307 prices
89
+ * the redemption alone.
90
+ */
91
+ export declare function PRICEMAT(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, issue: NoLift<Omittable<AcceptError<Scalar>>>, rate: NoLift<Omittable<AcceptError<Scalar>>>, yld: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
92
+ /**
93
+ * Returns the annual yield of a security that pays interest at maturity.
94
+ * @param settlement is the security's settlement date, expressed as a serial date number.
95
+ * @param maturity is the security's maturity date, expressed as a serial date number.
96
+ * @param issue is the security's issue date, expressed as a serial date number.
97
+ * @param rate is the interest rate.
98
+ * @param pr is the security's price per $100 face value.
99
+ * @param basis is the type of day count basis to use.
100
+ *
101
+ * @remarks
102
+ * PRICEMAT inverted in closed form, `((1 + DIM/B·rate) / (pr/100 + A/B·rate) − 1) / (DSM/B)`,
103
+ * measured against Excel 16.0 (fn-battery financial/YIELDMAT, 2026-08-28) with the counts
104
+ * {@link readMatArgs} describes.
105
+ */
106
+ export declare function YIELDMAT(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, issue: NoLift<Omittable<AcceptError<Scalar>>>, rate: NoLift<Omittable<AcceptError<Scalar>>>, pr: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
107
+ //# sourceMappingURL=SecurityMaturity.d.ts.map
@@ -0,0 +1,40 @@
1
+ import { AcceptError, Scalar, Omittable, NoLift } from '@sheetxl/primitives';
2
+ /**
3
+ * Returns the price per $100 face value for a treasury bill.
4
+ * @param settlement is the Treasury bill's settlement date, expressed as a serial date number.
5
+ * @param maturity is the Treasury bill's maturity date, expressed as a serial date number.
6
+ * @param discount is the Treasury bill's discount rate.
7
+ *
8
+ * @remarks
9
+ * `100·(1 − discount·days/360)`, measured against Excel 16.0 (fn-battery financial/TBILLPRICE,
10
+ * 2026-08-28): a negative price is #NUM!, and a `discount·days` that overflows is 0 (a price of
11
+ * 100). The arguments read as {@link readTbillArgs} describes.
12
+ */
13
+ export declare function TBILLPRICE(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, discount: NoLift<Omittable<AcceptError<Scalar>>>): number;
14
+ /**
15
+ * Returns the yield for a treasury bill.
16
+ * @param settlement is the Treasury bill's settlement date, expressed as a serial date number.
17
+ * @param maturity is the Treasury bill's maturity date, expressed as a serial date number.
18
+ * @param pr is the Treasury Bill's price per $100 face value.
19
+ *
20
+ * @remarks
21
+ * `(100 − pr)/pr · 360/days`, measured against Excel 16.0 (fn-battery financial/TBILLYIELD,
22
+ * 2026-08-28); a price above 100 is a negative yield. The arguments read as
23
+ * {@link readTbillArgs} describes.
24
+ */
25
+ export declare function TBILLYIELD(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, pr: NoLift<Omittable<AcceptError<Scalar>>>): number;
26
+ /**
27
+ * Returns the bond-equivalent yield for a treasury bill.
28
+ * @param settlement is the Treasury bill's settlement date, expressed as a serial date number.
29
+ * @param maturity is the Treasury bill's maturity date, expressed as a serial date number.
30
+ * @param discount is the Treasury bill's discount rate.
31
+ *
32
+ * @remarks
33
+ * Measured against Excel 16.0 (fn-battery financial/TBILLEQ, 2026-08-28). Through 182 days the
34
+ * doc's `365·discount / (360 − discount·days)`; from 183 days the Treasury's bond-equivalent
35
+ * quadratic on the discounted price, over a 365-day year — 366 for a 366-day span. A
36
+ * denominator at or below zero is #NUM!; a product that overflows is 0. The arguments read as
37
+ * {@link readTbillArgs} describes.
38
+ */
39
+ export declare function TBILLEQ(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, discount: NoLift<Omittable<AcceptError<Scalar>>>): number;
40
+ //# sourceMappingURL=TBill.d.ts.map
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @summary Returns the depreciation of an asset for any period you specify, including partial periods, using the double-declining balance method or some other method you specify.
2
+ * Returns the depreciation of an asset for any period you specify, including partial periods, using the double-declining balance method or some other method you specify.
3
3
  * @param cost is the initial cost of the asset.
4
4
  * @param salvage is the salvage value at the end of the life of the asset.
5
5
  * @param life is the number of periods over which the asset is being depreciated (sometimes called the useful life of the asset).
@@ -9,19 +9,21 @@
9
9
  * @param noSwitch switch to straight-line depreciation when depreciation is greater than the declining balance = FALSE; do not switch = TRUE.
10
10
  *
11
11
  * @remarks
12
- * including partial periods, using the double-declining balance method or
13
- * some other method you specify.
12
+ * Measured against Excel 16.0 (fn-battery financial/VDB and `adhoc-vdb-clamp`, 2026-08-28).
14
13
  *
15
- * VDB = Variable Declining Balance. It generalises DDB by:
16
- * • accepting fractional start/end periods
17
- * • supporting any factor (not just 2)
18
- * • optionally switching to straight-line when SL > DDB (noSwitch=FALSE)
14
+ * `no_switch = TRUE` is DDB period by period from the original cost, the first and last periods
15
+ * pro-rated by the fraction of them inside the window.
19
16
  *
20
- * The `noSwitch` flag controls the switch-to-SL behavior:
21
- * FALSE (default) — switch to straight-line when it yields more depreciation
22
- * TRUE — pure declining-balance, never switch
17
+ * With the switch, Excel runs two passes. The first walks from 0 to `start` to find the balance
18
+ * there — the FRACTIONAL part of `start` first (a partial period charged as `raw·fraction`,
19
+ * clamped at salvage and never negative), then whole periods with the straight-line switch, each
20
+ * period's straight line measured against the life remaining at that point (so a start of 2.5
21
+ * or 6.5 switches on the same `[1.5, 2.5]` period). The second pass depreciates that balance over
22
+ * `end − start` periods with a remaining life of `life − start`, each period's declining-balance
23
+ * charge clamped at salvage (then pro-rated if partial), switching to straight-line when that is
24
+ * larger. The second pass is NOT floored at zero: an asset already below salvage is written UP
25
+ * to it in its first period (VDB(300,2400,10,0,1) is −2100), which is also why a whole-period
26
+ * start on such an asset is 0 — the first pass has already moved the balance to salvage.
23
27
  */
24
- export declare function VDB(cost: number, salvage: number, life: number, startPeriod: number, // date
25
- endPeriod: number, // date
26
- factor?: number, noSwitch?: boolean): number;
28
+ export declare function VDB(cost: number, salvage: number, life: number, startPeriod: number, endPeriod: number, factor?: number, noSwitch?: boolean): number;
27
29
  //# sourceMappingURL=VDB.d.ts.map
@@ -0,0 +1,14 @@
1
+ import { AcceptError, IRange, Omittable } from '@sheetxl/primitives';
2
+ /**
3
+ * Aggregate values by row fields.
4
+ * @param rowFields The range or array containing the row fields.
5
+ * @param values The range or array containing the values to aggregate.
6
+ * @param fn The function used to do the aggregations: a LAMBDA, a function name such as SUM, or an array of them.
7
+ * @param fieldHeaders A number between 0 and 3 that specifies whether the field data has headers and whether field headers should be returned in the results.
8
+ * @param totalDepth Show totals for the row fields. 0 for none, 1 for grand totals, 2 for grand total and first level subtotals, etc. A negative number shows them at the top.
9
+ * @param sortOrder The column index to sort the row fields on. A negative index will sort in reverse order.
10
+ * @param filterArray An array of boolean where TRUE represents a row to retain.
11
+ * @param fieldRelationship The relationship of fields when multiple columns are supplied to the rowFields argument. 0 for hierarchy, 1 for table.
12
+ */
13
+ export declare function GROUPBY(rowFields: IRange, values: IRange, fn: AcceptError<any>, fieldHeaders?: Omittable<number>, totalDepth?: Omittable<number>, sortOrder?: Omittable<IRange>, filterArray?: Omittable<IRange>, fieldRelationship?: Omittable<number>): IRange;
14
+ //# sourceMappingURL=GroupBy.d.ts.map
@@ -0,0 +1,17 @@
1
+ import { IRange, AcceptError, Omittable } from '@sheetxl/primitives';
2
+ /**
3
+ * Aggregate values by rows and columns.
4
+ * @param rowFields The range or array containing the row fields.
5
+ * @param colFields The range or array containing the column fields.
6
+ * @param values The range or array containing the value fields.
7
+ * @param fn The function used to do the aggregations: a LAMBDA, a function name such as SUM, or an array of them.
8
+ * @param fieldHeaders A number between 0 and 3 that specifies whether the field data has headers and whether field headers should be return in the results.
9
+ * @param rowTotalDepth Show totals for the row fields. 0 for none, 1 for grand totals, 2 for grand totals and first level subtotals, etc. A negative number shows them at the top.
10
+ * @param rowSortOrder The column index to sort the row fields on. A negative index will sort in reverse order.
11
+ * @param colTotalDepth Show totals for the column fields. 0 for none, 1 for grand totals, 2 for grand totals and first level subtotals, etc. A negative number shows them at the left.
12
+ * @param colSortOrder The column index to sort the column fields on. A negative index will sort in reverse order.
13
+ * @param filterArray An array of boolean where TRUE represents a row to retain.
14
+ * @param relativeTo Defines what PERCENTOF is calculated relative to. 0 for column totals, 1 for row totals, 2 for the grand total, 3 for parent column totals, 4 for parent row totals.
15
+ */
16
+ export declare function PIVOTBY(rowFields: Omittable<IRange>, colFields: Omittable<IRange>, values: IRange, fn: AcceptError<any>, fieldHeaders?: Omittable<number>, rowTotalDepth?: Omittable<number>, rowSortOrder?: Omittable<IRange>, colTotalDepth?: Omittable<number>, colSortOrder?: Omittable<IRange>, filterArray?: Omittable<IRange>, relativeTo?: Omittable<number>): IRange;
17
+ //# sourceMappingURL=PivotBy.d.ts.map
@@ -1,45 +1,45 @@
1
- import { IRange, Scalar } from '@sheetxl/primitives';
1
+ import { IRange, Scalar, Omittable } from '@sheetxl/primitives';
2
2
  /**
3
+ * Returns the forecasted value for a specific future target date using exponential smoothing method.
3
4
  * @name FORECAST.ETS
4
- * @summary Returns the forecasted value for a specific future target date using exponential smoothing method.
5
5
  * @param targetDate is the data point for which you want to predict a value. It should carry on the pattern of values in the timeline.
6
6
  * @param values is the array or range of numeric data you're predicting.
7
7
  * @param timeline is the independent array or range of numeric data. The dates in the timeline must have a consistent step between them and can't be zero.
8
8
  * @param seasonality [1] 0 = no seasonality; 1 = auto-detect; any integer > 1 = explicit seasonal period.
9
9
  * @param dataCompletion [1] 1 = interpolate missing values; 0 = fill with zeros.
10
- * @param aggregation [1] Aggregation method for duplicate timestamps: 1=Average, 2=Count, 3=Max, 4=Median, 5=Min, 6=Sum, 7=None (#NUM! if duplicates exist).
10
+ * @param aggregation [1] Aggregation method for duplicate timestamps: 1=Average, 2=Count, 3=CountA, 4=Max, 5=Median, 6=Min, 7=Sum.
11
11
  */
12
- export declare function FORECAST_ETS(targetDate: number, values: IRange, timeline: IRange, seasonality?: number, dataCompletion?: number, aggregation?: number): Scalar;
12
+ export declare function FORECAST_ETS(targetDate: number, values: IRange, timeline: IRange, seasonality?: Omittable<number>, dataCompletion?: Omittable<number>, aggregation?: Omittable<number>): Scalar;
13
13
  /**
14
+ * Returns a confidence interval for the forecasted value at the specified target date.
14
15
  * @name FORECAST.ETS.CONFINT
15
- * @summary Returns a confidence interval for the forecasted value at the specified target date.
16
16
  * @param targetDate is the data point for which you want to predict a value. It should carry on the pattern of values in the timeline.
17
17
  * @param values is the array or range of numeric data you're predicting.
18
18
  * @param timeline is the independent array or range of numeric data. The dates in the timeline must have a consistent step between them and can't be zero.
19
19
  * @param confidenceLevel [0.95] Confidence probability, must be strictly between 0 and 1.
20
20
  * @param seasonality [1] 0 = no seasonality; 1 = auto-detect; any integer > 1 = explicit seasonal period.
21
21
  * @param dataCompletion [1] 1 = interpolate missing values; 0 = fill with zeros.
22
- * @param aggregation [1] Aggregation method for duplicate timestamps: 1=Average, 2=Count, 3=Max, 4=Median, 5=Min, 6=Sum, 7=None.
22
+ * @param aggregation [1] Aggregation method for duplicate timestamps: 1=Average, 2=Count, 3=CountA, 4=Max, 5=Median, 6=Min, 7=Sum.
23
23
  */
24
- export declare function FORECAST_ETS_CONFINT(targetDate: number, values: IRange, timeline: IRange, confidenceLevel?: number, seasonality?: number, dataCompletion?: number, aggregation?: number): Scalar;
24
+ export declare function FORECAST_ETS_CONFINT(targetDate: number, values: IRange, timeline: IRange, confidenceLevel?: Omittable<number>, seasonality?: Omittable<number>, dataCompletion?: Omittable<number>, aggregation?: Omittable<number>): Scalar;
25
25
  /**
26
+ * Returns the length of the repetitive pattern in the data for the specific time series.
26
27
  * @name FORECAST.ETS.SEASONALITY
27
- * @summary Returns the length of the repetitive pattern in the data for the specific time series.
28
28
  * @param values is the array or range of numeric data you're predicting.
29
29
  * @param timeline is the independent array or range of numeric data. The dates in the timeline must have a consistent step between them and can't be zero.
30
30
  * @param dataCompletion [1] 1 = interpolate missing values; 0 = fill with zeros.
31
- * @param aggregation [1] Aggregation method for duplicate timestamps: 1=Average, 2=Count, 3=Max, 4=Median, 5=Min, 6=Sum, 7=None.
31
+ * @param aggregation [1] Aggregation method for duplicate timestamps: 1=Average, 2=Count, 3=CountA, 4=Max, 5=Median, 6=Min, 7=Sum.
32
32
  */
33
- export declare function FORECAST_ETS_SEASONALITY(values: IRange, timeline: IRange, dataCompletion?: number, aggregation?: number): Scalar;
33
+ export declare function FORECAST_ETS_SEASONALITY(values: IRange, timeline: IRange, dataCompletion?: Omittable<number>, aggregation?: Omittable<number>): Scalar;
34
34
  /**
35
+ * Returns a requested statistic for the ETS forecast model.
35
36
  * @name FORECAST.ETS.STAT
36
- * @summary Returns a requested statistic for the ETS forecast model.
37
37
  * @param values is the array or range of numeric data you're predicting.
38
38
  * @param timeline is the independent array or range of numeric data.
39
39
  * @param statisticType 1=Alpha, 2=Beta (trend smoothing), 3=Gamma (seasonal smoothing), 4=MASE, 5=SMAPE, 6=MAE, 7=RMSE, 8=Step size.
40
40
  * @param seasonality [1] 0 = no seasonality; 1 = auto-detect; any integer > 1 = explicit seasonal period.
41
41
  * @param dataCompletion [1] 1 = interpolate missing values; 0 = fill with zeros.
42
- * @param aggregation [1] Aggregation method for duplicate timestamps: 1=Average, 2=Count, 3=Max, 4=Median, 5=Min, 6=Sum, 7=None.
42
+ * @param aggregation [1] Aggregation method for duplicate timestamps: 1=Average, 2=Count, 3=CountA, 4=Max, 5=Median, 6=Min, 7=Sum.
43
43
  */
44
- export declare function FORECAST_ETS_STAT(values: IRange, timeline: IRange, statisticType: number, seasonality?: number, dataCompletion?: number, aggregation?: number): Scalar;
45
- //# sourceMappingURL=ETS.d.ts.map
44
+ export declare function FORECAST_ETS_STAT(values: IRange, timeline: IRange, statisticType: number, seasonality?: Omittable<number>, dataCompletion?: Omittable<number>, aggregation?: Omittable<number>): Scalar;
45
+ //# sourceMappingURL=Ets.d.ts.map
@@ -1,13 +1,7 @@
1
- import { FormulaError, Scalar, IRange, Omittable } from '@sheetxl/primitives';
1
+ import { Scalar, IRange, Omittable, ReportType, NoLift } from '@sheetxl/primitives';
2
+ import { RegressionData } from '../_utils/LeastSquares';
2
3
  /**
3
- * The least-squares regression family: LINEST / LOGEST report the fitted model, TREND / GROWTH
4
- * evaluate it at new x-values, and LOGEST / GROWTH are the linear pair run on `ln(y)`.
5
- *
6
- * All four share `_utils/LeastSquares.ts` — the known_y/known_x/new_x shape rules, the
7
- * rank-deficient QR solve, and the `stats` grid.
8
- */
9
- /**
10
- * @summary Returns statistics that describe a linear trend matching known data points, by fitting a straight line using the least squares method.
4
+ * Returns statistics that describe a linear trend matching known data points, by fitting a straight line using the least squares method.
11
5
  * @param knownYs is the set of y-values you already know in the relationship y = mx + b.
12
6
  * @param knownXs is an optional set of x-values that you may already know in the relationship y = mx + b.
13
7
  * @param constant is a logical value: the constant b is calculated normally if Const = TRUE; b is set equal to 0 if Const = FALSE.
@@ -15,9 +9,9 @@ import { FormulaError, Scalar, IRange, Omittable } from '@sheetxl/primitives';
15
9
  *
16
10
  * @remarks {@link https://support.microsoft.com/en-us/office/linest-function-84d7d0d9-6e50-4101-977a-fa7abf772b6d|Docs}
17
11
  */
18
- export declare function LINEST(knownYs: IRange, knownXs?: Omittable<IRange>, constant?: Omittable<boolean>, stats?: boolean): (number | FormulaError.Known)[][];
12
+ export declare function LINEST(knownYs: IRange, knownXs?: ReportType<Omittable<IRange>>, constant?: Omittable<ReportType<NoLift<boolean>>>, stats?: Omittable<ReportType<NoLift<boolean>>>): Scalar[][];
19
13
  /**
20
- * @summary Returns statistics that describe an exponential curve matching known data points.
14
+ * Returns statistics that describe an exponential curve matching known data points.
21
15
  * @param knownYs is the set of y-values you already know in the relationship y = b*m^x.
22
16
  * @param knownXs is an optional set of x-values that you may already know in the relationship y = b*m^x.
23
17
  * @param constant is a logical value: the constant b is calculated normally if Const = TRUE; b is set equal to 1 if Const = FALSE.
@@ -25,25 +19,26 @@ export declare function LINEST(knownYs: IRange, knownXs?: Omittable<IRange>, con
25
19
  *
26
20
  * @remarks {@link https://support.microsoft.com/en-us/office/logest-function-f27462d8-3657-4030-866b-a272c1d18b4b|Docs}
27
21
  */
28
- export declare function LOGEST(knownYs: IRange, knownXs?: Omittable<IRange>, constant?: Omittable<boolean>, stats?: boolean): (number | FormulaError.Known)[][];
22
+ export declare function LOGEST(knownYs: IRange, knownXs?: ReportType<Omittable<IRange>>, constant?: Omittable<ReportType<NoLift<boolean>>>, stats?: Omittable<ReportType<NoLift<boolean>>>): Scalar[][];
29
23
  /**
30
- * @summary Returns values along a linear trend fitted to known data points.
24
+ * Returns values along a linear trend fitted to known data points.
31
25
  * @param knownYs The known y-values in the relationship y = mx + b.
32
26
  * @param knownXs Optional x-values. Defaults to {1,2,3,...,n}.
33
27
  * @param newXs The x-values for which to predict y. Defaults to knownX.
34
- * @param useConst If FALSE, forces the constant b to zero. Defaults to TRUE.
28
+ * @param constant If FALSE, forces the constant b to zero. Defaults to TRUE.
35
29
  *
36
30
  * @remarks {@link https://support.microsoft.com/en-us/office/trend-function-e2f135f0-8827-4096-9873-9a7cf7b51ef1|Docs}
37
31
  */
38
- export declare function TREND(knownYs: IRange, knownXs?: Omittable<IRange>, newXs?: Omittable<IRange>, useConst?: Omittable<boolean>): Scalar[][];
32
+ export declare function TREND(knownYs: IRange, knownXs?: ReportType<Omittable<IRange>>, newXs?: Omittable<IRange>, constant?: Omittable<ReportType<NoLift<boolean>>>): Scalar[][];
39
33
  /**
40
- * @summary Returns numbers in an exponential growth trend matching known data points.
34
+ * Returns numbers in an exponential growth trend matching known data points.
41
35
  * @param knownYs is the set of y-values you already know in the relationship y = b*m^x, an array or range of positive numbers.
42
36
  * @param knownXs is an optional set of x-values that you may already know in the relationship y = b*m^x, an array or range the same size as Known_y's.
43
37
  * @param newXs are new x-values for which you want GROWTH to return corresponding y-values.
44
- * @param useConst is a logical value: the constant b is calculated normally if Const = TRUE; b is set equal to 1 if Const = FALSE.
38
+ * @param constant is a logical value: the constant b is calculated normally if Const = TRUE; b is set equal to 1 if Const = FALSE.
45
39
  *
46
40
  * @remarks {@link https://support.microsoft.com/en-us/office/growth-function-541a91dc-3d5e-437d-b156-21324e68b80d|Docs}
47
41
  */
48
- export declare function GROWTH(knownYs: IRange, knownXs?: Omittable<IRange>, newXs?: Omittable<IRange>, useConst?: Omittable<boolean>): number[][];
42
+ export declare function GROWTH(knownYs: IRange, knownXs?: ReportType<Omittable<IRange>>, newXs?: Omittable<IRange>, constant?: Omittable<ReportType<NoLift<boolean>>>): Scalar[][];
43
+ export type { RegressionData };
49
44
  //# sourceMappingURL=Regression.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { IRange } from '@sheetxl/primitives';
2
2
  /**
3
- * @summary Returns the probability associated with a Student's t-Test.
3
+ * Returns the probability associated with a Student's t-Test.
4
4
  * @param array1 is the first data set.
5
5
  * @param array2 is the second data set.
6
6
  * @param tails specifies the number of distribution tails to return: one-tailed distribution = 1; two-tailed distribution = 2.
@@ -10,10 +10,10 @@ import { IRange } from '@sheetxl/primitives';
10
10
  * @remarks
11
11
  * {@link https://support.microsoft.com/en-us/office/t-test-function-d4e08ec3-c545-485f-962e-276f7cbed055|Docs}
12
12
  */
13
- export declare function TTEST(array1: IRange<number>, array2: IRange<number>, tails: number, type: number): number;
13
+ export declare function TTEST(array1: IRange, array2: IRange, tails: number, type: number): number;
14
14
  /**
15
+ * Returns the probability associated with a Student's t-Test.
15
16
  * @name T.TEST
16
- * @summary Returns the probability associated with a Student's t-Test.
17
17
  * @param array1 is the first data set.
18
18
  * @param array2 is the second data set.
19
19
  * @param tails specifies the number of distribution tails to return: one-tailed distribution = 1; two-tailed distribution = 2.
@@ -23,5 +23,5 @@ export declare function TTEST(array1: IRange<number>, array2: IRange<number>, ta
23
23
  * @remarks
24
24
  * {@link https://support.microsoft.com/en-us/office/t-test-function-d4e08ec3-c545-485f-962e-276f7cbed055|Docs}
25
25
  */
26
- export declare function T_TEST(array1: IRange<number>, array2: IRange<number>, tails: number, type: number): number;
27
- //# sourceMappingURL=TTEST.d.ts.map
26
+ export declare function T_TEST(array1: IRange, array2: IRange, tails: number, type: number): number;
27
+ //# sourceMappingURL=TTest.d.ts.map