@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
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.1",
4
+ "version": "0.8.0-beta.10",
5
5
  "license": "SEE LICENSE IN <LICENSE>",
6
6
  "type": "module",
7
7
  "exports": {
@@ -9,13 +9,12 @@
9
9
  "types": "./types/index.d.ts",
10
10
  "browser": "./browser/esm/index.mjs",
11
11
  "node": "./node/esm/index.mjs",
12
- "import": "./browser/esm/index.mjs",
13
- "require": "./browser/cjs/index.cjs"
12
+ "default": "./browser/esm/index.mjs"
14
13
  }
15
14
  },
16
15
  "types": "./types/index.d.ts",
17
16
  "module": "./browser/esm/index.mjs",
18
- "main": "./browser/cjs/index.cjs",
17
+ "main": "./browser/esm/index.mjs",
19
18
  "sideEffects": false,
20
19
  "engineStrict": true,
21
20
  "homepage": "https://sheetxl.com",
@@ -37,7 +36,7 @@
37
36
  "formulas"
38
37
  ],
39
38
  "dependencies": {
40
- "@sheetxl/primitives": "^0.8.0-beta.1",
41
- "@sheetxl/scripting": "^0.8.0-beta.1"
39
+ "@sheetxl/primitives": "^0.8.0-beta.10",
40
+ "@sheetxl/scripting": "^0.8.0-beta.10"
42
41
  }
43
42
  }
@@ -0,0 +1,5 @@
1
+ import { MinifiedDeclarations, MinifiedEnums } from '@sheetxl/scripting';
2
+ declare const declarations: MinifiedDeclarations;
3
+ export declare const enums: MinifiedEnums;
4
+ export default declarations;
5
+ //# sourceMappingURL=Annuity.decl.d.ts.map
@@ -1,4 +1,4 @@
1
1
  import { MinifiedDeclarations } from '@sheetxl/scripting';
2
2
  declare const declarations: MinifiedDeclarations;
3
3
  export default declarations;
4
- //# sourceMappingURL=Financial.decl.d.ts.map
4
+ //# sourceMappingURL=Cashflow.decl.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { MinifiedDeclarations } from '@sheetxl/scripting';
2
+ declare const declarations: MinifiedDeclarations;
3
+ export default declarations;
4
+ //# sourceMappingURL=Convert.decl.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { MinifiedDeclarations } from '@sheetxl/scripting';
2
+ declare const declarations: MinifiedDeclarations;
3
+ export default declarations;
4
+ //# sourceMappingURL=Coupon.decl.d.ts.map
@@ -1,4 +1,4 @@
1
1
  import { MinifiedDeclarations } from '@sheetxl/scripting';
2
2
  declare const declarations: MinifiedDeclarations;
3
3
  export default declarations;
4
- //# sourceMappingURL=Financial2.decl.d.ts.map
4
+ //# sourceMappingURL=Depreciation.decl.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { MinifiedDeclarations } from '@sheetxl/scripting';
2
+ declare const declarations: MinifiedDeclarations;
3
+ export default declarations;
4
+ //# sourceMappingURL=Growth.decl.d.ts.map
@@ -1,4 +1,4 @@
1
1
  import { MinifiedDeclarations } from '@sheetxl/scripting';
2
2
  declare const declarations: MinifiedDeclarations;
3
3
  export default declarations;
4
- //# sourceMappingURL=ODD.decl.d.ts.map
4
+ //# sourceMappingURL=Odd.decl.d.ts.map
@@ -1,4 +1,4 @@
1
1
  import { MinifiedDeclarations } from '@sheetxl/scripting';
2
2
  declare const declarations: MinifiedDeclarations;
3
3
  export default declarations;
4
- //# sourceMappingURL=Financial3.decl.d.ts.map
4
+ //# sourceMappingURL=STOCKHISTORY.decl.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { MinifiedDeclarations } from '@sheetxl/scripting';
2
+ declare const declarations: MinifiedDeclarations;
3
+ export default declarations;
4
+ //# sourceMappingURL=Security.decl.d.ts.map
@@ -1,4 +1,4 @@
1
1
  import { MinifiedDeclarations } from '@sheetxl/scripting';
