@sheetxl/formulas-extended 0.7.23-beta.1

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 (157) hide show
  1. package/LICENSE.md +11 -0
  2. package/README.md +59 -0
  3. package/browser/cjs/B4JJfKSI4ppwU855.cjs +1 -0
  4. package/browser/cjs/BWDfauDHqB6U_2ka.cjs +1 -0
  5. package/browser/cjs/BwLx9ix5Sq7suAYP.cjs +1 -0
  6. package/browser/cjs/C2uDl8VIJqh58YF_.cjs +1 -0
  7. package/browser/cjs/CW-b31_-r-_raT8Y.cjs +1 -0
  8. package/browser/cjs/Clu7XiAsCB48GDXN.cjs +1 -0
  9. package/browser/cjs/CnZfa45XxA-9Jhmp.cjs +1 -0
  10. package/browser/cjs/DsFZgtSQpC75d1M0.cjs +1 -0
  11. package/browser/cjs/JfM6P_qoQQTWakZf.cjs +1 -0
  12. package/browser/cjs/bM25C5avKgBAJVfk.cjs +1 -0
  13. package/browser/cjs/fqTQ_p3ehzUvc1tF.cjs +1 -0
  14. package/browser/cjs/h3dw1jAp2J5Pu4p3.cjs +1 -0
  15. package/browser/cjs/index.cjs +1 -0
  16. package/browser/cjs/jev6VGWTdgEgm4Yk.cjs +1 -0
  17. package/browser/cjs/lEQC21-Sk4lwHy2r.cjs +1 -0
  18. package/browser/esm/-9SircqlVS-6jMNw.mjs +304 -0
  19. package/browser/esm/BCWg0NNa-nGjBMYM.mjs +19 -0
  20. package/browser/esm/BSWSZ6lA8jcSqHmz.mjs +19 -0
  21. package/browser/esm/BUYVOSf4JEFM5iRs.mjs +45 -0
  22. package/browser/esm/BWbYcyqeI2q9zobt.mjs +63 -0
  23. package/browser/esm/BatWJFRiqJI5wALH.mjs +52 -0
  24. package/browser/esm/CRT-M9ZISwPJluM8.mjs +71 -0
  25. package/browser/esm/Ck9zOHAyQJLQF_j_.mjs +83 -0
  26. package/browser/esm/CmXZZdy6rEOCrUnH.mjs +63 -0
  27. package/browser/esm/DAxAXOJZXvqvlnoT.mjs +28 -0
  28. package/browser/esm/DHrrLoyQ_KZ3yWWr.mjs +55 -0
  29. package/browser/esm/DboajdAr6s1IjcXM.mjs +45 -0
  30. package/browser/esm/Dtof6I8zPa8LIz89.mjs +35 -0
  31. package/browser/esm/XphbS4usCLMa2WZ2.mjs +20 -0
  32. package/browser/esm/index.mjs +2978 -0
  33. package/licenses/dependencies.txt +1 -0
  34. package/node/esm/-9SircqlVS-6jMNw.mjs +304 -0
  35. package/node/esm/BBREUOtt4cAHs88k.mjs +45 -0
  36. package/node/esm/BCWg0NNa-nGjBMYM.mjs +19 -0
  37. package/node/esm/BSWSZ6lA8jcSqHmz.mjs +19 -0
  38. package/node/esm/BUYVOSf4JEFM5iRs.mjs +45 -0
  39. package/node/esm/BWbYcyqeI2q9zobt.mjs +63 -0
  40. package/node/esm/BatWJFRiqJI5wALH.mjs +52 -0
  41. package/node/esm/CRT-M9ZISwPJluM8.mjs +71 -0
  42. package/node/esm/Ck9zOHAyQJLQF_j_.mjs +83 -0
  43. package/node/esm/CmXZZdy6rEOCrUnH.mjs +63 -0
  44. package/node/esm/DHrrLoyQ_KZ3yWWr.mjs +55 -0
  45. package/node/esm/Dp0K0CPOWr5We6lS.mjs +28 -0
  46. package/node/esm/Dtof6I8zPa8LIz89.mjs +35 -0
  47. package/node/esm/XphbS4usCLMa2WZ2.mjs +20 -0
  48. package/node/esm/index.mjs +3047 -0
  49. package/package.json +43 -0
  50. package/resources/contents.json +14 -0
  51. package/resources/locales/contents.json +9 -0
  52. package/resources/locales/de/functions.json +59 -0
  53. package/types/index.d.ts +4 -0
  54. package/types/src/.generated/decl/cube/Cube.decl.d.ts +4 -0
  55. package/types/src/.generated/decl/cube/Cube.decl.d.ts.map +1 -0
  56. package/types/src/.generated/decl/financial/ACCRINT.decl.d.ts +4 -0
  57. package/types/src/.generated/decl/financial/ACCRINT.decl.d.ts.map +1 -0
  58. package/types/src/.generated/decl/financial/AMORDEGRC.decl.d.ts +4 -0
  59. package/types/src/.generated/decl/financial/AMORDEGRC.decl.d.ts.map +1 -0
  60. package/types/src/.generated/decl/financial/Date.decl.d.ts +4 -0
  61. package/types/src/.generated/decl/financial/Date.decl.d.ts.map +1 -0
  62. package/types/src/.generated/decl/financial/Financial.decl.d.ts +4 -0
  63. package/types/src/.generated/decl/financial/Financial.decl.d.ts.map +1 -0
  64. package/types/src/.generated/decl/financial/Financial2.decl.d.ts +4 -0
  65. package/types/src/.generated/decl/financial/Financial2.decl.d.ts.map +1 -0
  66. package/types/src/.generated/decl/financial/Financial3.decl.d.ts +4 -0
  67. package/types/src/.generated/decl/financial/Financial3.decl.d.ts.map +1 -0
  68. package/types/src/.generated/decl/financial/Financial4.decl.d.ts +4 -0
  69. package/types/src/.generated/decl/financial/Financial4.decl.d.ts.map +1 -0
  70. package/types/src/.generated/decl/financial/ODD.decl.d.ts +4 -0
  71. package/types/src/.generated/decl/financial/ODD.decl.d.ts.map +1 -0
  72. package/types/src/.generated/decl/financial/VDB.decl.d.ts +4 -0
  73. package/types/src/.generated/decl/financial/VDB.decl.d.ts.map +1 -0
  74. package/types/src/.generated/decl/statistical/ETS.decl.d.ts +4 -0
  75. package/types/src/.generated/decl/statistical/ETS.decl.d.ts.map +1 -0
  76. package/types/src/.generated/decl/statistical/Regression.decl.d.ts +4 -0
  77. package/types/src/.generated/decl/statistical/Regression.decl.d.ts.map +1 -0
  78. package/types/src/.generated/decl/statistical/TTEST.decl.d.ts +4 -0
  79. package/types/src/.generated/decl/statistical/TTEST.decl.d.ts.map +1 -0
  80. package/types/src/.generated/decl/text/RegEx.decl.d.ts +4 -0
  81. package/types/src/.generated/decl/text/RegEx.decl.d.ts.map +1 -0
  82. package/types/src/.generated/desc/cube/Cube.desc.d.ts +4 -0
  83. package/types/src/.generated/desc/cube/Cube.desc.d.ts.map +1 -0
  84. package/types/src/.generated/desc/financial/ACCRINT.desc.d.ts +4 -0
  85. package/types/src/.generated/desc/financial/ACCRINT.desc.d.ts.map +1 -0
  86. package/types/src/.generated/desc/financial/AMORDEGRC.desc.d.ts +4 -0
  87. package/types/src/.generated/desc/financial/AMORDEGRC.desc.d.ts.map +1 -0
  88. package/types/src/.generated/desc/financial/Date.desc.d.ts +4 -0
  89. package/types/src/.generated/desc/financial/Date.desc.d.ts.map +1 -0
  90. package/types/src/.generated/desc/financial/Financial.desc.d.ts +4 -0
  91. package/types/src/.generated/desc/financial/Financial.desc.d.ts.map +1 -0
  92. package/types/src/.generated/desc/financial/Financial2.desc.d.ts +4 -0
  93. package/types/src/.generated/desc/financial/Financial2.desc.d.ts.map +1 -0
  94. package/types/src/.generated/desc/financial/Financial3.desc.d.ts +4 -0
  95. package/types/src/.generated/desc/financial/Financial3.desc.d.ts.map +1 -0
  96. package/types/src/.generated/desc/financial/Financial4.desc.d.ts +4 -0
  97. package/types/src/.generated/desc/financial/Financial4.desc.d.ts.map +1 -0
  98. package/types/src/.generated/desc/financial/ODD.desc.d.ts +4 -0
  99. package/types/src/.generated/desc/financial/ODD.desc.d.ts.map +1 -0
  100. package/types/src/.generated/desc/financial/VDB.desc.d.ts +4 -0
  101. package/types/src/.generated/desc/financial/VDB.desc.d.ts.map +1 -0
  102. package/types/src/.generated/desc/statistical/ETS.desc.d.ts +4 -0
  103. package/types/src/.generated/desc/statistical/ETS.desc.d.ts.map +1 -0
  104. package/types/src/.generated/desc/statistical/Regression.desc.d.ts +4 -0
  105. package/types/src/.generated/desc/statistical/Regression.desc.d.ts.map +1 -0
  106. package/types/src/.generated/desc/statistical/TTEST.desc.d.ts +4 -0
  107. package/types/src/.generated/desc/statistical/TTEST.desc.d.ts.map +1 -0
  108. package/types/src/.generated/desc/text/RegEx.desc.d.ts +4 -0
  109. package/types/src/.generated/desc/text/RegEx.desc.d.ts.map +1 -0
  110. package/types/src/.generated/index.d.ts +7 -0
  111. package/types/src/.generated/index.d.ts.map +1 -0
  112. package/types/src/_utils/AnyArgs.d.ts +38 -0
  113. package/types/src/_utils/AnyArgs.d.ts.map +1 -0
  114. package/types/src/_utils/Consts.d.ts +14 -0
  115. package/types/src/_utils/Consts.d.ts.map +1 -0
  116. package/types/src/_utils/Date.d.ts +33 -0
  117. package/types/src/_utils/Date.d.ts.map +1 -0
  118. package/types/src/_utils/FinanaceSolver.d.ts +19 -0
  119. package/types/src/_utils/FinanaceSolver.d.ts.map +1 -0
  120. package/types/src/_utils/FinanceCoupon.d.ts +141 -0
  121. package/types/src/_utils/FinanceCoupon.d.ts.map +1 -0
  122. package/types/src/_utils/FinanceDate.d.ts +26 -0
  123. package/types/src/_utils/FinanceDate.d.ts.map +1 -0
  124. package/types/src/_utils/FinanceDayCount.d.ts +80 -0
  125. package/types/src/_utils/FinanceDayCount.d.ts.map +1 -0
  126. package/types/src/_utils/FinanceUtils.d.ts +3 -0
  127. package/types/src/_utils/FinanceUtils.d.ts.map +1 -0
  128. package/types/src/_utils/LeastSquares.d.ts +131 -0
  129. package/types/src/_utils/LeastSquares.d.ts.map +1 -0
  130. package/types/src/cube/Cube.d.ts +64 -0
  131. package/types/src/cube/Cube.d.ts.map +1 -0
  132. package/types/src/financial/ACCRINT.d.ts +19 -0
  133. package/types/src/financial/ACCRINT.d.ts.map +1 -0
  134. package/types/src/financial/AMORDEGRC.d.ts +53 -0
  135. package/types/src/financial/AMORDEGRC.d.ts.map +1 -0
  136. package/types/src/financial/Date.d.ts +29 -0
  137. package/types/src/financial/Date.d.ts.map +1 -0
  138. package/types/src/financial/Financial.d.ts +287 -0
  139. package/types/src/financial/Financial.d.ts.map +1 -0
  140. package/types/src/financial/Financial2.d.ts +99 -0
  141. package/types/src/financial/Financial2.d.ts.map +1 -0
  142. package/types/src/financial/Financial3.d.ts +95 -0
  143. package/types/src/financial/Financial3.d.ts.map +1 -0
  144. package/types/src/financial/Financial4.d.ts +82 -0
  145. package/types/src/financial/Financial4.d.ts.map +1 -0
  146. package/types/src/financial/ODD.d.ts +106 -0
  147. package/types/src/financial/ODD.d.ts.map +1 -0
  148. package/types/src/financial/VDB.d.ts +27 -0
  149. package/types/src/financial/VDB.d.ts.map +1 -0
  150. package/types/src/statistical/ETS.d.ts +45 -0
  151. package/types/src/statistical/ETS.d.ts.map +1 -0
  152. package/types/src/statistical/Regression.d.ts +49 -0
  153. package/types/src/statistical/Regression.d.ts.map +1 -0
  154. package/types/src/statistical/TTEST.d.ts +27 -0
  155. package/types/src/statistical/TTEST.d.ts.map +1 -0
  156. package/types/src/text/RegEx.d.ts +34 -0
  157. package/types/src/text/RegEx.d.ts.map +1 -0
