@sheetxl/formulas-extended 0.8.0-beta.7 → 1.0.0

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 (105) hide show
  1. package/LICENSE.md +8 -7
  2. package/browser/esm/{CeQ6SuIxUZqh3HPh.mjs → A_TsslEa7v06xjtB.mjs} +2 -2
  3. package/{node/esm/gEqtXRedjauLkFQy.mjs → browser/esm/BPrqhbN9VZIYH5IG.mjs} +2 -2
  4. package/browser/esm/{D1UaAPWtadA6WQym.mjs → BX7pY29hJOOcSicD.mjs} +2 -2
  5. package/{node/esm/B7bSKeOdJNkMI8vy.mjs → browser/esm/B_36M25P3ylEdEr6.mjs} +2 -2
  6. package/browser/esm/{HuN9hUBluqtdMtbi.mjs → BgUzQFjcZdMSId1y.mjs} +2 -2
  7. package/{node/esm/Cl9AHDWMHTV4ghtc.mjs → browser/esm/BlZf6nKQmGZNKGWp.mjs} +2 -2
  8. package/browser/esm/{SovXJICgjcrnP5oF.mjs → CB3MxWkCO8s1fDvl.mjs} +2 -2
  9. package/{node/esm/BABJmVzgGvW2jF-Q.mjs → browser/esm/CFEq5pyJzSfZaoNv.mjs} +2 -2
  10. package/browser/esm/{BDp-v1WpmNBJtReI.mjs → Cg4mj9E_lfI_22Z_.mjs} +2 -2
  11. package/{node/esm/BWZhoroEHIpb7BFa.mjs → browser/esm/Cjdgx08VY9pwovrP.mjs} +2 -2
  12. package/{node/esm/DSCDjsfYoGO5WjNr.mjs → browser/esm/D94bkwEKYwg5aljj.mjs} +2 -2
  13. package/browser/esm/{B-Sk_o2TU049q-x9.mjs → DM-Vn8I-pbGcVFyb.mjs} +2 -2
  14. package/browser/esm/{DPedjwsB7p3SlbRd.mjs → DMa57ep8SfoPew0E.mjs} +2 -2
  15. package/browser/esm/DQxba5bZ4GUDUbpv.mjs +23 -0
  16. package/browser/esm/{Der7j7u9cijmrJgd.mjs → DUHkfVtd_39bcscn.mjs} +2 -2
  17. package/{node/esm/BzHZQ9Br4rrG1l-Y.mjs → browser/esm/DUWw2JsfQame7osY.mjs} +2 -2
  18. package/browser/esm/DwQaS7NDRKur9Yqv.mjs +2420 -0
  19. package/browser/esm/{gvK7fcqCzP2drOzZ.mjs → L1F-cVvVuDRa5kZU.mjs} +2 -2
  20. package/{node/esm/BLHXyU_V9V7uBmpU.mjs → browser/esm/TR3__i4vpBI4hqi5.mjs} +2 -2
  21. package/browser/esm/{Dka2HRJInclyxesb.mjs → _6lBSpGAoGq4yAUk.mjs} +2 -2
  22. package/browser/esm/declarations.mjs +95 -0
  23. package/browser/esm/gCkKqa2flUEQZfwB.mjs +20 -0
  24. package/browser/esm/{BOoDABcBTUhzpmz9.mjs → ibC1iRcve0_oOLNg.mjs} +2 -2
  25. package/browser/esm/index.mjs +1727 -3684
  26. package/node/esm/{CeQ6SuIxUZqh3HPh.mjs → A_TsslEa7v06xjtB.mjs} +2 -2
  27. package/node/esm/{BlOeUuXHRVaAfUZT.mjs → B-_ofzbDoQPe79St.mjs} +2 -2
  28. package/{browser/esm/gEqtXRedjauLkFQy.mjs → node/esm/BPrqhbN9VZIYH5IG.mjs} +2 -2
  29. package/node/esm/{D1UaAPWtadA6WQym.mjs → BX7pY29hJOOcSicD.mjs} +2 -2
  30. package/{browser/esm/B7bSKeOdJNkMI8vy.mjs → node/esm/B_36M25P3ylEdEr6.mjs} +2 -2
  31. package/node/esm/{HuN9hUBluqtdMtbi.mjs → BgUzQFjcZdMSId1y.mjs} +2 -2
  32. package/{browser/esm/Cl9AHDWMHTV4ghtc.mjs → node/esm/BlZf6nKQmGZNKGWp.mjs} +2 -2
  33. package/node/esm/{1cIUeQwQM31CEQrN.mjs → C3K4PUymtn22TF3B.mjs} +2 -2
  34. package/node/esm/{SovXJICgjcrnP5oF.mjs → CB3MxWkCO8s1fDvl.mjs} +2 -2
  35. package/{browser/esm/BABJmVzgGvW2jF-Q.mjs → node/esm/CFEq5pyJzSfZaoNv.mjs} +2 -2
  36. package/node/esm/{BDp-v1WpmNBJtReI.mjs → Cg4mj9E_lfI_22Z_.mjs} +2 -2
  37. package/{browser/esm/BWZhoroEHIpb7BFa.mjs → node/esm/Cjdgx08VY9pwovrP.mjs} +2 -2
  38. package/{browser/esm/DSCDjsfYoGO5WjNr.mjs → node/esm/D94bkwEKYwg5aljj.mjs} +2 -2
  39. package/node/esm/{B-Sk_o2TU049q-x9.mjs → DM-Vn8I-pbGcVFyb.mjs} +2 -2
  40. package/node/esm/DQxba5bZ4GUDUbpv.mjs +23 -0
  41. package/{browser/esm/BzHZQ9Br4rrG1l-Y.mjs → node/esm/DUWw2JsfQame7osY.mjs} +2 -2
  42. package/node/esm/{gvK7fcqCzP2drOzZ.mjs → L1F-cVvVuDRa5kZU.mjs} +2 -2
  43. package/{browser/esm/BLHXyU_V9V7uBmpU.mjs → node/esm/TR3__i4vpBI4hqi5.mjs} +2 -2
  44. package/node/esm/{Dka2HRJInclyxesb.mjs → _6lBSpGAoGq4yAUk.mjs} +2 -2
  45. package/node/esm/declarations.mjs +95 -0
  46. package/node/esm/gCkKqa2flUEQZfwB.mjs +20 -0
  47. package/node/esm/{BOoDABcBTUhzpmz9.mjs → ibC1iRcve0_oOLNg.mjs} +2 -2
  48. package/node/esm/index.mjs +2036 -3980
  49. package/node/esm/qwfjBY_rcYIzxR0p.mjs +2420 -0
  50. package/package.json +12 -7
  51. package/types/declarations.d.ts +4 -0
  52. package/types/src/.generated/decl/{financial/STOCKHISTORY.decl.d.ts → lookupReference/GroupBy.decl.d.ts} +1 -1
  53. package/types/src/.generated/decl/lookupReference/PivotBy.decl.d.ts +4 -0
  54. package/types/src/.generated/declarations.d.ts +7 -0
  55. package/types/src/.generated/desc/{financial/STOCKHISTORY.desc.d.ts → lookupReference/GroupBy.desc.d.ts} +1 -1
  56. package/types/src/.generated/desc/lookupReference/PivotBy.desc.d.ts +4 -0
  57. package/types/src/_utils/AnyArgs.d.ts +0 -12
  58. package/types/src/_utils/FinanaceSolver.d.ts +0 -27
  59. package/types/src/_utils/FinanceAmor.d.ts +0 -9
  60. package/types/src/_utils/FinanceCashflow.d.ts +0 -17
  61. package/types/src/_utils/FinanceCoupon.d.ts +0 -63
  62. package/types/src/_utils/FinanceDate.d.ts +0 -7
  63. package/types/src/_utils/FinanceDayCount.d.ts +0 -74
  64. package/types/src/_utils/FinanceOdd.d.ts +0 -62
  65. package/types/src/_utils/FinanceSecurity.d.ts +0 -21
  66. package/types/src/_utils/FinanceUtils.d.ts +0 -32
  67. package/types/src/_utils/Pivot.d.ts +203 -0
  68. package/types/src/cube/Cube.d.ts +7 -7
  69. package/types/src/financial/ACCRINT.d.ts +0 -23
  70. package/types/src/financial/AMORDEGRC.d.ts +0 -22
  71. package/types/src/financial/Cashflow.d.ts +0 -49
  72. package/types/src/financial/Coupon.d.ts +0 -14
  73. package/types/src/financial/Date.d.ts +0 -29
  74. package/types/src/financial/Depreciation.d.ts +0 -9
  75. package/types/src/financial/Odd.d.ts +0 -18
  76. package/types/src/financial/Security.d.ts +0 -10
  77. package/types/src/financial/SecurityMaturity.d.ts +0 -40
  78. package/types/src/financial/TBill.d.ts +0 -17
  79. package/types/src/financial/VDB.d.ts +0 -17
  80. package/types/src/lookupReference/GroupBy.d.ts +14 -0
  81. package/types/src/lookupReference/PivotBy.d.ts +17 -0
  82. package/browser/cjs/B4ANcw0mAmhe2Aeb.cjs +0 -1
  83. package/browser/cjs/B6IXpae7f0J8Ocq6.cjs +0 -1
  84. package/browser/cjs/BWDfauDHqB6U_2ka.cjs +0 -1
  85. package/browser/cjs/Bncc0oXhFMdj_HuR.cjs +0 -1
  86. package/browser/cjs/C2uDl8VIJqh58YF_.cjs +0 -1
  87. package/browser/cjs/C4cZxb9nRtzTCA40.cjs +0 -1
  88. package/browser/cjs/CFxueP0tbpmvY1Ip.cjs +0 -1
  89. package/browser/cjs/CRcv32tHTbGSGtkh.cjs +0 -1
  90. package/browser/cjs/CW-b31_-r-_raT8Y.cjs +0 -1
  91. package/browser/cjs/CaJGoNwTL6pAJ6a4.cjs +0 -1
  92. package/browser/cjs/CfXcRa4RlFmqU0Op.cjs +0 -1
  93. package/browser/cjs/DRmo6uoGoqtiVff8.cjs +0 -1
  94. package/browser/cjs/DSXLVieENYN9qXYl.cjs +0 -1
  95. package/browser/cjs/DpFg69dDCPoOK2BY.cjs +0 -1
  96. package/browser/cjs/JfM6P_qoQQTWakZf.cjs +0 -1
  97. package/browser/cjs/PmwvZPFhqmL4DO58.cjs +0 -1
  98. package/browser/cjs/SATfdSwNygvlOSKC.cjs +0 -1
  99. package/browser/cjs/XRCcogT-Iqd3Wv6R.cjs +0 -1
  100. package/browser/cjs/bM25C5avKgBAJVfk.cjs +0 -1
  101. package/browser/cjs/iYn00uzmSLl2T0oN.cjs +0 -1
  102. package/browser/cjs/index.cjs +0 -1
  103. package/browser/esm/B5ZANoJsRDvqOd4a.mjs +0 -19
  104. package/node/esm/qw8NG1pIPcGjedVF.mjs +0 -19
  105. package/types/src/financial/STOCKHISTORY.d.ts +0 -17
@@ -4,11 +4,6 @@ import { AcceptError, Scalar, Omittable, NoLift } from '@sheetxl/primitives';
4
4
  * @param settlement is the Treasury bill's settlement date, expressed as a serial date number.
5
5
  * @param maturity is the Treasury bill's maturity date, expressed as a serial date number.
6
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
7
  */
13
8
  export declare function TBILLPRICE(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, discount: NoLift<Omittable<AcceptError<Scalar>>>): number;
14
9
  /**
@@ -16,11 +11,6 @@ export declare function TBILLPRICE(settlement: NoLift<Omittable<AcceptError<Scal
16
11
  * @param settlement is the Treasury bill's settlement date, expressed as a serial date number.
17
12
  * @param maturity is the Treasury bill's maturity date, expressed as a serial date number.
18
13
  * @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
14
  */
25
15
  export declare function TBILLYIELD(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, pr: NoLift<Omittable<AcceptError<Scalar>>>): number;
26
16
  /**
@@ -28,13 +18,6 @@ export declare function TBILLYIELD(settlement: NoLift<Omittable<AcceptError<Scal
28
18
  * @param settlement is the Treasury bill's settlement date, expressed as a serial date number.
29
19
  * @param maturity is the Treasury bill's maturity date, expressed as a serial date number.
30
20
  * @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
21
  */
39
22
  export declare function TBILLEQ(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, discount: NoLift<Omittable<AcceptError<Scalar>>>): number;
40
23
  //# sourceMappingURL=TBill.d.ts.map
@@ -7,23 +7,6 @@
7
7
  * @param endPeriod is the last period in the calculation.
8
8
  * @param factor is the rate at which the balance declines.
9
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
- * Measured against Excel 16.0 (fn-battery financial/VDB and `adhoc-vdb-clamp`, 2026-08-28).
13
- *
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.
16
- *
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.
27
10
  */
28
11
  export declare function VDB(cost: number, salvage: number, life: number, startPeriod: number, endPeriod: number, factor?: number, noSwitch?: boolean): number;
29
12
  //# 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 +0,0 @@