2
2
  declare const declarations: MinifiedDeclarations;
3
3
  export default declarations;
4
- //# sourceMappingURL=Financial4.decl.d.ts.map
4
+ //# sourceMappingURL=SecurityMaturity.decl.d.ts.map
@@ -1,4 +1,4 @@
1
1
  import { MinifiedDeclarations } from '@sheetxl/scripting';
2
2
  declare const declarations: MinifiedDeclarations;
3
3
  export default declarations;
4
- //# sourceMappingURL=TTEST.decl.d.ts.map
4
+ //# sourceMappingURL=TBill.decl.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { MinifiedDeclarations } from '@sheetxl/scripting';
2
+ declare const declarations: MinifiedDeclarations;
3
+ export default declarations;
4
+ //# sourceMappingURL=GroupBy.decl.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { MinifiedDeclarations } from '@sheetxl/scripting';
2
+ declare const declarations: MinifiedDeclarations;
3
+ export default declarations;
4
+ //# sourceMappingURL=PivotBy.decl.d.ts.map
@@ -1,4 +1,4 @@
1
1
  import { MinifiedDeclarations } from '@sheetxl/scripting';
2
2
  declare const declarations: MinifiedDeclarations;
3
3
  export default declarations;
4
- //# sourceMappingURL=ETS.decl.d.ts.map
4
+ //# sourceMappingURL=Ets.decl.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { MinifiedDeclarations } from '@sheetxl/scripting';
2
+ declare const declarations: MinifiedDeclarations;
3
+ export default declarations;
4
+ //# sourceMappingURL=TTest.decl.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { MinifiedDescriptors, MinifiedEnumDescriptors } from '@sheetxl/scripting';
2
+ declare const descriptors: MinifiedDescriptors;
3
+ export declare const enums: MinifiedEnumDescriptors;
4
+ export default descriptors;
5
+ //# sourceMappingURL=Annuity.desc.d.ts.map
@@ -1,4 +1,4 @@
1
1
  import { MinifiedDescriptors } from '@sheetxl/scripting';
2
2
  declare const descriptors: MinifiedDescriptors;
3
3
  export default descriptors;
4
- //# sourceMappingURL=Financial.desc.d.ts.map
4
+ //# sourceMappingURL=Cashflow.desc.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { MinifiedDescriptors } from '@sheetxl/scripting';
2
+ declare const descriptors: MinifiedDescriptors;
3
+ export default descriptors;
4
+ //# sourceMappingURL=Convert.desc.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { MinifiedDescriptors } from '@sheetxl/scripting';
2
+ declare const descriptors: MinifiedDescriptors;
3
+ export default descriptors;
4
+ //# sourceMappingURL=Coupon.desc.d.ts.map
@@ -1,4 +1,4 @@
1
1
  import { MinifiedDescriptors } from '@sheetxl/scripting';
2
2
  declare const descriptors: MinifiedDescriptors;
3
3
  export default descriptors;
4
- //# sourceMappingURL=Financial2.desc.d.ts.map
4
+ //# sourceMappingURL=Depreciation.desc.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { MinifiedDescriptors } from '@sheetxl/scripting';
2
+ declare const descriptors: MinifiedDescriptors;
3
+ export default descriptors;
4
+ //# sourceMappingURL=Growth.desc.d.ts.map
@@ -1,4 +1,4 @@
1
1
  import { MinifiedDescriptors } from '@sheetxl/scripting';
2
2
  declare const descriptors: MinifiedDescriptors;
3
3
  export default descriptors;
4
- //# sourceMappingURL=ODD.desc.d.ts.map
4
+ //# sourceMappingURL=Odd.desc.d.ts.map
@@ -1,4 +1,4 @@
1
1
  import { MinifiedDescriptors } from '@sheetxl/scripting';
2
2
  declare const descriptors: MinifiedDescriptors;
3
3
  export default descriptors;