@@ -0,0 +1,106 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ODD.d.ts","sourceRoot":"","sources":["../../../../src/financial/ODD.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CACvB,UAAU,EAAE,MAAM,EAAE,OAAO;AAC3B,QAAQ,EAAE,MAAM,EAAE,OAAO;AACzB,KAAK,EAAE,MAAM,EAAE,OAAO;AACtB,WAAW,EAAE,MAAM,EAAE,OAAO;AAC5B,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,KAAK,GAAE,MAAU,GAChB,MAAM,CAuBR;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,SAAS,CACvB,UAAU,EAAE,MAAM,EAAE,OAAO;AAC3B,QAAQ,EAAE,MAAM,EAAE,OAAO;AACzB,KAAK,EAAE,MAAM,EAAE,OAAO;AACtB,WAAW,EAAE,MAAM,EAAE,OAAO;AAC5B,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,KAAK,GAAE,MAAU,GAChB,MAAM,CAuCR;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,SAAS,CACvB,UAAU,EAAE,MAAM,EAAE,OAAO;AAC3B,QAAQ,EAAE,MAAM,EAAE,OAAO;AACzB,YAAY,EAAE,MAAM,EAAE,OAAO;AAC7B,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,KAAK,GAAE,MAAU,GAChB,MAAM,CAqBR;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,SAAS,CACvB,UAAU,EAAE,MAAM,EAAE,OAAO;AAC3B,QAAQ,EAAE,MAAM,EAAE,OAAO;AACzB,YAAY,EAAE,MAAM,EAAG,OAAO;AAC9B,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,KAAK,GAAE,MAAU,GAChB,MAAM,CA4BR"}
@@ -0,0 +1,27 @@
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.
3
+ * @param cost is the initial cost of the asset.
4
+ * @param salvage is the salvage value at the end of the life of the asset.
5
+ * @param life is the number of periods over which the asset is being depreciated (sometimes called the useful life of the asset).
6
+ * @param startPeriod is the first period in the calculation.
7
+ * @param endPeriod is the last period in the calculation.
8
+ * @param factor is the rate at which the balance declines.
9
+ * @param noSwitch switch to straight-line depreciation when depreciation is greater than the declining balance = FALSE; do not switch = TRUE.
10
+ *
11
+ * @remarks
12
+ * including partial periods, using the double-declining balance method or
13
+ * some other method you specify.
14
+ *
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)
19
+ *
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
23
+ */
24
+ export declare function VDB(cost: number, salvage: number, life: number, startPeriod: number, // date
25
+ endPeriod: number, // date
26
+ factor?: number, noSwitch?: boolean): number;
27
+ //# sourceMappingURL=VDB.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VDB.d.ts","sourceRoot":"","sources":["../../../../src/financial/VDB.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,GAAG,CACjB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EAAE,OAAO;AAC5B,SAAS,EAAE,MAAM,EAAE,OAAO;AAC1B,MAAM,GAAE,MAAU,EAClB,QAAQ,GAAE,OAAe,GACxB,MAAM,CAiCR"}
@@ -0,0 +1,45 @@
1
+ import { IRange, Scalar } from '@sheetxl/primitives';
2
+ /**
3
+ * @name FORECAST.ETS
4
+ * @summary Returns the forecasted value for a specific future target date using exponential smoothing method.
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
+ * @param values is the array or range of numeric data you're predicting.
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
+ * @param seasonality [1] 0 = no seasonality; 1 = auto-detect; any integer > 1 = explicit seasonal period.
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).
11
+ */
12
+ export declare function FORECAST_ETS(targetDate: number, values: IRange, timeline: IRange, seasonality?: number, dataCompletion?: number, aggregation?: number): Scalar;
13
+ /**
14
+ * @name FORECAST.ETS.CONFINT
15
+ * @summary Returns a confidence interval for the forecasted value at the specified target date.
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
+ * @param values is the array or range of numeric data you're predicting.
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
+ * @param confidenceLevel [0.95] Confidence probability, must be strictly between 0 and 1.
20
+ * @param seasonality [1] 0 = no seasonality; 1 = auto-detect; any integer > 1 = explicit seasonal period.
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.
23
+ */
24
+ export declare function FORECAST_ETS_CONFINT(targetDate: number, values: IRange, timeline: IRange, confidenceLevel?: number, seasonality?: number, dataCompletion?: number, aggregation?: number): Scalar;
25
+ /**
26
+ * @name FORECAST.ETS.SEASONALITY
27
+ * @summary Returns the length of the repetitive pattern in the data for the specific time series.
28
+ * @param values is the array or range of numeric data you're predicting.
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
+ * @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.
32
+ */
33
+ export declare function FORECAST_ETS_SEASONALITY(values: IRange, timeline: IRange, dataCompletion?: number, aggregation?: number): Scalar;
34
+ /**
35
+ * @name FORECAST.ETS.STAT
36
+ * @summary Returns a requested statistic for the ETS forecast model.
37
+ * @param values is the array or range of numeric data you're predicting.
38
+ * @param timeline is the independent array or range of numeric data.
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
+ * @param seasonality [1] 0 = no seasonality; 1 = auto-detect; any integer > 1 = explicit seasonal period.
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.
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ETS.d.ts","sourceRoot":"","sources":["../../../../src/statistical/ETS.ts"],"names":[],"mappings":"AACA,OAAO,EAAgC,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAI7F;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,WAAW,GAAE,MAAU,EACvB,cAAc,GAAE,MAAU,EAC1B,WAAW,GAAE,MAAU,GACtB,MAAM,CA0BR;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,eAAe,GAAE,MAAa,EAC9B,WAAW,GAAE,MAAU,EACvB,cAAc,GAAE,MAAU,EAC1B,WAAW,GAAE,MAAU,GACtB,MAAM,CAyBR;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,cAAc,GAAE,MAAU,EAC1B,WAAW,GAAE,MAAU,GACtB,MAAM,CAWR;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,WAAW,GAAE,MAAU,EACvB,cAAc,GAAE,MAAU,EAC1B,WAAW,GAAE,MAAU,GACtB,MAAM,CA4BR"}
@@ -0,0 +1,49 @@
1
+ import { FormulaError, Scalar, IRange, Omittable } from '@sheetxl/primitives';
2
+ /**
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.
11
+ * @param knownYs is the set of y-values you already know in the relationship y = mx + b.
12
+ * @param knownXs is an optional set of x-values that you may already know in the relationship y = mx + b.
13
+ * @param constant is a logical value: the constant b is calculated normally if Const = TRUE; b is set equal to 0 if Const = FALSE.
14
+ * @param stats is a logical value: return additional regression statistics = TRUE; return m-coefficients and the constant b = FALSE.
15
+ *
16
+ * @remarks {@link https://support.microsoft.com/en-us/office/linest-function-84d7d0d9-6e50-4101-977a-fa7abf772b6d|Docs}
17
+ */
18
+ export declare function LINEST(knownYs: IRange, knownXs?: Omittable<IRange>, constant?: Omittable<boolean>, stats?: boolean): (number | FormulaError.Known)[][];
19
+ /**
20
+ * @summary Returns statistics that describe an exponential curve matching known data points.
21
+ * @param knownYs is the set of y-values you already know in the relationship y = b*m^x.
22
+ * @param knownXs is an optional set of x-values that you may already know in the relationship y = b*m^x.
23
+ * @param constant is a logical value: the constant b is calculated normally if Const = TRUE; b is set equal to 1 if Const = FALSE.
24
+ * @param stats is a logical value: return additional regression statistics = TRUE; return m-coefficients and the constant b = FALSE.
25
+ *
26
+ * @remarks {@link https://support.microsoft.com/en-us/office/logest-function-f27462d8-3657-4030-866b-a272c1d18b4b|Docs}
27
+ */
28
+ export declare function LOGEST(knownYs: IRange, knownXs?: Omittable<IRange>, constant?: Omittable<boolean>, stats?: boolean): (number | FormulaError.Known)[][];
29
+ /**
30
+ * @summary Returns values along a linear trend fitted to known data points.
31
+ * @param knownYs The known y-values in the relationship y = mx + b.
32
+ * @param knownXs Optional x-values. Defaults to {1,2,3,...,n}.
33
+ * @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.
35
+ *
36
+ * @remarks {@link https://support.microsoft.com/en-us/office/trend-function-e2f135f0-8827-4096-9873-9a7cf7b51ef1|Docs}
37
+ */
38
+ export declare function TREND(knownYs: IRange, knownXs?: Omittable<IRange>, newXs?: Omittable<IRange>, useConst?: Omittable<boolean>): Scalar[][];
39
+ /**
40
+ * @summary Returns numbers in an exponential growth trend matching known data points.
41
+ * @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
+ * @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
+ * @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.
45
+ *
46
+ * @remarks {@link https://support.microsoft.com/en-us/office/growth-function-541a91dc-3d5e-437d-b156-21324e68b80d|Docs}
47
+ */
48
+ export declare function GROWTH(knownYs: IRange, knownXs?: Omittable<IRange>, newXs?: Omittable<IRange>, useConst?: Omittable<boolean>): number[][];
49
+ //# sourceMappingURL=Regression.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Regression.d.ts","sourceRoot":"","sources":["../../../../src/statistical/Regression.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAMnF;;;;;;GAMG;AAEH;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CACpB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,EAC3B,QAAQ,GAAE,SAAS,CAAC,OAAO,CAAM,EACjC,KAAK,GAAE,OAAa,GACnB,CAAC,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,EAAE,EAAE,CASnC;AAED;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CACpB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,EAC3B,QAAQ,GAAE,SAAS,CAAC,OAAO,CAAM,EACjC,KAAK,GAAE,OAAa,GACnB,CAAC,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,EAAE,EAAE,CAQnC;AAED;;;;;;;;GAQG;AACH,wBAAgB,KAAK,CACnB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,EAC3B,KAAK,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,EACzB,QAAQ,GAAE,SAAS,CAAC,OAAO,CAAM,GAChC,MAAM,EAAE,EAAE,CAIZ;AAED;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CACpB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,EAC3B,KAAK,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,EACzB,QAAQ,GAAE,SAAS,CAAC,OAAO,CAAM,GAChC,MAAM,EAAE,EAAE,CAMZ"}
@@ -0,0 +1,27 @@
1
+ import { IRange } from '@sheetxl/primitives';
2
+ /**
3
+ * @summary Returns the probability associated with a Student's t-Test.
4
+ * @param array1 is the first data set.
5
+ * @param array2 is the second data set.
6
+ * @param tails specifies the number of distribution tails to return: one-tailed distribution = 1; two-tailed distribution = 2.
7
+ * @param type is the kind of t-test: paired = 1, two-sample equal variance (homoscedastic) = 2, two-sample unequal variance = 3.
8
+ * @category Compatibility
9
+ *
10
+ * @remarks
11
+ * {@link https://support.microsoft.com/en-us/office/t-test-function-d4e08ec3-c545-485f-962e-276f7cbed055|Docs}
12
+ */
13
+ export declare function TTEST(array1: IRange<number>, array2: IRange<number>, tails: number, type: number): number;
14
+ /**
15
+ * @name T.TEST
16
+ * @summary Returns the probability associated with a Student's t-Test.
17
+ * @param array1 is the first data set.
18
+ * @param array2 is the second data set.
19
+ * @param tails specifies the number of distribution tails to return: one-tailed distribution = 1; two-tailed distribution = 2.
20
+ * @param type is the kind of t-test: paired = 1, two-sample equal variance (homoscedastic) = 2, two-sample unequal variance = 3.
21
+ * @category Statistical
22
+ *
23
+ * @remarks
24
+ * {@link https://support.microsoft.com/en-us/office/t-test-function-d4e08ec3-c545-485f-962e-276f7cbed055|Docs}
25
+ */
26
+ export declare function T_TEST(array1: IRange<number>, array2: IRange<number>, tails: number, type: number): number;
27
+ //# sourceMappingURL=TTEST.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TTEST.d.ts","sourceRoot":"","sources":["../../../../src/statistical/TTEST.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAIhE;;;;;;;;;;GAUG;AACH,wBAAgB,KAAK,CACnB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EACtB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EACtB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GACX,MAAM,CAER;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CACpB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EACtB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EACtB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GACX,MAAM,CA0CR"}
@@ -0,0 +1,34 @@
1
+ import { IRange, Scalar } from '@sheetxl/primitives';
2
+ /**
3
+ * @summary Extracts substrings of 'text' based on the provided REGEX 'pattern'.
4
+ * @param text is the text string from which you want to extract characters.
5
+ * @param pattern The regular expression to be applied.
6
+ * @param returnMode Specify which matches to return.
7
+ * @param caseInsensitive Whether the match is case insensitive.
8
+ */
9
+ export declare function REGEXEXTRACT(text: string, pattern: string, returnMode?: number, caseInsensitive?: boolean): IRange;
10
+ /**
11
+ * @summary Tests whether a text string matches a regular expression.
12
+ * @param text is the text string to be tested against the regular expression.
13
+ * @param regularExpression The regular expression to test the text against.
14
+ * @param caseInsensitive Whether the match is case insensitive.
15
+ * @category Sheets
16
+ */
17
+ export declare function REGEXMATCH(text: string, regularExpression: string, caseInsensitive?: boolean): Scalar;
18
+ /**
19
+ * @summary Returns 'text', with 'replacement' in place of matches with 'pattern'.
20
+ * @param text is the text string from which you want to extract characters.
21
+ * @param pattern The regular expression to be applied.
22
+ * @param replacement The replacement string.
23
+ * @param occurrence The occurrence of the match to replace.
24
+ * @param caseInsensitive Whether the match is case insensitive.
25
+ */
26
+ export declare function REGEXREPLACE(text: string, pattern: string, replacement: string, occurrence?: number, caseInsensitive?: boolean): Scalar;
27
+ /**
28
+ * @summary Checks whether the input matches the pattern, and returns TRUE or FALSE.
29
+ * @param text is the text string to be checked.
30
+ * @param pattern is the regular expression to be applied.
31
+ * @param caseInsensitive Whether the match is case insensitive.
32
+ */
33
+ export declare function REGEXTEST(text: string, pattern: string, caseInsensitive?: boolean): Scalar;
34
+ //# sourceMappingURL=RegEx.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RegEx.d.ts","sourceRoot":"","sources":["../../../../src/text/RegEx.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,MAAM,EAAgC,KAAK,MAAM,EACvD,MAAM,qBAAqB,CAAC;AAE7B;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,UAAU,GAAE,MAAQ,EACpB,eAAe,GAAE,OAAa,GAC7B,MAAM,CAiCR;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,EACZ,iBAAiB,EAAE,MAAM,EACzB,eAAe,GAAE,OAAa,GAC7B,MAAM,CAMR;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,UAAU,GAAE,MAAQ,EACpB,eAAe,GAAE,OAAa,GAC7B,MAAM,CAqCR;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,eAAe,GAAE,OAAa,GAC7B,MAAM,CAIR"}