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

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 (142) hide show
  1. package/browser/esm/0yxQHUFt5rjQCIev.mjs +32 -0
  2. package/browser/esm/B0dkCLIUbDz5vaVn.mjs +37 -0
  3. package/browser/esm/BDiwqEqe9Jl-Rmly.mjs +19 -0
  4. package/browser/esm/BJjZHVPRHerJoONT.mjs +33 -0
  5. package/{node/esm/COqdI1LYTHd9oLA6.mjs → browser/esm/Bf0x5wP966yEyeU1.mjs} +1 -1
  6. package/browser/esm/BfcYyyl5rbLdyDeQ.mjs +58 -0
  7. package/{node/esm/srpVt74r2zbvm1N0.mjs → browser/esm/C2ZfbEIW-6-61CUe.mjs} +5 -5
  8. package/browser/esm/{BuGemmv84T8m0wqw.mjs → CNDVQpzD85y-8iJ4.mjs} +1 -1
  9. package/browser/esm/CZ7GTErfSkfNcFRk.mjs +32 -0
  10. package/browser/esm/CiTyrOKe-UEYKcPV.mjs +47 -0
  11. package/browser/esm/CjKII1gh4dO5nTCs.mjs +119 -0
  12. package/browser/esm/{DY3kG36QGyDbrANO.mjs → CoHdir1CxZhcwJYt.mjs} +1 -1
  13. package/browser/esm/D0XFBj8GRIDAu37v.mjs +20 -0
  14. package/{node/esm/DodhOXkSzelSxHmB.mjs → browser/esm/D25GpXzrju6GyQn2.mjs} +27 -29
  15. package/browser/esm/{DpoZ7h1ScIJvbOY9.mjs → D4kfW2yw0rsWNLi0.mjs} +5 -5
  16. package/{node/esm/vu0NRDeeTbEHPMYS.mjs → browser/esm/D4ySsDPVL4IH96en.mjs} +2 -2
  17. package/{node/esm/CnVJ8GAsshRjRGA-.mjs → browser/esm/DXTaMRX8ten_8WHT.mjs} +2 -2
  18. package/browser/esm/{B1VmvhXuEn7zaTB9.mjs → Dt0ErrS3YGvCicxr.mjs} +1 -1
  19. package/{node/esm/BRwwvGaJ6HvkxjFC.mjs → browser/esm/cfrOLasJbMwF7L77.mjs} +1 -1
  20. package/browser/esm/declarations.mjs +99 -0
  21. package/browser/esm/g4CKPtGz1NpGDtQq.mjs +2449 -0
  22. package/browser/esm/index.mjs +2281 -2585
  23. package/browser/esm/o8LeKZ4-9nq29pqg.mjs +23 -0
  24. package/{node/esm/Bma3CN4_Nec6_4n7.mjs → browser/esm/qAolCiBy-hQL59hu.mjs} +6 -6
  25. package/browser/esm/{BFnDPCjxJcoIItFa.mjs → zWOO2QFn-kMYJv1L.mjs} +3 -3
  26. package/node/esm/0vsGDvrSkTeFOp0A.mjs +19 -0
  27. package/node/esm/0yxQHUFt5rjQCIev.mjs +32 -0
  28. package/node/esm/B0dkCLIUbDz5vaVn.mjs +37 -0
  29. package/node/esm/BJjZHVPRHerJoONT.mjs +33 -0
  30. package/{browser/esm/COqdI1LYTHd9oLA6.mjs → node/esm/Bf0x5wP966yEyeU1.mjs} +1 -1
  31. package/node/esm/BfcYyyl5rbLdyDeQ.mjs +58 -0
  32. package/node/esm/{LAkTk93odAfpvx50.mjs → Bnco0vB0yNDiLGre.mjs} +1 -1
  33. package/{browser/esm/srpVt74r2zbvm1N0.mjs → node/esm/C2ZfbEIW-6-61CUe.mjs} +5 -5
  34. package/node/esm/{BQyZVLTMNFLbjVap.mjs → C3Qy2cWt_qACxJiF.mjs} +3 -3
  35. package/node/esm/{BuGemmv84T8m0wqw.mjs → CNDVQpzD85y-8iJ4.mjs} +1 -1
  36. package/node/esm/CZ7GTErfSkfNcFRk.mjs +32 -0
  37. package/node/esm/CgY5V9Cmm0UJmyGW.mjs +2449 -0
  38. package/node/esm/CiTyrOKe-UEYKcPV.mjs +47 -0
  39. package/node/esm/CjKII1gh4dO5nTCs.mjs +119 -0
  40. package/node/esm/D0XFBj8GRIDAu37v.mjs +20 -0
  41. package/{browser/esm/DodhOXkSzelSxHmB.mjs → node/esm/D25GpXzrju6GyQn2.mjs} +27 -29
  42. package/node/esm/{DpoZ7h1ScIJvbOY9.mjs → D4kfW2yw0rsWNLi0.mjs} +5 -5
  43. package/{browser/esm/vu0NRDeeTbEHPMYS.mjs → node/esm/D4ySsDPVL4IH96en.mjs} +2 -2
  44. package/{browser/esm/CnVJ8GAsshRjRGA-.mjs → node/esm/DXTaMRX8ten_8WHT.mjs} +2 -2
  45. package/node/esm/{B1VmvhXuEn7zaTB9.mjs → Dt0ErrS3YGvCicxr.mjs} +1 -1
  46. package/{browser/esm/BRwwvGaJ6HvkxjFC.mjs → node/esm/cfrOLasJbMwF7L77.mjs} +1 -1
  47. package/node/esm/declarations.mjs +99 -0
  48. package/node/esm/index.mjs +2551 -2837
  49. package/node/esm/o8LeKZ4-9nq29pqg.mjs +23 -0
  50. package/{browser/esm/Bma3CN4_Nec6_4n7.mjs → node/esm/qAolCiBy-hQL59hu.mjs} +6 -6
  51. package/package.json +11 -6
  52. package/types/declarations.d.ts +4 -0
  53. package/types/src/.generated/decl/financial/Annuity.decl.d.ts +5 -0
  54. package/types/src/.generated/decl/financial/{Financial.decl.d.ts → Cashflow.decl.d.ts} +1 -1
  55. package/types/src/.generated/decl/financial/Convert.decl.d.ts +4 -0
  56. package/types/src/.generated/decl/financial/Coupon.decl.d.ts +4 -0
  57. package/types/src/.generated/decl/financial/{Financial2.decl.d.ts → Depreciation.decl.d.ts} +1 -1
  58. package/types/src/.generated/decl/financial/Growth.decl.d.ts +4 -0
  59. package/types/src/.generated/decl/financial/{ODD.decl.d.ts → Odd.decl.d.ts} +1 -1
  60. package/types/src/.generated/decl/financial/{Financial3.decl.d.ts → STOCKHISTORY.decl.d.ts} +1 -1
  61. package/types/src/.generated/decl/financial/Security.decl.d.ts +4 -0
  62. package/types/src/.generated/decl/financial/{Financial4.decl.d.ts → SecurityMaturity.decl.d.ts} +1 -1
  63. package/types/src/.generated/decl/{statistical/TTEST.decl.d.ts → financial/TBill.decl.d.ts} +1 -1
  64. package/types/src/.generated/decl/lookupReference/GroupBy.decl.d.ts +4 -0
  65. package/types/src/.generated/decl/lookupReference/PivotBy.decl.d.ts +4 -0
  66. package/types/src/.generated/decl/statistical/{ETS.decl.d.ts → Ets.decl.d.ts} +1 -1
  67. package/types/src/.generated/decl/statistical/TTest.decl.d.ts +4 -0
  68. package/types/src/.generated/declarations.d.ts +7 -0
  69. package/types/src/.generated/desc/financial/Annuity.desc.d.ts +5 -0
  70. package/types/src/.generated/desc/financial/{Financial.desc.d.ts → Cashflow.desc.d.ts} +1 -1
  71. package/types/src/.generated/desc/financial/Convert.desc.d.ts +4 -0
  72. package/types/src/.generated/desc/financial/Coupon.desc.d.ts +4 -0
  73. package/types/src/.generated/desc/financial/{Financial2.desc.d.ts → Depreciation.desc.d.ts} +1 -1
  74. package/types/src/.generated/desc/financial/Growth.desc.d.ts +4 -0
  75. package/types/src/.generated/desc/financial/{ODD.desc.d.ts → Odd.desc.d.ts} +1 -1
  76. package/types/src/.generated/desc/financial/{Financial3.desc.d.ts → STOCKHISTORY.desc.d.ts} +1 -1
  77. package/types/src/.generated/desc/financial/Security.desc.d.ts +4 -0
  78. package/types/src/.generated/desc/financial/{Financial4.desc.d.ts → SecurityMaturity.desc.d.ts} +1 -1
  79. package/types/src/.generated/desc/{statistical/TTEST.desc.d.ts → financial/TBill.desc.d.ts} +1 -1
  80. package/types/src/.generated/desc/lookupReference/GroupBy.desc.d.ts +4 -0
  81. package/types/src/.generated/desc/lookupReference/PivotBy.desc.d.ts +4 -0
  82. package/types/src/.generated/desc/statistical/{ETS.desc.d.ts → Ets.desc.d.ts} +1 -1
  83. package/types/src/.generated/desc/statistical/TTest.desc.d.ts +4 -0
  84. package/types/src/_utils/AnyArgs.d.ts +17 -3
  85. package/types/src/_utils/FinanaceSolver.d.ts +39 -2
  86. package/types/src/_utils/FinanceAmor.d.ts +23 -0
  87. package/types/src/_utils/FinanceCashflow.d.ts +42 -0
  88. package/types/src/_utils/FinanceCoupon.d.ts +92 -82
  89. package/types/src/_utils/FinanceDate.d.ts +24 -0
  90. package/types/src/_utils/FinanceDayCount.d.ts +46 -0
  91. package/types/src/_utils/FinanceOdd.d.ts +93 -0
  92. package/types/src/_utils/FinanceSecurity.d.ts +84 -0
  93. package/types/src/_utils/FinanceUtils.d.ts +37 -1
  94. package/types/src/_utils/LeastSquares.d.ts +20 -22
  95. package/types/src/_utils/Pivot.d.ts +205 -0
  96. package/types/src/_utils/RegexCompile.d.ts +33 -0
  97. package/types/src/cube/Cube.d.ts +7 -7
  98. package/types/src/financial/ACCRINT.d.ts +33 -6
  99. package/types/src/financial/AMORDEGRC.d.ts +22 -40
  100. package/types/src/financial/Annuity.d.ts +118 -0
  101. package/types/src/financial/Cashflow.d.ts +84 -0
  102. package/types/src/financial/Convert.d.ts +26 -0
  103. package/types/src/financial/Coupon.d.ts +72 -0
  104. package/types/src/financial/Date.d.ts +34 -5
  105. package/types/src/financial/Depreciation.d.ts +58 -0
  106. package/types/src/financial/Growth.d.ts +22 -0
  107. package/types/src/financial/Odd.d.ts +82 -0
  108. package/types/src/financial/STOCKHISTORY.d.ts +17 -0
  109. package/types/src/financial/Security.d.ts +68 -0
  110. package/types/src/financial/SecurityMaturity.d.ts +107 -0
  111. package/types/src/financial/TBill.d.ts +40 -0
  112. package/types/src/financial/VDB.d.ts +15 -13
  113. package/types/src/lookupReference/GroupBy.d.ts +14 -0
  114. package/types/src/lookupReference/PivotBy.d.ts +17 -0
  115. package/types/src/statistical/{ETS.d.ts → Ets.d.ts} +14 -14
  116. package/types/src/statistical/Regression.d.ts +13 -18
  117. package/types/src/statistical/{TTEST.d.ts → TTest.d.ts} +5 -5
  118. package/types/src/text/RegEx.d.ts +34 -11
  119. package/browser/cjs/B4JJfKSI4ppwU855.cjs +0 -1
  120. package/browser/cjs/BWDfauDHqB6U_2ka.cjs +0 -1
  121. package/browser/cjs/BwLx9ix5Sq7suAYP.cjs +0 -1
  122. package/browser/cjs/C2uDl8VIJqh58YF_.cjs +0 -1
  123. package/browser/cjs/CW-b31_-r-_raT8Y.cjs +0 -1
  124. package/browser/cjs/Clu7XiAsCB48GDXN.cjs +0 -1
  125. package/browser/cjs/CnZfa45XxA-9Jhmp.cjs +0 -1
  126. package/browser/cjs/DsFZgtSQpC75d1M0.cjs +0 -1
  127. package/browser/cjs/JfM6P_qoQQTWakZf.cjs +0 -1
  128. package/browser/cjs/bM25C5avKgBAJVfk.cjs +0 -1
  129. package/browser/cjs/fqTQ_p3ehzUvc1tF.cjs +0 -1
  130. package/browser/cjs/h3dw1jAp2J5Pu4p3.cjs +0 -1
  131. package/browser/cjs/index.cjs +0 -1
  132. package/browser/cjs/jev6VGWTdgEgm4Yk.cjs +0 -1
  133. package/browser/cjs/lEQC21-Sk4lwHy2r.cjs +0 -1
  134. package/browser/esm/CwoMEzOtRihuYUTr.mjs +0 -20
  135. package/browser/esm/Dy6UD7hQRBsT0WNp.mjs +0 -304
  136. package/node/esm/CwoMEzOtRihuYUTr.mjs +0 -20
  137. package/node/esm/Dy6UD7hQRBsT0WNp.mjs +0 -304
  138. package/types/src/financial/Financial.d.ts +0 -288
  139. package/types/src/financial/Financial2.d.ts +0 -99
  140. package/types/src/financial/Financial3.d.ts +0 -95
  141. package/types/src/financial/Financial4.d.ts +0 -82
  142. package/types/src/financial/ODD.d.ts +0 -106