4
- //# sourceMappingURL=Financial3.desc.d.ts.map
4
+ //# sourceMappingURL=STOCKHISTORY.desc.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { MinifiedDescriptors } from '@sheetxl/scripting';
2
+ declare const descriptors: MinifiedDescriptors;
3
+ export default descriptors;
4
+ //# sourceMappingURL=Security.desc.d.ts.map
@@ -1,4 +1,4 @@
1
1
  import { MinifiedDescriptors } from '@sheetxl/scripting';
2
2
  declare const descriptors: MinifiedDescriptors;
3
3
  export default descriptors;
4
- //# sourceMappingURL=Financial4.desc.d.ts.map
4
+ //# sourceMappingURL=SecurityMaturity.desc.d.ts.map
@@ -1,4 +1,4 @@
1
1
  import { MinifiedDescriptors } from '@sheetxl/scripting';
2
2
  declare const descriptors: MinifiedDescriptors;
3
3
  export default descriptors;
4
- //# sourceMappingURL=TTEST.desc.d.ts.map
4
+ //# sourceMappingURL=TBill.desc.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { MinifiedDescriptors } from '@sheetxl/scripting';
2
+ declare const descriptors: MinifiedDescriptors;
3
+ export default descriptors;
4
+ //# sourceMappingURL=GroupBy.desc.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { MinifiedDescriptors } from '@sheetxl/scripting';
2
+ declare const descriptors: MinifiedDescriptors;
3
+ export default descriptors;
4
+ //# sourceMappingURL=PivotBy.desc.d.ts.map
@@ -1,4 +1,4 @@
1
1
  import { MinifiedDescriptors } from '@sheetxl/scripting';
2
2
  declare const descriptors: MinifiedDescriptors;
3
3
  export default descriptors;
4
- //# sourceMappingURL=ETS.desc.d.ts.map
4
+ //# sourceMappingURL=Ets.desc.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { MinifiedDescriptors } from '@sheetxl/scripting';
2
+ declare const descriptors: MinifiedDescriptors;
3
+ export default descriptors;
4
+ //# sourceMappingURL=TTest.desc.d.ts.map
@@ -1,4 +1,4 @@
1
- import { Scalar } from '@sheetxl/primitives';
1
+ import { Scalar, Omittable } from '@sheetxl/primitives';
2
2
  /**
3
3
  * Readers for arguments Excel declares `any` rather than `number`.
4
4
  *
@@ -23,10 +23,17 @@ import { Scalar } from '@sheetxl/primitives';
23
23
  * `parseAsSerialDate` supplies the refusal — `#VALUE!` for a boolean, whether it arrived as a
24
24
  * literal or as a cell, and an incoming error rethrown with its own identity.
25
25
  *
26
- * A blank CELL is serial 0. Excel answers `#N/A` for a genuinely empty SLOT (`EOMONTH(,0)`),
27
- * which we cannot yet distinguish — both reach the body as `null` (CALC-ISSUES item 43).
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}.
28
29
  */
29
30
  export declare function anyDate(value: Scalar): number;
31
+ /**
32
+ * A REQUIRED date parameter Excel declares `any` (`Omittable<Scalar>` on the declaration): an
33
+ * argument supplied EMPTY is a missing argument (#N/A); everything else reads through
34
+ * {@link anyDate}, so a blank CELL is still serial 0.
35
+ */
36
+ export declare function anyDateRequired(value: Omittable<Scalar>): number;
30
37
  /**
31
38
  * Reads a plain NUMERIC argument declared `any` — the `months`/`basis` slots.
32
39
  *
@@ -35,4 +42,11 @@ export declare function anyDate(value: Scalar): number;
35
42
  * text parsed, boolean refused, error identity preserved.
36
43
  */
37
44
  export declare function anyNumber(value: Scalar): number;
45
+ /**
46
+ * A REQUIRED parameter Excel declares `any` (`Omittable<Scalar>` on the declaration): an argument
47
+ * supplied EMPTY is a missing argument (#N/A) rather than a zero, and everything else reads
48
+ * through `anyNumber`. The `undefined` check must come first — `anyNumber` reads a blank cell's
49
+ * `null` as 0, which is what a blank CELL is measured to be.
50
+ */
51
+ export declare function anyRequired(value: Omittable<Scalar>): number;
38
52
  //# sourceMappingURL=AnyArgs.d.ts.map