1
- exports.default={NPV:{s:`Returns the net present value of an investment based on a discount rate and a series of future payments (negative values) and income (positive values).`,p:{rate:{d:`is the rate of discount over the length of one period.`},value:{d:`are 1 to 254 payments and income, equally spaced in time and occurring at the end of each period.`}}},IRR:{s:`Returns the internal rate of return for a series of cash flows.`,p:{values:{d:`is an array or a reference to cells that contain numbers for which you want to calculate the internal rate of return.`},guess:{d:`is a number that you guess is close to the result of IRR.`}}},MIRR:{s:`Returns the modified internal rate of return for a series of periodic cash flows.`,p:{values:{d:`An array of cash flows; must contain at least one positive and one negative value.`},financeRate:{d:`The interest rate paid on negative cash flows (cost of capital).`},reinvestRate:{d:`The interest rate received on positive cash flows (reinvestment rate).`}}},XNPV:{s:`Returns the net present value for a schedule of cash flows.`,p:{rate:{d:`is the discount rate to apply to the cash flows.`},values:{d:`is a series of cash flows that correspond to a schedule of payments in dates.`},dates:{d:`is a schedule of payment dates that corresponds to the cash flow payments.`}}},XIRR:{s:`Returns the internal rate of return for a schedule of cash flows.`,p:{values:{d:`is a series of cash flows that correspond to a schedule of payments in dates.`},dates:{d:`is a schedule of payment dates that corresponds to the cash flow payments.`},guess:{d:`is a number that you guess is close to the result of XIRR.`}}}};
@@ -1 +0,0 @@
1
- exports.default={SLN:{s:`Returns the straight-line depreciation of an asset for one period.`,p:{cost:{d:`is the initial cost of the asset.`},salvage:{d:`is the salvage value at the end of the life of the asset.`},life:{d:`is the number of periods over which the asset is being depreciated (sometimes called the useful life of the asset).`}}},SYD:{s:`Returns the sum-of-years' digits depreciation of an asset for a specified period.`,p:{cost:{d:`is the initial cost of the asset.`},salvage:{d:`is the salvage value at the end of the life of the asset.`},life:{d:`is the number of periods over which the asset is being depreciated (sometimes called the useful life of the asset).`},per:{d:`is the period and must use the same units as Life.`}}},DB:{s:`Returns the depreciation of an asset for a specified period using the fixed-declining balance method.`,p:{cost:{d:`is the initial cost of the asset.`},salvage:{d:`is the salvage value at the end of the life of the asset.`},life:{d:`is the number of periods over which the asset is being depreciated (sometimes called the useful life of the asset).`},period:{d:`is the period for which you want to calculate the depreciation. Period must use the same units as Life.`},month:{d:`is the number of months in the first year.`}}},DDB:{s:`Returns the depreciation of an asset for a specified period using the double-declining balance method or some other method you specify.`,p:{cost:{d:`is the initial cost of the asset.`},salvage:{d:`is the salvage value at the end of the life of the asset.`},life:{d:`is the number of periods over which the asset is being depreciated (sometimes called the useful life of the asset).`},period:{d:`is the period for which you want to calculate the depreciation. Period must use the same units as Life.`},factor:{d:`is the rate at which the balance declines.`}}},AMORLINC:{s:`Returns the prorated linear depreciation of an asset for each accounting period.`,p:{cost:{d:`is the cost of the asset.`},datePurchased:{d:`is the date the asset is purchased.`},firstPeriod:{d:`is the date of the end of the first period.`},salvage:{d:`is the salvage value at the end of life of the asset.`},period:{d:`is the period.`},rate:{d:`is the rate of depreciation.`},basis:{d:`year basis : 0 for year of 360 days, 1 for actual, 3 for year of 365 days.`}}}};
@@ -1 +0,0 @@
1
- exports.default={VDB:{s:`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.`,p:{cost:{d:`is the initial cost of the asset.`},salvage:{d:`is the salvage value at the end of the life of the asset.`},life:{d:`is the number of periods over which the asset is being depreciated (sometimes called the useful life of the asset).`},startPeriod:{d:`is the first period in the calculation.`},endPeriod:{d:`is the last period in the calculation.`},factor:{d:`is the rate at which the balance declines.`},noSwitch:{d:`switch to straight-line depreciation when depreciation is greater than the declining balance = FALSE; do not switch = TRUE.`}}}};
@@ -1 +0,0 @@
1
- exports.default={"FORECAST.ETS":{s:`Returns the forecasted value for a specific future target date using exponential smoothing method.`,p:{targetDate:{d:`is the data point for which you want to predict a value. It should carry on the pattern of values in the timeline.`},values:{d:`is the array or range of numeric data you're predicting.`},timeline:{d:`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.`},seasonality:{d:`[1] 0 = no seasonality; 1 = auto-detect; any integer > 1 = explicit seasonal period.`},dataCompletion:{d:`[1] 1 = interpolate missing values; 0 = fill with zeros.`},aggregation:{d:`[1] Aggregation method for duplicate timestamps: 1=Average, 2=Count, 3=CountA, 4=Max, 5=Median, 6=Min, 7=Sum.`}}},"FORECAST.ETS.CONFINT":{s:`Returns a confidence interval for the forecasted value at the specified target date.`,p:{targetDate:{d:`is the data point for which you want to predict a value. It should carry on the pattern of values in the timeline.`},values:{d:`is the array or range of numeric data you're predicting.`},timeline:{d:`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.`},confidenceLevel:{d:`[0.95] Confidence probability, must be strictly between 0 and 1.`},seasonality:{d:`[1] 0 = no seasonality; 1 = auto-detect; any integer > 1 = explicit seasonal period.`},dataCompletion:{d:`[1] 1 = interpolate missing values; 0 = fill with zeros.`},aggregation:{d:`[1] Aggregation method for duplicate timestamps: 1=Average, 2=Count, 3=CountA, 4=Max, 5=Median, 6=Min, 7=Sum.`}}},"FORECAST.ETS.SEASONALITY":{s:`Returns the length of the repetitive pattern in the data for the specific time series.`,p:{values:{d:`is the array or range of numeric data you're predicting.`},timeline:{d:`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.`},dataCompletion:{d:`[1] 1 = interpolate missing values; 0 = fill with zeros.`},aggregation:{d:`[1] Aggregation method for duplicate timestamps: 1=Average, 2=Count, 3=CountA, 4=Max, 5=Median, 6=Min, 7=Sum.`}}},"FORECAST.ETS.STAT":{s:`Returns a requested statistic for the ETS forecast model.`,p:{values:{d:`is the array or range of numeric data you're predicting.`},timeline:{d:`is the independent array or range of numeric data.`},statisticType:{d:`1=Alpha, 2=Beta (trend smoothing), 3=Gamma (seasonal smoothing), 4=MASE, 5=SMAPE, 6=MAE, 7=RMSE, 8=Step size.`},seasonality:{d:`[1] 0 = no seasonality; 1 = auto-detect; any integer > 1 = explicit seasonal period.`},dataCompletion:{d:`[1] 1 = interpolate missing values; 0 = fill with zeros.`},aggregation:{d:`[1] Aggregation method for duplicate timestamps: 1=Average, 2=Count, 3=CountA, 4=Max, 5=Median, 6=Min, 7=Sum.`}}}};
@@ -1 +0,0 @@
1
- exports.default={PRICE:{s:`Returns the price per $100 face value of a security that pays periodic interest.`,p:{settlement:{d:`is the security's settlement date, expressed as a serial date number.`},maturity:{d:`is the security's maturity date, expressed as a serial date number.`},rate:{d:`is the interest rate.`},yld:{d:`is the security's annual yield.`},redemption:{d:`is the amount to be received at maturity.`},frequency:{d:`is the number of coupon payments per year.`},basis:{d:`is the type of day count basis to use.`}}},DURATION:{s:`Returns the annual duration of a security with periodic interest payments.`,p:{settlement:{d:`is the security's settlement date, expressed as a serial date number.`},maturity:{d:`is the security's maturity date, expressed as a serial date number.`},coupon:{d:`is the security's annual coupon rate.`},yld:{d:`is the security's annual yield.`},frequency:{d:`is the number of coupon payments per year.`},basis:{d:`is the type of day count basis to use.`}}},MDURATION:{s:`Returns the Macauley modified duration for a security with an assumed par value of $100.`,p:{settlement:{d:`is the security's settlement date, expressed as a serial date number.`},maturity:{d:`is the security's maturity date, expressed as a serial date number.`},coupon:{d:`is the security's annual coupon rate.`},yld:{d:`is the security's annual yield.`},frequency:{d:`is the number of coupon payments per year.`},basis:{d:`is the type of day count basis to use.`}}},YIELD:{s:`Returns the yield on a security that pays periodic interest.`,p:{settlement:{d:`is the security's settlement date, expressed as a serial date number.`},maturity:{d:`is the security's maturity date, expressed as a serial date number.`},rate:{d:`is the security's annual coupon rate.`},pr:{d:`is the security's price per $100 face value.`},redemption:{d:`is the security's redemption value per $100 face value.`},frequency:{d:`is the number of coupon payments per year.`},basis:{d:`is the type of day count basis to use.`}}}};
@@ -1 +0,0 @@
1
- exports.default={DISC:{s:`Returns the discount rate for a security.`,p:{settlement:{d:`is the security's settlement date, expressed as a serial date number.`},maturity:{d:`is the security's maturity date, expressed as a serial date number.`},pr:{d:`is the security's price per $100 face value.`},redemption:{d:`is the security's redemption value per $100 face value.`},basis:{d:`is the type of day count basis to use.`}}},PRICEDISC:{s:`Returns the price per $100 face value of a discounted security.`,p:{settlement:{d:`is the security's settlement date, expressed as a serial date number.`},maturity:{d:`is the security's maturity date, expressed as a serial date number.`},discount:{d:`is the security's discount rate.`},redemption:{d:`is the amount to be received at maturity.`},basis:{d:`is the type of day count basis to use.`}}},YIELDDISC:{s:`Returns the annual yield for a discounted security. For example, a treasury bill.`,p:{settlement:{d:`is the security's settlement date, expressed as a serial date number.`},maturity:{d:`is the security's maturity date, expressed as a serial date number.`},pr:{d:`is the security's price per $100 face value.`},redemption:{d:`is the security's redemption value per $100 face value.`},basis:{d:`is the type of day count basis to use.`}}},INTRATE:{s:`Returns the interest rate for a fully invested security.`,p:{settlement:{d:`is the security's settlement date, expressed as a serial date number.`},maturity:{d:`is the security's maturity date, expressed as a serial date number.`},investment:{d:`is the amount invested in the security.`},redemption:{d:`is the amount to be received at maturity.`},basis:{d:`is the type of day count basis to use.`}}},RECEIVED:{s:`Returns the amount received at maturity for a fully invested security.`,p:{settlement:{d:`is the security's settlement date, expressed as a serial date number.`},maturity:{d:`is the security's maturity date, expressed as a serial date number.`},investment:{d:`is the amount invested in the security.`},discount:{d:`is the security's discount rate.`},basis:{d:`is the type of day count basis to use.`}}},PRICEMAT:{s:`Returns the price per $100 face value of a security that pays interest at maturity.`,p:{settlement:{d:`is the security's settlement date, expressed as a serial date number.`},maturity:{d:`is the security's maturity date, expressed as a serial date number.`},issue:{d:`is the security's issue date, expressed as a serial date number.`},rate:{d:`is the interest rate.`},yld:{d:`is the security's annual yield.`},basis:{d:`is the type of day count basis to use.`}}},YIELDMAT:{s:`Returns the annual yield of a security that pays interest at maturity.`,p:{settlement:{d:`is the security's settlement date, expressed as a serial date number.`},maturity:{d:`is the security's maturity date, expressed as a serial date number.`},issue:{d:`is the security's issue date, expressed as a serial date number.`},rate:{d:`is the interest rate.`},pr:{d:`is the security's price per $100 face value.`},basis:{d:`is the type of day count basis to use.`}}}};
@@ -1 +0,0 @@
1
- exports.default={ACCRINT:{s:`Returns the accrued interest for a security that pays periodic interest.`,p:{issue:{d:`is the security's issue date, expressed as a serial date number.`},firstInterest:{d:`is the security's first interest date, expressed as a serial date number.`},settlement:{d:`is the security's settlement date, expressed as a serial date number.`},rate:{d:`is the security's annual coupon rate.`},par:{d:`is the security's par value.`},frequency:{d:`is the number of coupon payments per year.`},basis:{d:`is the type of day count basis to use.`},calcMethod:{d:`is a logical value: to accrued interest from issue date = TRUE; to calculate from last coupon payment date = FALSE.`}}},ACCRINTM:{s:`Returns the accrued interest for a security that pays interest at maturity.`,p:{issue:{d:`is the security's issue date, expressed as a serial date number.`},settlement:{d:`is the security's maturity date, expressed as a serial date number.`},rate:{d:`is the security's annual coupon rate.`},par:{d:`is the security's par value.`},basis:{d:`is the type of day count basis to use.`}}}};
@@ -1 +0,0 @@
1
- exports.default={FV:{s:`Returns the future value of an investment based on periodic, constant payments and a constant interest rate.`,p:{rate:{d:`is the interest rate.`},nper:{d:`is the total number of payment periods.`},pmt:{d:`is the payment made each period; it cannot change over the life of the investment.`},pv:{d:`is the present value of the investment.`},type:{d:`Indicates when payments are due: at the end of the period = 0, at the beginning of the period = 1.`}}},PV:{s:`Returns the present value of an investment: the total amount that a series of future payments is worth now.`,p:{rate:{d:`is the interest rate.`},nper:{d:`is the total number of payment periods in an investment.`},pmt:{d:`is the payment made each period and cannot change over the life of the investment.`},fv:{d:`is the future value, or a cash balance you want to attain after the last payment is made.`},type:{d:`is a logical value: payment at the beginning of the period = 1; payment at the end of the period = 0.`}}},PMT:{s:`Calculates the payment for a loan based on constant payments and a constant interest rate.`,p:{rate:{d:`is the interest rate.`},nper:{d:`is the total number of payment periods.`},pv:{d:`is the present value of the investment.`},fv:{d:`is the future value, or a cash balance you want to attain after the last payment is made.`},type:{d:`is a logical value: payment at the beginning of the period = 1; payment at the end of the period = 0.`}}},NPER:{s:`Returns the number of periods for an investment based on periodic, constant payments and a constant interest rate.`,p:{rate:{d:`is the interest rate per period. For example, use 6%/4 for quarterly payments at 6% APR.`},pmt:{d:`is the payment made each period; it cannot change over the life of the investment.`},pv:{d:`is the present value, or the lump-sum amount that a series of future payments is worth now.`},fv:{d:`is the future value, or a cash balance you want to attain after the last payment is made.`},type:{d:`is a logical value: payment at the beginning of the period = 1; payment at the end of the period = 0.`}}},RATE:{s:`Returns the interest rate per period of a loan or an investment. For example, use 6%/4 for quarterly payments at 6% APR.`,p:{nper:{d:`is the total number of payment periods.`},pmt:{d:`is the payment made each period and cannot change over the life of the loan or investment.`},pv:{d:`is the present value: the total amount that a series of future payments is worth now.`},fv:{d:`is the future value, or a cash balance you want to attain after the last payment is made.`},type:{d:`is a logical value: payment at the beginning of the period = 1; payment at the end of the period = 0.`},guess:{d:`is your guess for what the rate will be.`}}},IPMT:{s:`Returns the interest payment for a given period for an investment, based on periodic, constant payments and a constant interest rate.`,p:{rate:{d:`is the interest rate.`},per:{d:`is the period for which you want to find the interest and must be in the range 1 to Nper.`},nper:{d:`is the total number of payment periods.`},pv:{d:`is the present value of the investment.`},fv:{d:`is the future value, or a cash balance you want to attain after the last payment is made.`},type:{d:`is a logical value representing the timing of payment: at the end of the period = 0, at the beginning of the period = 1.`}}},PPMT:{s:`Returns the payment on the principal for a given investment based on periodic, constant payments and a constant payments and a constant interest rate.`,p:{rate:{d:`is the interest rate per period.`},per:{d:`is the period for which you want to find the principal payment and must be in the range 1 to Nper.`},nper:{d:`is the total number of payment periods in the investment.`},pv:{d:`is the present value of the investment.`},fv:{d:`is the future value, or a cash balance you want to attain after the last payment is made.`},type:{d:`is a logical value: payment at the beginning of the period = 1; payment at the end of the period = 0.`}}},CUMIPMT:{s:`Returns the cumulative interest paid between two periods.`,p:{rate:{d:`is the interest rate.`},nper:{d:`is the total number of payment periods.`},pv:{d:`is the present value of the investment.`},startPeriod:{d:`is the first period in the calculation.`},endPeriod:{d:`is the last period in the calculation.`},type:{d:`is the timing of the payment.`}}},CUMPRINC:{s:`Returns the cumulative principal paid on a loan between two periods.`,p:{rate:{d:`is the interest rate.`},nper:{d:`is the total number of payment periods.`},pv:{d:`is the present value of the investment.`},startPeriod:{d:`is the first period in the calculation.`},endPeriod:{d:`is the last period in the calculation.`},type:{d:`is the timing of the payment.`}}},ISPMT:{s:`Returns the interest paid during a specific period of an investment.`,p:{rate:{d:`is the interest rate.`},per:{d:`period for which you want to find the interest.`},nper:{d:`number of payment periods in an investment.`},pv:{d:`lump sum amount that a series of future payments is right now.`}}}},exports.enums={PaymentType:{s:`When payments are due in each period.`,m:{"At the end of the period":{d:`Payments are due at the end of each period.`},"At the beginning of the period":{d:`Payments are due at the beginning of each period.`}}}};
@@ -1 +0,0 @@
1
- exports.default={CUBEKPIMEMBER:{s:`Returns a key performance indicator (KPI) property and displays the KPI name in the cell.`,p:{connection:{d:`is the name of a connection to an OLAP cube.`},kpiName:{d:`is the KPI name.`},kpiProperty:{d:`is the KPI property.`},caption:{d:`is the caption to be displayed in the cell.`}},h:`Unimplemented Cube`},CUBEMEMBER:{s:`Returns a member or tuple from the cube.`,p:{connection:{d:`is the name of a connection to an OLAP cube.`},memberExpression:{d:`is the expression representing the name of a member or tuple in the OLAP cube.`},caption:{d:`is the caption to be displayed in the cell.`}},h:`Unimplemented Cube`},CUBEMEMBERPROPERTY:{s:`Returns the value of a member property from the cube.`,p:{connection:{d:`is the name of a connection to an OLAP cube.`},memberExpression:{d:`is the expression representing the name of a member in the OLAP cube.`},kpiProperty:{d:`is the property name.`}},h:`Unimplemented Cube`},CUBERANKEDMEMBER:{s:`Returns the nth, or ranked, member in a set.`,p:{connection:{d:`is the name of a connection to an OLAP cube.`},setExpression:{d:`is the set from which the element is to be retrieved.`},rank:{d:`is the rank of the element to be retrieved.`},caption:{d:`is the caption to be displayed in the cell.`}},h:`Unimplemented Cube`},CUBESET:{s:`Defines a calculated set of members or tuples by sending a set expression to the cube on the server, which creates the set, and then returns that set to Microsoft Excel.`,p:{connection:{d:`is the name of a connection to an OLAP cube.`},setExpression:{d:`is the expression for the set.`},caption:{d:`is the caption to be displayed in the cell.`},sortOrder:{d:`is the sort order.`},sortBy:{d:`is the sort by.`}},h:`Unimplemented Cube`},CUBESETCOUNT:{s:`Returns the number of items in a set.`,p:{set:{d:`is the set whose elements are to be counted.`}},h:`Unimplemented Cube`},CUBEVALUE:{s:`Returns an aggregated value from the cube.`,p:{connection:{d:`is the name of a connection to an OLAP cube.`},memberExpression:{d:`is a slicer that determines the portion of the OLAP cube for which the aggregation value is to be retrieved.`}},h:`Unimplemented Cube`}};
@@ -1 +0,0 @@
1
- exports.default={STOCKHISTORY:{s:`Returns an array of historical quote data for a symbol and date range you specify..`,p:{stock:{d:`Symbol of financial instrument to be considered or a Stock data type.`},startDate:{d:`First date to return data from.`},endDate:{d:`Last date to return data from.`},interval:{d:`A number indicating the granularity of the data; 0 - Daily, 1 - Weekly, 2 - Monthly.`},headers:{d:`A logical value to add column header data; 0 - No column header, 1 - Show column header, 2 - Show instrument identifier and column header.`},properties:{d:`A number indicating which column of data to return; 0 through 5.`}},h:`Unimplemented RichData`}};
@@ -1 +0,0 @@
1
- exports.default={EFFECT:{s:`Returns the effective annual interest rate.`,p:{nominalRate:{d:`is the nominal interest rate.`},npery:{d:`is the number of compounding periods per year.`}}},NOMINAL:{s:`Returns the annual nominal interest rate.`,p:{effectiveRate:{d:`is the effective interest rate.`},npery:{d:`is the number of compounding periods per year.`}}},DOLLARDE:{s:`Converts a dollar price, expressed as a fraction, into a dollar price, expressed as a decimal number.`,p:{fractionalDollar:{d:`is a number expressed as a fraction.`},fraction:{d:`is the integer to use in the denominator of the fraction.`}}},DOLLARFR:{s:`Converts a dollar price, expressed as a decimal number, into a dollar price, expressed as a fraction.`,p:{decimalDollar:{d:`is a decimal number.`},fraction:{d:`is the integer to use in the denominator of the fraction.`}}}};
@@ -1 +0,0 @@
1
- exports.default={LINEST:{s:`Returns statistics that describe a linear trend matching known data points, by fitting a straight line using the least squares method.`,p:{knownYs:{d:`is the set of y-values you already know in the relationship y = mx + b.`},knownXs:{d:`is an optional set of x-values that you may already know in the relationship y = mx + b.`},constant:{d:`is a logical value: the constant b is calculated normally if Const = TRUE; b is set equal to 0 if Const = FALSE.`},stats:{d:`is a logical value: return additional regression statistics = TRUE; return m-coefficients and the constant b = FALSE.`}}},LOGEST:{s:`Returns statistics that describe an exponential curve matching known data points.`,p:{knownYs:{d:`is the set of y-values you already know in the relationship y = b*m^x.`},knownXs:{d:`is an optional set of x-values that you may already know in the relationship y = b*m^x.`},constant:{d:`is a logical value: the constant b is calculated normally if Const = TRUE; b is set equal to 1 if Const = FALSE.`},stats:{d:`is a logical value: return additional regression statistics = TRUE; return m-coefficients and the constant b = FALSE.`}}},TREND:{s:`Returns values along a linear trend fitted to known data points.`,p:{knownYs:{d:`The known y-values in the relationship y = mx + b.`},knownXs:{d:`Optional x-values. Defaults to {1,2,3,...,n}.`},newXs:{d:`The x-values for which to predict y. Defaults to knownX.`},constant:{d:`If FALSE, forces the constant b to zero. Defaults to TRUE.`}}},GROWTH:{s:`Returns numbers in an exponential growth trend matching known data points.`,p:{knownYs:{d:`is the set of y-values you already know in the relationship y = b*m^x, an array or range of positive numbers.`},knownXs:{d:`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.`},newXs:{d:`are new x-values for which you want GROWTH to return corresponding y-values.`},constant:{d:`is a logical value: the constant b is calculated normally if Const = TRUE; b is set equal to 1 if Const = FALSE.`}}}};
@@ -1 +0,0 @@
1
- exports.default={ODDFPRICE:{s:`Returns the price per $100 face value of a security with an odd first period.`,p:{settlement:{d:`is the security's settlement date, expressed as a serial date number.`},maturity:{d:`is the security's maturity date, expressed as a serial date number.`},issue:{d:`is the security's issue date, expressed as a serial date number.`},firstCoupon:{d:`is the security's first coupon date, expressed as a serial date number.`},rate:{d:`is the security's interest rate.`},yld:{d:`is the security's annual yield.`},redemption:{d:`is the security's redemption value per $100 face value.`},frequency:{d:`is the number of coupon payments per year.`},basis:{d:`is the type of day count basis to use.`}}},ODDFYIELD:{s:`Returns the yield of a security with an odd first period.`,p:{settlement:{d:`is the security's settlement date, expressed as a serial date number.`},maturity:{d:`is the security's maturity date, expressed as a serial date number.`},issue:{d:`is the security's issue date, expressed as a serial date number.`},firstCoupon:{d:`is the security's first coupon date, expressed as a serial date number.`},rate:{d:`is the security's interest rate.`},pr:{d:`is the security's price.`},redemption:{d:`is the security's redemption value per $100 face value.`},frequency:{d:`is the number of coupon payments per year.`},basis:{d:`is the type of day count basis to use.`}}},ODDLPRICE:{s:`Returns the price per $100 face value of a security with an odd last period.`,p:{settlement:{d:`is the security's settlement date, expressed as a serial date number.`},maturity:{d:`is the security's maturity date, expressed as a serial date number.`},lastInterest:{d:`is the security's last coupon date, expressed as a serial date number.`},rate:{d:`is the interest rate.`},yld:{d:`is the security's annual yield.`},redemption:{d:`is the amount to be received at maturity.`},frequency:{d:`is the number of coupon payments per year.`},basis:{d:`is the type of day count basis to use.`}}},ODDLYIELD:{s:`Returns the yield of a security with an odd last period.`,p:{settlement:{d:`is the security's settlement date, expressed as a serial date number.`},maturity:{d:`is the security's maturity date, expressed as a serial date number.`},lastInterest:{d:`is the security's last coupon date, expressed as a serial date number.`},rate:{d:`is the interest rate.`},pr:{d:`is the security's price.`},redemption:{d:`is the amount to be received at maturity.`},frequency:{d:`is the number of coupon payments per year.`},basis:{d:`is the type of day count basis to use.`}}}};
@@ -1 +0,0 @@
1
- exports.default={AMORDEGRC:{s:`Returns the depreciation for each accounting period using a depreciation coefficient (French degressive / accelerated depreciation).`,p:{cost:{d:`is the cost of the asset.`},datePurchased:{d:`is the date the asset is purchased.`},firstPeriod:{d:`is the date of the end of the first period.`},salvage:{d:`is the salvage value at the end of life of the asset.`},period:{d:`is the period.`},rate:{d:`is the depreciation rate.`},basis:{d:`is the type of day count basis to use.`}}}};
@@ -1 +0,0 @@
1
- exports.default={DATEDIF:{s:`Returns the number of days between two dates.`,p:{startDate:{d:`is a serial date number that represents the start date.`},endDate:{d:`is a serial date number that represents the end date.`},unit:{d:`is a string that specifies the unit of time to use.`}},h:`Legacy`},YEARFRAC:{s:`Returns the year fraction representing the number of whole days between start_date and end_date.`,c:`Date & Time`,p:{startDate:{d:`is a serial date number that represents the start date.`},endDate:{d:`is a serial date number that represents the end date.`},basis:{d:`is the type of day count basis to use.`}}},DAYS360:{s:`Returns the number of days between two dates based on a 360-day year (twelve 30-day months).`,p:{startDate:{d:`startDate and endDate are the two dates between which you want to know the number of days.`},endDate:{d:`startDate and endDate are the two dates between which you want to know the number of days.`},method:{d:`is a logical value specifying the calculation method: U.S. (NASD) = FALSE; European = TRUE.`}}}};
@@ -1 +0,0 @@
1
- exports.default={COUPDAYBS:{s:`Returns the number of days from the beginning of the coupon period to the settlement date.`,p:{settlement:{d:`is the security's settlement date, expressed as a serial date number.`},maturity:{d:`is the security's maturity date, expressed as a serial date number.`},frequency:{d:`is the number of coupon payments per year.`},basis:{d:`is the type of day count basis to use.`}}},COUPDAYS:{s:`Returns the number of days in the coupon period containing the settlement date.`,p:{settlement:{d:`is the security's settlement date, expressed as a serial date number.`},maturity:{d:`is the security's maturity date, expressed as a serial date number.`},frequency:{d:`is the number of coupon payments per year.`},basis:{d:`is the type of day count basis to use.`}}},COUPDAYSNC:{s:`Returns the number of days from the settlement date to the next coupon date.`,p:{settlement:{d:`is the security's settlement date, expressed as a serial date number.`},maturity:{d:`is the security's maturity date, expressed as a serial date number.`},frequency:{d:`is the number of coupon payments per year.`},basis:{d:`is the type of day count basis to use.`}}},COUPNCD:{s:`Returns the next coupon date after the settlement date.`,p:{settlement:{d:`is the security's settlement date, expressed as a serial date number.`},maturity:{d:`is the security's maturity date, expressed as a serial date number.`},frequency:{d:`is the number of coupon payments per year.`},basis:{d:`is the type of day count basis to use.`}}},COUPPCD:{s:`Returns the previous coupon date before the settlement date.`,p:{settlement:{d:`is the security's settlement date, expressed as a serial date number.`},maturity:{d:`is the security's maturity date, expressed as a serial date number.`},frequency:{d:`is the number of coupon payments per year.`},basis:{d:`is the type of day count basis to use.`}}},COUPNUM:{s:`Returns the number of coupons payable between the settlement date and maturity date.`,p:{settlement:{d:`is the security's settlement date, expressed as a serial date number.`},maturity:{d:`is the security's maturity date, expressed as a serial date number.`},frequency:{d:`is the number of coupon payments per year.`},basis:{d:`is the type of day count basis to use.`}}}};
@@ -1 +0,0 @@
1
- exports.default={REGEXEXTRACT:{s:`Extracts substrings of 'text' based on the provided REGEX 'pattern'.`,p:{text:{d:`is the text string from which you want to extract characters.`},pattern:{d:`The regular expression to be applied.`},returnMode:{d:`Specify which matches to return.`},caseSensitivity:{d:`Whether the match is case sensitive (0) or insensitive (1).`}}},REGEXMATCH:{s:`Tests whether a text string matches a regular expression.`,c:`Sheets`,p:{text:{d:`is the text string to be tested against the regular expression.`},regularExpression:{d:`The regular expression to test the text against.`},caseInsensitive:{d:`Whether the match is case insensitive.`}}},REGEXREPLACE:{s:`Returns 'text', with 'replacement' in place of matches with 'pattern'.`,p:{text:{d:`is the text string from which you want to extract characters.`},pattern:{d:`The regular expression to be applied.`},replacement:{d:`The replacement string.`},occurrence:{d:`Which match to replace; 0 replaces them all and a negative counts from the end.`},caseSensitivity:{d:`Whether the match is case sensitive (0) or insensitive (1).`}}},REGEXTEST:{s:`Checks whether the input matches the pattern, and returns TRUE or FALSE.`,p:{text:{d:`is the text string to be checked.`},pattern:{d:`is the regular expression to be applied.`},caseSensitivity:{d:`Whether the match is case sensitive (0) or insensitive (1).`}}}};
@@ -1 +0,0 @@
1
- exports.default={FVSCHEDULE:{s:`Returns the future value of an initial principal after applying a series of compound interest rates.`,p:{principal:{d:`is the present value.`},schedule:{d:`is an array of interest rates to apply.`}}},RRI:{s:`Returns an equivalent interest rate for the growth of an investment.`,p:{nper:{d:`is the total number of payment periods.`},pv:{d:`is the present value of the investment.`},fv:{d:`is the future value of the investment.`}}},PDURATION:{s:`Returns the number of periods required by an investment to reach a specified value.`,p:{rate:{d:`is the interest rate.`},pv:{d:`is the present value of the investment.`},fv:{d:`is the desired future value of the investment.`}}}};
@@ -1 +0,0 @@
1
- exports.default={TTEST:{s:`Returns the probability associated with a Student's t-Test.`,c:`Compatibility`,p:{array1:{d:`is the first data set.`},array2:{d:`is the second data set.`},tails:{d:`specifies the number of distribution tails to return: one-tailed distribution = 1; two-tailed distribution = 2.`},type:{d:`is the kind of t-test: paired = 1, two-sample equal variance (homoscedastic) = 2, two-sample unequal variance = 3.`}}},"T.TEST":{s:`Returns the probability associated with a Student's t-Test.`,p:{array1:{d:`is the first data set.`},array2:{d:`is the second data set.`},tails:{d:`specifies the number of distribution tails to return: one-tailed distribution = 1; two-tailed distribution = 2.`},type:{d:`is the kind of t-test: paired = 1, two-sample equal variance (homoscedastic) = 2, two-sample unequal variance = 3.`}}}};
@@ -1 +0,0 @@
1
- exports.default={TBILLPRICE:{s:`Returns the price per $100 face value for a treasury bill.`,p:{settlement:{d:`is the Treasury bill's settlement date, expressed as a serial date number.`},maturity:{d:`is the Treasury bill's maturity date, expressed as a serial date number.`},discount:{d:`is the Treasury bill's discount rate.`}}},TBILLYIELD:{s:`Returns the yield for a treasury bill.`,p:{settlement:{d:`is the Treasury bill's settlement date, expressed as a serial date number.`},maturity:{d:`is the Treasury bill's maturity date, expressed as a serial date number.`},pr:{d:`is the Treasury Bill's price per $100 face value.`}}},TBILLEQ:{s:`Returns the bond-equivalent yield for a treasury bill.`,p:{settlement:{d:`is the Treasury bill's settlement date, expressed as a serial date number.`},maturity:{d:`is the Treasury bill's maturity date, expressed as a serial date number.`},discount:{d:`is the Treasury bill's discount rate.`}}}};
@@ -1 +0,0 @@
1
- var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};let n=require("@sheetxl/primitives");var r=t({CUBEKPIMEMBER:()=>i,CUBEMEMBER:()=>a,CUBEMEMBERPROPERTY:()=>o,CUBERANKEDMEMBER:()=>s,CUBESET:()=>c,CUBESETCOUNT:()=>l,CUBEVALUE:()=>u});function i(e,t,r,i){throw n.FormulaError.BuiltIn.NA}function a(e,t,r){throw n.FormulaError.BuiltIn.NA}function o(e,t,r){throw n.FormulaError.BuiltIn.NA}function s(e,t,r,i){throw n.FormulaError.BuiltIn.NA}function c(e,t,r,i,a){throw n.FormulaError.BuiltIn.NA}function l(e){throw n.FormulaError.BuiltIn.NA}function u(e,...t){throw n.FormulaError.BuiltIn.NA}function d(e){if(e===null)return 0;if(typeof e==`string`)try{return n.FormulaContext.parseAsNumber(e)}catch{return n.FormulaContext.parseAsSerialDate(e)}return n.FormulaContext.parseAsSerialDate(e)}function f(e){if(e===void 0)throw n.FormulaError.BuiltIn.NA;return d(e)}function p(e){return e===null?0:n.FormulaContext.parseAsNumber(e)}function m(e){if(e===void 0)throw n.FormulaError.BuiltIn.NA;return p(e)}var h=[31,29,31,30,31,30,31,31,30,31,30,31],g=[31,28,31,30,31,30,31,31,30,31,30,31];function _(e){return e%4==0&&e%100!=0||e%400==0}function v(e,t){return _(e)?h[t]:g[t]}var y=(e,t)=>v(e,t-1),b=e=>e.d===y(e.y,e.m);function x(e){let t=n.FormulaContext.getDateParts(e);return{y:t.year,m:t.month,d:t.day}}function S(e,t,n){let r=t<=2?e-1:e,i=Math.floor(r/400),a=r-400*i,o=Math.floor((153*(t+(t>2?-3:9))+2)/5)+n-1,s=146097*i+(365*a+Math.floor(a/4)-Math.floor(a/100)+o)-693900;return s>=60?s+1:s}function C(e,t){let n=e.m-1+t,r=e.y+Math.floor(n/12);return n=(n%12+12)%12+1,{y:r,m:n,d:Math.min(e.d,y(r,n))}}function w(e){return n.FormulaContext.getDateParts(Math.max(0,Math.floor(e)))}function T(e,t,n,r,i,a){return 360*(r-e)+30*(i-t)+(a-n)}function E(e,t,r){switch(r){case 0:return function(e,t){return{days:Math.abs(te(e,t)),yearDays:360}}(e,t);case 1:return function(e,t){if(e===t)return{days:0,yearDays:365};let r=w(e),i=w(t),a=r.year,o=i.year,s=Math.abs(t-e),c=Math.abs(o-a),l=c+1,u=o<a?o:a,d=o<a?a:o,f,p=n.FormulaContext.getSerialDate(u,1,1);if(u===1900&&(p+=1),c===0)f=n.FormulaContext.getSerialDate(u,12,31)-p+1;else if(c===1){let r=Math.min(e,t),i=Math.max(e,t),a=w(r),o=w(i),s=o.month-a.month;if(s>0||s===0&&o.day>a.day)f=(n.FormulaContext.getSerialDate(d+1,1,1)-p)/l;else{f=365;for(let e of[u,d])if(_(e)){let t=n.FormulaContext.getSerialDate(e,2,29);if(t>=r&&t<=i){f=366;break}}}}else f=(n.FormulaContext.getSerialDate(d+1,1,1)-p)/l;return{days:s,yearDays:f}}(e,t);case 2:return{days:Math.abs(t-e),yearDays:360};case 3:default:return{days:Math.abs(t-e),yearDays:365};case 4:return function(e,t){let n=w(e),r=w(t),i=n.day,a=r.day;return i===31&&(i=30),a===31&&(a=30),{days:Math.abs(T(n.year,n.month,i,r.year,r.month,a)),yearDays:360}}(e,t)}}function D(e){return e>=0&&Math.floor(e)<=2958465}function O(e,t,n){let r=Math.floor(e),i=Math.floor(t);if(r>i){let e=r;r=i,i=e}if(n===0)return te(r,i)/360;let{days:a,yearDays:o}=E(r,i,n);return a/o}function ee(e,t,n){let r=x(e),i=x(t).y-r.y,a=e;for(;i>0;--i){let e=C(r,12*i);if(a=S(e.y,e.m,e.d),a<=t)break}if(i<=0&&(i=0,a=e),n===0||n===4)return i+function(e,t,n){let r=w(e),i=w(t),a=r.day,o=i.day;return(r.month===2&&a===29||a===31)&&(a=30),o===31&&(n||a>=30)&&(o=30),T(r.year,r.month,a,i.year,i.month,o)}(a,t,n===4)/360;let o=t-a;return n===2?i+o/360:n===3?i+o/365:i+o/(_(x(t).y)?366:365)}function te(e,t){let n=w(e),r=w(t),i=n.year,a=n.month,o=n.day,s=r.year,c=r.month,l=r.day,u=!1;return a===2?o===(_(i)?29:28)&&(o=30,u=!0):o===31&&(o=30),u&&c===2&&l===(_(s)?29:28)&&(l=30),l!==31||u||(o<30?(c===12?(s+=1,c=1):c+=1,l=1):l=30),T(i,a,o,s,c,l)}function ne(e,t,n){let r=Math.floor(e),i=Math.floor(t),a,o;return n===0||n===4?(a=E(r,i,n).days,o=360):(a=re(i)-re(r),o=n!==3&&_(w(r).year)?366:365),{days:a===0?o:a,yearDays:o}}function re(e){let t=w(e);return t.month===2&&t.day===29&&_(t.year)?e-1:e}function k(e){let t=e===void 0?0:p(e),r=Math.trunc(t);if(t<0||r>4)throw n.FormulaError.BuiltIn.Num;return r}function ie(e,t){let r=Math.floor(e),i=Math.floor(t);if(!D(e)||!D(t)||r>=i)throw n.FormulaError.BuiltIn.Num;return{settlement:r,maturity:i}}function A(e,t,r,i,a){let o=k(a),s=f(e),c=f(t),l=m(r),u=m(i),d=ie(s,c);if(l<=0||u<=0)throw n.FormulaError.BuiltIn.Num;return{...d,x:l,y:u,basis:o}}function ae(e,t,r){let i=f(e),a=f(t),o=m(r),s=ie(i,a);if(s.maturity>function(e){let t=n.FormulaContext.getDateParts(e);if(t.year>=9999)throw n.FormulaError.BuiltIn.Num;if(t.day===0)return n.FormulaContext.getSerialDate(t.year+1,t.month,1)-1;let r=v(t.year+1,t.month-1);return t.day>r?n.FormulaContext.getSerialDate(t.year+1,t.month+1,1):n.FormulaContext.getSerialDate(t.year+1,t.month,t.day)}(s.settlement)||o<=0)throw n.FormulaError.BuiltIn.Num;return{...s,x:o,days:s.maturity-s.settlement}}function oe(e,t,r,i,a,o){let s=k(o),c=f(e),l=f(t),u=f(r),d=m(i),p=m(a);if(!D(c)||!D(l)||!D(u))throw n.FormulaError.BuiltIn.Num;let h=Math.floor(c),g=Math.floor(l),_=Math.floor(u);if(!(_<h&&h<g))throw n.FormulaError.BuiltIn.Num;let{days:v,yearDays:y}=E(_,h,s),b=E(_,g,s).days;return{rate:d,x:p,DIM:b,DSM:b-v,A:v,B:y}}function j(e,t,r,i,a,o=!1){let s=o?0:k(a),c=f(e);if(!D(c))throw n.FormulaError.BuiltIn.Num;let l=f(t);if(!D(l))throw n.FormulaError.BuiltIn.Num;let u=r.map(m),d=Math.trunc(m(i));if(d!==1&&d!==2&&d!==4)throw n.FormulaError.BuiltIn.Num;return o&&(s=k(a)),{...ie(c,l),numbers:u,frequency:d,basis:s}}var M=e=>Number.isFinite(e)?e:0,se=t({ACCRINT:()=>ce,ACCRINTM:()=>le});function ce(e,t,r,i,a,o,s=0,c=!0){let l=function(e){if(e===void 0)return!0;if(e===null)return!1;if(typeof e==`boolean`)return e;if(typeof e==`number`)return e!==0;throw n.FormulaError.isError(e)?e:n.FormulaError.BuiltIn.Value}(c),u=f(e);if(!D(u))throw n.FormulaError.BuiltIn.Num;let d=f(t);if(!D(d))throw n.FormulaError.BuiltIn.Num;let h=f(r);if(!D(h))throw n.FormulaError.BuiltIn.Num;let g=m(i),_=a===void 0?1e3:p(a),v=Math.trunc(m(o));if(v!==1&&v!==2&&v!==4)throw n.FormulaError.BuiltIn.Num;let y=k(s),S=Math.floor(u),C=Math.floor(h);if(S>=C||g<=0||_<=0)throw n.FormulaError.BuiltIn.Num;let w=function(e,t,n,r,i,a){let o=12/r,s=b(x(t)),c;if(n>t&&a){c=t;for(let e=t;e<n;)c=e,e=N(e,o,s)}else c=N(t,-o,s);let l=i===3?365/r:i===1?t-N(t,-o,s):360/r,u=me(Math.max(e,c),n,i)/l;for(let t=c;t>e;){let n=N(t,-o,s);e<=n?a&&(u+=1):u+=me(e,t,i)/he(n,t,r,i),t=n}return u}(S,Math.floor(d),C,v,y,l);return M(g/v*_*w)}function le(e,t,r,i,a=0){let o=f(e);if(!D(o))throw n.FormulaError.BuiltIn.Num;let s=f(t);if(!D(s))throw n.FormulaError.BuiltIn.Num;let c=m(r),l=i===void 0?1e3:p(i),u=k(a);if(Math.floor(o)>Math.floor(s)||c<=0||l<=0)throw n.FormulaError.BuiltIn.Num;let d=l*c*O(o,s,u);return Number.isFinite(d)?d:0}var ue=(e,t)=>360*(t.y-e.y)+30*(t.m-e.m)+(t.d-e.d),de=e=>e.m===2&&e.d===y(e.y,2);function fe(e,t,n){let r=x(e),i=x(t);return de(i)&&(n||de(r))&&(i.d=30),i.d===31&&(n||r.d>=30)&&(i.d=30),(r.d===31||de(r))&&(r.d=30),ue(r,i)}function pe(e,t){let n=x(e),r=x(t);return n.d===31&&(n.d=30),r.d===31&&(r.d=30),ue(n,r)}var me=(e,t,n)=>n===0?fe(e,t,!1):n===4?pe(e,t):t-e,he=(e,t,n,r)=>r===1?t-e:r===3?365/n:r===4?pe(e,t):fe(e,t,!0);function N(e,t,r){if(e<1)throw n.FormulaError.BuiltIn.Num;let i=C(x(e),t),a=S(i.y,i.m,r?y(i.y,i.m):i.d);if(a<1||a>2958465)throw n.FormulaError.BuiltIn.Num;return a}function ge(e,t,r,i,a,o,s){let c=m(e),l=Math.floor(m(t)),u=Math.floor(m(r)),d=m(i),f=m(a),h=m(o);if(c<=0||d<0||d>c||f<0||h<=0||!n.FormulaContext.isValidDate(l)||!n.FormulaContext.isValidDate(u)||l>u)return null;let g=Math.floor(p(s??0));return g<0||g===2||g>4?null:{cost:c,salvage:d,periodIndex:f>1?Math.floor(f):Math.ceil(f),rate:h,...ne(l,u,g)}}var P=e=>{let t=e.getLocaleProfile().currencySymbol;return`${t}#,##0.00_);[Red](${t}#,##0.00)`},F=(e,t)=>{if(e===0){if(t<0)throw n.FormulaError.BuiltIn.Div0;if(t===0)return NaN}if(!Number.isInteger(t)||Math.abs(t)>4294967294)return Math.exp(t*Math.log(e));let r=Math.abs(t),i=1,a=e;for(;r>0;)r%2==1&&(i*=a),a*=a,r=Math.floor(r/2);return t<0?1/i:i},_e=e=>e>=2147483648||e<=-2147483649||Number.isNaN(e)?-2147483648:Math.trunc(e),I=(e,t=0)=>{let n=10**t,r=Number(Math.abs(e).toPrecision(15));return Math.sign(e)*Math.round(r*n)/n},ve=t({AMORDEGRC:()=>be}),ye=1e6;function be(e,t,n,r,i,a,o=0){let s=ge(e,t,n,r,i,a,o);if(!s)return NaN;let{cost:c,salvage:l,periodIndex:u,rate:d,days:f,yearDays:p}=s,m=f/p,h=1/d;if(h<=2)return NaN;let g=d*(h<=4?1.5:h<=6?2:2.5),_=Math.ceil(h);if(c-l===0)return 0;let v=I(Math.min(c*g*m,c-l));if(u===0)return v;let y=c-v,b=Math.min(u,_-3),x=1;if(b>=1){if(b-1<=ye)for(;x<b;x++){if(y<l)return 0;y-=y*g}else y*=F(1-g,b-1),x=b;if(y<l)return 0;if(u===b)return I(y*g);y-=y*g,x++}for(;x<=u;x++){if(y<l)return 0;let e=_-x;if(e<1)return 0;let t=e<=2?y/e:y*g;if(x===u)return I(t);y-=t}return 0}var xe=t({CUMIPMT:()=>ke,CUMPRINC:()=>Ae,FV:()=>Se,IPMT:()=>De,ISPMT:()=>je,NPER:()=>Te,PMT:()=>we,PPMT:()=>Oe,PV:()=>Ce,RATE:()=>Ee});function Se(e,t,r,i=0,a=0){if(n.FormulaContext.formatResults(P(n.FormulaContext.getRuntime())),e===0)return-(i+r*t);let o=F(1+e,t);return-(i*o+(o-1)/e*(1+e*+!!a)*r)}function Ce(e,t,r,i=0,a=0){if(n.FormulaContext.formatResults(P(n.FormulaContext.getRuntime())),e===0)return-(i+r*t);let o=F(1+e,t);if(o===0)throw n.FormulaError.BuiltIn.Div0;return-(i+(o-1)/e*(1+e*+!!a)*r)/o}function we(e,t,r,i=0,a=0){if(n.FormulaContext.formatResults(P(n.FormulaContext.getRuntime())),t===0)return NaN;if(e===0)return(-r-i)/t;if(e<=-1)return NaN;let o=t*Math.log1p(e),s=(r/-Math.expm1(-o)+i/Math.expm1(o))*e;return-(a?s/(1+e):s)}function Te(e,t,r,i=0,a=0){if(e===0){if(t===0)throw n.FormulaError.BuiltIn.Div0;return(-r-i)/t}if(e<=-1)return NaN;let o=Math.log(1+e);if(o===0)throw n.FormulaError.BuiltIn.Div0;return a&&(t*=1+e),Math.log((t-i*e)/(r*e+t))/o}function Ee(e,t,r,i=0,a=0,o=.1){if(n.FormulaContext.formatResults(`0%`),o<=-1)throw n.FormulaError.BuiltIn.Value;let s=+!!a,c=n=>{if(n===0)return r+t*e+i;let a=F(1+n,e);return r*a+(a-1)/n*(1+n*s)*t+i},l=o,u=c(l),d=u>0?o-.001:o+.001,f=c(d);for(let e=0;e<200;e++){let e=d-f*(d-l)/(f-u);if(!Number.isFinite(e))return NaN;let t=c(e);if(!Number.isFinite(t))return NaN;if(Math.abs(e-d)<1e-7&&Math.abs(t)<1e-7)return e<=-1?NaN:e;l=d,u=f,d=e,f=t}return NaN}function De(e,t,r,i,a=0,o=0){if(n.FormulaContext.formatResults(P(n.FormulaContext.getRuntime())),t<1||t-1>=r)return NaN;if(t===1&&o||e===0)return 0;if(e<=-1)return NaN;let s=Math.log1p(e),c=t-1,l=-e*(i*-Math.expm1((c-r)*s)-a*(c*s<700?Math.exp(-r*s)*Math.expm1(c*s):Math.exp((c-r)*s)-Math.exp(-r*s)))/-Math.expm1(-r*s);return o?l/(1+e):l}function Oe(e,t,r,i,a=0,o=0){if(n.FormulaContext.formatResults(P(n.FormulaContext.getRuntime())),t<1||t-1>=r)return NaN;if(e===0)return-(i+a)/r;if(e<=-1)return NaN;let s=Math.log1p(e),c=-Math.expm1(-r*s);if(o&&t===1)return-e*(i+a*Math.exp(-r*s))/(c*(1+e));let l=o?t-2:t-1;return-(i+a)*(e*Math.exp((l-r)*s))/c}function ke(e,t,n,r,i,a){let o=Ne(...Me(e,t,n,r,i,a));if(!o)return NaN;let s=o.count*o.payment-o.principal;return Number.isFinite(s)?s:NaN}function Ae(e,t,n,r,i,a){let o=Ne(...Me(e,t,n,r,i,a));return o?o.principal:NaN}function je(e,t,r,i){if(r===0)throw n.FormulaError.BuiltIn.Div0;let a=i*(t-r)*e/r;return Number.isFinite(a)?a:NaN}var Me=(e,t,n,r,i,a)=>[m(e),m(t),m(n),m(r),m(i),m(a)],Ne=(e,t,n,r,i,a)=>{if(e<=0||t<=0||n<=0||r<1||r>i||i>t||a!==0&&a!==1)return null;let o=we(e,t,n,0,a);if(!Number.isFinite(o))return null;let s=Math.ceil(r),c=Math.floor(i),l=c-s+1;if(l<=0)return{payment:o,principal:0,count:0};let u=Math.log1p(e),d=-Math.expm1(-t*u),f=(e,r)=>{let i=-n*(Math.exp((e-t-1)*u)*Math.expm1((r-e+1)*u))/d;return Number.isFinite(i)?i:-n*(Math.exp((r-t)*u)-Math.exp((e-t-1)*u))/d};if(!a)return{payment:o,principal:f(s,c),count:l};let p=s<=1?o:0,m=Math.max(s,2);return m<=c&&(p+=f(m,c)/(1+e)),{payment:o,principal:p,count:l}},Pe=e=>{let t=n.FormulaContext.getArgs().getRawAt(e),r=t;return!0!==r?.isIRange||r.size===1&&!0===t.isIReferenceRange};function Fe(e,t,r,i=`xnpv`){let a=i===`xirr`,o=e.flatten({onError:`value`}),s=t.flatten({onError:`value`}),c=o.getRowCount();if(c!==s.getRowCount())throw n.FormulaError.BuiltIn.Num;let l=!Pe(r+1),u=Pe(r)||a,d=!l||a,f=+!a,p=[],m=[],h;for(let e=0;e<c;e++){let t=o.getValueAt(e,0)??null,r=s.getValueAt(e,0)??null;if(e===0){if(n.FormulaError.isError(r))throw r;if(!a&&(h=Ie(r,d,a,0),h<f||h>2958465))throw n.FormulaError.BuiltIn.Num;if(n.FormulaError.isError(t))throw t}else{if(n.FormulaError.isError(t))throw t;if(n.FormulaError.isError(r))throw r}if(a&&t===null)continue;if(a&&r===null&&l)throw n.FormulaError.BuiltIn.Num;let i=Ie(r,d,a,e),c=Le(t,u,a,e);if(i>2958465||i<f||!a&&i<h)throw n.FormulaError.BuiltIn.Num;h===void 0&&(h=i),p.push(c),m.push(i)}let g=h??0;return{values:p,days:m.map(e=>e-g)}}function Ie(e,t,r,i){let a=t?d(e):e;if(typeof a!=`number`||Number.isNaN(a))throw r||i===0?n.FormulaError.BuiltIn.Value:n.FormulaError.BuiltIn.Num;return Math.trunc(a)}function Le(e,t,r,i){let a=t?p(e):e;if(typeof a!=`number`||Number.isNaN(a))throw r||i===0?n.FormulaError.BuiltIn.Value:n.FormulaError.BuiltIn.Num;return a}var Re=t({IRR:()=>Be,MIRR:()=>Ve,NPV:()=>ze,XIRR:()=>Ue,XNPV:()=>He});function ze(e,t){n.FormulaContext.formatResults(P(n.FormulaContext.getRuntime()));let r=[];for(let e of t)for(let t of e.values())r.push(t);let i=r.length,a=1+e;if(a===0||!Number.isFinite(F(a,i-1)))throw n.FormulaError.BuiltIn.Div0;let o=0;for(let e=i-1;e>=0;e--)o+=r[e],o/=a;return o}function Be(e,t=.1){if(n.FormulaContext.formatResults(`0%`),n.FormulaContext.getArgs().getKindAt(0)===n.ValueKind.Error)throw e[0];if(t<=-1||1+t===t||e===void 0)throw n.FormulaError.BuiltIn.Value;let r=[];for(let t of e){if(n.FormulaError.isError(t))throw n.FormulaError.BuiltIn.Value;typeof t==`number`&&r.push(t)}let i=!1,a=!1;for(let e of r)e>0?i=!0:e<0&&(a=!0);if(!i||!a)return NaN;let o=e=>{if(e===0)throw n.FormulaError.BuiltIn.Div0;let t=1/e,i=0,a=1;for(let e=0;e<r.length;e++)i+=r[e]/a,a*=t;return i},s=1/(1+t),c=o(s),l=c>0?.001:-.001;s+l<=0&&(l=-l),s+l===s&&(l=Math.sign(l)*Math.abs(s)*.001);let u=s+l,d=o(u);for(let e=0;e<200;e++){if(d===c)return NaN;let e=u-d*(u-s)/(d-c);if(!Number.isFinite(e))return NaN;let t=e-u;if(s=u,c=d,u=e,d=o(e),Math.abs(t)<1e-7&&Math.abs(d)<1e-7){let t=1/e-1;return Number.isFinite(t)?t:NaN}}return NaN}function Ve(e,t,r){if(n.FormulaContext.formatResults(`0%`),e===void 0)throw n.FormulaError.BuiltIn.Value;let i=[];for(let t of e){if(n.FormulaError.isError(t))throw t;typeof t==`number`&&i.push(t)}let a=i.length;if(a<2||!Number.isFinite(F(1+r,a-1)))throw n.FormulaError.BuiltIn.Div0;if(!Number.isFinite(F(1+r,a))||!Number.isFinite(F(1+t,a)))return NaN;let o=0,s=0;for(let e=0;e<a;e++){let a=i[e];if(a>0){let t=(1+r)**+e;if(t===0)throw n.FormulaError.BuiltIn.Div0;o+=a/t}else if(a<0){let r=(1+t)**+e;if(r===0)throw n.FormulaError.BuiltIn.Div0;s+=a/r}}if(s===0)throw n.FormulaError.BuiltIn.Div0;let c=(-(o*(1+r)**(a-1))/s)**(1/(a-1))-1;return Number.isFinite(c)?c:NaN}function He(e,t,r){let i=m(e);if(t===void 0||r===void 0)throw n.FormulaError.BuiltIn.NA;if(i<=0)return NaN;let a=Fe(t,r,1),o=0;for(let e=0;e<a.values.length;e++){let t=F(1+i,a.days[e]/365);if(!Number.isFinite(t))return NaN;o+=a.values[e]/t}return Number.isFinite(o)?o:NaN}function Ue(e,t,r=.1){let i=p(r);if(e===void 0||t===void 0)throw n.FormulaError.BuiltIn.NA;let a=Fe(e,t,0,`xirr`),o=a.values,s=o.length;if(s===1)throw n.FormulaError.BuiltIn.NA;let c=!1,l=!1;for(let e of o)e>0?c=!0:e<0&&(l=!0);if(!c||!l)return NaN;let u=a.days.map(e=>e/365),d=e=>{let t=0;for(let n=0;n<s;n++)t+=o[n]/(1+e)**+u[n];return t},f=i<0?0:1/0,m=[-.999999999999,-.99999,-.999,-.99,-.9,-.75,-.5,-.25,-.1,-.01,-1e-4,0,1e-4,.01,.1,.25,.5,1,2,5,10,50,100,1e3,1e4,1e6,1e8,1e10,0xe8d4a51000,0x5af3107a4000,0x38d7ea4c68000,0x2386f26fc10000,0xde0b6b3a7640000,1e21,1e25,1e30,1e40,1e60,1e100,1e200,1e300].filter(e=>e<f);i>-1&&i<f&&!m.includes(i)&&m.push(i),m.sort((e,t)=>e-t);let h=NaN,g=NaN,_=1/0,v=m[0],y=d(v);if(y===0)return v;for(let e=1;e<m.length;e++){let t=m[e],n=d(t);if(n===0)return t;if(Number.isFinite(n)&&Number.isFinite(y)&&n>0!=y>0){let e=Math.min(Math.abs(v-i),Math.abs(t-i));e<_&&(_=e,h=v,g=t)}v=t,y=n}if(!Number.isFinite(h))return NaN;let b=d(h);for(let e=0;e<200;e++){let e=(h+g)/2;if(e===h||e===g)break;let t=d(e);if(t===0)return e;t>0==b>0?(h=e,b=t):g=e}let x=Math.abs(d(h))<=Math.abs(d(g))?h:g;return Number.isFinite(x)?x:NaN}var We=t({DOLLARDE:()=>qe,DOLLARFR:()=>Je,EFFECT:()=>Ge,NOMINAL:()=>Ke});function Ge(e,t){let n=m(e),r=Math.trunc(m(t));if(n<=0||r<1)return NaN;let i=F(1+n/r,r)-1;return Number.isFinite(i)?i:NaN}function Ke(e,t){let n=m(e),r=Math.trunc(m(t));if(n<=0||r<1)return NaN;let i=(F(n+1,1/r)-1)*r;return Number.isFinite(i)?i:NaN}function qe(e,t){let n=m(e),{denominator:r,scale:i}=Ye(m(t));if(Number.isNaN(r))return NaN;let a=n<0?-1:1,o=Math.abs(n),s=Math.trunc(o);return a*(s+(o-s)*i/r)}function Je(e,t){let n=m(e),{denominator:r,scale:i}=Ye(m(t));if(Number.isNaN(r))return NaN;let a=n<0?-1:1,o=Math.abs(n),s=Math.trunc(o);return a*(s+(o-s)*r/i)}var Ye=e=>{if(e<0)return{denominator:NaN,scale:1};let t=Math.trunc(e);if(t===0)throw n.FormulaError.BuiltIn.Div0;return{denominator:t,scale:10**Math.ceil(Math.log10(t))}},L=(e,t)=>v(e,t-1),Xe=e=>e.d===L(e.y,e.m);function R(e,t=!1){let n=Math.min(e.d,L(e.y,e.m)),r=e.m<=2?e.y-1:e.y,i=Math.floor(r/400),a=r-400*i,o=Math.floor((153*(e.m+(e.m>2?-3:9))+2)/5)+n-1,s=146097*i+(365*a+Math.floor(a/4)-Math.floor(a/100)+o)-693900;return!t&&s>=60?s+1:s}function Ze(e,t){let n=R(e)<1;return R(t,n)-R(e,n)}function Qe(e){let t=n.FormulaContext.getDateParts(e);return{y:t.year,m:t.month,d:t.day}}function $e(e,t,n,r){let i=e.m-1-t,a=e.y+Math.floor(i/12);i=(i%12+12)%12+1;let o=L(a,i);return{y:a,m:i,d:r?o:Math.min(n,o)}}function z(e,t,n,r=!1){let i=Xe(e),a=$e(e,t*n,e.d,i);return r&&!i&&(a.d=Math.min(e.d,a.m===2?29:L(a.y,a.m))),a}function B(e,t,n){let r=12/n,i=Qe(t),a=0,o=i;for(;(a===0?t:R(o))>e;)a++,o=z(i,a,r);return{maturity:i,pcd:o,ncd:z(i,a-1,r),count:a,step:r}}function et(e,t,n){return Math.max(0,R(B(e,t,n).pcd))}function tt(e,t,n){return R(B(e,t,n).ncd)}function V(e,t,n){let r=B(e,t,n);return R(r.pcd)<=0?NaN:r.count}function nt(e,t,n,r){return function(e,t,n){let{days:r}=E(e,t,n);return e<t?r:0}(et(e,t,n),e,r)}function rt(e,t,n,r){let i=B(e,t,n);if(r!==0&&r!==4)return R(i.ncd)-e;let a=Qe(e),o=z(i.maturity,i.count-1,i.step,!0),s=i.pcd.y===a.y&&i.pcd.m===a.m&&i.pcd.d===a.d,c=s?z(i.maturity,i.count,i.step,!0).d:a.d,l=o.d;return r===4?(c=Math.min(c,30),l=Math.min(l,30)):((c===31||s&&a.m===2&&c>=L(a.y,2))&&(c=30),(l===31||o.m===2&&l>=L(o.y,2))&&(l=30)),360*(o.y-a.y)+30*(o.m-a.m)+(l-c)}function it(e,t,n,r){if(r===3)return 365/n;if(r!==1)return 360/n;let i=12/n,a=Qe(t),o=[a],s=[a],c=Xe(a),l=a.d,u=e=>e[e.length-1];for(;R(u(o))>e||R(u(s))>e;){let e=$e(u(o),i,u(o).d,c);Xe(e)&&(c=!0),o.push(e);let t=$e(u(s),i,l,!1);l=t.d,s.push(t)}let d=s.findIndex(t=>R(t)<=e);if(R(s[d-1])!==R(o[d-1]))return Ze(s[d],s[d-1]);let f=o.findIndex(t=>R(t)<=e);return Ze(o[f],o[f-1])}function H(e,t,r,i){let a=f(e),o=f(t),s=Math.floor(a),c=Math.floor(o);if(!D(a)||!D(o)||s>=c)throw n.FormulaError.BuiltIn.Num;let l=Math.trunc(m(r));if(l!==1&&l!==2&&l!==4)throw n.FormulaError.BuiltIn.Num;let u=i===void 0?0:p(i),d=Math.trunc(u);if(u<0||d>4)throw n.FormulaError.BuiltIn.Num;return{settlement:s,maturity:c,frequency:l,basis:d}}function U(e,t,n,r){let i=V(e,t,n),a=nt(e,t,n,r),o=r===1?a+rt(e,t,n,r):it(e,t,n,r);return{N:i,A:a,E:o,DSC:o-a}}function at(e,t,n,r,i,a,o){let{N:s,A:c,E:l,DSC:u}=U(e,t,a,o);if(Number.isNaN(s))return NaN;let d=100*n/a,f=r/a;if(s===1)return(d+i)/(f*u/l+1)-d*c/l;let p=(1+f)**(s-1+u/l);if(!Number.isFinite(p))return NaN;let m=0;for(let e=1;e<=s;e++)m+=d/(1+f)**(e-1+u/l);return m+i/p-d*c/l}function ot(e,t,n,r,i,a){let{N:o,A:s,E:c,DSC:l}=U(e,t,i,a);if(Number.isNaN(o))return NaN;let u=l/c-1,d=1+r/i,f=100*n/i,p=0,m=0;for(let e=1;e<=o;e++){let t=e+u,n=f/d**t;p+=t*n,m+=n}let h=o+u,g=d**h;if(!Number.isFinite(g))return NaN;let _=100/g;return p+=h*_,m+=_,p/m/i}var st=t({COUPDAYBS:()=>ct,COUPDAYS:()=>lt,COUPDAYSNC:()=>ut,COUPNCD:()=>dt,COUPNUM:()=>pt,COUPPCD:()=>ft});function ct(e,t,n,r=0){let i=H(e,t,n,r);return nt(i.settlement,i.maturity,i.frequency,i.basis)}function lt(e,t,n,r=0){let i=H(e,t,n,r);return it(i.settlement,i.maturity,i.frequency,i.basis)}function ut(e,t,n,r=0){let i=H(e,t,n,r);return rt(i.settlement,i.maturity,i.frequency,i.basis)}function dt(e,t,n,r=0){let i=H(e,t,n,r);return tt(i.settlement,i.maturity,i.frequency)}function ft(e,t,n,r=0){let i=H(e,t,n,r);return et(i.settlement,i.maturity,i.frequency)}function pt(e,t,n,r=0){let i=H(e,t,n,r);return V(i.settlement,i.maturity,i.frequency)}var mt=t({DATEDIF:()=>ht,DAYS360:()=>_t,YEARFRAC:()=>gt});function ht(e,t,r){let i=Math.floor(e),a=Math.floor(t);if(!D(e)||!D(t)||i>a)return NaN;let o=n.FormulaContext.getDateParts(i),s=n.FormulaContext.getDateParts(a);r=r.toLowerCase();let c=s.year-o.year,l=s.month-o.month,u=s.day-o.day,d=l<0||l===0&&u<0,f=u<0?-1:0,p=a-n.FormulaContext.getSerialDate(s.year,s.month+f,o.day),m=(f+12*c+l)%12;switch(r){case`y`:return c-+!!d;case`m`:return 12*c+l+f;case`d`:return a-i;case`md`:return p;case`ym`:return m;case`yd`:return n.FormulaContext.getSerialDate(o.year,o.month+m,o.day)+p-i}return NaN}function gt(e,t,n=0){let r=n===void 0?0:p(n),i=Math.trunc(r);if(r<0||i>4)return NaN;let a=f(e);if(!D(a))return NaN;let o=f(t);return D(o)?O(a,o,i):NaN}function _t(e,t,n=!1){if(!D(e)||!D(t))return NaN;let r=Math.floor(e),i=Math.floor(t);return n?(i>=r?1:-1)*E(r,i,4).days:function(e,t){let n=w(e),r=w(t),i=n.year,a=n.month,o=n.day,s=r.year,c=r.month,l=r.day;return a===2?w(e+1).month===3&&(o=30):o===31&&(o=30),l===31&&(o<30?(c===12?(s+=1,c=1):c+=1,l=1):l=30),T(i,a,o,s,c,l)}(r,i)}var vt=t({AMORLINC:()=>Ct,DB:()=>xt,DDB:()=>St,SLN:()=>yt,SYD:()=>bt});function yt(e,t,r){if(n.FormulaContext.formatResults(P(n.FormulaContext.getRuntime())),r===0)throw n.FormulaError.BuiltIn.Div0;return(e-t)/r}function bt(e,t,r,i){if(n.FormulaContext.formatResults(P(n.FormulaContext.getRuntime())),t<0||r<=0||i<=0||i>r)return NaN;let a=r*(r+1)/2;if(!Number.isFinite(a))throw n.FormulaError.BuiltIn.Div0;return(e-t)*(r+1-i)/a}function xt(e,t,r,i,a=12){if(n.FormulaContext.formatResults(P(n.FormulaContext.getRuntime())),e<0||t<0||r<=0||i<=0)return NaN;let o=_e(a);if(o<1||o>12)return NaN;let s=_e(r),c=_e(i);if(c>s+ +(o<12))return NaN;if(e===0)return 0;let l=I(1-F(t/e,1/r),3);if(l===0)return 0;let u=e*l*(o/12),d=Math.max(c,1);if(d===1)return u;let f=e-u;for(let e=2;e<d;e++)f-=f*l;return d===s+1?f/12*l*(12-o):f*l}function St(e,t,r,i,a=2){if(n.FormulaContext.formatResults(P(n.FormulaContext.getRuntime())),e<0||t<0||r<=0||i<=0||i>r||a<=0)return NaN;let o=a/r,s=Math.max(i,1)-1,c=s===0?e:e*F(1-o,s),l=c*o;return Number.isFinite(l)?(c-l<t&&(l=c-t),Math.max(l,0)):NaN}function Ct(e,t,n,r,i,a,o=0){let s=ge(e,t,n,r,i,a,o);if(!s)return NaN;let{cost:c,salvage:l,periodIndex:u,rate:d,days:f,yearDays:p}=s,m=c*d;if(!Number.isFinite(m))return 0;let h=c-l,g=Math.min(c*(f/p*d),h);if(u===0)return g;let _=Math.floor((h-g)/m);return u<=_?m:u===_+1?(h-g)%m:0}var wt=t({FVSCHEDULE:()=>Tt,PDURATION:()=>Dt,RRI:()=>Et});function Tt(e,t){if(e===void 0||t===void 0)throw n.FormulaError.BuiltIn.NA;let r=m(e),i=n.FormulaContext.getArgs().getRawAt(1),a=i,o=!0===a?.isIRange,s=o&&a.size===1&&!0===a.isIReferenceRange;if(!o||s)r*=1+m(o?a.getValueAt(0,0)??null:i);else for(let e of t.values())if(e!=null){if(n.FormulaError.isError(e))throw e;if(typeof e!=`number`)throw n.FormulaError.BuiltIn.Value;r*=1+e}return Number.isFinite(r)?r:0}function Et(e,t,n){if(e<=0||n<0&&t>0||n>0&&t<0)return NaN;if(t===0)return n===0?0:NaN;let r=F(n/t,1/e)-1;return Number.isFinite(r)?r:NaN}function Dt(e,t,r){if(e<=0||t<=0||r<=0)return NaN;let i=Math.log(1+e);if(i===0)throw n.FormulaError.BuiltIn.Div0;return(Math.log(r)-Math.log(t))/i}function W(e,t,r,i){let a=e.map(e=>{let t=f(e);if(!D(t))throw n.FormulaError.BuiltIn.Num;return Math.floor(t)}),o=t.map(m),s=Math.trunc(m(r));if(s!==1&&s!==2&&s!==4)throw n.FormulaError.BuiltIn.Num;return{dates:a,numbers:o,frequency:s,basis:k(i)}}var G=e=>S(e.y,e.m,e.d);function Ot(e,t,n){let r=b(e),i=e.m-1+t*n,a=e.y+Math.floor(i/12);return i=(i%12+12)%12+1,S(a,i,r?y(a,i):Math.min(e.d,y(a,i)))}var kt=(e,t)=>360*(t.y-e.y)+30*(t.m-e.m)+(t.d-e.d);function At(e,t){return e!==0&&e!==4?(e,t)=>t-e:(n,r)=>{let i=x(n),a=x(r);return e===4?(i.d===31&&(i.d=30),a.d===31&&(a.d=30),kt(i,a)):(b(i)&&(i.d=30),t&&b(a)&&(a.d=30),kt(i,a))}}function jt(e,t,r,i,a){let o=12/i,s=x(r),c=At(a,!1),l=At(a,!0),u=x(t);for(;G(u)>r;)u=C(u,-o);if(G(u)<1)throw n.FormulaError.BuiltIn.Num;let d=1;for(;Ot(s,d,o)<t;)d++;if(Ot(s,d,o)>2958465)throw n.FormulaError.BuiltIn.Num;let f=0,p=0,m=0,h=r,g=s;for(let n=0;n<d;n++){g=C(g,o);let r=G(g),i=l(h,r);e>h&&(f+=Math.min(c(h,Math.min(r,e)),i)/i),e<r&&(m+=Math.min(c(Math.max(h,e),Math.min(r,t)),i)/i),p+=n+1===d?(i-l(t,r))/i:1,h=r}return{A:f,DC:p,DSC:m}}function Mt(e,t,r,i,a,o){if(et(i,t,a)!==i)throw n.FormulaError.BuiltIn.Num;let s=12/a,c=V(r,i,a);if(Number.isNaN(c))throw n.FormulaError.BuiltIn.Num;let l=[i],u=x(i);for(let e=0;e<c;e++)u=C(u,-s),l.push(G(u));if(l[l.length-1]<1)throw n.FormulaError.BuiltIn.Num;let d=(e,t)=>E(e,t,o).days,f=U(e,i,a,o);if(Number.isNaN(f.N))throw n.FormulaError.BuiltIn.Num;let p=f.E,m=d(r,i);if(m===p)throw n.FormulaError.BuiltIn.Num;if(m<p){let o=V(e,t,a)-1;if(Number.isNaN(o))throw n.FormulaError.BuiltIn.Num;return{N:o,A:d(r,e)/p,DC:m/p,u:d(e,i)/p}}let h=V(i,t,a),g=0,_=0;for(let t=0;t<c;t++){let n=l[c-t],i=l[c-t-1],s=o===1?i-n:o===3?365/a:360/a,u=Math.max(n,r);e>u&&i>u&&(g+=d(u,Math.min(i,e))/s),_+=t===0?i>r?d(r,i)/s:0:1}let v=x(e),w=S(v.y,v.m,y(v.y,v.m)),T=w<i&&tt(w-1,i,a)===w,D=b(x(i))&&e!==w&&!T?1:0;return{N:h,A:g,DC:_,u:f.N-1+D+(o===2||o===3?tt(e,i,a)-e:f.DSC)/p}}var K=e=>Number.isFinite(e)?e:0;function Nt(e,t,n){return(100*e+(100-t)/n)/((100+t)/2-(100-t)/(4*n))}function Pt(e,t,n){let r=e;for(let e=0;e<100;e++){let e=n(r);if(!Number.isFinite(e))return NaN;let i=r-t(r)/e;if(!Number.isFinite(i))return NaN;let a=Math.abs(i-r)<1e-5;if(r=i,a)break}return r}var Ft=t({ODDFPRICE:()=>Lt,ODDFYIELD:()=>Rt,ODDLPRICE:()=>zt,ODDLYIELD:()=>Bt});function It(e,t,r,i,a,o,s,c,l){let{N:u,A:d,DC:f,u:p}=Mt(e,t,r,i,c,l),m=o/c,h=100*a/c,g=F(1+m,u+p);if(!Number.isFinite(g))throw n.FormulaError.BuiltIn.Num;let _=0;for(let e=1;e<=u;e++)_+=h/F(1+m,e+p);let v=s/g+h*f/F(1+m,p)+_-h*d;if(!Number.isFinite(v))throw n.FormulaError.BuiltIn.Num;return v}function Lt(e,t,r,i,a,o,s,c,l=0){let u=W([e,t,r,i],[a,o,s],c,l),[d,f,p,m]=u.dates,[h,g,_]=u.numbers;if(!(p<d&&d<m&&m<f)||h<0||g<0||_<=0)throw n.FormulaError.BuiltIn.Num;return It(d,f,p,m,h,g,_,u.frequency,u.basis)}function Rt(e,t,r,i,a,o,s,c,l=0){let u=W([e,t,r,i],[a,o,s],c,l),[d,f,p,m]=u.dates,[h,g,_]=u.numbers;if(!(p<d&&d<m&&m<f)||h<0||g<=0||_<=0)throw n.FormulaError.BuiltIn.Num;Mt(d,f,p,m,u.frequency,u.basis);let v=Pt(Nt(h,g,ee(d,f,u.basis)),e=>{try{return It(d,f,p,m,h,e,_,u.frequency,u.basis)-g}catch{return NaN}},e=>function(e,t,n,r,i,a,o,s,c){let{N:l,DC:u,u:d}=Mt(e,t,n,r,s,c),f=1+a/s,p=100*i/s,m=-o*(l+d)/s/F(f,l+d+1);m+=-p*u*d/s/F(f,d+1);for(let e=1;e<=l;e++)m+=-p*(e+d)/s/F(f,e+d+1);return m}(d,f,p,m,h,e,_,u.frequency,u.basis));if(!Number.isFinite(v))throw n.FormulaError.BuiltIn.Num;return v}function zt(e,t,r,i,a,o,s,c=0){let l=W([e,t,r],[i,a,o],s,c),[u,d,f]=l.dates,[p,m,h]=l.numbers;if(!(f<u&&u<d)||p<0||m<0||h<=0)throw n.FormulaError.BuiltIn.Num;let{A:g,DC:_,DSC:v}=jt(u,d,f,l.frequency,l.basis),y=100*p/l.frequency;return(h+K(y*_))/(1+m/l.frequency*v)-K(y*g)}function Bt(e,t,r,i,a,o,s,c=0){let l=W([e,t,r],[i,a,o],s,c),[u,d,f]=l.dates,[p,m,h]=l.numbers;if(!(f<u&&u<d)||p<0||m<=0||h<=0)throw n.FormulaError.BuiltIn.Num;let{A:g,DC:_,DSC:v}=jt(u,d,f,l.frequency,l.basis),y=100*p/l.frequency,b=h+K(y*_),x=m+K(y*g);return(b-x)/x*(l.frequency/v)}var Vt=t({STOCKHISTORY:()=>Ht});function Ht(e,t,r,i=0,a=1,o=[0,1,2,3,4]){let s=r??t;if(!n.FormulaContext.isValidDate(t)||!n.FormulaContext.isValidDate(s))throw n.FormulaError.BuiltIn.Num}var Ut=t({DURATION:()=>Gt,MDURATION:()=>Kt,PRICE:()=>Wt,YIELD:()=>qt});function Wt(e,t,r,i,a,o,s=0){let c=j(e,t,[r,i,a],o,s),[l,u,d]=c.numbers;if(l<0||u<0||d<=0)throw n.FormulaError.BuiltIn.Num;return at(c.settlement,c.maturity,l,u,d,c.frequency,c.basis)}function Gt(e,t,r,i,a,o=0){let s=j(e,t,[r,i],a,o,!0),[c,l]=s.numbers;if(c<0||l<0)throw n.FormulaError.BuiltIn.Num;return ot(s.settlement,s.maturity,c,l,s.frequency,s.basis)}function Kt(e,t,r,i,a,o=0){let s=j(e,t,[r,i],a,o,!0),[c,l]=s.numbers;if(c<0||l<0)throw n.FormulaError.BuiltIn.Num;return ot(s.settlement,s.maturity,c,l,s.frequency,s.basis)/(1+l/s.frequency)}function qt(e,t,r,i,a,o,s=0){let c=j(e,t,[r,i,a],o,s),[l,u,d]=c.numbers;if(l<0||u<=0||d<=0)throw n.FormulaError.BuiltIn.Num;let{settlement:f,maturity:p,frequency:m,basis:h}=c,g=U(f,p,m,h);if(Number.isNaN(g.N))throw n.FormulaError.BuiltIn.Num;if(g.N>1){let e=Pt(Nt(l,u,ee(f,p,h)),e=>at(f,p,l,e,d,m,h)-u,e=>function(e,t,n,r,i,a,o){let{N:s,A:c,E:l,DSC:u}=U(e,t,a,o);if(Number.isNaN(s))return NaN;let d=100*n/a,f=1+r/a,p=-i*(s-1+u/l)/a/f**(s+u/l);for(let e=1;e<=s;e++)p+=-d*(e-1+u/l)/a/f**(e+u/l);return p}(f,p,l,e,d,m,h));if(Number.isNaN(e))throw n.FormulaError.BuiltIn.Num;return e}let _=g.A,v=E(f,p,h).days,y=h===1||h===2||h===3?_+v:g.E,b=u/100+_/y*(l/m);return M((d/100+l/m-b)/b*m*(y/v))}var Jt=t({DISC:()=>Yt,INTRATE:()=>Qt,PRICEDISC:()=>Xt,PRICEMAT:()=>en,RECEIVED:()=>$t,YIELDDISC:()=>Zt,YIELDMAT:()=>tn});function Yt(e,t,n,r,i=0){let a=A(e,t,n,r,i),o=(1-a.x/a.y)/O(a.settlement,a.maturity,a.basis);return Number.isFinite(o)?o:NaN}function Xt(e,t,n,r,i=0){let a=A(e,t,n,r,i),o=a.y-a.x*a.y*O(a.settlement,a.maturity,a.basis);return Number.isFinite(o)?o:NaN}function Zt(e,t,n,r,i=0){let a=A(e,t,n,r,i),o=(a.y-a.x)/a.x/O(a.settlement,a.maturity,a.basis);return Number.isFinite(o)?o:NaN}function Qt(e,t,n,r,i=0){let a=A(e,t,n,r,i),o=(a.y-a.x)/a.x/O(a.settlement,a.maturity,a.basis);return Number.isFinite(o)?o:NaN}function $t(e,t,r,i,a=0){let o=A(e,t,r,i,a),s=1-o.y*O(o.settlement,o.maturity,o.basis);if(!(s>0))throw n.FormulaError.BuiltIn.Num;return o.x/s}function en(e,t,r,i,a,o=0){let s=oe(e,t,r,i,a,o);if(s.rate<0||s.x<0)throw n.FormulaError.BuiltIn.Num;return(100+M(s.DIM/s.B*s.rate*100))/(1+s.DSM/s.B*s.x)-M(s.A/s.B*s.rate*100)}function tn(e,t,r,i,a,o=0){let s=oe(e,t,r,i,a,o);if(s.rate<0||s.x<=0)throw n.FormulaError.BuiltIn.Num;return((1+s.DIM/s.B*s.rate)/(s.x/100+s.A/s.B*s.rate)-1)/(s.DSM/s.B)}var nn=t({TBILLEQ:()=>on,TBILLPRICE:()=>rn,TBILLYIELD:()=>an});function rn(e,t,r){let i=ae(e,t,r),a=100*(1-M(i.x*i.days)/360);if(a<0)throw n.FormulaError.BuiltIn.Num;return a}function an(e,t,n){let r=ae(e,t,n);return(100-r.x)/r.x*360/r.days}function on(e,t,r){let i=ae(e,t,r),a=M(i.x*i.days);if(i.days<=182){let e=360-a;if(!(e>0))throw n.FormulaError.BuiltIn.Num;return M(365*i.x)/e}let o=1-a/360;if(!(o>0))throw n.FormulaError.BuiltIn.Num;let s=i.days/(i.days>365?366:365);return(-2*s+2*Math.sqrt(s*s-(2*s-1)*(1-1/o)))/(2*s-1)}var sn=t({VDB:()=>ln}),cn=1e7;function ln(e,t,r,i,a,o=2,s=!1){if(n.FormulaContext.formatResults(P(n.FormulaContext.getRuntime())),e<0||t<0||r<0||o<0||i<0||a>r||i>a)return NaN;if(r===0)throw n.FormulaError.BuiltIn.Div0;if(i===a)return 0;let c=o/r;if(s)return function(e,t,n,r,i,a){let o=Math.floor(r)+1,s=Math.ceil(i),c=0;for(let n=o;n<=s;n++){let l=q(n===1?e:e*F(1-a,n-1),a,t);if(Number.isNaN(l))return NaN;l=Math.max(l,0),n===o?l*=Math.min(i,o)-r:n===s&&(l*=i-(s-1)),c+=l}return c}(e,t,0,i,a,c);let l=function(e,t,n,r,i){let a=Math.floor(i),o=i-a,s=e,c=!1,l=0;if(o>0){let e=q(s,r,t);if(Number.isNaN(e))return NaN;let i;if(l=(s-t)/n,l>e&&l>0)i=l*o;else{let e=s*r*o;i=Math.max(s-e<t?s-t:e,0)}s-=i}if(a>cn)return s*F(1-r,a);for(let e=1;e<=a;e++){let i;if(c)i=l;else{if(i=q(s,r,t),Number.isNaN(i))return NaN;l=(s-t)/(n-(o+e-1)),l>i&&l>0&&(c=!0,i=l)}s-=i}return s}(e,t,r,c,i);return Number.isNaN(l)?NaN:function(e,t,n,r,i){let a=Math.ceil(i),o=0,s=!1,c=0;for(let l=1;l<=a;l++){let u;if(s)u=c;else{if(u=q(e,r,t),Number.isNaN(u))return NaN;c=(e-t)/(n-(l-1)),c>u&&c>0&&(s=!0,u=c)}o+=l===a?u*(i-(a-1)):u,e-=u}return o}(l,t,r-i,c,a-i)}var q=(e,t,n)=>{let r=e*t;return Number.isFinite(r)?e-r<n?e-n:r:NaN},un=t({FORECAST_ETS:()=>dn,FORECAST_ETS_CONFINT:()=>fn,FORECAST_ETS_SEASONALITY:()=>pn,FORECAST_ETS_STAT:()=>mn});function dn(e,t,r,i=1,a=1,o=1){let s=_n(t,r,a,o);if(n.FormulaError.isError(s))return s;let{values:c,stepSize:l,lastTime:u,firstTime:d}=s;if((e-d)/l<=-.999)return n.FormulaError.BuiltIn.Num;let f=(e-u)/l;if(f>2147483647)return n.FormulaError.BuiltIn.Num;let p=bn(c,i);if(n.FormulaError.isError(p))return p;let{alpha:m,beta:h,gamma:g,period:_,b0:v}=p,{L:y,T:b,S:x,finalIndex:S}=yn(c,m,h,g,_,v).finalState,C=y+f*b;return _>1&&(C+=x[((S+Math.round(f))%_+_)%_]),C}function fn(e,t,r,i=.95,a=1,o=1,s=1){if(i<0||i>=1)return n.FormulaError.BuiltIn.Num;let c=_n(t,r,o,s);if(n.FormulaError.isError(c))return c;let{values:l,stepSize:u,lastTime:d}=c;if(e<=d)return n.FormulaError.BuiltIn.Num;let f=Math.round((e-d)/u);if(f>2147483647)return n.FormulaError.BuiltIn.Num;let p=bn(l,a);if(n.FormulaError.isError(p))return p;let{alpha:m,beta:h,gamma:g,period:_,b0:v}=p,y=function(e,t,n,r,i,a){let o=e.length,s,c,l=Array(Math.max(1,i)).fill(0);if(i>1&&o>=2*i){let t=0,n=0;for(let n=0;n<i;n++)t+=e[n];for(let t=i;t<2*i;t++)n+=e[t];s=t/i,c=(n-t)/(i*i);let r=t/i;for(let t=0;t<i;t++)l[t]=e[t]-r}else s=e[0],c=a===void 0?i>1&&i<o?(e[i]-e[0])/i:0:a;let u=0;for(let a=0;a<o;a++){let o=i>1?a%i:0,d=i>1?l[o]:0,f=s+c+d,p=e[a]-f;u+=p*p;let m=t*(e[a]-d)+(1-t)*(s+c),h=n*(m-s)+(1-n)*c;i>1&&(l[o]=r*(e[a]-m)+(1-r)*d),s=m,c=h}return Math.sqrt(u/o)}(l,m,h,g,_,v),b=function(e,t,n,r){let i=Math.abs(r);if(i===0)return 0;let a=0,o=1;for(let r=1;r<=i;r++)a+=o*o,o=o+e+(n>1&&r%n===0?t:0);return a}(m,g,_,f);return function(e){let t=(1+e)/2,r=n.FormulaContext.getFunction(`NORM.S.INV`);if(r)return r.execute(t);let i=Math.sqrt(-2*Math.log(1-t));return i-(2.515517+.802853*i+.010328*i*i)/(1+1.432788*i+.189269*i*i+.001308*i*i*i)}(i)*y*Math.sqrt(b)}function pn(e,t,r=1,i=1){let a=_n(e,t,r,i);if(n.FormulaError.isError(a))return a;let{values:o}=a;return o.length<4?0:vn(o)}function mn(e,t,r,i=1,a=1,o=1){let s=J(r);if(s===null||s<1||s>8)return n.FormulaError.BuiltIn.Num;let c=_n(e,t,a,o);if(n.FormulaError.isError(c))return c;let{values:l,stepSize:u}=c;if(s===8)return u;let d=bn(l,i);if(n.FormulaError.isError(d))return d;let{alpha:f,beta:p,gamma:m,period:h,b0:g}=d;switch(s){case 1:return f;case 2:return p*f;case 3:return m;default:{let e=function(e,t,n,r,i,a){let o=e.length,s,c,l=Array(Math.max(1,i)).fill(0);if(i>1&&o>=2*i){let t=0,n=0;for(let n=0;n<i;n++)t+=e[n];for(let t=i;t<2*i;t++)n+=e[t];s=t/i,c=(n-t)/(i*i);let r=t/i;for(let t=0;t<i;t++)l[t]=e[t]-r}else s=e[0],c=a===void 0?i>1&&i<o?(e[i]-e[0])/i:0:a;let u=0,d=0,f=0,p=0;for(let t=1;t<o;t++)p+=Math.abs(e[t]-e[t-1]);let m=p/(o-1);for(let a=0;a<o;a++){let o=e[a],p=i>1?a%i:0,m=i>1?l[p]:0,h=s+c+m,g=o-h;u+=Math.abs(g),d+=g*g,f+=Math.abs(g)/((Math.abs(o)+Math.abs(h))/2||1);let _=t*(o-m)+(1-t)*(s+c),v=n*(_-s)+(1-n)*c;i>1&&(l[p]=r*(o-_)+(1-r)*m),s=_,c=v}return{mae:u/o,rmse:Math.sqrt(d/o),smape:f/o,mase:m===0?0:u/o/m}}(l,f,p,m,h,g);if(s===4)return e.mase;if(s===5)return e.smape;if(s===6)return e.mae;if(s===7)return e.rmse}}return n.FormulaError.BuiltIn.Num}function hn(e,t){let n=e.map(e=>e.value);switch(t){case 1:return n.reduce((e,t)=>e+t,0)/n.length;case 2:case 3:return n.length;case 4:return Math.max(...n);case 5:{n.sort((e,t)=>e-t);let e=Math.floor(n.length/2);return n.length%2==0?(n[e-1]+n[e])/2:n[e]}case 6:return Math.min(...n);default:return n.reduce((e,t)=>e+t,0)}}function J(e){return Number.isInteger(e)?e:null}var gn=8784;function _n(e,t,r,i){let a=J(r);if(a!==0&&a!==1)return n.FormulaError.BuiltIn.Num;let o=J(i);if(o===null||o<1||o>7)return n.FormulaError.BuiltIn.Num;let s=e.flatten(),c=t.flatten();if(s.getRowCount()!==c.getRowCount())return n.FormulaError.BuiltIn.NA;if(e.hasError())return e.firstError();if(t.hasError())return t.firstError();if(s.getRowCount()<2)return n.FormulaError.BuiltIn.Div0;let l=[];for(let[[e,t]]of s.alignValues([c]))typeof e==`number`&&typeof t==`number`&&l.push({time:t,value:e});if(l.sort((e,t)=>e.time-t.time),l.length<2)return n.FormulaError.BuiltIn.Div0;let u=[],d=[l[0]];for(let e=1;e<l.length;e++){let t=l[e];t.time===l[e-1].time?d.push(t):(u.push({time:d[0].time,value:hn(d,o)}),d=[t])}if(u.push({time:d[0].time,value:hn(d,o)}),u.length<2)return n.FormulaError.BuiltIn.Div0;let f=[];for(let e=1;e<u.length;e++)f.push(u[e].time-u[e-1].time);f.sort((e,t)=>e-t);let p=Math.floor(f.length/2),m=f.length%2==0?(f[p-1]+f[p])/2:f[p];if(m<=0)return n.FormulaError.BuiltIn.Num;let h=[u[0].value];for(let e=1;e<u.length;e++){let t=u[e-1].time,r=u[e].time,i=t+m;if(r>i){let n=Math.round((r-t)/m)-1;for(let t=1;t<=n;t++)if(a===0)h.push(0);else{let r=u[e-1].value,i=u[e].value;h.push(r+t/(n+1)*(i-r))}}else if(Math.abs(r-i)>.01*m)return n.FormulaError.BuiltIn.Num;h.push(u[e].value)}return{values:h,stepSize:m,lastTime:u[u.length-1].time,firstTime:u[0].time}}function vn(e){let t=e.length;if(t<4)return 0;let n=e.reduce((e,t)=>e+t,0)/t,r=0;for(let i=0;i<t;i++)r+=(e[i]-n)**2;if(r===0)return 0;let i=-1/0,a=0,o=Math.min(Math.floor(t/2),24);for(let s=2;s<=o;s++){let o=0;for(let r=0;r<t-s;r++)o+=(e[r]-n)*(e[r+s]-n);let c=o/r;c>i&&c>.3&&(i=c,a=s)}return a}function yn(e,t,n,r,i,a){let o=e.length,s,c;if(i>1&&o>=2*i){let t=0,n=0;for(let n=0;n<i;n++)t+=e[n];for(let t=i;t<2*i;t++)n+=e[t];s=t/i,c=(n-t)/(i*i)}else s=e[0],c=a===void 0?i>1&&i<o?(e[i]-e[0])/i:0:a;let l=Array(Math.max(1,i)).fill(0);if(i>1&&o>=i){let t=l.length>0?(()=>{let t=0;for(let n=0;n<i;n++)t+=e[n];return t/i})():s;for(let n=0;n<i;n++)l[n]=e[n]-t}let u=0,d=0;for(let a=0;a<o;a++){let o=e[a],f=i>1?a%i:0,p=i>1?l[f]:0,m=o-(s+c+p);u+=m*m;let h=t*(o-p)+(1-t)*(s+c),g=n*(h-s)+(1-n)*c;i>1&&(l[f]=r*(o-h)+(1-r)*p),s=h,c=g,d=f}return{mse:u/o,finalState:{L:s,T:c,S:l,finalIndex:d}}}function bn(e,t){let r=J(t);if(r===null||r<0||r>gn)return n.FormulaError.BuiltIn.Num;let i=1;r===1?(i=vn(e),i<=1&&(i=1)):r>1&&(i=r),i>1&&e.length<2*i&&(i=1);let a=e.length;if(i===1){let t=Math.max(1,Math.floor(a/4)),n=xn(t=>{let n=Math.max(.001,Math.min(.999,t[0])),r=Math.max(.001,Math.min(.999,t[1])),i=t[2];return yn(e,n,r,0,1,i).mse},[.9,.1,a>t?(e[t]-e[0])/t:0]).x;return{alpha:Math.max(.001,Math.min(.999,n[0])),beta:Math.max(.001,Math.min(.999,n[1])),gamma:0,period:1,b0:n[2]}}let o=xn(t=>yn(e,Math.max(.001,Math.min(.999,t[0])),Math.max(.001,Math.min(.999,t[1])),Math.max(.001,Math.min(.999,t[2])),i).mse,[.9,.1,.1]).x;return{alpha:Math.max(.001,Math.min(.999,o[0])),beta:Math.max(.001,Math.min(.999,o[1])),gamma:Math.max(.001,Math.min(.999,o[2])),period:i,b0:0}}function Y(e,t,n,r,i){for(let a=0;a<e.length;++a)e[a]=t*n[a]+r*i[a]}function xn(e,t,n){let r=(n||={}).maxIterations||200*t.length,i=n.nonZeroDelta||1.05,a=n.zeroDelta||.001,o=n.minErrorDelta||1e-6,s=n.minTolerance||1e-5,c=n.rho===void 0?1:n.rho,l=n.chi===void 0?2:n.chi,u=n.psi===void 0?-.5:n.psi,d=n.sigma===void 0?.5:n.sigma,f,p=t.length,m=Array(p+1);m[0]=t,m[0].fx=e(t),m[0].id=0;for(let n=0;n<p;++n){let r=t.slice();r[n]=r[n]?r[n]*i:a,m[n+1]=r,m[n+1].fx=e(r),m[n+1].id=n+1}function h(e){for(let t=0;t<e.length;t++)m[p][t]=e[t];m[p].fx=e.fx}let g=(e,t)=>e.fx-t.fx,_=t.slice(),v=t.slice(),y=t.slice(),b=t.slice();for(let t=0;t<r;++t){if(m.sort(g),n.history){let e=m.map(e=>{let t=e.slice();return t.fx=e.fx,t.id=e.id,t});e.sort((e,t)=>e.id-t.id),n.history.push({x:m[0].slice(),fx:m[0].fx,simplex:e})}f=0;for(let e=0;e<p;++e)f=Math.max(f,Math.abs(m[0][e]-m[1][e]));if(Math.abs(m[0].fx-m[p].fx)<o&&f<s)break;for(let e=0;e<p;++e){_[e]=0;for(let t=0;t<p;++t)_[e]+=m[t][e];_[e]/=p}let t=m[p];if(Y(v,1+c,_,-c,t),v.fx=e(v),v.fx<m[0].fx)Y(b,1+l,_,-l,t),b.fx=e(b),h(b.fx<v.fx?b:v);else if(v.fx>=m[p-1].fx){let n=!1;if(v.fx>t.fx?(Y(y,1+u,_,-u,t),y.fx=e(y),y.fx<t.fx?h(y):n=!0):(Y(y,1-u*c,_,u*c,t),y.fx=e(y),y.fx<v.fx?h(y):n=!0),n){if(d>=1)break;for(let t=1;t<m.length;++t)Y(m[t],1-d,m[0],d,m[t]),m[t].fx=e(m[t])}}else h(v)}return m.sort(g),{fx:m[0].fx,x:m[0]}}var Sn=Object.freeze({includeEmpty:!0}),Cn=(Object.freeze({axis:n.IRange.Axis.Column}),Object.freeze({axis:n.IRange.Axis.Row}),Object.freeze({type:n.ScalarType.Number,axis:n.IRange.Axis.Row})),wn=(e,t,r=!1)=>{let i=e.getRowCount(),a=e.getColumnCount(),o=i*a;if(o===0)throw n.FormulaError.BuiltIn.Value;let s=i===1,c=i>1&&a>1;if(!t||t.size===0){let t=Q(e,o,r),n=Array(o);for(let e=0;e<o;e++)n[e]=[e+1];return{ys:t,xs:n,k:1,isRowOriented:s,isRectangularY:c,yRows:i,yCols:a}}let l=t.getRowCount(),u=t.getColumnCount();if(c){if(l!==i||u!==a)throw n.FormulaError.BuiltIn.Ref;let d=Q(e,o,r),f=Q(t,o),p=Array(o);for(let e=0;e<o;e++)p[e]=[f[e]];return{ys:d,xs:p,k:1,isRowOriented:s,isRectangularY:c,yRows:i,yCols:a}}if((s?u:l)!==o)throw n.FormulaError.BuiltIn.Ref;let d=s?l:u;return{ys:Q(e,o,r),xs:On(t,o,d,s),k:d,isRowOriented:s,isRectangularY:c,yRows:i,yCols:a}},X=(e,t,r)=>{if(e===void 0)return r(t);if(e===null)return r(!1);if(typeof e==`boolean`)return r(e);if(Array.isArray(e))throw n.FormulaError.BuiltIn.Value;return r(Tn((e=>{let t=e.getRowCount(),r=e.getColumnCount();if(t===1&&r===1||!n.FormulaContext.isImplicitIntersect())return e.getValueAt(0,0);let i=e.getCoords(),a=n.FormulaContext.getRow()-i.rowStart,o=n.FormulaContext.getColumn()-i.colStart,s=a>=0&&a<t,c=o>=0&&o<r;if(s&&c)return e.getValueAt(a,o);if(s&&r===1)return e.getValueAt(a,0);if(c&&t===1)return e.getValueAt(0,o);throw n.FormulaError.BuiltIn.Value})(e)))},Tn=e=>{if(e==null)return!1;if(typeof e==`boolean`)return e;if(typeof e==`number`)return!(e>-22250738585072014e-324&&e<22250738585072014e-324);if(typeof e==`string`){let t=e.toUpperCase();if(t===`TRUE`)return!0;if(t===`FALSE`)return!1;throw n.FormulaError.BuiltIn.Value}throw n.FormulaError.BuiltIn.Value},En=(e,t,r)=>{let i,a,o;if(t&&t.size>0){let r=((e,t)=>{let r=e.getRowCount(),i=e.getColumnCount(),a=r*i;if(a===0)throw n.FormulaError.BuiltIn.Ref;if(t.k===1){let t=Q(e,a),n=Array(a);for(let e=0;e<a;e++)n[e]=[t[e]];return{xs:n,rows:r,cols:i}}let o=t.isRowOriented?i:r;if((t.isRowOriented?r:i)!==t.k)throw n.FormulaError.BuiltIn.Ref;return{xs:On(e,o,t.k,t.isRowOriented),rows:t.isRowOriented?1:o,cols:t.isRowOriented?o:1}})(t,e);i=r.xs,a=r.rows,o=r.cols}else i=e.xs,a=e.yRows,o=e.yCols;let s=Array(a),c=0;for(let e=0;e<a;e++){let t=Array(o);for(let e=0;e<o;e++)t[e]=r(i[c++]);s[e]=t}return s},Z=(e,t,n)=>{let r=e.length,i=t.length>0?t[0].length:0,a=[],o=[];n&&(a.push(Array(r).fill(1)),o.push(i));for(let e=i-1;e>=0;e--){let n=Array(r);for(let i=0;i<r;i++)n[i]=t[i][e];a.push(n),o.push(i-1-e)}let s=[],c=[],l=[];for(let e=0;e<a.length;e++){let t=a[e].slice(),n=Math.sqrt(kn(t,t)),i=Array(c.length).fill(0);for(let e=0;e<2;e++)for(let e=0;e<c.length;e++){let n=kn(c[e],t);for(let i=0;i<r;i++)t[i]-=n*c[e][i];i[e]+=n}let o=Math.sqrt(kn(t,t));if(!(o<=1e-10*(n||1))){for(let e=0;e<r;e++)t[e]/=o;i.push(o),c.push(t),l.push(i),s.push(e)}}let u=s.length,d=Array(u);for(let t=0;t<u;t++)d[t]=kn(c[t],e);let f=Array(u).fill(0);for(let e=u-1;e>=0;e--){let t=d[e];for(let n=e+1;n<u;n++)t-=l[n][e]*f[n];f[e]=t/l[e][e]}let p=Array.from({length:u},()=>Array(u).fill(0));for(let e=u-1;e>=0;e--){p[e][e]=1/l[e][e];for(let t=e+1;t<u;t++){let n=0;for(let r=e+1;r<=t;r++)n+=l[r][e]*p[r][t];p[e][t]=-n*p[e][e]}}let m=Array(i+1).fill(0),h=Array(i+1).fill(0);for(let e=0;e<u;e++){let t=o[s[e]];m[t]=f[e];let n=0;for(let t=e;t<u;t++)n+=p[e][t]*p[e][t];h[t]=n}let g=e=>{let t=n?m[i]:0;for(let n=0;n<i;n++)t+=m[i-1-n]*e[n];return t},_=0;for(let n=0;n<r;n++){let r=e[n]-g(t[n]??[]);_+=r*r}let v=0;if(n){let t=0;for(let n=0;n<r;n++)t+=e[n];t/=r;for(let n=0;n<r;n++)v+=(e[n]-t)*(e[n]-t)}else for(let t=0;t<r;t++)v+=e[t]*e[t];n&&v===0&&(_=0);let y=v-_,b=n?u-1:u,x=r-b-+!!n,S=x>0?_/x:0,C=x>0?Math.sqrt(S):0,w=Array(i+1).fill(0);for(let e=0;e<=i;e++)w[e]=C*Math.sqrt(Math.max(h[e],0));return{coefficients:m,standardErrors:w,kEffective:b,df:x,sey:C,r2:v===0?1:y/v,f:x>0&&b>0&&S!==0?y/b/S:null,ssReg:y,ssResid:_,predict:g}},Dn=(e,t,r)=>{let i=t.length,a=n.FormulaError.BuiltIn.NA,o=(e,t)=>{let n=Array(i).fill(a);return n[0]=e,i>1&&(n[1]=t),n},s=e.standardErrors.slice();return r||(s[i-1]=a),[t.slice(),s,o(e.r2,e.sey),o(e.f??n.FormulaError.BuiltIn.Num,e.df),o(e.ssReg,e.ssResid)]},Q=(e,t,r=!1)=>{let i=Array(t),a=0;for(let t of e.values(Sn)){if(typeof t!=`number`)throw n.FormulaError.BuiltIn.Value;if(r){if(t<=0)throw n.FormulaError.BuiltIn.Num;i[a++]=Math.log(t)}else i[a++]=t}return i},On=(e,t,n,r)=>{let i=Q(e,t*n),a=Array(t);for(let e=0;e<t;e++){let o=Array(n);for(let a=0;a<n;a++)o[a]=r?i[a*t+e]:i[e*n+a];a[e]=o}return a},kn=(e,t)=>{let n=0;for(let r=0;r<e.length;r++)n+=e[r]*t[r];return n},An=t({GROWTH:()=>Fn,LINEST:()=>Mn,LOGEST:()=>Nn,TREND:()=>Pn}),jn=()=>{if(n.FormulaContext.getArgs().getAreaCountAt(1)>1)throw n.FormulaError.BuiltIn.Ref};function Mn(e,t,n,r){jn();let i=wn(e,t);return X(n,!0,e=>{let t=Z(i.ys,i.xs,e);return X(r,!1,n=>n?Dn(t,t.coefficients,e):[t.coefficients.slice()])})}function Nn(e,t,n,r){jn();let i=wn(e,t,!0);return X(n,!0,e=>{let t=Z(i.ys,i.xs,e),n=In(t);return X(r,!1,r=>r?Dn(t,n,e):[n])})}function Pn(e,t,n,r){jn();let i=wn(e,t);return X(r,!0,e=>{let t=Z(i.ys,i.xs,e);return En(i,n,t.predict)})}function Fn(e,t,r,i){jn();let a=wn(e,t,!0);return X(i,!0,e=>{let t=Z(a.ys,a.xs,e).coefficients.map(Math.exp),i=a.k;return En(a,r,e=>{let r=t[i];for(let n=0;n<i;n++)r*=t[i-1-n]**e[n];return Number.isFinite(r)?r:n.FormulaError.BuiltIn.Num})})}var In=e=>e.coefficients.map(e=>{let t=Math.exp(e);return Number.isFinite(t)?t:n.FormulaError.BuiltIn.Num}),Ln=t({TTEST:()=>Rn,T_TEST:()=>zn});function Rn(e,t,n,r){return zn(e,t,n,r)}function zn(e,t,r,i){if(r=Math.floor(r+Bn),i=Math.floor(i+Bn),r!==1&&r!==2||i<1||i>3)return NaN;for(let r of[e,t])if(r.size===1&&r.isIReferenceRange){if(r.hasError())throw r.firstError();if(r.entries({includeEmpty:!1}).next().done)throw n.FormulaError.BuiltIn.Value}let a;if(i===1){let r=e.getShape(),i=t.getShape();if(r.rows*r.columns!==i.rows*i.columns)throw n.FormulaError.BuiltIn.NA;let o=[],s=[];for(let[[r,i]]of e.flatten().alignValues([t.flatten()])){if(n.FormulaError.isError(r))throw r;if(n.FormulaError.isError(i))throw i;typeof r==`number`&&typeof i==`number`&&(o.push(r),s.push(i))}if(o.length<2)throw n.FormulaError.BuiltIn.Div0;a=function(e,t){let r=e.length;if(!Number.isFinite(Un(e))||!Number.isFinite(Un(t)))return{error:n.FormulaError.BuiltIn.Num};let i=0;for(let n=0;n<r;n++)i+=e[n]-t[n];let a=i/r,o=0;for(let n=0;n<r;n++){let r=e[n]-t[n]-a;o+=r*r}return o===0?{error:n.FormulaError.BuiltIn.Div0}:{x:Math.abs(a)*Math.sqrt(r*(r-1)/o),df:r-1}}(o,s)}else{if(e.hasError())throw e.firstError();if(t.hasError())throw t.firstError();let r=e.getValuesFlat(Cn),o=t.getValuesFlat(Cn);if(r.length<2||o.length<2)throw n.FormulaError.BuiltIn.Div0;a=i===2?function(e,t){let r=e.length,i=t.length,a=0,o=0,s=0,c=0;for(let t of e)a+=t,o+=t*t;for(let e of t)s+=e,c+=e*e;if(!Number.isFinite(o)||!Number.isFinite(c))return{error:n.FormulaError.BuiltIn.Num};let l=o-a**2/r,u=c-s**2/i,d=Math.sqrt(l+u);if(d===0)return{error:n.FormulaError.BuiltIn.Div0};let f=r+i-2;return{x:Math.abs(a/r-s/i)/d*Math.sqrt(r*i*f/(r+i)),df:f}}(r,o):function(e,t){let r=e.length,i=t.length,a=0,o=0,s=0,c=0;for(let t of e)a+=t,o+=t*t;for(let e of t)s+=e,c+=e*e;if(!Number.isFinite(o)||!Number.isFinite(c))return{error:n.FormulaError.BuiltIn.Num};let l=(o-a**2/r)/(r*(r-1)),u=(c-s**2/i)/(i*(i-1));if(l+u===0)return{error:n.FormulaError.BuiltIn.Div0};let d=Math.abs(a/r-s/i)/Math.sqrt(l+u),f=l/(l+u);return{x:d,df:1/(f**2/(r-1)+(1-f)**2/(i-1))}}(r,o)}if(`error`in a)throw a.error;return function(e,t){let n=.5*function(e,t,n){if(n<=0)return 0;if(n>=1)return 1;let r=Hn(e)+Hn(t)-Hn(e+t),i=Math.exp(Math.log(n)*e+Math.log(1-n)*t-r);return n<(e+1)/(e+t+2)?i*Vn(e,t,n)/e:1-i*Vn(t,e,1-n)/t}(t/2,.5,t/(t+e*e));return e>=0?1-n:n}(-a.x,a.df)*r}var Bn=2**-22;function Vn(e,t,n){let r=1e-30,i=e+t,a=e+1,o=e-1,s=1,c=1-i*n/a;Math.abs(c)<r&&(c=r),c=1/c;let l=c;for(let u=1;u<=200;u++){let d=2*u,f=u*(t-u)*n/((o+d)*(e+d));c=1+f*c,Math.abs(c)<r&&(c=r),s=1+f/s,Math.abs(s)<r&&(s=r),c=1/c,l*=c*s,f=-(e+u)*(i+u)*n/((e+d)*(a+d)),c=1+f*c,Math.abs(c)<r&&(c=r),s=1+f/s,Math.abs(s)<r&&(s=r),c=1/c;let p=c*s;if(l*=p,Math.abs(p-1)<3e-16)break}return l}function Hn(e){let t=[.9999999999998099,676.5203681218851,-1259.1392167224028,771.3234287776531,-176.6150291621406,12.507343278686905,-.13857109526572012,9984369578019572e-21,1.5056327351493116e-7];if(e<.5)return Math.log(Math.PI/Math.sin(Math.PI*e))-Hn(1-e);e--;let n=t[0];for(let r=1;r<9;r++)n+=t[r]/(e+r);let r=e+7.5;return .5*Math.log(2*Math.PI)+(e+.5)*Math.log(r)-r+Math.log(n)}function Un(e){let t=0;for(let n of e)t+=n*n;return t}var $=`\\p{L}\\p{N}_`,Wn={alpha:`\\p{L}`,digit:`\\p{Nd}`,alnum:`\\p{L}\\p{N}`,upper:`\\p{Lu}`,lower:`\\p{Ll}`,space:`\\s`,blank:`\\t\\p{Zs}`,punct:`\\p{P}\\p{S}`,word:$,cntrl:`\\p{Cc}`,xdigit:`0-9A-Fa-f`,ascii:`\\x00-\\x7F`,print:`\\P{C}`,graph:`\\P{C}`},Gn={alpha:`\\P{L}`,digit:`\\P{Nd}`,upper:`\\P{Lu}`,lower:`\\P{Ll}`,space:`\\S`,cntrl:`\\P{Cc}`,print:`\\p{C}`,graph:`\\p{C}`},Kn=`(?:(?<=[${$}])(?![${$}])|(?<![${$}])(?=[${$}]))`,qn=`(?:(?<=[${$}])(?=[${$}])|(?<![${$}])(?![${$}]))`,Jn=(e,t)=>{if(!e.startsWith(`[:`,t))return null;let n=e.indexOf(`:]`,t+2);if(n===-1)return null;let r=e.slice(t+2,n),i=r.startsWith(`^`);i&&(r=r.slice(1));let a=i?Gn[r]:Wn[r];return a===void 0?null:{emit:a,next:n+2}},Yn=(e,t)=>{if(!e.startsWith(`(?`,t))return null;let n=t+2,r=``,i=``,a=!1;for(;n<e.length;){let t=e[n];if(t!==`-`){if(!/[imsUx]/.test(t))break;a?i+=t:r+=t,n+=1}else a=!0,n+=1}return e[n]===`)`?{on:r,off:i,group:!1,next:n+1}:e[n]===`:`&&(r||i)?{on:r,off:i,group:!0,next:n+1}:null},Xn=e=>e.replace(/[^ims]/g,``),Zn=e=>(RegExp(`${e.source}|`,e.flags.replace(`g`,``)).exec(``)?.length??1)-1,Qn=(e,t,r=``)=>{let i=(t?`i`:``)+r,a=(e,t)=>{try{let n=new RegExp(e,t?`${i}u`:i);return{regex:n,groups:Zn(n)}}catch{return null}},o;try{o=(e=>{let t=``,n=0,r=!1,i=!1,a=[];for(;n<e.length;){let o=e[n];if(o===`\\`){let i=e[n+1];if(i===void 0){t+=`\\`,n+=1;continue}if((i===`p`||i===`P`)&&e[n+2]&&e[n+2]!==`{`){t+=`\\${i}{${e[n+2]}}`,n+=3;continue}if(i===`C`)throw SyntaxError(`the any-byte escape is not supported`);if(r){if(i===`w`){t+=$,n+=2;continue}if(i===`d`){t+=`\\p{Nd}`,n+=2;continue}}else{if(i===`A`){t+=`^`,n+=2;continue}if(i===`z`||i===`Z`){t+=`$`,n+=2;continue}if(i===`b`){t+=Kn,n+=2;continue}if(i===`B`){t+=qn,n+=2;continue}if(i===`w`){t+=`[${$}]`,n+=2;continue}if(i===`W`){t+=`[^${$}]`,n+=2;continue}if(i===`d`){t+=`\\p{Nd}`,n+=2;continue}if(i===`D`){t+=`\\P{Nd}`,n+=2;continue}}t+=o+i,n+=2;continue}if(r){let i=Jn(e,n);if(i){t+=i.emit,n=i.next;continue}if(o===`]`){r=!1,t+=o,n+=1;continue}t+=o,n+=1;continue}if(o===`[`){r=!0,t+=o,n+=1,e[n]===`^`&&(t+=`^`,n+=1),e[n]===`]`&&(t+=`\\]`,n+=1);continue}let s=Yn(e,n);if(s){s.on.includes(`U`)&&(i=!0),s.off.includes(`U`)&&(i=!1);let e=Xn(s.on),r=Xn(s.off);s.group?t+=e||r?`(?${e}${r?`-${r}`:``}:`:`(?:`:(e||r)&&(t+=`(?${e}${r?`-${r}`:``}:`,a.push(`)`)),n=s.next;continue}if(i&&/[*+?]/.test(o))e[n+1]===`?`?(t+=o,n+=2):(t+=`${o}?`,n+=1);else{if(i&&o===`{`){let r=e.indexOf(`}`,n);if(r!==-1&&/^\{\d*(,\d*)?\}$/.test(e.slice(n,r+1))){t+=e.slice(n,r+1),e[r+1]===`?`?n=r+2:(t+=`?`,n=r+1);continue}}e.startsWith(`(?P<`,n)?(t+=`(?<`,n+=4):(t+=o,n+=1)}}return t+a.join(``)})(e)}catch{return n.FormulaError.BuiltIn.Value}let s=o.replace(/\\([pP])\{([A-Za-z_]+)\}/g,`\\$1{Script=$2}`);return a(o,!0)??(s===o?null:a(s,!0))??a(e,!1)??n.FormulaError.BuiltIn.Value},$n=(e,t)=>{let r=Math.trunc(e);return r>=0&&r<=t?r:n.FormulaError.BuiltIn.Value},er=t({REGEXEXTRACT:()=>tr,REGEXMATCH:()=>nr,REGEXREPLACE:()=>rr,REGEXTEST:()=>ir});function tr(e,t,r=0,i=0){let a=$n(r,2);if(n.FormulaError.isError(a))return a;let o=$n(i,1);if(n.FormulaError.isError(o))return o;let s=Qn(t,o===1);if(n.FormulaError.isError(s))return s;let{regex:c}=s;if(a===0){let t=e.match(c);return t?n.FormulaContext.createRange().replace([[t[0]]]):n.FormulaError.BuiltIn.NA}if(a===1){let t=[...e.matchAll(new RegExp(c.source,`${c.flags}g`))];return t.length===0?n.FormulaError.BuiltIn.NA:n.FormulaContext.createRange().replace([t.map(e=>e[0])])}if(s.groups===0)return n.FormulaError.BuiltIn.Value;let l=e.match(c);return l?n.FormulaContext.createRange().replace([l.slice(1).map(e=>e??n.FormulaError.BuiltIn.NA)]):n.FormulaError.BuiltIn.NA}function nr(e,t,r=!1){let i=Qn(t,r);return n.FormulaError.isError(i)?i:i.regex.test(e)}function rr(e,t,r,i=0,a=0){let o=$n(a,1);if(n.FormulaError.isError(o))return o;let s=Qn(t,o===1);if(n.FormulaError.isError(s))return s;let{regex:c,groups:l}=s,u=((e,t)=>{let r=``,i=0;for(;i<e.length;){let a=e[i];if(a===`\\`){let a=e[i+1];if(a!==void 0&&/\d/.test(a)){let a=/^\d+/.exec(e.slice(i+1))[0],o=Number(a);if(o===0){r+=`$&`,i+=1+a.length;continue}if(o>t)return n.FormulaError.BuiltIn.Value;r+=`$${o}`,i+=1+a.length;continue}if(a===`\\`){r+=`\\`,i+=2;continue}r+=a??``,i+=2;continue}if(a!==`$`){r+=a,i+=1;continue}let o=e[i+1];if(o!==`$`&&o!==`&`&&o!=="`"&&o!==`'`){if(o!==void 0&&/\d/.test(o)){let a=/^\d+/.exec(e.slice(i+1))[0],o=Number(a);if(o===0){r+=`$&`,i+=1+a.length;continue}if(o>t)return n.FormulaError.BuiltIn.Value;r+=`$${o}`,i+=1+a.length;continue}if(o===`{`){let a=e.indexOf(`}`,i+2);if(a!==-1){let o=e.slice(i+2,a);if(/^\d+$/.test(o)){let e=Number(o);if(e===0){r+=`$&`,i=a+1;continue}if(e>t)return n.FormulaError.BuiltIn.Value;r+=`$${e}`}else r+=`$<${o}>`;i=a+1;continue}}return n.FormulaError.BuiltIn.Value}r+=a+o,i+=2}return r})(r,l);if(n.FormulaError.isError(u))return u;let d=Math.trunc(i),f=new RegExp(c.source,`${c.flags}g`);if(d===0)return e.replace(f,u);let p=[...e.matchAll(f)],m=d>0?d-1:p.length+d;if(m<0||m>=p.length)return e;let h=p[m],g=h.index;return e.slice(0,g)+h[0].replace(c,u)+e.slice(g+h[0].length)}function ir(e,t,r=0){let i=$n(r,1);if(n.FormulaError.isError(i))return i;let a=Qn(t,i===1);return n.FormulaError.isError(a)?a:a.regex.test(e)}var ar={CUBEKPIMEMBER:{p:[{n:`connection`,s:`string`},{n:`kpiName`,s:`string`},{n:`kpiProperty`},{n:`caption`,s:`string`,m:`?`}],r:{s:`string`}},CUBEMEMBER:{p:[{n:`connection`,s:`string`},{n:`memberExpression`,s:`string`},{n:`caption`,s:`string`,m:`?`}],r:{s:`string`}},CUBEMEMBERPROPERTY:{p:[{n:`connection`,s:`string`},{n:`memberExpression`,s:`string`},{n:`kpiProperty`}],r:{s:`string`}},CUBERANKEDMEMBER:{p:[{n:`connection`,s:`string`},{n:`setExpression`,s:`string`},{n:`rank`},{n:`caption`,s:`string`,m:`?`}],r:{s:`string`}},CUBESET:{p:[{n:`connection`,s:`string`},{n:`setExpression`,s:`string`},{n:`caption`,s:`string`,m:`?`},{n:`sortOrder`,m:`?`},{n:`sortBy`,s:`string`,m:`?`}],r:{s:`string`}},CUBESETCOUNT:{p:[{n:`set`,s:`string`}],r:{s:`number`}},CUBEVALUE:{p:[{n:`connection`,s:`string`},{n:`memberExpression`,s:`string`,d:1,m:`...`}],r:{s:`string`}}},or={ACCRINT:{p:[{n:`issue`,s:`*`,ae:1,u:1,nl:1},{n:`firstInterest`,s:`*`,ae:1,u:1,nl:1},{n:`settlement`,s:`*`,ae:1,u:1,nl:1},{n:`rate`,s:`*`,ae:1,u:1,nl:1},{n:`par`,s:`*`,ae:1,u:1,nl:1},{n:`frequency`,s:`*`,ae:1,u:1,nl:1},{n:`basis`,s:`*`,ae:1,m:`?`,v:0,u:1,nl:1},{n:`calcMethod`,s:`*`,ae:1,m:`?`,v:!0,u:1,nl:1}],r:{s:`number`}},ACCRINTM:{p:[{n:`issue`,s:`*`,ae:1,u:1,nl:1},{n:`settlement`,s:`*`,ae:1,u:1,nl:1},{n:`rate`,s:`*`,ae:1,u:1,nl:1},{n:`par`,s:`*`,ae:1,u:1,nl:1},{n:`basis`,s:`*`,ae:1,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}}},sr={AMORDEGRC:{p:[{n:`cost`,s:`*`,u:1,nl:1},{n:`datePurchased`,s:`*`,u:1,nl:1},{n:`firstPeriod`,s:`*`,u:1,nl:1},{n:`salvage`,s:`*`,u:1,nl:1},{n:`period`,s:`*`,u:1,nl:1},{n:`rate`,s:`*`,u:1,nl:1},{n:`basis`,s:`*`,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}}},cr={FV:{p:[{n:`rate`},{n:`nper`},{n:`pmt`},{n:`pv`,m:`?`,v:0},{n:`type`,m:`?`,v:0,rt:1,e:`PaymentType`}],r:{s:`number`}},PV:{p:[{n:`rate`},{n:`nper`},{n:`pmt`},{n:`fv`,m:`?`,v:0},{n:`type`,m:`?`,v:0,rt:1,e:`PaymentType`}],r:{s:`number`}},PMT:{p:[{n:`rate`},{n:`nper`},{n:`pv`},{n:`fv`,m:`?`,v:0},{n:`type`,m:`?`,v:0,rt:1,e:`PaymentType`}],r:{s:`number`}},NPER:{p:[{n:`rate`},{n:`pmt`},{n:`pv`},{n:`fv`,m:`?`,v:0},{n:`type`,m:`?`,v:0,rt:1,e:`PaymentType`}],r:{s:`number`}},RATE:{p:[{n:`nper`},{n:`pmt`},{n:`pv`},{n:`fv`,m:`?`,v:0},{n:`type`,m:`?`,v:0,rt:1,e:`PaymentType`},{n:`guess`,m:`?`,v:.1}],r:{s:`number`}},IPMT:{p:[{n:`rate`},{n:`per`},{n:`nper`},{n:`pv`},{n:`fv`,m:`?`,v:0},{n:`type`,m:`?`,v:0,rt:1,e:`PaymentType`}],r:{s:`number`}},PPMT:{p:[{n:`rate`},{n:`per`},{n:`nper`},{n:`pv`},{n:`fv`,m:`?`,v:0},{n:`type`,m:`?`,v:0,rt:1,e:`PaymentType`}],r:{s:`number`}},CUMIPMT:{p:[{n:`rate`,s:`*`,u:1,nl:1},{n:`nper`,s:`*`,u:1,nl:1},{n:`pv`,s:`*`,u:1,nl:1},{n:`startPeriod`,s:`*`,u:1,nl:1},{n:`endPeriod`,s:`*`,u:1,nl:1},{n:`type`,s:`*`,u:1,nl:1,e:`PaymentType`}],r:{s:`number`}},CUMPRINC:{p:[{n:`rate`,s:`*`,u:1,nl:1},{n:`nper`,s:`*`,u:1,nl:1},{n:`pv`,s:`*`,u:1,nl:1},{n:`startPeriod`,s:`*`,u:1,nl:1},{n:`endPeriod`,s:`*`,u:1,nl:1},{n:`type`,s:`*`,u:1,nl:1,e:`PaymentType`}],r:{s:`number`}},ISPMT:{p:[{n:`rate`},{n:`per`},{n:`nper`},{n:`pv`}],r:{s:`number`}}},lr={PaymentType:{m:[[`At the end of the period`,0],[`At the beginning of the period`,1]]}},ur={NPV:{p:[{n:`rate`},{n:`value`,g:[{n:`value`,s:`number`,r:`r`}]}],r:{s:`number`}},IRR:{p:[{n:`values`,s:`*`,d:1,ae:1,u:1},{n:`guess`,m:`?`,v:.1}],r:{s:`number`}},MIRR:{p:[{n:`values`,s:`*`,d:1,ae:1,u:1},{n:`financeRate`},{n:`reinvestRate`}],r:{s:`number`}},XNPV:{p:[{n:`rate`,s:`*`,u:1,nl:1},{n:`values`,r:`r`,u:1},{n:`dates`,r:`r`,u:1}],r:{s:`number`}},XIRR:{p:[{n:`values`,r:`r`,u:1},{n:`dates`,r:`r`,u:1},{n:`guess`,s:`*`,m:`?`,v:.1,u:1,nl:1}],r:{s:`number`}}},dr={EFFECT:{p:[{n:`nominalRate`,s:`*`,u:1,nl:1},{n:`npery`,s:`*`,u:1,nl:1}],r:{s:`number`}},NOMINAL:{p:[{n:`effectiveRate`,s:`*`,u:1,nl:1},{n:`npery`,s:`*`,u:1,nl:1}],r:{s:`number`}},DOLLARDE:{p:[{n:`fractionalDollar`,s:`*`,u:1,nl:1},{n:`fraction`,s:`*`,u:1,nl:1}],r:{s:`number`}},DOLLARFR:{p:[{n:`decimalDollar`,s:`*`,u:1,nl:1},{n:`fraction`,s:`*`,u:1,nl:1}],r:{s:`number`}}},fr={COUPDAYBS:{p:[{n:`settlement`,s:`*`,u:1,nl:1},{n:`maturity`,s:`*`,u:1,nl:1},{n:`frequency`,s:`*`,u:1,nl:1},{n:`basis`,s:`*`,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}},COUPDAYS:{p:[{n:`settlement`,s:`*`,u:1,nl:1},{n:`maturity`,s:`*`,u:1,nl:1},{n:`frequency`,s:`*`,u:1,nl:1},{n:`basis`,s:`*`,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}},COUPDAYSNC:{p:[{n:`settlement`,s:`*`,u:1,nl:1},{n:`maturity`,s:`*`,u:1,nl:1},{n:`frequency`,s:`*`,u:1,nl:1},{n:`basis`,s:`*`,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}},COUPNCD:{p:[{n:`settlement`,s:`*`,u:1,nl:1},{n:`maturity`,s:`*`,u:1,nl:1},{n:`frequency`,s:`*`,u:1,nl:1},{n:`basis`,s:`*`,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}},COUPPCD:{p:[{n:`settlement`,s:`*`,u:1,nl:1},{n:`maturity`,s:`*`,u:1,nl:1},{n:`frequency`,s:`*`,u:1,nl:1},{n:`basis`,s:`*`,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}},COUPNUM:{p:[{n:`settlement`,s:`*`,u:1,nl:1},{n:`maturity`,s:`*`,u:1,nl:1},{n:`frequency`,s:`*`,u:1,nl:1},{n:`basis`,s:`*`,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}}},pr={DATEDIF:{p:[{n:`startDate`},{n:`endDate`},{n:`unit`,s:`string`}],r:{s:`number`}},YEARFRAC:{p:[{n:`startDate`,s:`*`,ae:1,u:1,nl:1},{n:`endDate`,s:`*`,ae:1,u:1,nl:1},{n:`basis`,s:`*`,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}},DAYS360:{p:[{n:`startDate`},{n:`endDate`},{n:`method`,s:`boolean`,m:`?`,v:!1}],r:{s:`number`}}},mr={SLN:{p:[{n:`cost`},{n:`salvage`},{n:`life`}],r:{s:`number`}},SYD:{p:[{n:`cost`},{n:`salvage`},{n:`life`},{n:`per`}],r:{s:`number`}},DB:{p:[{n:`cost`},{n:`salvage`},{n:`life`},{n:`period`},{n:`month`,m:`?`,v:12}],r:{s:`number`}},DDB:{p:[{n:`cost`},{n:`salvage`},{n:`life`},{n:`period`},{n:`factor`,m:`?`,v:2}],r:{s:`number`}},AMORLINC:{p:[{n:`cost`,s:`*`,u:1,nl:1},{n:`datePurchased`,s:`*`,u:1,nl:1},{n:`firstPeriod`,s:`*`,u:1,nl:1},{n:`salvage`,s:`*`,u:1,nl:1},{n:`period`,s:`*`,u:1,nl:1},{n:`rate`,s:`*`,u:1,nl:1},{n:`basis`,s:`*`,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}}},hr={FVSCHEDULE:{p:[{n:`principal`,s:`*`,u:1,nl:1},{n:`schedule`,r:`r`,u:1}],r:{s:`number`}},RRI:{p:[{n:`nper`},{n:`pv`},{n:`fv`}],r:{s:`number`}},PDURATION:{p:[{n:`rate`},{n:`pv`},{n:`fv`}],r:{s:`number`}}},gr={ODDFPRICE:{p:[{n:`settlement`,s:`*`,ae:1,u:1,nl:1},{n:`maturity`,s:`*`,ae:1,u:1,nl:1},{n:`issue`,s:`*`,ae:1,u:1,nl:1},{n:`firstCoupon`,s:`*`,ae:1,u:1,nl:1},{n:`rate`,s:`*`,ae:1,u:1,nl:1},{n:`yld`,s:`*`,ae:1,u:1,nl:1},{n:`redemption`,s:`*`,ae:1,u:1,nl:1},{n:`frequency`,s:`*`,ae:1,u:1,nl:1},{n:`basis`,s:`*`,ae:1,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}},ODDFYIELD:{p:[{n:`settlement`,s:`*`,ae:1,u:1,nl:1},{n:`maturity`,s:`*`,ae:1,u:1,nl:1},{n:`issue`,s:`*`,ae:1,u:1,nl:1},{n:`firstCoupon`,s:`*`,ae:1,u:1,nl:1},{n:`rate`,s:`*`,ae:1,u:1,nl:1},{n:`pr`,s:`*`,ae:1,u:1,nl:1},{n:`redemption`,s:`*`,ae:1,u:1,nl:1},{n:`frequency`,s:`*`,ae:1,u:1,nl:1},{n:`basis`,s:`*`,ae:1,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}},ODDLPRICE:{p:[{n:`settlement`,s:`*`,ae:1,u:1,nl:1},{n:`maturity`,s:`*`,ae:1,u:1,nl:1},{n:`lastInterest`,s:`*`,ae:1,u:1,nl:1},{n:`rate`,s:`*`,ae:1,u:1,nl:1},{n:`yld`,s:`*`,ae:1,u:1,nl:1},{n:`redemption`,s:`*`,ae:1,u:1,nl:1},{n:`frequency`,s:`*`,ae:1,u:1,nl:1},{n:`basis`,s:`*`,ae:1,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}},ODDLYIELD:{p:[{n:`settlement`,s:`*`,ae:1,u:1,nl:1},{n:`maturity`,s:`*`,ae:1,u:1,nl:1},{n:`lastInterest`,s:`*`,ae:1,u:1,nl:1},{n:`rate`,s:`*`,ae:1,u:1,nl:1},{n:`pr`,s:`*`,ae:1,u:1,nl:1},{n:`redemption`,s:`*`,ae:1,u:1,nl:1},{n:`frequency`,s:`*`,ae:1,u:1,nl:1},{n:`basis`,s:`*`,ae:1,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}}},_r={STOCKHISTORY:{p:[{n:`stock`,s:`string`},{n:`startDate`},{n:`endDate`,m:`?`},{n:`interval`,m:`?`,v:0},{n:`headers`,m:`?`,v:1},{n:`properties`,d:1,m:`?`}],r:{r:`r`}}},vr={PRICE:{p:[{n:`settlement`,s:`*`,ae:1,u:1,nl:1},{n:`maturity`,s:`*`,ae:1,u:1,nl:1},{n:`rate`,s:`*`,ae:1,u:1,nl:1},{n:`yld`,s:`*`,ae:1,u:1,nl:1},{n:`redemption`,s:`*`,ae:1,u:1,nl:1},{n:`frequency`,s:`*`,ae:1,u:1,nl:1},{n:`basis`,s:`*`,ae:1,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}},DURATION:{p:[{n:`settlement`,s:`*`,ae:1,u:1,nl:1},{n:`maturity`,s:`*`,ae:1,u:1,nl:1},{n:`coupon`,s:`*`,ae:1,u:1,nl:1},{n:`yld`,s:`*`,ae:1,u:1,nl:1},{n:`frequency`,s:`*`,ae:1,u:1,nl:1},{n:`basis`,s:`*`,ae:1,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}},MDURATION:{p:[{n:`settlement`,s:`*`,ae:1,u:1,nl:1},{n:`maturity`,s:`*`,ae:1,u:1,nl:1},{n:`coupon`,s:`*`,ae:1,u:1,nl:1},{n:`yld`,s:`*`,ae:1,u:1,nl:1},{n:`frequency`,s:`*`,ae:1,u:1,nl:1},{n:`basis`,s:`*`,ae:1,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}},YIELD:{p:[{n:`settlement`,s:`*`,ae:1,u:1,nl:1},{n:`maturity`,s:`*`,ae:1,u:1,nl:1},{n:`rate`,s:`*`,ae:1,u:1,nl:1},{n:`pr`,s:`*`,ae:1,u:1,nl:1},{n:`redemption`,s:`*`,ae:1,u:1,nl:1},{n:`frequency`,s:`*`,ae:1,u:1,nl:1},{n:`basis`,s:`*`,ae:1,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}}},yr={DISC:{p:[{n:`settlement`,s:`*`,ae:1,u:1,nl:1},{n:`maturity`,s:`*`,ae:1,u:1,nl:1},{n:`pr`,s:`*`,ae:1,u:1,nl:1},{n:`redemption`,s:`*`,ae:1,u:1,nl:1},{n:`basis`,s:`*`,ae:1,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}},PRICEDISC:{p:[{n:`settlement`,s:`*`,ae:1,u:1,nl:1},{n:`maturity`,s:`*`,ae:1,u:1,nl:1},{n:`discount`,s:`*`,ae:1,u:1,nl:1},{n:`redemption`,s:`*`,ae:1,u:1,nl:1},{n:`basis`,s:`*`,ae:1,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}},YIELDDISC:{p:[{n:`settlement`,s:`*`,ae:1,u:1,nl:1},{n:`maturity`,s:`*`,ae:1,u:1,nl:1},{n:`pr`,s:`*`,ae:1,u:1,nl:1},{n:`redemption`,s:`*`,ae:1,u:1,nl:1},{n:`basis`,s:`*`,ae:1,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}},INTRATE:{p:[{n:`settlement`,s:`*`,ae:1,u:1,nl:1},{n:`maturity`,s:`*`,ae:1,u:1,nl:1},{n:`investment`,s:`*`,ae:1,u:1,nl:1},{n:`redemption`,s:`*`,ae:1,u:1,nl:1},{n:`basis`,s:`*`,ae:1,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}},RECEIVED:{p:[{n:`settlement`,s:`*`,ae:1,u:1,nl:1},{n:`maturity`,s:`*`,ae:1,u:1,nl:1},{n:`investment`,s:`*`,ae:1,u:1,nl:1},{n:`discount`,s:`*`,ae:1,u:1,nl:1},{n:`basis`,s:`*`,ae:1,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}},PRICEMAT:{p:[{n:`settlement`,s:`*`,ae:1,u:1,nl:1},{n:`maturity`,s:`*`,ae:1,u:1,nl:1},{n:`issue`,s:`*`,ae:1,u:1,nl:1},{n:`rate`,s:`*`,ae:1,u:1,nl:1},{n:`yld`,s:`*`,ae:1,u:1,nl:1},{n:`basis`,s:`*`,ae:1,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}},YIELDMAT:{p:[{n:`settlement`,s:`*`,ae:1,u:1,nl:1},{n:`maturity`,s:`*`,ae:1,u:1,nl:1},{n:`issue`,s:`*`,ae:1,u:1,nl:1},{n:`rate`,s:`*`,ae:1,u:1,nl:1},{n:`pr`,s:`*`,ae:1,u:1,nl:1},{n:`basis`,s:`*`,ae:1,m:`?`,v:0,u:1,nl:1}],r:{s:`number`}}},br={TBILLPRICE:{p:[{n:`settlement`,s:`*`,ae:1,u:1,nl:1},{n:`maturity`,s:`*`,ae:1,u:1,nl:1},{n:`discount`,s:`*`,ae:1,u:1,nl:1}],r:{s:`number`}},TBILLYIELD:{p:[{n:`settlement`,s:`*`,ae:1,u:1,nl:1},{n:`maturity`,s:`*`,ae:1,u:1,nl:1},{n:`pr`,s:`*`,ae:1,u:1,nl:1}],r:{s:`number`}},TBILLEQ:{p:[{n:`settlement`,s:`*`,ae:1,u:1,nl:1},{n:`maturity`,s:`*`,ae:1,u:1,nl:1},{n:`discount`,s:`*`,ae:1,u:1,nl:1}],r:{s:`number`}}},xr={VDB:{p:[{n:`cost`},{n:`salvage`},{n:`life`},{n:`startPeriod`},{n:`endPeriod`},{n:`factor`,m:`?`,v:2},{n:`noSwitch`,s:`boolean`,m:`?`,v:!1}],r:{s:`number`}}},Sr={"FORECAST.ETS":{fn:`FORECAST_ETS`,p:[{n:`targetDate`},{n:`values`,r:`r`},{n:`timeline`,r:`r`},{n:`seasonality`,m:`?`,v:1,u:1},{n:`dataCompletion`,m:`?`,v:1,u:1},{n:`aggregation`,m:`?`,v:1,u:1}],r:{s:`*`}},"FORECAST.ETS.CONFINT":{fn:`FORECAST_ETS_CONFINT`,p:[{n:`targetDate`},{n:`values`,r:`r`},{n:`timeline`,r:`r`},{n:`confidenceLevel`,m:`?`,v:.95,u:1},{n:`seasonality`,m:`?`,v:1,u:1},{n:`dataCompletion`,m:`?`,v:1,u:1},{n:`aggregation`,m:`?`,v:1,u:1}],r:{s:`*`}},"FORECAST.ETS.SEASONALITY":{fn:`FORECAST_ETS_SEASONALITY`,p:[{n:`values`,r:`r`},{n:`timeline`,r:`r`},{n:`dataCompletion`,m:`?`,v:1,u:1},{n:`aggregation`,m:`?`,v:1,u:1}],r:{s:`*`}},"FORECAST.ETS.STAT":{fn:`FORECAST_ETS_STAT`,p:[{n:`values`,r:`r`},{n:`timeline`,r:`r`},{n:`statisticType`},{n:`seasonality`,m:`?`,v:1,u:1},{n:`dataCompletion`,m:`?`,v:1,u:1},{n:`aggregation`,m:`?`,v:1,u:1}],r:{s:`*`}}},Cr={LINEST:{p:[{n:`knownYs`,r:`r`},{n:`knownXs`,r:`r`,m:`?`,u:1,rt:1},{n:`constant`,s:`boolean`,m:`?`,u:1,nl:1,rt:1},{n:`stats`,s:`boolean`,m:`?`,u:1,nl:1,rt:1}],r:{s:`*`,r:`m`}},LOGEST:{p:[{n:`knownYs`,r:`r`},{n:`knownXs`,r:`r`,m:`?`,u:1,rt:1},{n:`constant`,s:`boolean`,m:`?`,u:1,nl:1,rt:1},{n:`stats`,s:`boolean`,m:`?`,u:1,nl:1,rt:1}],r:{s:`*`,r:`m`}},TREND:{p:[{n:`knownYs`,r:`r`},{n:`knownXs`,r:`r`,m:`?`,u:1,rt:1},{n:`newXs`,r:`r`,m:`?`,u:1},{n:`constant`,s:`boolean`,m:`?`,u:1,nl:1,rt:1}],r:{s:`*`,r:`m`}},GROWTH:{p:[{n:`knownYs`,r:`r`},{n:`knownXs`,r:`r`,m:`?`,u:1,rt:1},{n:`newXs`,r:`r`,m:`?`,u:1},{n:`constant`,s:`boolean`,m:`?`,u:1,nl:1,rt:1}],r:{s:`*`,r:`m`}}},wr={TTEST:{p:[{n:`array1`,r:`r`},{n:`array2`,r:`r`},{n:`tails`},{n:`type`}],r:{s:`number`}},"T.TEST":{fn:`T_TEST`,p:[{n:`array1`,r:`r`},{n:`array2`,r:`r`},{n:`tails`},{n:`type`}],r:{s:`number`}}},Tr={REGEXEXTRACT:{p:[{n:`text`,s:`string`},{n:`pattern`,s:`string`},{n:`returnMode`,m:`?`,v:0},{n:`caseSensitivity`,m:`?`,v:0}],r:{s:`*`}},REGEXMATCH:{p:[{n:`text`,s:`string`},{n:`regularExpression`,s:`string`},{n:`caseInsensitive`,s:`boolean`,m:`?`,v:!1}],r:{s:`*`}},REGEXREPLACE:{p:[{n:`text`,s:`string`},{n:`pattern`,s:`string`},{n:`replacement`,s:`string`},{n:`occurrence`,m:`?`,v:0},{n:`caseSensitivity`,m:`?`,v:0}],r:{s:`*`}},REGEXTEST:{p:[{n:`text`,s:`string`},{n:`pattern`,s:`string`},{n:`caseSensitivity`,m:`?`,v:0}],r:{s:`*`}}},Er=()=>Promise.resolve().then(()=>require("./CW-b31_-r-_raT8Y.cjs")),Dr=()=>Promise.resolve().then(()=>require("./CFxueP0tbpmvY1Ip.cjs")),Or=()=>Promise.resolve().then(()=>require("./DpFg69dDCPoOK2BY.cjs")),kr=()=>Promise.resolve().then(()=>require("./CRcv32tHTbGSGtkh.cjs")),Ar=()=>Promise.resolve().then(()=>require("./B4ANcw0mAmhe2Aeb.cjs")),jr=()=>Promise.resolve().then(()=>require("./CfXcRa4RlFmqU0Op.cjs")),Mr=()=>Promise.resolve().then(()=>require("./PmwvZPFhqmL4DO58.cjs")),Nr=()=>Promise.resolve().then(()=>require("./JfM6P_qoQQTWakZf.cjs")),Pr=()=>Promise.resolve().then(()=>require("./B6IXpae7f0J8Ocq6.cjs")),Fr=()=>Promise.resolve().then(()=>require("./XRCcogT-Iqd3Wv6R.cjs")),Ir=()=>Promise.resolve().then(()=>require("./DSXLVieENYN9qXYl.cjs")),Lr=()=>Promise.resolve().then(()=>require("./CaJGoNwTL6pAJ6a4.cjs")),Rr=()=>Promise.resolve().then(()=>require("./C2uDl8VIJqh58YF_.cjs")),zr=()=>Promise.resolve().then(()=>require("./C4cZxb9nRtzTCA40.cjs")),Br=()=>Promise.resolve().then(()=>require("./iYn00uzmSLl2T0oN.cjs")),Vr=()=>Promise.resolve().then(()=>require("./BWDfauDHqB6U_2ka.cjs")),Hr=()=>Promise.resolve().then(()=>require("./Bncc0oXhFMdj_HuR.cjs")),Ur=()=>Promise.resolve().then(()=>require("./DRmo6uoGoqtiVff8.cjs")),Wr=()=>Promise.resolve().then(()=>require("./bM25C5avKgBAJVfk.cjs")),Gr=()=>Promise.resolve().then(()=>require("./SATfdSwNygvlOSKC.cjs"));module.exports=(e,t,n)=>(n||=new Map,t(n,e,r,ar,Er,`Cube`),t(n,e,se,or,Dr,`Financial`),t(n,e,ve,sr,Or,`Financial`),t(n,e,xe,cr,kr,`Financial`,lr),t(n,e,Re,ur,Ar,`Financial`),t(n,e,We,dr,jr,`Financial`),t(n,e,st,fr,Mr,`Financial`),t(n,e,mt,pr,Nr,`Financial`),t(n,e,vt,mr,Pr,`Financial`),t(n,e,wt,hr,Fr,`Financial`),t(n,e,Ft,gr,Ir,`Financial`),t(n,e,Vt,_r,Lr,`Financial`),t(n,e,Ut,vr,Rr,`Financial`),t(n,e,Jt,yr,zr,`Financial`),t(n,e,nn,br,Br,`Financial`),t(n,e,sn,xr,Vr,`Financial`),t(n,e,un,Sr,Hr,`Statistical`),t(n,e,An,Cr,Ur,`Statistical`),t(n,e,Ln,wr,Wr,`Statistical`),t(n,e,er,Tr,Gr,`Text`),n);
@@ -1,19 +0,0 @@
1
- /**
2
- * @license @sheetxl/formulas-extended - Formulas Enterprise - TypeScript formulas compatible with Excel built-ins. - v0.8.0-beta.7
3
- *
4
- * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */
7
- var e = { STOCKHISTORY: {
8
- s: "Returns an array of historical quote data for a symbol and date range you specify..",
9
- p: {
10
- stock: { d: "Symbol of financial instrument to be considered or a Stock data type." },
11
- startDate: { d: "First date to return data from." },
12
- endDate: { d: "Last date to return data from." },
13
- interval: { d: "A number indicating the granularity of the data; 0 - Daily, 1 - Weekly, 2 - Monthly." },
14
- headers: { d: "A logical value to add column header data; 0 - No column header, 1 - Show column header, 2 - Show instrument identifier and column header." },
15
- properties: { d: "A number indicating which column of data to return; 0 through 5." }
16
- },
17
- h: "Unimplemented RichData"
18
- } };
19
- export { e as default };
@@ -1,19 +0,0 @@
1
- /**
2
- * @license @sheetxl/formulas-extended - Formulas Enterprise - TypeScript formulas compatible with Excel built-ins. - v0.8.0-beta.7
3
- *
4
- * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */
7
- var a = { STOCKHISTORY: {
8
- s: "Returns an array of historical quote data for a symbol and date range you specify..",
9
- p: {
10
- stock: { d: "Symbol of financial instrument to be considered or a Stock data type." },
11
- startDate: { d: "First date to return data from." },
12
- endDate: { d: "Last date to return data from." },
13
- interval: { d: "A number indicating the granularity of the data; 0 - Daily, 1 - Weekly, 2 - Monthly." },
14
- headers: { d: "A logical value to add column header data; 0 - No column header, 1 - Show column header, 2 - Show instrument identifier and column header." },
15
- properties: { d: "A number indicating which column of data to return; 0 through 5." }
16
- },
17
- h: "Unimplemented RichData"
18
- } };
19
- export { a as default };
@@ -1,17 +0,0 @@
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