@@ -1,106 +0,0 @@
1
- /**
2
- * Odd first and last coupon bond price/yield functions.
3
- *
4
- * "Odd" means the first or last coupon period is irregular — shorter or longer
5
- * than a standard coupon period. This happens when a bond is issued between
6
- * coupon dates (odd first) or the final coupon date doesn't align with
7
- * maturity (odd last).
8
- *
9
- * Why ODDLPRICE lives here and not in financialHelpers:
10
- * The odd-last formula uses a different internal structure (_getCoupDate,
11
- * _getFrac) that is not shared by any other function. Keeping it here avoids
12
- * polluting the shared helper module with single-use private math.
13
- *
14
- * Date ordering requirements:
15
- * ODDFPRICE/ODDFYIELD: issue < settlement < firstCoupon < maturity
16
- * ODDLPRICE/ODDLYIELD: lastInterest < settlement < maturity
17
- */
18
- /**
19
- * @summary Returns the price per $100 face value of a security with an odd first period.
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 issue is the security's issue date, expressed as a serial date number.
23
- * @param firstCoupon is the security's first coupon date, expressed as a serial date number.
24
- * @param yld is the security's annual yield.
25
- * @param redemption is the security's redemption value per $100 face value.
26
- * @param frequency is the number of coupon payments per year.
27
- * @param basis is the type of day count basis to use.
28
- *
29
- * @remarks
30
- * The first coupon period is "odd" (shorter or longer than normal) when the
31
- * bond is issued between standard coupon dates.
32
- */
33
- export declare function ODDFPRICE(settlement: number, // date
34
- maturity: number, // date
35
- issue: number, // date
36
- firstCoupon: number, // date
37
- rate: number, yld: number, redemption: number, frequency: number, basis?: number): number;
38
- /**
39
- * @summary Returns the yield of a security with an odd first period.
40
- * @param settlement is the security's settlement date, expressed as a serial date number.
41
- * @param maturity is the security's maturity date, expressed as a serial date number.
42
- * @param issue is the security's issue date, expressed as a serial date number.
43
- * @param firstCoupon is the security's first coupon date, expressed as a serial date number.
44
- * @param rate is the security's interest rate.
45
- * @param pr is the security's price.
46
- * @param redemption is the security's redemption value per $100 face value.
47
- * @param frequency is the number of coupon payments per year.
48
- * @param basis is the type of day count basis to use.
49
- *
50
- * @remarks
51
- * Numerically inverts ODDFPRICE via Newton-Raphson. The initial guess uses
52
- * the same heuristic as Excel: a linear approximation of yield from the
53
- * price/day-count relationship.
54
- */
55
- export declare function ODDFYIELD(settlement: number, // date
56
- maturity: number, // date
57
- issue: number, // date
58
- firstCoupon: number, // date
59
- rate: number, pr: number, redemption: number, frequency: number, basis?: number): number;
60
- /**
61
- * @summary Returns the price per $100 face value of a security with an odd last period.
62
- * @param settlement is the security's settlement date, expressed as a serial date number.
63
- * @param maturity is the security's maturity date, expressed as a serial date number.
64
- * @param lastInterest is the security's last coupon date, expressed as a serial date number.
65
- * @param rate is the interest rate.
66
- * @param yld is the security's annual yield.
67
- * @param redemption is the amount to be received at maturity.
68
- * @param frequency is the number of coupon payments per year.
69
- * @param basis is the type of day count basis to use.
70
- *
71
- * @remarks
72
- * The last coupon period is "odd" when the final coupon date and maturity do
73
- * not coincide — i.e. the bond matures between regular coupon dates.
74
- *
75
- * Unlike the odd-first functions, the odd-last formula is derived from a
76
- * different spec formula that expresses price as a function of three
77
- * fractional period lengths (fAi, fDCi, fDSCi — see _calculateOddLPrice).
78
- */
79
- export declare function ODDLPRICE(settlement: number, // date
80
- maturity: number, // date
81
- lastInterest: number, // date
82
- rate: number, yld: number, redemption: number, frequency: number, basis?: number): number;
83
- /**
84
- * @summary Returns the yield of a security with an odd last period.
85
- * @param settlement is the security's settlement date, expressed as a serial date number.
86
- * @param maturity is the security's maturity date, expressed as a serial date number.
87
- * @param lastInterest is the security's last coupon date, expressed as a serial date number.
88
- * @param rate is the interest rate.
89
- * @param pr is the security's price.
90
- * @param redemption is the amount to be received at maturity.
91
- * @param frequency is the number of coupon payments per year.
92
- * @param basis is the type of day count basis to use.
93
- *
94
- * @remarks
95
- * For the odd-last case Excel uses a closed-form yield formula (not Newton)
96
- * because the price formula is linear in yield. We follow the same approach.
97
- *
98
- * Formula from the Excel spec:
99
- * yield = (freq*(redemption−pr) + 100*rate*(fDCi−fAi))
100
- * / (fDSCi*pr + 100*rate*fAi*fDSCi/freq)
101
- */
102
- export declare function ODDLYIELD(settlement: number, // date
103
- maturity: number, // date
104
- lastInterest: number, // date
105
- rate: number, pr: number, redemption: number, frequency: number, basis?: number): number;
106
- //# sourceMappingURL=ODD.d.ts.map