@@ -1,4 +1,34 @@
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
+ 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
+ export declare function solveYieldByNewton(start: number, priceFn: IterFn, slopeFn: IterFn): number;
31
+ export {};
2
32
  /**
3
33
  * Solve `iterFn(x) = 0` numerically, starting from `guess`.
4
34
  *
@@ -14,6 +44,13 @@ type IterFn = (x: number) => number;
14
44
  *
15
45
  * Used by: YIELD, ODDFYIELD, ODDLYIELD.
16
46
  */
17
- export declare function solveByNewton(guess: number, iterFn: IterFn): number;
18
- export {};
47
+ /**
48
+ * Bisection fallback when Newton-Raphson fails to converge.
49
+ *
50
+ * Phase 1: Expand a small bracket around guess until the function changes sign
51
+ * (guarantees a root is bracketed, or gives up with NaN).
52
+ * Phase 2: Standard bisection to isolate the root.
53
+ *
54
+ * Returns NaN if no bracket is found within the iteration budget.
55
+ */
19
56
  //# sourceMappingURL=FinanaceSolver.d.ts.map
@@ -0,0 +1,23 @@
1
+ import { Scalar, Omittable } from '@sheetxl/primitives';
2
+ /** The arguments of AMORLINC/AMORDEGRC once read and validated. */
3
+ export interface AmorArgs {
4
+ cost: number;
5
+ salvage: number;
6
+ /** The period as Excel indexes it: under 1 is period 1, above 1 truncates. */
7
+ periodIndex: number;
8
+ rate: number;
9
+ /** The stub period's day count (`getAmorDayCount`); its year fraction is `days / yearDays`. */
10
+ days: number;
11
+ yearDays: number;
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
+ 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
+ //# sourceMappingURL=FinanceAmor.d.ts.map
@@ -0,0 +1,42 @@
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
+ export interface DatedFlows {
20
+ /** The flow at each ordinal. */
21
+ values: number[];
22
+ /** Days from the first date, every serial truncated first. */
23
+ days: number[];
24
+ }
25
+ /**
26
+ * `(values, dates)` as XNPV and XIRR read them. `valuesSlot` is the argument index of the values
27
+ * operand (the dates operand is the next one), which is what tells a one-cell operand from a list
28
+ * of one; `dialect` picks between the two functions' member rules.
29
+ *
30
+ * The pair scan is common to both: a count mismatch is `#NUM!` before anything else, and then, per
31
+ * ordinal, an error in the values operand, an error in the dates operand, and only then the kinds
32
+ * and the date's own domain.
33
+ *
34
+ * What differs is what a member may BE. XNPV's list members must already be numbers — a text, a
35
+ * boolean, an empty string or a blank is `#VALUE!` at ordinal 0 and `#NUM!` after it — and its
36
+ * serials run `[1, MAX_SERIAL_DATE]` with every date at or after the first. XIRR COERCES its
37
+ * members instead (numeric text and date text parse, a boolean or a true text is `#VALUE!`
38
+ * wherever it sits), drops a pair whose VALUE is blank, answers `#NUM!` for a blank DATE beside a
39
+ * present value, admits serial 0, and does not order the dates at all.
40
+ */
41
+ export declare function readDatedFlows(values: IRange, dates: IRange, valuesSlot: number, dialect?: 'xnpv' | 'xirr'): DatedFlows;
42
+ //# sourceMappingURL=FinanceCashflow.d.ts.map
@@ -1,26 +1,4 @@
1
- /**
2
- * Shared pure-math helpers for bond pricing and coupon date functions.
3
- *
4
- * All formulas follow the Excel spec:
5
- * https://support.microsoft.com/en-us/office/financial-functions-reference
6
- *
7
- * Date arithmetic delegates to SheetXL's existing date utilities
8
- * (dateAddMonths, getDaysInMonth, isLastDayOfMonth, getDayCount), and serial
9
- * <-> Date conversion to FormulaContext's `dateOnly` flavors — same interface
10
- * SheetXL uses throughout the financial module.
11
- *
12
- * Basis codes (used throughout):
13
- * 0 US 30/360 (NASD)
14
- * 1 Actual/actual
15
- * 2 Actual/360
16
- * 3 Actual/365
17
- * 4 European 30/360
18
- *
19
- * These are plain number-in / number-out helpers that the formula wrappers
20
- * call after doing all parameter validation and coercion — they touch
21
- * FormulaContext only for serial<->Date conversion, never IRange or
22
- * FormulaError.
23
- */
1
+ import { Omittable, Scalar } from '@sheetxl/primitives';
24
2
  /**
25
3
  * Returns the signed day count between two Excel serial dates using the given
26
4
  * day-count basis. The result is always positive (or zero) — we clamp
@@ -33,70 +11,117 @@
33
11
  export declare function daysBetween(startSerial: number, endSerial: number, basis: number): number;
34
12
  /**
35
13
  * Previous coupon date (COUPPCD):
36
- * Returns the Excel serial number of the last coupon date before or on the
37
- * settlement date.
38
- *
39
- * Used by: COUPPCD, COUPDAYBS, COUPDAYS (basis=1), PRICE, YIELD, DURATION…
14
+ * Returns the Excel serial number of the last coupon date before or on the settlement date.
15
+ * A coupon date below the calendar answers 0 — Excel's clamp, measured.
40
16
  */
41
17
  export declare function calculateCouppcd(settlementSerial: number, maturitySerial: number, frequency: number): number;
42
18
  /**
43
19
  * Next coupon date (COUPNCD):
44
20
  * Returns the Excel serial number of the first coupon date after settlement.
45
- *
46
- * Used by: COUPNCD, COUPDAYSNC, ODDLPRICE (basis 2 / 3 branch).
47
21
  */
48
22
  export declare function calculateCoupncd(settlementSerial: number, maturitySerial: number, frequency: number): number;
49
23
  /**
50
- * Days from previous coupon to settlement (COUPDAYBS):
51
- * The "accrued days" — how many days of the current coupon period have elapsed
52
- * by the settlement date.
53
- *
54
- * Used by: COUPDAYBS, PRICE, YIELD, DURATION, MDURATION.
24
+ * Number of remaining coupons from settlement to maturity (COUPNUM). `NaN` (the caller's
25
+ * #NUM!) when the previous coupon date is at or below serial 0 — `COUPNUM(DATE(1900,1,1),
26
+ * DATE(1900,12,31),4)` is #NUM! while its COUPPCD is 0 (measured).
27
+ */
28
+ export declare function calculateCoupnum(settlementSerial: number, maturitySerial: number, frequency: number): number;
29
+ /**
30
+ * Days from previous coupon to settlement (COUPDAYBS): the day count of the basis from the
31
+ * (clamped) previous coupon date to the settlement — the NASD rules `getDayCount` keeps for
32
+ * basis 0, actual days for 1–3, the European 30/360 for 4.
55
33
  */
56
34
  export declare function calculateCoupdaybs(settlementSerial: number, maturitySerial: number, frequency: number, basis: number): number;
57
35
  /**
58
- * Days in the coupon period that contains settlement (COUPDAYS):
59
- * Basis 1 (actual/actual) counts actual calendar days from PCD to NCD.
60
- * Basis 3 is always 365/frequency.
61
- * All 30/360 bases divide 360 by frequency.
62
- *
63
- * Used by: COUPDAYS, PRICE, YIELD, DURATION, MDURATION, ODDLPRICE, ODDLYIELD.
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
+ 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}.
64
63
  */
65
64
  export declare function calculateCoupdays(settlementSerial: number, maturitySerial: number, frequency: number, basis: number): number;
66
65
  /**
67
- * Number of remaining coupons from settlement to maturity (COUPNUM):
68
- * Counts how many (12/frequency)-month backward steps from maturity are needed
69
- * to pass settlement.
70
- *
71
- * Used by: COUPNUM, PRICE, YIELD, DURATION, MDURATION, ODDFPRICE, ODDFYIELD.
66
+ * The four arguments of the six coupon functions, read in Excel's order — every one is
67
+ * Excel-declared `any` (a boolean is #VALUE!, an empty argument #N/A, a blank cell 0, a
68
+ * multi-cell reference does not broadcast: `NoLift<>` on every slot): the two dates
69
+ * are coerced and validated (#NUM! for a serial outside the calendar or a settlement not
70
+ * strictly before the maturity once both are truncated), then the frequency is read and
71
+ * validated (1, 2 or 4 after truncation), then the basis — so
72
+ * `COUPDAYS(DATE(2020,1,1),DATE(2019,1,1),"x",0)` is #NUM! and so is the same with a text
73
+ * basis, while a text frequency against a bad basis is #VALUE!. Basis truncates; a negative
74
+ * one is #NUM! before truncation.
72
75
  */
73
- export declare function calculateCoupnum(settlementSerial: number, maturitySerial: number, frequency: number): number;
76
+ export declare function readCouponArgs(settlement: Omittable<Scalar>, maturity: Omittable<Scalar>, frequency: Omittable<Scalar>, basis: Omittable<Scalar>): {
77
+ settlement: number;
78
+ maturity: number;
79
+ frequency: number;
80
+ basis: number;
81
+ };
74
82
  /**
75
- * ODDFPRICE core:
76
- * Prices a bond with an irregular (short or long) first coupon period.
77
- *
78
- * Dispatches to the short-coupon or long-coupon sub-function depending on
79
- * whether DFC < E (short first period) or DFC >= E (long first period).
80
- *
81
- * All arguments are already validated scalars. Returns NaN on degenerate
82
- * inputs (the formula wrapper turns NaN → #NUM!).
83
- *
84
- * Reference:
85
- * https://support.microsoft.com/en-us/office/oddfprice-function-d7d664a8-34df-4233-8d2b-922bcf6a69e1
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.
86
91
  */
87
- export declare function calculateOddFPrice(settlementSerial: number, maturitySerial: number, issueSerial: number, firstCouponSerial: number, rate: number, yld: number, redemption: number, frequency: number, basis: number): number;
92
+ export declare function couponPeriod(settlementSerial: number, maturitySerial: number, frequency: number, basis: number): {
93
+ N: number;
94
+ A: number;
95
+ E: number;
96
+ DSC: number;
97
+ };
88
98
  /**
89
- * Standard coupon bond price.
90
- *
91
- * The closed-form formula per $100 face value from the Excel spec:
92
- * https://support.microsoft.com/en-us/office/price-function-3ea9deac-8dfa-436f-a7c8-17ea02c21b0a
93
- *
94
- * Special-cased for N=1 (single remaining coupon period) where the standard
95
- * summation degenerates and the spec provides a simpler formula.
96
- *
97
- * Used by: PRICE, YIELD (via Newton inversion).
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.
98
113
  */
99
114
  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
+ export declare function calculatePriceSlope(settlementSerial: number, maturitySerial: number, rate: number, yld: number, redemption: number, frequency: number, basis: number): number;
100
125
  /**
101
126
  * Macaulay duration of a coupon bond.
102
127
  *
@@ -123,19 +148,4 @@ export declare function calculateDuration(settlementSerial: number, maturitySeri
123
148
  */
124
149
  export declare function calculateDDB(cost: number, salvage: number, life: number, period: number, // 1-based period number
125
150
  factor: number): number;
126
- /**
127
- * Returns true if the settlement and maturity dates are aligned to coupon
128
- * dates — i.e., the day-of-month matches and the month difference is an exact
129
- * multiple of (12/frequency).
130
- *
131
- * Used by ODDFPRICE / ODDFYIELD / ODDLPRICE / ODDLYIELD validators.
132
- */
133
- export declare function isDatesAreAlignedToCoupon(date1Serial: number, date2Serial: number, frequency: number): boolean;
134
- /**
135
- * Returns true if calculateCouppcd(d1, d2, frequency) >= 0.
136
- *
137
- * Used by ODDFPRICE / ODDFYIELD validators.
138
- */
139
- export declare function isCouppcdIsNonNegative(date1Serial: number, date2Serial: number, frequency: number): boolean;
140
- export declare function isValidFrequency(frequency: number): boolean;
141
151
  //# sourceMappingURL=FinanceCoupon.d.ts.map