@sheetxl/formulas-extended 0.8.0-beta.1 → 0.8.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/esm/0yxQHUFt5rjQCIev.mjs +32 -0
- package/browser/esm/B0dkCLIUbDz5vaVn.mjs +37 -0
- package/browser/esm/BDiwqEqe9Jl-Rmly.mjs +19 -0
- package/browser/esm/BJjZHVPRHerJoONT.mjs +33 -0
- package/{node/esm/COqdI1LYTHd9oLA6.mjs → browser/esm/Bf0x5wP966yEyeU1.mjs} +1 -1
- package/browser/esm/BfcYyyl5rbLdyDeQ.mjs +58 -0
- package/{node/esm/srpVt74r2zbvm1N0.mjs → browser/esm/C2ZfbEIW-6-61CUe.mjs} +5 -5
- package/browser/esm/{BuGemmv84T8m0wqw.mjs → CNDVQpzD85y-8iJ4.mjs} +1 -1
- package/browser/esm/CZ7GTErfSkfNcFRk.mjs +32 -0
- package/browser/esm/CiTyrOKe-UEYKcPV.mjs +47 -0
- package/browser/esm/CjKII1gh4dO5nTCs.mjs +119 -0
- package/browser/esm/{DY3kG36QGyDbrANO.mjs → CoHdir1CxZhcwJYt.mjs} +1 -1
- package/browser/esm/D0XFBj8GRIDAu37v.mjs +20 -0
- package/{node/esm/DodhOXkSzelSxHmB.mjs → browser/esm/D25GpXzrju6GyQn2.mjs} +27 -29
- package/browser/esm/{DpoZ7h1ScIJvbOY9.mjs → D4kfW2yw0rsWNLi0.mjs} +5 -5
- package/{node/esm/vu0NRDeeTbEHPMYS.mjs → browser/esm/D4ySsDPVL4IH96en.mjs} +2 -2
- package/{node/esm/CnVJ8GAsshRjRGA-.mjs → browser/esm/DXTaMRX8ten_8WHT.mjs} +2 -2
- package/browser/esm/{B1VmvhXuEn7zaTB9.mjs → Dt0ErrS3YGvCicxr.mjs} +1 -1
- package/{node/esm/BRwwvGaJ6HvkxjFC.mjs → browser/esm/cfrOLasJbMwF7L77.mjs} +1 -1
- package/browser/esm/declarations.mjs +99 -0
- package/browser/esm/g4CKPtGz1NpGDtQq.mjs +2449 -0
- package/browser/esm/index.mjs +2281 -2585
- package/browser/esm/o8LeKZ4-9nq29pqg.mjs +23 -0
- package/{node/esm/Bma3CN4_Nec6_4n7.mjs → browser/esm/qAolCiBy-hQL59hu.mjs} +6 -6
- package/browser/esm/{BFnDPCjxJcoIItFa.mjs → zWOO2QFn-kMYJv1L.mjs} +3 -3
- package/node/esm/0vsGDvrSkTeFOp0A.mjs +19 -0
- package/node/esm/0yxQHUFt5rjQCIev.mjs +32 -0
- package/node/esm/B0dkCLIUbDz5vaVn.mjs +37 -0
- package/node/esm/BJjZHVPRHerJoONT.mjs +33 -0
- package/{browser/esm/COqdI1LYTHd9oLA6.mjs → node/esm/Bf0x5wP966yEyeU1.mjs} +1 -1
- package/node/esm/BfcYyyl5rbLdyDeQ.mjs +58 -0
- package/node/esm/{LAkTk93odAfpvx50.mjs → Bnco0vB0yNDiLGre.mjs} +1 -1
- package/{browser/esm/srpVt74r2zbvm1N0.mjs → node/esm/C2ZfbEIW-6-61CUe.mjs} +5 -5
- package/node/esm/{BQyZVLTMNFLbjVap.mjs → C3Qy2cWt_qACxJiF.mjs} +3 -3
- package/node/esm/{BuGemmv84T8m0wqw.mjs → CNDVQpzD85y-8iJ4.mjs} +1 -1
- package/node/esm/CZ7GTErfSkfNcFRk.mjs +32 -0
- package/node/esm/CgY5V9Cmm0UJmyGW.mjs +2449 -0
- package/node/esm/CiTyrOKe-UEYKcPV.mjs +47 -0
- package/node/esm/CjKII1gh4dO5nTCs.mjs +119 -0
- package/node/esm/D0XFBj8GRIDAu37v.mjs +20 -0
- package/{browser/esm/DodhOXkSzelSxHmB.mjs → node/esm/D25GpXzrju6GyQn2.mjs} +27 -29
- package/node/esm/{DpoZ7h1ScIJvbOY9.mjs → D4kfW2yw0rsWNLi0.mjs} +5 -5
- package/{browser/esm/vu0NRDeeTbEHPMYS.mjs → node/esm/D4ySsDPVL4IH96en.mjs} +2 -2
- package/{browser/esm/CnVJ8GAsshRjRGA-.mjs → node/esm/DXTaMRX8ten_8WHT.mjs} +2 -2
- package/node/esm/{B1VmvhXuEn7zaTB9.mjs → Dt0ErrS3YGvCicxr.mjs} +1 -1
- package/{browser/esm/BRwwvGaJ6HvkxjFC.mjs → node/esm/cfrOLasJbMwF7L77.mjs} +1 -1
- package/node/esm/declarations.mjs +99 -0
- package/node/esm/index.mjs +2551 -2837
- package/node/esm/o8LeKZ4-9nq29pqg.mjs +23 -0
- package/{browser/esm/Bma3CN4_Nec6_4n7.mjs → node/esm/qAolCiBy-hQL59hu.mjs} +6 -6
- package/package.json +11 -6
- package/types/declarations.d.ts +4 -0
- package/types/src/.generated/decl/financial/Annuity.decl.d.ts +5 -0
- package/types/src/.generated/decl/financial/{Financial.decl.d.ts → Cashflow.decl.d.ts} +1 -1
- package/types/src/.generated/decl/financial/Convert.decl.d.ts +4 -0
- package/types/src/.generated/decl/financial/Coupon.decl.d.ts +4 -0
- package/types/src/.generated/decl/financial/{Financial2.decl.d.ts → Depreciation.decl.d.ts} +1 -1
- package/types/src/.generated/decl/financial/Growth.decl.d.ts +4 -0
- package/types/src/.generated/decl/financial/{ODD.decl.d.ts → Odd.decl.d.ts} +1 -1
- package/types/src/.generated/decl/financial/{Financial3.decl.d.ts → STOCKHISTORY.decl.d.ts} +1 -1
- package/types/src/.generated/decl/financial/Security.decl.d.ts +4 -0
- package/types/src/.generated/decl/financial/{Financial4.decl.d.ts → SecurityMaturity.decl.d.ts} +1 -1
- package/types/src/.generated/decl/{statistical/TTEST.decl.d.ts → financial/TBill.decl.d.ts} +1 -1
- package/types/src/.generated/decl/lookupReference/GroupBy.decl.d.ts +4 -0
- package/types/src/.generated/decl/lookupReference/PivotBy.decl.d.ts +4 -0
- package/types/src/.generated/decl/statistical/{ETS.decl.d.ts → Ets.decl.d.ts} +1 -1
- package/types/src/.generated/decl/statistical/TTest.decl.d.ts +4 -0
- package/types/src/.generated/declarations.d.ts +7 -0
- package/types/src/.generated/desc/financial/Annuity.desc.d.ts +5 -0
- package/types/src/.generated/desc/financial/{Financial.desc.d.ts → Cashflow.desc.d.ts} +1 -1
- package/types/src/.generated/desc/financial/Convert.desc.d.ts +4 -0
- package/types/src/.generated/desc/financial/Coupon.desc.d.ts +4 -0
- package/types/src/.generated/desc/financial/{Financial2.desc.d.ts → Depreciation.desc.d.ts} +1 -1
- package/types/src/.generated/desc/financial/Growth.desc.d.ts +4 -0
- package/types/src/.generated/desc/financial/{ODD.desc.d.ts → Odd.desc.d.ts} +1 -1
- package/types/src/.generated/desc/financial/{Financial3.desc.d.ts → STOCKHISTORY.desc.d.ts} +1 -1
- package/types/src/.generated/desc/financial/Security.desc.d.ts +4 -0
- package/types/src/.generated/desc/financial/{Financial4.desc.d.ts → SecurityMaturity.desc.d.ts} +1 -1
- package/types/src/.generated/desc/{statistical/TTEST.desc.d.ts → financial/TBill.desc.d.ts} +1 -1
- package/types/src/.generated/desc/lookupReference/GroupBy.desc.d.ts +4 -0
- package/types/src/.generated/desc/lookupReference/PivotBy.desc.d.ts +4 -0
- package/types/src/.generated/desc/statistical/{ETS.desc.d.ts → Ets.desc.d.ts} +1 -1
- package/types/src/.generated/desc/statistical/TTest.desc.d.ts +4 -0
- package/types/src/_utils/AnyArgs.d.ts +17 -3
- package/types/src/_utils/FinanaceSolver.d.ts +39 -2
- package/types/src/_utils/FinanceAmor.d.ts +23 -0
- package/types/src/_utils/FinanceCashflow.d.ts +42 -0
- package/types/src/_utils/FinanceCoupon.d.ts +92 -82
- package/types/src/_utils/FinanceDate.d.ts +24 -0
- package/types/src/_utils/FinanceDayCount.d.ts +46 -0
- package/types/src/_utils/FinanceOdd.d.ts +93 -0
- package/types/src/_utils/FinanceSecurity.d.ts +84 -0
- package/types/src/_utils/FinanceUtils.d.ts +37 -1
- package/types/src/_utils/LeastSquares.d.ts +20 -22
- package/types/src/_utils/Pivot.d.ts +205 -0
- package/types/src/_utils/RegexCompile.d.ts +33 -0
- package/types/src/cube/Cube.d.ts +7 -7
- package/types/src/financial/ACCRINT.d.ts +33 -6
- package/types/src/financial/AMORDEGRC.d.ts +22 -40
- package/types/src/financial/Annuity.d.ts +118 -0
- package/types/src/financial/Cashflow.d.ts +84 -0
- package/types/src/financial/Convert.d.ts +26 -0
- package/types/src/financial/Coupon.d.ts +72 -0
- package/types/src/financial/Date.d.ts +34 -5
- package/types/src/financial/Depreciation.d.ts +58 -0
- package/types/src/financial/Growth.d.ts +22 -0
- package/types/src/financial/Odd.d.ts +82 -0
- package/types/src/financial/STOCKHISTORY.d.ts +17 -0
- package/types/src/financial/Security.d.ts +68 -0
- package/types/src/financial/SecurityMaturity.d.ts +107 -0
- package/types/src/financial/TBill.d.ts +40 -0
- package/types/src/financial/VDB.d.ts +15 -13
- package/types/src/lookupReference/GroupBy.d.ts +14 -0
- package/types/src/lookupReference/PivotBy.d.ts +17 -0
- package/types/src/statistical/{ETS.d.ts → Ets.d.ts} +14 -14
- package/types/src/statistical/Regression.d.ts +13 -18
- package/types/src/statistical/{TTEST.d.ts → TTest.d.ts} +5 -5
- package/types/src/text/RegEx.d.ts +34 -11
- package/browser/cjs/B4JJfKSI4ppwU855.cjs +0 -1
- package/browser/cjs/BWDfauDHqB6U_2ka.cjs +0 -1
- package/browser/cjs/BwLx9ix5Sq7suAYP.cjs +0 -1
- package/browser/cjs/C2uDl8VIJqh58YF_.cjs +0 -1
- package/browser/cjs/CW-b31_-r-_raT8Y.cjs +0 -1
- package/browser/cjs/Clu7XiAsCB48GDXN.cjs +0 -1
- package/browser/cjs/CnZfa45XxA-9Jhmp.cjs +0 -1
- package/browser/cjs/DsFZgtSQpC75d1M0.cjs +0 -1
- package/browser/cjs/JfM6P_qoQQTWakZf.cjs +0 -1
- package/browser/cjs/bM25C5avKgBAJVfk.cjs +0 -1
- package/browser/cjs/fqTQ_p3ehzUvc1tF.cjs +0 -1
- package/browser/cjs/h3dw1jAp2J5Pu4p3.cjs +0 -1
- package/browser/cjs/index.cjs +0 -1
- package/browser/cjs/jev6VGWTdgEgm4Yk.cjs +0 -1
- package/browser/cjs/lEQC21-Sk4lwHy2r.cjs +0 -1
- package/browser/esm/CwoMEzOtRihuYUTr.mjs +0 -20
- package/browser/esm/Dy6UD7hQRBsT0WNp.mjs +0 -304
- package/node/esm/CwoMEzOtRihuYUTr.mjs +0 -20
- package/node/esm/Dy6UD7hQRBsT0WNp.mjs +0 -304
- package/types/src/financial/Financial.d.ts +0 -288
- package/types/src/financial/Financial2.d.ts +0 -99
- package/types/src/financial/Financial3.d.ts +0 -95
- package/types/src/financial/Financial4.d.ts +0 -82
- package/types/src/financial/ODD.d.ts +0 -106
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IRange, AcceptError, Omittable } from '@sheetxl/primitives';
|
|
2
|
+
/**
|
|
3
|
+
* Aggregate values by rows and columns.
|
|
4
|
+
* @param rowFields The range or array containing the row fields.
|
|
5
|
+
* @param colFields The range or array containing the column fields.
|
|
6
|
+
* @param values The range or array containing the value fields.
|
|
7
|
+
* @param fn The function used to do the aggregations: a LAMBDA, a function name such as SUM, or an array of them.
|
|
8
|
+
* @param fieldHeaders A number between 0 and 3 that specifies whether the field data has headers and whether field headers should be return in the results.
|
|
9
|
+
* @param rowTotalDepth Show totals for the row fields. 0 for none, 1 for grand totals, 2 for grand totals and first level subtotals, etc. A negative number shows them at the top.
|
|
10
|
+
* @param rowSortOrder The column index to sort the row fields on. A negative index will sort in reverse order.
|
|
11
|
+
* @param colTotalDepth Show totals for the column fields. 0 for none, 1 for grand totals, 2 for grand totals and first level subtotals, etc. A negative number shows them at the left.
|
|
12
|
+
* @param colSortOrder The column index to sort the column fields on. A negative index will sort in reverse order.
|
|
13
|
+
* @param filterArray An array of boolean where TRUE represents a row to retain.
|
|
14
|
+
* @param relativeTo Defines what PERCENTOF is calculated relative to. 0 for column totals, 1 for row totals, 2 for the grand total, 3 for parent column totals, 4 for parent row totals.
|
|
15
|
+
*/
|
|
16
|
+
export declare function PIVOTBY(rowFields: Omittable<IRange>, colFields: Omittable<IRange>, values: IRange, fn: AcceptError<any>, fieldHeaders?: Omittable<number>, rowTotalDepth?: Omittable<number>, rowSortOrder?: Omittable<IRange>, colTotalDepth?: Omittable<number>, colSortOrder?: Omittable<IRange>, filterArray?: Omittable<IRange>, relativeTo?: Omittable<number>): IRange;
|
|
17
|
+
//# sourceMappingURL=PivotBy.d.ts.map
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { IRange, Scalar } from '@sheetxl/primitives';
|
|
1
|
+
import { IRange, Scalar, Omittable } from '@sheetxl/primitives';
|
|
2
2
|
/**
|
|
3
|
+
* Returns the forecasted value for a specific future target date using exponential smoothing method.
|
|
3
4
|
* @name FORECAST.ETS
|
|
4
|
-
* @summary Returns the forecasted value for a specific future target date using exponential smoothing method.
|
|
5
5
|
* @param targetDate is the data point for which you want to predict a value. It should carry on the pattern of values in the timeline.
|
|
6
6
|
* @param values is the array or range of numeric data you're predicting.
|
|
7
7
|
* @param timeline is the independent array or range of numeric data. The dates in the timeline must have a consistent step between them and can't be zero.
|
|
8
8
|
* @param seasonality [1] 0 = no seasonality; 1 = auto-detect; any integer > 1 = explicit seasonal period.
|
|
9
9
|
* @param dataCompletion [1] 1 = interpolate missing values; 0 = fill with zeros.
|
|
10
|
-
* @param aggregation [1] Aggregation method for duplicate timestamps: 1=Average, 2=Count, 3=
|
|
10
|
+
* @param aggregation [1] Aggregation method for duplicate timestamps: 1=Average, 2=Count, 3=CountA, 4=Max, 5=Median, 6=Min, 7=Sum.
|
|
11
11
|
*/
|
|
12
|
-
export declare function FORECAST_ETS(targetDate: number, values: IRange, timeline: IRange, seasonality?: number
|
|
12
|
+
export declare function FORECAST_ETS(targetDate: number, values: IRange, timeline: IRange, seasonality?: Omittable<number>, dataCompletion?: Omittable<number>, aggregation?: Omittable<number>): Scalar;
|
|
13
13
|
/**
|
|
14
|
+
* Returns a confidence interval for the forecasted value at the specified target date.
|
|
14
15
|
* @name FORECAST.ETS.CONFINT
|
|
15
|
-
* @summary Returns a confidence interval for the forecasted value at the specified target date.
|
|
16
16
|
* @param targetDate is the data point for which you want to predict a value. It should carry on the pattern of values in the timeline.
|
|
17
17
|
* @param values is the array or range of numeric data you're predicting.
|
|
18
18
|
* @param timeline is the independent array or range of numeric data. The dates in the timeline must have a consistent step between them and can't be zero.
|
|
19
19
|
* @param confidenceLevel [0.95] Confidence probability, must be strictly between 0 and 1.
|
|
20
20
|
* @param seasonality [1] 0 = no seasonality; 1 = auto-detect; any integer > 1 = explicit seasonal period.
|
|
21
21
|
* @param dataCompletion [1] 1 = interpolate missing values; 0 = fill with zeros.
|
|
22
|
-
* @param aggregation [1] Aggregation method for duplicate timestamps: 1=Average, 2=Count, 3=
|
|
22
|
+
* @param aggregation [1] Aggregation method for duplicate timestamps: 1=Average, 2=Count, 3=CountA, 4=Max, 5=Median, 6=Min, 7=Sum.
|
|
23
23
|
*/
|
|
24
|
-
export declare function FORECAST_ETS_CONFINT(targetDate: number, values: IRange, timeline: IRange, confidenceLevel?: number
|
|
24
|
+
export declare function FORECAST_ETS_CONFINT(targetDate: number, values: IRange, timeline: IRange, confidenceLevel?: Omittable<number>, seasonality?: Omittable<number>, dataCompletion?: Omittable<number>, aggregation?: Omittable<number>): Scalar;
|
|
25
25
|
/**
|
|
26
|
+
* Returns the length of the repetitive pattern in the data for the specific time series.
|
|
26
27
|
* @name FORECAST.ETS.SEASONALITY
|
|
27
|
-
* @summary Returns the length of the repetitive pattern in the data for the specific time series.
|
|
28
28
|
* @param values is the array or range of numeric data you're predicting.
|
|
29
29
|
* @param timeline is the independent array or range of numeric data. The dates in the timeline must have a consistent step between them and can't be zero.
|
|
30
30
|
* @param dataCompletion [1] 1 = interpolate missing values; 0 = fill with zeros.
|
|
31
|
-
* @param aggregation [1] Aggregation method for duplicate timestamps: 1=Average, 2=Count, 3=
|
|
31
|
+
* @param aggregation [1] Aggregation method for duplicate timestamps: 1=Average, 2=Count, 3=CountA, 4=Max, 5=Median, 6=Min, 7=Sum.
|
|
32
32
|
*/
|
|
33
|
-
export declare function FORECAST_ETS_SEASONALITY(values: IRange, timeline: IRange, dataCompletion?: number
|
|
33
|
+
export declare function FORECAST_ETS_SEASONALITY(values: IRange, timeline: IRange, dataCompletion?: Omittable<number>, aggregation?: Omittable<number>): Scalar;
|
|
34
34
|
/**
|
|
35
|
+
* Returns a requested statistic for the ETS forecast model.
|
|
35
36
|
* @name FORECAST.ETS.STAT
|
|
36
|
-
* @summary Returns a requested statistic for the ETS forecast model.
|
|
37
37
|
* @param values is the array or range of numeric data you're predicting.
|
|
38
38
|
* @param timeline is the independent array or range of numeric data.
|
|
39
39
|
* @param statisticType 1=Alpha, 2=Beta (trend smoothing), 3=Gamma (seasonal smoothing), 4=MASE, 5=SMAPE, 6=MAE, 7=RMSE, 8=Step size.
|
|
40
40
|
* @param seasonality [1] 0 = no seasonality; 1 = auto-detect; any integer > 1 = explicit seasonal period.
|
|
41
41
|
* @param dataCompletion [1] 1 = interpolate missing values; 0 = fill with zeros.
|
|
42
|
-
* @param aggregation [1] Aggregation method for duplicate timestamps: 1=Average, 2=Count, 3=
|
|
42
|
+
* @param aggregation [1] Aggregation method for duplicate timestamps: 1=Average, 2=Count, 3=CountA, 4=Max, 5=Median, 6=Min, 7=Sum.
|
|
43
43
|
*/
|
|
44
|
-
export declare function FORECAST_ETS_STAT(values: IRange, timeline: IRange, statisticType: number, seasonality?: number
|
|
45
|
-
//# sourceMappingURL=
|
|
44
|
+
export declare function FORECAST_ETS_STAT(values: IRange, timeline: IRange, statisticType: number, seasonality?: Omittable<number>, dataCompletion?: Omittable<number>, aggregation?: Omittable<number>): Scalar;
|
|
45
|
+
//# sourceMappingURL=Ets.d.ts.map
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Scalar, IRange, Omittable, ReportType, NoLift } from '@sheetxl/primitives';
|
|
2
|
+
import { RegressionData } from '../_utils/LeastSquares';
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
* evaluate it at new x-values, and LOGEST / GROWTH are the linear pair run on `ln(y)`.
|
|
5
|
-
*
|
|
6
|
-
* All four share `_utils/LeastSquares.ts` — the known_y/known_x/new_x shape rules, the
|
|
7
|
-
* rank-deficient QR solve, and the `stats` grid.
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @summary Returns statistics that describe a linear trend matching known data points, by fitting a straight line using the least squares method.
|
|
4
|
+
* Returns statistics that describe a linear trend matching known data points, by fitting a straight line using the least squares method.
|
|
11
5
|
* @param knownYs is the set of y-values you already know in the relationship y = mx + b.
|
|
12
6
|
* @param knownXs is an optional set of x-values that you may already know in the relationship y = mx + b.
|
|
13
7
|
* @param constant is a logical value: the constant b is calculated normally if Const = TRUE; b is set equal to 0 if Const = FALSE.
|
|
@@ -15,9 +9,9 @@ import { FormulaError, Scalar, IRange, Omittable } from '@sheetxl/primitives';
|
|
|
15
9
|
*
|
|
16
10
|
* @remarks {@link https://support.microsoft.com/en-us/office/linest-function-84d7d0d9-6e50-4101-977a-fa7abf772b6d|Docs}
|
|
17
11
|
*/
|
|
18
|
-
export declare function LINEST(knownYs: IRange, knownXs?: Omittable<IRange
|
|
12
|
+
export declare function LINEST(knownYs: IRange, knownXs?: ReportType<Omittable<IRange>>, constant?: Omittable<ReportType<NoLift<boolean>>>, stats?: Omittable<ReportType<NoLift<boolean>>>): Scalar[][];
|
|
19
13
|
/**
|
|
20
|
-
*
|
|
14
|
+
* Returns statistics that describe an exponential curve matching known data points.
|
|
21
15
|
* @param knownYs is the set of y-values you already know in the relationship y = b*m^x.
|
|
22
16
|
* @param knownXs is an optional set of x-values that you may already know in the relationship y = b*m^x.
|
|
23
17
|
* @param constant is a logical value: the constant b is calculated normally if Const = TRUE; b is set equal to 1 if Const = FALSE.
|
|
@@ -25,25 +19,26 @@ export declare function LINEST(knownYs: IRange, knownXs?: Omittable<IRange>, con
|
|
|
25
19
|
*
|
|
26
20
|
* @remarks {@link https://support.microsoft.com/en-us/office/logest-function-f27462d8-3657-4030-866b-a272c1d18b4b|Docs}
|
|
27
21
|
*/
|
|
28
|
-
export declare function LOGEST(knownYs: IRange, knownXs?: Omittable<IRange
|
|
22
|
+
export declare function LOGEST(knownYs: IRange, knownXs?: ReportType<Omittable<IRange>>, constant?: Omittable<ReportType<NoLift<boolean>>>, stats?: Omittable<ReportType<NoLift<boolean>>>): Scalar[][];
|
|
29
23
|
/**
|
|
30
|
-
*
|
|
24
|
+
* Returns values along a linear trend fitted to known data points.
|
|
31
25
|
* @param knownYs The known y-values in the relationship y = mx + b.
|
|
32
26
|
* @param knownXs Optional x-values. Defaults to {1,2,3,...,n}.
|
|
33
27
|
* @param newXs The x-values for which to predict y. Defaults to knownX.
|
|
34
|
-
* @param
|
|
28
|
+
* @param constant If FALSE, forces the constant b to zero. Defaults to TRUE.
|
|
35
29
|
*
|
|
36
30
|
* @remarks {@link https://support.microsoft.com/en-us/office/trend-function-e2f135f0-8827-4096-9873-9a7cf7b51ef1|Docs}
|
|
37
31
|
*/
|
|
38
|
-
export declare function TREND(knownYs: IRange, knownXs?: Omittable<IRange
|
|
32
|
+
export declare function TREND(knownYs: IRange, knownXs?: ReportType<Omittable<IRange>>, newXs?: Omittable<IRange>, constant?: Omittable<ReportType<NoLift<boolean>>>): Scalar[][];
|
|
39
33
|
/**
|
|
40
|
-
*
|
|
34
|
+
* Returns numbers in an exponential growth trend matching known data points.
|
|
41
35
|
* @param knownYs is the set of y-values you already know in the relationship y = b*m^x, an array or range of positive numbers.
|
|
42
36
|
* @param knownXs is an optional set of x-values that you may already know in the relationship y = b*m^x, an array or range the same size as Known_y's.
|
|
43
37
|
* @param newXs are new x-values for which you want GROWTH to return corresponding y-values.
|
|
44
|
-
* @param
|
|
38
|
+
* @param constant is a logical value: the constant b is calculated normally if Const = TRUE; b is set equal to 1 if Const = FALSE.
|
|
45
39
|
*
|
|
46
40
|
* @remarks {@link https://support.microsoft.com/en-us/office/growth-function-541a91dc-3d5e-437d-b156-21324e68b80d|Docs}
|
|
47
41
|
*/
|
|
48
|
-
export declare function GROWTH(knownYs: IRange, knownXs?: Omittable<IRange
|
|
42
|
+
export declare function GROWTH(knownYs: IRange, knownXs?: ReportType<Omittable<IRange>>, newXs?: Omittable<IRange>, constant?: Omittable<ReportType<NoLift<boolean>>>): Scalar[][];
|
|
43
|
+
export type { RegressionData };
|
|
49
44
|
//# sourceMappingURL=Regression.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IRange } from '@sheetxl/primitives';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Returns the probability associated with a Student's t-Test.
|
|
4
4
|
* @param array1 is the first data set.
|
|
5
5
|
* @param array2 is the second data set.
|
|
6
6
|
* @param tails specifies the number of distribution tails to return: one-tailed distribution = 1; two-tailed distribution = 2.
|
|
@@ -10,10 +10,10 @@ import { IRange } from '@sheetxl/primitives';
|
|
|
10
10
|
* @remarks
|
|
11
11
|
* {@link https://support.microsoft.com/en-us/office/t-test-function-d4e08ec3-c545-485f-962e-276f7cbed055|Docs}
|
|
12
12
|
*/
|
|
13
|
-
export declare function TTEST(array1: IRange
|
|
13
|
+
export declare function TTEST(array1: IRange, array2: IRange, tails: number, type: number): number;
|
|
14
14
|
/**
|
|
15
|
+
* Returns the probability associated with a Student's t-Test.
|
|
15
16
|
* @name T.TEST
|
|
16
|
-
* @summary Returns the probability associated with a Student's t-Test.
|
|
17
17
|
* @param array1 is the first data set.
|
|
18
18
|
* @param array2 is the second data set.
|
|
19
19
|
* @param tails specifies the number of distribution tails to return: one-tailed distribution = 1; two-tailed distribution = 2.
|
|
@@ -23,5 +23,5 @@ export declare function TTEST(array1: IRange<number>, array2: IRange<number>, ta
|
|
|
23
23
|
* @remarks
|
|
24
24
|
* {@link https://support.microsoft.com/en-us/office/t-test-function-d4e08ec3-c545-485f-962e-276f7cbed055|Docs}
|
|
25
25
|
*/
|
|
26
|
-
export declare function T_TEST(array1: IRange
|
|
27
|
-
//# sourceMappingURL=
|
|
26
|
+
export declare function T_TEST(array1: IRange, array2: IRange, tails: number, type: number): number;
|
|
27
|
+
//# sourceMappingURL=TTest.d.ts.map
|
|
@@ -1,34 +1,57 @@
|
|
|
1
1
|
import { IRange, Scalar } from '@sheetxl/primitives';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Extracts substrings of 'text' based on the provided REGEX 'pattern'.
|
|
4
4
|
* @param text is the text string from which you want to extract characters.
|
|
5
5
|
* @param pattern The regular expression to be applied.
|
|
6
6
|
* @param returnMode Specify which matches to return.
|
|
7
|
-
* @param
|
|
7
|
+
* @param caseSensitivity Whether the match is case sensitive (0) or insensitive (1).
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* `returnMode` is three functions in one slot: the first match (0), every match (1), or the
|
|
11
|
+
* capture groups of the first match (2). It is truncated before it is read, so 1.5 is 1, and
|
|
12
|
+
* anything else is #VALUE!. Modes 1 and 2 both spill across a row. A pattern that matches nothing
|
|
13
|
+
* is #N/A, and asking mode 2 of a pattern with no capture groups is #VALUE! whether or not it
|
|
14
|
+
* would have matched.
|
|
8
15
|
*/
|
|
9
|
-
export declare function REGEXEXTRACT(text: string, pattern: string, returnMode?: number,
|
|
16
|
+
export declare function REGEXEXTRACT(text: string, pattern: string, returnMode?: number, caseSensitivity?: number): IRange | Scalar;
|
|
10
17
|
/**
|
|
11
|
-
*
|
|
18
|
+
* Tests whether a text string matches a regular expression.
|
|
12
19
|
* @param text is the text string to be tested against the regular expression.
|
|
13
20
|
* @param regularExpression The regular expression to test the text against.
|
|
14
21
|
* @param caseInsensitive Whether the match is case insensitive.
|
|
15
22
|
* @category Sheets
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* The Google Sheets spelling of {@link REGEXTEST}; Excel has no such function, so this keeps
|
|
26
|
+
* Sheets' signature, whose third argument is a boolean rather than Excel's 0-or-1 number. The
|
|
27
|
+
* pattern language is the one the Excel REGEX functions use.
|
|
16
28
|
*/
|
|
17
29
|
export declare function REGEXMATCH(text: string, regularExpression: string, caseInsensitive?: boolean): Scalar;
|
|
18
30
|
/**
|
|
19
|
-
*
|
|
31
|
+
* Returns 'text', with 'replacement' in place of matches with 'pattern'.
|
|
20
32
|
* @param text is the text string from which you want to extract characters.
|
|
21
33
|
* @param pattern The regular expression to be applied.
|
|
22
34
|
* @param replacement The replacement string.
|
|
23
|
-
* @param occurrence
|
|
24
|
-
* @param
|
|
35
|
+
* @param occurrence Which match to replace; 0 replaces them all and a negative counts from the end.
|
|
36
|
+
* @param caseSensitivity Whether the match is case sensitive (0) or insensitive (1).
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* `occurrence` is truncated toward zero — 1.9 is the first match, and 0.9 is the zero that means
|
|
40
|
+
* all of them — and a negative counts from the end, so −1 is the last. Matches never overlap, so
|
|
41
|
+
* the second `aa` of `aaaa` starts at position 3. In `replacement`, `$0` and `$&` are both the
|
|
42
|
+
* whole match, `$1` / `${1}` / `\1` are group references, and a reference to a group that does not
|
|
43
|
+
* exist is #VALUE! rather than literal text.
|
|
25
44
|
*/
|
|
26
|
-
export declare function REGEXREPLACE(text: string, pattern: string, replacement: string, occurrence?: number,
|
|
45
|
+
export declare function REGEXREPLACE(text: string, pattern: string, replacement: string, occurrence?: number, caseSensitivity?: number): Scalar;
|
|
27
46
|
/**
|
|
28
|
-
*
|
|
47
|
+
* Checks whether the input matches the pattern, and returns TRUE or FALSE.
|
|
29
48
|
* @param text is the text string to be checked.
|
|
30
49
|
* @param pattern is the regular expression to be applied.
|
|
31
|
-
* @param
|
|
50
|
+
* @param caseSensitivity Whether the match is case sensitive (0) or insensitive (1).
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* `caseSensitivity` is a number rather than a boolean: 0 is sensitive and 1 is not, it is
|
|
54
|
+
* truncated first, and anything else — 2, a negative, a huge value, non-numeric text — is #VALUE!.
|
|
32
55
|
*/
|
|
33
|
-
export declare function REGEXTEST(text: string, pattern: string,
|
|
56
|
+
export declare function REGEXTEST(text: string, pattern: string, caseSensitivity?: number): Scalar;
|
|
34
57
|
//# sourceMappingURL=RegEx.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
exports.default={AMORDEGRC:{s:`Returns the depreciation for each accounting period using a`,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={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={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:`Settlement date number number.`},maturity:{d:`Maturity date number number.`},frequency:{d:`Coupons per year: 1, 2, or 4.`},basis:{d:`Day-count basis (0–4). Default 0.`}}},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 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.`}}},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={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={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={COUPDAYS:{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.`}}},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.`}}},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.`}}},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.`}}},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.`}}},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.`}}},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 pmts are due.`}}},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.`}}},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.`}}},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.`}}},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.`}}},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).`}}},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.`}}},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.`}}},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.`}}},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.`}}},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.`}}},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.`}}},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.`}}},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.`}}},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.`}}},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.`}}},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).`}}},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`},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.`}}},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.`}}},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.`}}},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.`}}},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.`}}}};
|
|
@@ -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.`},useConst:{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.`},useConst:{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:{},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={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={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={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.`},caseInsensitive:{d:`Whether the match is case insensitive.`}}},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:`The occurrence of the match to replace.`},caseInsensitive:{d:`Whether the match is case insensitive.`}}},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.`},caseInsensitive:{d:`Whether the match is case insensitive.`}}}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
exports.default={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.`}}},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.`}}},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.`}}},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.`}}},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.`}}}};
|
package/browser/cjs/index.cjs
DELETED
|
@@ -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}var d=[31,29,31,30,31,30,31,31,30,31,30,31],f=[31,28,31,30,31,30,31,31,30,31,30,31];function p(e){return e%4==0&&e%100!=0||e%400==0}function m(e,t){return p(e)?d[t]:f[t]}function h(e,t,n){return m(e,t)===n}function g(e,t){return Math.trunc(e)-Math.trunc(t)}function _(e,t){let r=n.FormulaContext.fromSerialDate(e,!0),i=n.FormulaContext.fromSerialDate(t,!0),a=i.getFullYear()-r.getFullYear();if(a>1)return!0;if(a<1)return!1;let o=i.getMonth()-r.getMonth();return o>0||!(o<0)&&i.getDate()>r.getDate()}function v(e,t){if(h(e.getFullYear(),e.getMonth(),e.getDate())){e.setDate(1),e.setMonth(e.getMonth()+t);let n=e.getFullYear(),r=e.getMonth();e.setDate(m(n,r))}else e.setMonth(e.getMonth()+t);return e}function y(e){return!(e<0||e>4)}function b(e){return n.FormulaContext.getDateParts(Math.max(0,Math.floor(e)))}function x(e,t,n,r,i,a){return 360*(r-e)+30*(i-t)+(a-n)}function S(e,t,r){switch(r){case 0:return function(e,t){let n=b(e),r=b(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===(p(i)?29:28)&&(o=30,u=!0):o===31&&(o=30),l!==31||u||(o<30?(c===12?(s+=1,c=1):c+=1,l=1):l=30),{days:Math.abs(x(i,a,o,s,c,l)),yearDays:360}}(e,t);case 1:return function(e,t){if(e===t)return{days:0,yearDays:365};let r=b(e),i=b(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,m=n.FormulaContext.getSerialDate(u,1,1);if(u===1900&&(m+=1),c===0)f=n.FormulaContext.getSerialDate(u,12,31)-m+1;else if(c===1){let r=Math.min(e,t),i=Math.max(e,t),a=b(r),o=b(i),s=o.month-a.month;if(s>0||s===0&&o.day>a.day)f=(n.FormulaContext.getSerialDate(d+1,1,1)-m)/l;else{f=365;for(let e of[u,d])if(p(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)-m)/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=b(e),r=b(t),i=n.day,a=r.day;return i===31&&(i=30),a===31&&(a=30),{days:Math.abs(x(n.year,n.month,i,r.year,r.month,a)),yearDays:360}}(e,t)}}function C(e,t,n){let{days:r}=S(e,t,n);return e<t?r:0}function w(e,t){let n=e.getMonth(),r=e.getDate();return r===new Date(e.getFullYear(),n+1,0).getDate()?new Date(t,n+1,0):new Date(t,n,r)}function ee(e,t,r){let i=n.FormulaContext.fromSerialDate(e,!0),a=n.FormulaContext.fromSerialDate(t,!0),o=12/r;for(a=w(a,i.getFullYear()),a>i&&(a=w(a,a.getFullYear()-1));a<=i;)a=v(a,o);return a=v(a,-o),a}function T(e,t,r){return n.FormulaContext.toSerialDate(ee(e,t,r),!0)}function E(e,t,r){let i=v(ee(e,t,r),12/r);return n.FormulaContext.toSerialDate(i,!0)}function D(e,t,n,r){return C(T(e,t,n),e,r)}function O(e,t,r,i){if(i===3)return 365/r;if(i!==1)return 360/r;let a=T(e,t,r),o=v(n.FormulaContext.fromSerialDate(a,!0),12/r),s=n.FormulaContext.toSerialDate(o,!0);return a<0&&r===1?365:s-a}function k(e,t,r){let i=n.FormulaContext.fromSerialDate(e,!0),a=n.FormulaContext.fromSerialDate(t,!0),o=12/r,s=0;for(;a>i;)a=v(a,-o),s++;return s}function A(e,t,r){let i=n.FormulaContext.fromSerialDate(e,!0);if(i=v(i,t),r){let e=i.getFullYear(),t=i.getMonth();i.setDate(m(e,t))}return n.FormulaContext.toSerialDate(i,!0)}function te(e,t,r,i,a,o,s,c,l){let u=C(r,i,l),d=O(e,i,c,l);return u<d?function(e,t,n,r,i,a,o,s,c,l,u){let d=k(e,t,s),f=C(e,r,c),p=C(n,e,c),m=a/s,h=100*i/s,g=h*l/u,_=o/(1+m)**(d-1+f/u);_+=g/(1+m)**(f/u);for(let e=2;e<=d;e++)_+=h/(1+m)**(e-1+f/u);return _-=h*p/u,_}(e,t,r,i,a,o,s,c,l,u,d):function(e,t,r,i,a,o,s,c,l,u){let d=k(i,t,c),f=function(e,t,r,i){let a=n.FormulaContext.fromSerialDate(e,!0),o=n.FormulaContext.fromSerialDate(t,!0),s=a.getFullYear(),c=a.getMonth(),l=a.getDate(),u=o.getFullYear(),d=o.getMonth(),f=o.getDate(),p=h(s,c,l)||c!==1&&l>28&&l<m(s,c)&&h(u,d,f),g=A(t,0,p),_=+!!i+ +(t<g),v=A(g,r,p);for(;r>0?v<t:v>t;)v=A(v,r,p),_++;return _}(i,e,12/c,!0),p;p=l===2||l===3?C(e,E(e,i,c),l):u-C(T(e,i,c),e,l);let g=o/c,_=100*a/c,y=s/(1+g)**(d+f+p/u),b=k(r,i,c),x=i,S=0,w=0;for(let t=b;t>=1;t--){let i=n.FormulaContext.fromSerialDate(x,!0),a=n.FormulaContext.toSerialDate(v(i,-12/c),!0),o=l===1?C(a,x,l):u;S+=(t>1?o:C(r,x,l))/o;let s=Math.max(r,a),d=Math.min(e,x);w+=(s<d?C(s,d,l):0)/o,x=a}y+=_*S/(1+g)**(f+p/u);for(let e=1;e<=d;e++)y+=_/(1+g)**(e+f+p/u);return y-=_*w,y}(e,t,r,i,a,o,s,c,l,d)}function ne(e,t,n,r,i,a,o){let s=k(e,t,a),c=O(e,t,a,o),l=D(e,t,a,o),u=c-l,d=100*n/a,f=r/a;if(s===1)return(d+i)/(f*u/c+1)-d*l/c;let p=i/(1+f)**(s-1+u/c);for(let e=1;e<=s;e++)p+=d/(1+f)**(e-1+u/c);return p-=d*l/c,p}function re(e,t,n,r,i,a){let o=D(e,t,i,a),s=O(e,t,i,a),c=k(e,t,i),l=(s-o)/s-1,u=1+r/i,d=100*n/i,f=0,p=0;for(let e=1;e<=c;e++){let t=e+l,n=d/u**t;f+=t*n,p+=n}let m=c+l,h=100/u**m;return f+=m*h,p+=h,f/p/i}function ie(e,t,n,r,i){let a=Math.min(i/n,1),o=a===1&&r!==1?0:e*(1-a)**(r-1),s=e*(1-a)**r,c=s<t?o-t:o-s;return Math.max(c,0)}function j(e,t,n){return T(e,t,n)>=0}function M(e){return!(e<1||e>4||e===3)}var ae=t({ACCRINT:()=>oe});function oe(e,t,r,i,a,o,s=0,c=!0){if(e=Math.trunc(e),t=Math.trunc(t),r=Math.trunc(r),o=Math.trunc(o),s=Math.trunc(s),!n.FormulaContext.isValidDate(e)||!n.FormulaContext.isValidDate(t)||!n.FormulaContext.isValidDate(r))return n.FormulaError.BuiltIn.Value;if(!M(o)||!y(s)||i<=0||a<=0||e>=r)return NaN;let l=function(e,t,n,r,i,a=!0){let o=Math.ceil(r*(Math.abs(t-e)+Math.abs(t-n))/365)+6,s=0;for(let n=1;n<=o;n++)if(se(t,r,-n)<=e){s=n;break}let c=[];for(let e=-s;c.length<=600;e++){let i=se(t,r,e);if(c.push(i),i>=n)break}let l=null;if(i===1){let e=c.findIndex(e=>e===t);e>0&&(l=t-c[e-1])}let u=0;for(let o=0;o+1<c.length;o++){let s=c[o],d=c[o+1];if(d<=e)continue;if(s>=n)break;let f=Math.max(s,e),p=Math.min(d,n);if(f===s&&p===d&&(i===0||i===4||a)){u+=1;continue}let m,h;switch(i){case 0:m=f-s===1&&d<t?p-f:S(f,p,0).days,h=360/r;break;case 1:m=p-f,h=l===null?d-s:l;break;case 2:m=p-f,h=360/r;break;case 3:default:m=p-f,h=365/r;break;case 4:m=S(f,p,4).days,h=360/r}h>0&&(u+=m/h)}return u}(e,t,r,o,s,c);return i/o*a*l}function se(e,t,r){let i=Math.round(12/t*r),a=n.FormulaContext.fromSerialDate(e,!0);return v(a,i),n.FormulaContext.toSerialDate(a,!0)}var ce=t({AMORDEGRC:()=>le});function le(e,t,r,i,a,o,s=0){if(s=Math.floor(s),!n.FormulaContext.isValidDate(t)||!n.FormulaContext.isValidDate(r)||e<=0||i<0||e<i||a<0||o<=0||s!==0&&s!==1&&s!==3||Math.floor(t)>Math.floor(r))return NaN;let c=1/o,l=o*((u=c)<5?1.5:u<=6?2:2.5);var u;let{days:d,yearDays:f}=S(t,r,s),p=d/f;return function(e,t,n,r,i,a,o){let s=Math.ceil(r),c=Math.floor(e*n*a);if(o===0)return c;let l=e-Math.floor(e*n*i);if(r<3){let e=s-1;return e<=0?l>t?l:0:o<=e?Math.ceil(l/e):0}let u=l;for(let e=1;e<=o;e++){if(u<=t)return 0;let r=u*n,i=s-e,a=i>0?u/i:0,c=Math.floor(Math.max(r,a));if(e===o)return c;u-=c}return 0}(e,i,l,c,p,s===1&&c>=3?d/365:p,a>1?Math.floor(a):Math.ceil(a))}function ue(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 N(e){return e===null?0:n.FormulaContext.parseAsNumber(e)}var de=t({DATEDIF:()=>P,DAYS360:()=>F,YEARFRAC:()=>fe});function P(e,t,r){let i=n.FormulaContext.getDateParts(e),a=n.FormulaContext.getDateParts(t),o=Math.trunc(e),s=Math.trunc(t);if(r=r.toLowerCase(),e>t)return NaN;let c=a.year-i.year,l=a.month-i.month,u=a.day-i.day,d;switch(r){case`y`:return d=l<0||l===0&&u<0?-1:0,d+c;case`m`:return d=u<0?-1:0,12*c+l+d;case`d`:return s-o;case`md`:return s-n.FormulaContext.getSerialDate(a.year,a.month+(u<0?-1:0),i.day);case`ym`:return d=u<0?-1:0,(d+12*c+l)%12;case`yd`:return s-n.FormulaContext.getSerialDate(a.year-+(l<0||l===0&&u<0),i.month,i.day)}return NaN}function fe(e,t,r=0){let i=ue(e),a=ue(t),o=N(r);if(!n.FormulaContext.isValidDate(i)||!n.FormulaContext.isValidDate(a)||!y(o))return NaN;if(i>a){let e=i;i=a,a=e}let{days:s,yearDays:c}=S(i,a,o);return s/c}function F(e,t,n=!1){return n?(t>=e?1:-1)*S(e,t,4).days:function(e,t){let n=b(e),r=b(t),i=n.year,a=n.month,o=n.day,s=r.year,c=r.month,l=r.day;if(a===2?b(e+1).month===3&&(o=30):o===31&&(o=30),l===31)if(o<30){let e=b(t+1);s=e.year,c=e.month,l=e.day}else l=30;return x(i,a,o,s,c,l)}(e,t)}var I=e=>{let t=e.getLocaleProfile().currencySymbol;return`${t}#,##0.00_);[Red](${t}#,##0.00)`},L=(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},pe=t({COUPDAYS:()=>me,CUMIPMT:()=>he,CUMPRINC:()=>ve,DB:()=>ye,DDB:()=>be,DISC:()=>xe,DOLLARDE:()=>Se,DOLLARFR:()=>Ce,EFFECT:()=>we,FV:()=>Te,FVSCHEDULE:()=>Ee,IPMT:()=>De,IRR:()=>Oe,ISPMT:()=>ke,MIRR:()=>Ae,NOMINAL:()=>je,NPER:()=>Me,NPV:()=>Ne,PDURATION:()=>Pe,PMT:()=>Fe,PPMT:()=>Ie,PRICEDISC:()=>Le,PV:()=>Re,RATE:()=>ze,RRI:()=>Ve,SLN:()=>He,STOCKHISTORY:()=>Ue,SYD:()=>We,TBILLEQ:()=>Ge,TBILLPRICE:()=>Ke,TBILLYIELD:()=>qe,XIRR:()=>Je,XNPV:()=>Ye});function me(e,t,r,i=0){if(!n.FormulaContext.isValidDate(e)||!n.FormulaContext.isValidDate(t)||!M(r)||!y(i)||e>=t)return NaN;if(i===1){let i=function(e,t,n){let r=new Date(t);if(r.setFullYear(e.getFullYear()),r>e)for(;r>e;)r.setMonth(r.getMonth()-Math.round(12/n));else{let t=new Date(r);for(t.setMonth(t.getMonth()+Math.round(12/n));t<=e;)r.setTime(t.getTime()),t.setMonth(t.getMonth()+Math.round(12/n))}return r}(n.FormulaContext.fromSerialDate(e),n.FormulaContext.fromSerialDate(t),r),a=new Date(i);return a.setMonth(a.getMonth()+Math.round(12/r)),P(n.FormulaContext.toSerialDate(i),n.FormulaContext.toSerialDate(a),`D`)}let a;switch(i){case 0:case 2:case 4:a=360;break;case 3:a=365;break;default:return NaN}return a/r}function he(e,t,n,r,i,a){let o=_e(...ge(e,t,n,r,i,a));if(!o)return NaN;let s=o.count*o.payment-o.principal;return Number.isFinite(s)?s:NaN}var R=e=>{if(e===void 0)throw n.FormulaError.BuiltIn.NA;return N(e)},ge=(e,t,n,r,i,a)=>[R(e),R(t),R(n),R(r),R(i),R(a)],_e=(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=Fe(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}};function ve(e,t,n,r,i,a){let o=_e(...ge(e,t,n,r,i,a));return o?o.principal:NaN}function ye(e,t,r,i,a=12){if(e<0||t<0||r<=0||i<0||a<1||a>12||a===12&&i>r||i>r+1)return NaN;if(e===0)return 0;n.FormulaContext.formatResults(I(n.FormulaContext.getRuntime()));let o=Math.round(1e3*(1-(t/e)**(1/r)))/1e3,s=e*o*a/12;if(i===1)return s;let c=e-s;for(let e=2;e<i;e++)c-=c*o;return i===r+1?c*o*(12-a)/12:c*o}function be(e,t,n,r,i=2){if(e<0||t<0||n<0||r<0||i<=0||r>n)return NaN;if(t>=e)return 0;let a=0,o=0;for(let s=1;s<=r;s++)o=Math.min(i/n*(e-a),e-t-a),a+=o;return o}function xe(e,t,r,i,a=0){if(!n.FormulaContext.isValidDate(e)||!n.FormulaContext.isValidDate(t)||!y(a)||r<=0||i<=0||e>=t)return NaN;let o,s;switch(a){case 0:o=360,s=F(e,t,!1);break;case 1:case 3:o=365,s=P(e,t,`D`);break;case 2:o=360,s=P(e,t,`D`);break;case 4:o=360,s=F(e,t,!0);break;default:return NaN}return(i-r)/i*o/s}function Se(e,t){if((t=Math.trunc(t))<0)return NaN;if(t===0)throw n.FormulaError.BuiltIn.Div0;if(t===1)return e;let r=e<0?-1:1,i=Math.abs(e),a=Math.trunc(i),o=i-a;return r*(a+Math.round(o*10**Math.ceil(Math.log10(t)))/t)}function Ce(e,t){if((t=Math.trunc(t))<0)return NaN;if(t===0)throw n.FormulaError.BuiltIn.Div0;if(t===1)return e;let r=e<0?-1:1,i=Math.abs(e),a=Math.trunc(i),o=i-a,s=Math.ceil(Math.log10(t));return r*(a+o*t/10**s)}function we(e,t){let n=R(e),r=Math.trunc(R(t));if(n<=0||r<1)return NaN;let i=L(1+n/r,r)-1;return Number.isFinite(i)?i:NaN}function Te(e,t,r,i=0,a=0){if(n.FormulaContext.formatResults(I(n.FormulaContext.getRuntime())),e===0)return-(i+r*t);let o=L(1+e,t);return-(i*o+(o-1)/e*(1+e*+!!a)*r)}function Ee(e,t){if(e===void 0||t===void 0)throw n.FormulaError.BuiltIn.NA;let r=R(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+R(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 De(e,t,r,i,a=0,o=0){if(t<1||t-1>=r)return NaN;if(n.FormulaContext.formatResults(I(n.FormulaContext.getRuntime())),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=.1){let n=e.some(e=>e>0),r=e.some(e=>e<0);if(!n||!r)return NaN;let i=t=>{let n=1+t,r=0,i=1;for(let t=0;t<e.length;t++)r+=e[t]/i,i*=n;return r},a=t;for(let e=0;e<20;e++){let e=i(a),t=a-e/((i(a+z)-e)/z);if(Math.abs(t-a)<z)return t;a=t,a<=-1&&(a=-.9999999)}return NaN}function ke(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}function Ae(e,t,r){let i=e.length;if(!e.some(e=>e<0))throw n.FormulaError.BuiltIn.Div0;let a=0;for(let n=0;n<i;n++){let r=e[n];r<0&&(a+=r/(1+t)**+n)}let o=0;for(let t=0;t<i;t++){let n=e[t];n>0&&(o+=n*(1+r)**(i-1-t))}return n.FormulaContext.formatResults(`0%`),(-o/a)**(1/(i-1))-1}function je(e,t){let n=R(e),r=Math.trunc(R(t));if(n<=0||r<1)return NaN;let i=(L(n+1,1/r)-1)*r;return Number.isFinite(i)?i:NaN}function Me(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 Ne(e,t){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(L(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 Pe(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 Fe(e,t,r,i=0,a=0){if(t===0)return NaN;if(n.FormulaContext.formatResults(I(n.FormulaContext.getRuntime())),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 Ie(e,t,r,i,a=0,o=0){if(t<1||t-1>=r)return NaN;if(n.FormulaContext.formatResults(I(n.FormulaContext.getRuntime())),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 Le(e,t,r,i,a=0){if(!n.FormulaContext.isValidDate(e)||!n.FormulaContext.isValidDate(t)||!y(a)||r<=0||i<=0||e>=t)return NaN;let o,s;switch(a){case 0:o=360,s=F(e,t,!1);break;case 1:case 3:o=365,s=P(e,t,`D`);break;case 2:o=360,s=P(e,t,`D`);break;case 4:o=360,s=F(e,t,!0);break;default:return NaN}return i-r*i*s/o}function Re(e,t,r,i=0,a=0){if(n.FormulaContext.formatResults(I(n.FormulaContext.getRuntime())),e===0)return-(i+r*t);let o=L(1+e,t);if(o===0)throw n.FormulaError.BuiltIn.Div0;return-(i+(o-1)/e*(1+e*+!!a)*r)/o}function ze(e,t,r,i=0,a=0,o=.1){if(o<=-1)throw n.FormulaError.BuiltIn.Value;let s=+!!a,c=n=>{if(n===0)return r+t*e+i;let a=L(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<Be;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}var Be=200;function Ve(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=L(n/t,1/e)-1;return Number.isFinite(r)?r:NaN}function He(e,t,r){if(r===0)throw n.FormulaError.BuiltIn.Div0;return(e-t)/r}function Ue(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}function We(e,t,n,r){return r>n?NaN:(e-t)*(n-r+1)*2/(n*(n+1))}function Ge(e,t,r){if(e=Math.round(e),t=Math.round(t),!n.FormulaContext.isValidDate(e)||!n.FormulaContext.isValidDate(t)||e>=t||_(e,t))return NaN;let i=360-r*(t-e);return i===0?0:i<0?NaN:365*r/i}function Ke(e,t,r){if(e=Math.round(e),t=Math.round(t),!n.FormulaContext.isValidDate(e)||!n.FormulaContext.isValidDate(t)||e>=t||_(e,t))return NaN;let i=360-r*(t-e);return i===0?0:i<0?NaN:100*(1-r*(t-e)/360)}function qe(e,t,r){return e=Math.round(e),t=Math.round(t),!n.FormulaContext.isValidDate(e)||!n.FormulaContext.isValidDate(t)||e>=t||_(e,t)?NaN:360*(100-r)/(r*(t-e))}function Je(e,t,r=.1){let i=e.flatten({onError:`value`}),a=t.flatten({onError:`value`});if(i.getRowCount()!==a.getRowCount())return NaN;let o=[],s=[];for(let[[e,t]]of i.alignValues([a]))if(e!==null){if(t===null)return NaN;if(n.FormulaError.isError(e)||n.FormulaError.isError(t)||typeof t!=`number`||isNaN(t))return n.FormulaError.BuiltIn.Value;o.push(e),s.push(t)}let c=o.some(e=>e>0),l=o.some(e=>e<0);if(!c||!l)return NaN;let u=s[0],d=s.map(e=>g(e,u)/365),f=e=>{let t=1+e,n=0;for(let e=0;e<o.length;e++)n+=o[e]/t**+d[e];return n},p=r;for(let e=0;e<20;e++){let e=f(p),t=(f(p+z)-e)/z;if(Math.abs(t)<z)break;let n=p-e/t;if(Math.abs(n-p)<z)return n;p=n,p<=-1&&(p=-.9999999)}return NaN}function Ye(e,t,r){if(e<=0)return NaN;let i=t.flatten({onError:`value`}),a=r.flatten({onError:`value`});if(i.getRowCount()!==a.getRowCount()||i.getRowCount()===0)return NaN;let o=[],s=[];for(let[[e,t]]of i.alignValues([a])){if(e===null||t===null)return NaN;if(n.FormulaError.isError(e)||n.FormulaError.isError(t))return n.FormulaError.BuiltIn.Value;if(typeof e!=`number`)return NaN;if(typeof t!=`number`)return n.FormulaError.BuiltIn.Value;o.push(e),s.push(t)}for(let e=1;e<s.length;e++)if(s[e]<s[e-1])return NaN;let c=0,l=s[0];for(let t=0;t<o.length;t++)c+=o[t]/(1+e)**(g(s[t],l)/365);return c}var z=1e-7,Xe=t({ACCRINTM:()=>Ze,AMORLINC:()=>rt,INTRATE:()=>Qe,PRICEMAT:()=>tt,RECEIVED:()=>$e,YIELDDISC:()=>et,YIELDMAT:()=>nt});function Ze(e,t,r,i,a=0){if(a=Math.floor(a),!n.FormulaContext.isValidDate(e)||!n.FormulaContext.isValidDate(t)||!y(a)||r<=0||i<=0||Math.floor(e)>Math.floor(t))return NaN;if(Math.floor(e)===Math.floor(t))return 0;let{days:o,yearDays:s}=S(e,t,a);return i*r*o/s}function Qe(e,t,r,i,a=0){if(a=Math.floor(a),!n.FormulaContext.isValidDate(e)||!n.FormulaContext.isValidDate(t)||!y(a)||r<=0||i<=0||Math.floor(e)>=Math.floor(t))return NaN;let{days:o,yearDays:s}=S(e,t,a);return(i-r)/r*(s/o)}function $e(e,t,r,i,a=0){if(a=Math.floor(a),!n.FormulaContext.isValidDate(e)||!n.FormulaContext.isValidDate(t)||r<=0||i<=0||!y(a)||Math.floor(e)>=Math.floor(t))return NaN;let{days:o,yearDays:s}=S(e,t,a),c=r/(1-i*o/s);return c<0?NaN:c}function et(e,t,r,i,a=0){if(a=Math.floor(a),!n.FormulaContext.isValidDate(e)||!n.FormulaContext.isValidDate(t)||r<=0||i<=0||!y(a)||Math.floor(e)>=Math.floor(t))return NaN;let{days:o,yearDays:s}=S(e,t,a);return(i/r-1)/(o/s)}function tt(e,t,r,i,a,o=0){if(o=Math.floor(o),!n.FormulaContext.isValidDate(e)||!n.FormulaContext.isValidDate(t)||!n.FormulaContext.isValidDate(r)||i<0||a<0||!y(o)||!it(r,e,t))return NaN;let{yearDays:s}=S(r,e,o),{days:c}=S(e,t,o),{days:l}=S(r,t,o),{days:u}=S(r,e,o);return(100+l/s*i*100)/(1+c/s*a)-u/s*i*100}function nt(e,t,r,i,a,o=0){if(o=Math.floor(o),!n.FormulaContext.isValidDate(e)||!n.FormulaContext.isValidDate(t)||!n.FormulaContext.isValidDate(r)||i<0||a<=0||!y(o)||!it(r,e,t))return NaN;let{yearDays:s}=S(r,e,o),{days:c}=S(e,t,o),{days:l}=S(r,t,o),{days:u}=S(r,e,o);return((1+l/s*i)/(a/100+u/s*i)-1)/(c/s)}function rt(e,t,r,i,a,o,s=0){if(s=Math.floor(s),e<=0||!n.FormulaContext.isValidDate(t)||!n.FormulaContext.isValidDate(r)||i<0||e<i||a<0||o<=0||Math.floor(t)>Math.floor(r)||![0,1,3,4].includes(s))return NaN;a=a>1?Math.floor(a):Math.ceil(a);let c=e-i,l=e*o,{days:u,yearDays:d}=S(t,r,s),f=u/d,p=Math.ceil(c/l-f);return p<0?0:a===0?l*f:a===p?c-l*(f+a-1):a>p?0:l}function it(e,t,n){return Math.floor(n)>Math.floor(t)&&Math.floor(t)>Math.floor(e)}var at=t({COUPDAYBS:()=>ot,COUPDAYS:()=>st,COUPDAYSNC:()=>ct,COUPNCD:()=>lt,COUPNUM:()=>dt,COUPPCD:()=>ut});function ot(e,t,r,i=0){return r=Math.floor(r),i=Math.floor(i),n.FormulaContext.isValidDate(e)&&n.FormulaContext.isValidDate(t)&&M(r)&&y(i)&&B(e,t,r,i)?D(e,t,r,i):NaN}function st(e,t,r,i=0){return r=Math.floor(r),i=Math.floor(i),n.FormulaContext.isValidDate(e)&&n.FormulaContext.isValidDate(t)&&M(r)&&y(i)&&B(e,t,r,i)?O(e,t,r,i):NaN}function ct(e,t,r,i=0){if(r=Math.floor(r),i=Math.floor(i),!(n.FormulaContext.isValidDate(e)&&n.FormulaContext.isValidDate(t)&&M(r)&&y(i)&&B(e,t,r,i)))return NaN;let{days:a}=S(e,E(e,t,r),i);return a}function lt(e,t,r,i=0){return r=Math.floor(r),i=Math.floor(i),n.FormulaContext.isValidDate(e)&&n.FormulaContext.isValidDate(t)&&M(r)&&y(i)&&!(e>=t)&&B(e,t,r,i)?(n.FormulaContext.formatResults(`Short Date`),E(e,t,r)):NaN}function ut(e,t,r,i=0){if(r=Math.floor(r),i=Math.floor(i),!(n.FormulaContext.isValidDate(e)&&n.FormulaContext.isValidDate(t)&&M(r)&&y(i)&&B(e,t,r,i)))return NaN;n.FormulaContext.formatResults(`d-mmm-yy`);let a=T(e,t,r);return a<0?0:a}function dt(e,t,r,i=0){return r=Math.floor(r),i=Math.floor(i),n.FormulaContext.isValidDate(e)&&n.FormulaContext.isValidDate(t)&&M(r)&&y(i)&&B(e,t,r,i)?T(e,t,r)<0?NaN:k(e,t,r):NaN}function B(e,t,n,r){return M(n)&&y(r)&&Math.floor(e)<Math.floor(t)}function ft(e,t){let n=1e-7,r=e,i=1,a=0;for(;i>n&&a<500;){let e=(t(r+n)-t(r-n))/2e-7,o=r-t(r)/e;i=Math.abs(o-r),r=o,a++}return Number.isNaN(r)||!Number.isFinite(r)||a===500?function(e,t){let n=1e-7,r=1.6,i=Number.MAX_VALUE;if(e<=-1||e>=i)return NaN;let a,o,s=Math.max(e-.01,-.9999999),c=Math.min(e+.01,i-n),l=!1;for(let e=0;e<60;e++){if(a=t(s),o=t(c),a*o<=0){l=!0;break}s=Math.max(s+r*(s-c),-.9999999),c=Math.min(c+r*(c-s),i-n)}if(!l)return NaN;a=t(s);let u=s,d=a,f=0;do u=s+(c-s)/2,d=t(u),a*d<0?c=u:(s=u,a=d),f++;while(Math.abs(d)>n&&f<60);return u}(e,t):r}var pt=t({DURATION:()=>ht,MDURATION:()=>gt,PRICE:()=>mt,YIELD:()=>_t});function mt(e,t,r,i,a,o,s=0){return o=Math.floor(o),s=Math.floor(s),!n.FormulaContext.isValidDate(e)||!n.FormulaContext.isValidDate(t)||r<0||i<0||a<=0||!M(o)||!y(s)||Math.floor(e)>=Math.floor(t)||!j(e,t,o)?NaN:ne(e,t,r,i,a,o,s)}function ht(e,t,r,i,a,o=0){return a=Math.floor(a),o=Math.floor(o),!n.FormulaContext.isValidDate(e)||!n.FormulaContext.isValidDate(t)||r<0||i<0||!M(a)||!y(o)||Math.floor(e)>=Math.floor(t)||e<=0||t<=366?NaN:re(e,t,r,i,a,o)}function gt(e,t,r,i,a,o=0){return a=Math.floor(a),o=Math.floor(o),!n.FormulaContext.isValidDate(e)||!n.FormulaContext.isValidDate(t)||r<0||i<0||!M(a)||!y(o)||Math.floor(e)>=Math.floor(t)||e<=0||t<=366?NaN:re(e,t,r,i,a,o)/(1+i/a)}function _t(e,t,r,i,a,o,s=0){if(o=Math.floor(o),s=Math.floor(s),!n.FormulaContext.isValidDate(e)||!n.FormulaContext.isValidDate(t)||r<0||i<=0||a<=0||!M(o)||!y(s)||Math.floor(e)>=Math.floor(t)||!j(e,t,o))return NaN;if(k(e,t,o)>1){let n=ft(r||.01,n=>ne(e,t,r,n,a,o,s)-i);return Number.isNaN(n)?NaN:n}let c=D(e,t,o,s),l=O(e,t,o,s),{days:u}=S(e,t,s),d=i/100+c/l*(r/o);return(a/100+r/o-d)/d*o*(l/u)}var vt=t({ODDFPRICE:()=>yt,ODDFYIELD:()=>bt,ODDLPRICE:()=>xt,ODDLYIELD:()=>St});function yt(e,t,r,i,a,o,s,c,l=0){return c=Math.floor(c),l=Math.floor(l),!n.FormulaContext.isValidDate(e)||!n.FormulaContext.isValidDate(t)||!n.FormulaContext.isValidDate(r)||!n.FormulaContext.isValidDate(i)||a<0||o<0||s<=0||!M(c)||!y(l)||!H(e,t,r,i,c)?NaN:te(e,t,r,i,a,o,s,c,l)}function bt(e,t,r,i,a,o,s,c,l=0){if(c=Math.floor(c),l=Math.floor(l),!n.FormulaContext.isValidDate(e)||!n.FormulaContext.isValidDate(t)||!n.FormulaContext.isValidDate(r)||!n.FormulaContext.isValidDate(i)||a<0||o<=0||s<=0||!M(c)||!y(l)||!H(e,t,r,i,c))return NaN;let{days:u}=S(e,t,l),d=ft((a*u*100-(o-100))/(.25*(o-100)*(1+2*u)+100*u),n=>o-te(e,t,r,i,a,n,s,c,l));return Number.isNaN(d)?NaN:d}function xt(e,t,r,i,a,o,s,c=0){return s=Math.floor(s),c=Math.floor(c),!n.FormulaContext.isValidDate(e)||!n.FormulaContext.isValidDate(t)||!n.FormulaContext.isValidDate(r)||i<0||a<0||o<=0||!M(s)||!y(c)||!wt(e,t,r,s)?NaN:function(e,t,n,r,i,a,o,s){let{fAi:c,fDCi:l,fDSCi:u}=Ct(e,t,n,o,s);return(a*o+100*r*(l-c*(1+i*u/o)))/(i*u+o)}(e,t,r,i,a,o,s,c)}function St(e,t,r,i,a,o,s,c=0){if(s=Math.floor(s),c=Math.floor(c),!n.FormulaContext.isValidDate(e)||!n.FormulaContext.isValidDate(t)||!n.FormulaContext.isValidDate(r)||i<0||a<=0||o<=0||!M(s)||!y(c)||!wt(e,t,r,s))return NaN;let{fAi:l,fDCi:u,fDSCi:d}=Ct(e,t,r,s,c);return(s*(o-a)+100*i*(u-l))/(d*a+100*i*l*d/s)}function Ct(e,t,r,i,a){let o=function(e,t,r){let i=n.FormulaContext.fromSerialDate(e,!0),a=n.FormulaContext.fromSerialDate(t,!0),o=12/r;for(a.setFullYear(i.getFullYear()),a>i&&a.setFullYear(a.getFullYear()-1);a<i;)a.setMonth(a.getMonth()+o);return n.FormulaContext.toSerialDate(a,!0)}(t,r,i);return{fAi:V(r,e,o,i,a),fDCi:V(r,t,o,i,a),fDSCi:V(e,t,o,i,a)}}function V(e,t,r,i,a){let o=n.FormulaContext.fromSerialDate(e,!0),s=n.FormulaContext.fromSerialDate(t,!0),c=12/i,l=n.FormulaContext.fromSerialDate(r,!0);for(l.setFullYear(o.getFullYear()),l<o&&l.setFullYear(l.getFullYear()+1);l>o;)l.setMonth(l.getMonth()-c);let u=n.FormulaContext.toSerialDate(l,!0);l.setMonth(l.getMonth()+c);let d=n.FormulaContext.toSerialDate(l,!0),f=(e,t,n)=>a===1||a===3?n-t:O(t,n,i,e);if(d>=t){let{days:n}=S(e,t,a);return n/f(a,u,d)}let{days:p}=S(e,d,a),m=p/f(a,u,d),h=n.FormulaContext.fromSerialDate(d,!0),g=n.FormulaContext.fromSerialDate(d,!0);for(g.setMonth(g.getMonth()+c);g<s;)h.setMonth(h.getMonth()+c),g.setMonth(g.getMonth()+c),m+=1;u=n.FormulaContext.toSerialDate(h,!0),d=n.FormulaContext.toSerialDate(g,!0);let{days:_}=S(u,t,a);return m+=_/f(a,u,d),m}function H(e,t,r,i,a){return Math.floor(t)>Math.floor(i)&&Math.floor(i)>Math.floor(e)&&Math.floor(e)>Math.floor(r)&&function(e,t,r){let i=n.FormulaContext.fromSerialDate(e,!0),a=n.FormulaContext.fromSerialDate(t,!0),o=h(i.getFullYear(),i.getMonth(),i.getDate()),s=h(a.getFullYear(),a.getMonth(),a.getDate());return!!(i.getDate()===a.getDate()||o&&s)&&Math.abs(12*(a.getFullYear()-i.getFullYear())+(a.getMonth()-i.getMonth()))%(12/r)==0}(t,i,a)&&j(r,t,a)}function wt(e,t,n,r){return Math.floor(t)>Math.floor(e)&&Math.floor(e)>Math.floor(n)&&j(n,t,r)}var Tt=t({VDB:()=>Et});function Et(e,t,r,i,a,o=2,s=!1){if(!n.FormulaContext.isValidDate(i)||!n.FormulaContext.isValidDate(a)||e<0||t<0||r<0||i<0||a<0||a>r||i>a||o<0)return NaN;if(r===0&&i===0&&a===0)throw n.FormulaError.BuiltIn.Div0;if(e<t){if(i>=1||s)return 0;let n=t-e,r=a-i;return-(r>=1?n:n*r)}return s?function(e,t,n,r,i,a){let o=Math.floor(r)+1,s=Math.ceil(i),c=0;for(let l=o;l<=s;l++){let u=ie(e,t,n,l,a);l===o?u*=Math.min(i,o)-r:l===s&&(u*=i-(s-1)),c+=u}return c}(e,t,r,i,a,o):function(e,t,n,r,i,a){let o=Math.ceil(i),s=e,c=!1,l=0,u=0;for(let d=1;d<=o&&!(s<=t);d++){let o;if(c)o=l;else{let r=ie(e,t,n,d,a),i=n-(d-1),u=i>0?(s-t)/i:0;u>r?(l=u,c=!0,o=u):o=r}o=Math.min(o,s-t);let f=Math.max(d-1,r);u+=o*Math.max(0,Math.min(d,i)-f),s-=o}return u}(e,t,r,i,a,o)}var Dt=t({FORECAST_ETS:()=>Ot,FORECAST_ETS_CONFINT:()=>kt,FORECAST_ETS_SEASONALITY:()=>At,FORECAST_ETS_STAT:()=>jt});function Ot(e,t,r,i=1,a=1,o=1){let s=U(t,r,a,o);if(n.FormulaError.isError(s))return s;let{values:c,stepSize:l,lastTime:u,firstTime:d}=s,f=Math.round((e-u)/l),p=G(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}=W(c,m,h,g,_,v).finalState,C=y+f*b;return _>1&&(C+=x[(S+f)%_]),C}function kt(e,t,r,i=.95,a=1,o=1,s=1){if(i<0||i>=1)return n.FormulaError.BuiltIn.Num;let c=U(t,r,o,s);if(n.FormulaError.isError(c))return c;let{values:l,stepSize:u,lastTime:d}=c;if(l.length<4)return 0;let f=Math.round((e-d)/u),p=G(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 At(e,t,r=1,i=1){let a=U(e,t,r,i);if(n.FormulaError.isError(a))return a===n.FormulaError.BuiltIn.NA?a:0;let{values:o}=a;return o.length<4?0:Nt(o)}function jt(e,t,r,i=1,a=1,o=1){if(r<1||r>8)return n.FormulaError.BuiltIn.Num;let s=U(e,t,a,o);if(n.FormulaError.isError(s))return s;let{values:c,stepSize:l}=s;if(r===8)return l;let u=G(c,i);if(n.FormulaError.isError(u))return u;let{alpha:d,beta:f,gamma:p,period:m,b0:h}=u;switch(r){case 1:return d;case 2:return f*d;case 3:return p;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}}(c,d,f,p,m,h);if(r===4)return e.mase;if(r===5)return e.smape;if(r===6)return e.mae;if(r===7)return e.rmse}}return n.FormulaError.BuiltIn.Num}function Mt(e,t){if(e.length===1)return e[0].value;let r=e.map(e=>e.value);switch(t){case 1:return r.reduce((e,t)=>e+t,0)/r.length;case 2:return r.length;case 3:return Math.max(...r);case 4:{r.sort((e,t)=>e-t);let e=Math.floor(r.length/2);return r.length%2==0?(r[e-1]+r[e])/2:r[e]}case 5:return Math.min(...r);case 6:return r.reduce((e,t)=>e+t,0);default:return n.FormulaError.BuiltIn.Num}}function U(e,t,r,i){if(r<0||r>1)return n.FormulaError.BuiltIn.Num;let a=e.flatten(),o=t.flatten();if(a.getRowCount()!==o.getRowCount())return n.FormulaError.BuiltIn.NA;if(a.getRowCount()<2)return n.FormulaError.BuiltIn.Num;let s=[];for(let[[e,t]]of a.alignValues([o]))typeof e==`number`&&typeof t==`number`&&s.push({time:t,value:e});if(s.sort((e,t)=>e.time-t.time),s.length<2)return n.FormulaError.BuiltIn.Num;let c=[],l=[s[0]];for(let e=1;e<s.length;e++){let t=s[e];if(t.time===s[e-1].time)l.push(t);else{let e=Mt(l,i);if(n.FormulaError.isError(e))return e;c.push({time:l[0].time,value:e}),l=[t]}}let u=Mt(l,i);if(n.FormulaError.isError(u))return u;if(c.push({time:l[0].time,value:u}),c.length<2)return n.FormulaError.BuiltIn.Num;let d=[];for(let e=1;e<c.length;e++)d.push(c[e].time-c[e-1].time);d.sort((e,t)=>e-t);let f=Math.floor(d.length/2),p=d.length%2==0?(d[f-1]+d[f])/2:d[f];if(p<=0)return n.FormulaError.BuiltIn.Num;let m=[c[0].value];for(let e=1;e<c.length;e++){let t=c[e-1].time,i=c[e].time,a=t+p;if(i>a){let n=Math.round((i-t)/p)-1;for(let t=1;t<=n;t++)if(r===0)m.push(0);else{let r=c[e-1].value,i=c[e].value;m.push(r+t/(n+1)*(i-r))}}else if(Math.abs(i-a)>.01*p)return n.FormulaError.BuiltIn.Num;m.push(c[e].value)}return{values:m,stepSize:p,lastTime:c[c.length-1].time,firstTime:c[0].time}}function Nt(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 W(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 G(e,t){let r=1;if(t===0)r=1;else if(t===1)r=Nt(e),r<=1&&(r=1);else{if(!(t>1))return n.FormulaError.BuiltIn.Num;r=Math.floor(t)}if(r>1&&e.length<2*r)return n.FormulaError.BuiltIn.Num;let i=e.length;if(r===1){let t=Math.max(1,Math.floor(i/4)),n=Pt(t=>{let n=Math.max(.001,Math.min(.999,t[0])),r=Math.max(.001,Math.min(.999,t[1])),i=t[2];return W(e,n,r,0,1,i).mse},[.9,.1,i>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 a=Pt(t=>W(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])),r).mse,[.9,.1,.1]).x;return{alpha:Math.max(.001,Math.min(.999,a[0])),beta:Math.max(.001,Math.min(.999,a[1])),gamma:Math.max(.001,Math.min(.999,a[2])),period:r,b0:0}}function K(e,t,n,r,i){for(let a=0;a<e.length;++a)e[a]=t*n[a]+r*i[a]}function Pt(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(K(v,1+c,_,-c,t),v.fx=e(v),v.fx<m[0].fx)K(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?(K(y,1+u,_,-u,t),y.fx=e(y),y.fx<t.fx?h(y):n=!0):(K(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)K(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 Ft=Object.freeze({includeEmpty:!0}),q=(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})),J=(e,t)=>{let r=e.getRowCount(),i=e.getColumnCount(),a=r*i;if(a===0)throw n.FormulaError.BuiltIn.Value;let o=X(e,a),s=r===1&&i>1,c=r>1&&i>1;if(!t||t.size===0){let e=Array(a);for(let t=0;t<a;t++)e[t]=[t+1];return{ys:o,xs:e,k:1,isRowOriented:s,isRectangularY:c,yRows:r,yCols:i}}let l=t.getRowCount(),u=t.getColumnCount();if(c){if(l!==r||u!==i)throw n.FormulaError.BuiltIn.Ref;let e=X(t,a),d=Array(a);for(let t=0;t<a;t++)d[t]=[e[t]];return{ys:o,xs:d,k:1,isRowOriented:s,isRectangularY:c,yRows:r,yCols:i}}if((s?u:l)!==a)throw n.FormulaError.BuiltIn.Ref;let d=s?l:u;return{ys:o,xs:zt(t,a,d,s),k:d,isRowOriented:s,isRectangularY:c,yRows:r,yCols:i}},It=e=>{let t=Array(e.length);for(let r=0;r<e.length;r++){if(e[r]<=0)throw n.FormulaError.BuiltIn.Num;t[r]=Math.log(e[r])}return t},Lt=(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=X(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:zt(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},Y=(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(Z(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=Z(c[e],t);for(let i=0;i<r;i++)t[i]-=n*c[e][i];i[e]+=n}let o=Math.sqrt(Z(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]=Z(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];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}},Rt=(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)]},X=(e,t)=>{let r=Array(t),i=0;for(let t of e.values(Ft)){if(typeof t!=`number`)throw n.FormulaError.BuiltIn.Value;r[i++]=t}return r},zt=(e,t,n,r)=>{let i=X(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},Z=(e,t)=>{let n=0;for(let r=0;r<e.length;r++)n+=e[r]*t[r];return n},Bt=t({GROWTH:()=>Wt,LINEST:()=>Vt,LOGEST:()=>Ht,TREND:()=>Ut});function Vt(e,t,n=!0,r=!1){let i=J(e,t),a=Y(i.ys,i.xs,n),o=a.coefficients;return r?Rt(a,o,n):[o.slice()]}function Ht(e,t,n=!0,r=!1){let i=J(e,t),a=Y(It(i.ys),i.xs,n),o=a.coefficients.map(Math.exp);return r?Rt(a,o,n):[o]}function Ut(e,t,n,r=!0){let i=J(e,t);return Lt(i,n,Y(i.ys,i.xs,r).predict)}function Wt(e,t,n,r=!0){let i=J(e,t);return Lt(i,n,Y(It(i.ys),i.xs,r).predict).map(e=>e.map(Math.exp))}var Gt=t({TTEST:()=>Kt,T_TEST:()=>qt});function Kt(e,t,n,r){return qt(e,t,n,r)}function qt(e,t,r,i){if(r=Math.floor(r),i=Math.floor(i),![1,2].includes(r)||![1,2,3].includes(i))return NaN;let a=e.getShape(),o=t.getShape(),s=a.rows*a.columns,c=o.rows*o.columns;if(i===1&&s!==c)return n.FormulaError.BuiltIn.NA;let l;if(i===1){let r=[],i=[],a=e.flatten(q).alignValues([t.flatten(q)]);for(let[[e,t]]of a)e!==null&&t!==null&&(r.push(e),i.push(t));if(r.length<2)throw n.FormulaError.BuiltIn.Div0;l=function(e,t){let n=e.length,r=0,i=0,a=0;for(let o=0;o<n;o++)r+=e[o],i+=t[o],a+=(e[o]-t[o])**2;let o=r-i,s=n*a-o**2;return s===0?{error:!0}:{x:Math.abs(o)*Math.sqrt((n-1)/s),df:n-1}}(r,i)}else{let r=e.getValuesFlat(q),a=t.getValuesFlat(q);if(r.length<2||a.length<2)throw n.FormulaError.BuiltIn.Div0;l=i===2?function(e,t){let n=e.length,r=t.length,i=0,a=0,o=0,s=0;for(let t of e)i+=t,a+=t*t;for(let e of t)o+=e,s+=e*e;let c=a-i**2/n,l=s-o**2/r,u=Math.sqrt(c+l);if(u===0)return{error:!0};let d=n+r-2;return{x:Math.abs(i/n-o/r)/u*Math.sqrt(n*r*d/(n+r)),df:d}}(r,a):function(e,t){let n=e.length,r=t.length,i=0,a=0,o=0,s=0;for(let t of e)i+=t,a+=t*t;for(let e of t)o+=e,s+=e*e;let c=(a-i**2/n)/(n*(n-1)),l=(s-o**2/r)/(r*(r-1));if(c+l===0)return{error:!0};let u=Math.abs(i/n-o/r)/Math.sqrt(c+l),d=c/(c+l);return{x:u,df:1/(d**2/(n-1)+(1-d)**2/(r-1))}}(r,a)}if(`error`in l)throw n.FormulaError.BuiltIn.Div0;return function(e,t){let n=.5*function(e,t,n){if(n<=0)return 0;if(n>=1)return 1;let r=Q(e)+Q(t)-Q(e+t),i=Math.exp(Math.log(n)*e+Math.log(1-n)*t-r);return n<(e+1)/(e+t+2)?i*Jt(e,t,n)/e:1-i*Jt(t,e,1-n)/t}(t/2,.5,t/(t+e*e));return e>=0?1-n:n}(-l.x,l.df)*r}function Jt(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 Q(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))-Q(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)}var Yt=t({REGEXEXTRACT:()=>Xt,REGEXMATCH:()=>Zt,REGEXREPLACE:()=>Qt,REGEXTEST:()=>$t});function Xt(e,t,r=0,i=!1){let a=$(t,i);if(n.FormulaError.isError(a))return a;if(r===0){let t=e.match(a);return t?n.FormulaContext.createRange().replace([[t[0]]]):n.FormulaContext.createRange().replace([[n.FormulaError.BuiltIn.NA]])}if(r===1){let t=new RegExp(a.source,a.flags+`g`),r=[...e.matchAll(t)];if(r.length===0)return n.FormulaContext.createRange().replace([[n.FormulaError.BuiltIn.NA]]);let i=r.map(e=>e[0]);return n.FormulaContext.createRange().replace([i])}if(r===2){let t=e.match(a);if(!t)return n.FormulaContext.createRange().replace([[n.FormulaError.BuiltIn.NA]]);if(t.length===1)return n.FormulaError.BuiltIn.Value;let r=t.slice(1).map(e=>e??n.FormulaError.BuiltIn.NA);return n.FormulaContext.createRange().replace([r])}return n.FormulaError.BuiltIn.Value}function Zt(e,t,r=!1){let i=$(t,r);return n.FormulaError.isError(i)?i:i.test(e)}function Qt(e,t,r,i=0,a=!1){let o=$(t,a);if(n.FormulaError.isError(o))return o;if(i===0){let t=new RegExp(o.source,o.flags+`g`);return e.replace(t,r)}let s=0,c=e,l=new RegExp(o.source,o.flags),u=0;for(;u<=c.length;){let e=c.slice(u).match(l);if(!e||e.index===void 0)break;if(s++,s===i){let t=u+e.index;c=c.slice(0,t)+e[0].replace(l,r)+c.slice(t+e[0].length);break}u+=e.index+Math.max(e[0].length,1)}return c}function $t(e,t,r=!1){let i=$(t,r);return n.FormulaError.isError(i)?i:i.test(e)}function $(e,t){try{return new RegExp(e,t?`i`:``)}catch{return n.FormulaError.BuiltIn.Value}}var en={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`}}},tn={ACCRINT:{p:[{n:`issue`},{n:`firstInterest`},{n:`settlement`},{n:`rate`},{n:`par`},{n:`frequency`},{n:`basis`,m:`?`,v:0},{n:`calcMethod`,s:`boolean`,m:`?`,v:!0}],r:{s:`number`}}},nn={AMORDEGRC:{p:[{n:`cost`},{n:`datePurchased`},{n:`firstPeriod`},{n:`salvage`},{n:`period`},{n:`rate`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}}},rn={DATEDIF:{p:[{n:`startDate`},{n:`endDate`},{n:`unit`,s:`string`}],r:{s:`number`}},YEARFRAC:{p:[{n:`startDate`,s:`*`},{n:`endDate`,s:`*`},{n:`basis`,s:`*`,m:`?`,v:0}],r:{s:`number`}},DAYS360:{p:[{n:`startDate`},{n:`endDate`},{n:`method`,s:`boolean`,m:`?`,v:!1}],r:{s:`number`}}},an={COUPDAYS:{p:[{n:`settlement`},{n:`maturity`},{n:`frequency`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}},CUMIPMT:{x:[`noReferenceLift`,`noMemberFilter`],p:[{n:`rate`,s:`*`,u:1},{n:`nper`,s:`*`,u:1},{n:`pv`,s:`*`,u:1},{n:`startPeriod`,s:`*`,u:1},{n:`endPeriod`,s:`*`,u:1},{n:`type`,s:`*`,u:1}],r:{s:`number`}},CUMPRINC:{x:[`noReferenceLift`,`noMemberFilter`],p:[{n:`rate`,s:`*`,u:1},{n:`nper`,s:`*`,u:1},{n:`pv`,s:`*`,u:1},{n:`startPeriod`,s:`*`,u:1},{n:`endPeriod`,s:`*`,u:1},{n:`type`,s:`*`,u:1}],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`}},DISC:{p:[{n:`settlement`},{n:`maturity`},{n:`pr`},{n:`redemption`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}},DOLLARDE:{p:[{n:`fractionalDollar`},{n:`fraction`}],r:{s:`number`}},DOLLARFR:{p:[{n:`decimalDollar`},{n:`fraction`}],r:{s:`number`}},EFFECT:{x:[`noReferenceLift`,`noMemberFilter`],p:[{n:`nominalRate`,s:`*`,u:1},{n:`npery`,s:`*`,u:1}],r:{s:`number`}},FV:{p:[{n:`rate`},{n:`nper`},{n:`pmt`},{n:`pv`,m:`?`,v:0},{n:`type`,m:`?`,v:0,e:[`0`,`1`]}],r:{s:`number`}},FVSCHEDULE:{x:[`noReferenceLift`,`noMemberFilter`],p:[{n:`principal`,s:`*`,u:1},{n:`schedule`,r:`r`,o:`accept`,u:1}],r:{s:`number`}},IPMT:{p:[{n:`rate`},{n:`per`},{n:`nper`},{n:`pv`},{n:`fv`,m:`?`,v:0},{n:`type`,m:`?`,v:0}],r:{s:`number`}},IRR:{p:[{n:`values`,d:1},{n:`guess`,m:`?`,v:.1}],r:{s:`number`}},ISPMT:{p:[{n:`rate`},{n:`per`},{n:`nper`},{n:`pv`}],r:{s:`number`}},MIRR:{p:[{n:`values`,d:1},{n:`financeRate`},{n:`reinvestRate`}],r:{s:`number`}},NOMINAL:{x:[`noReferenceLift`,`noMemberFilter`],p:[{n:`effectiveRate`,s:`*`,u:1},{n:`npery`,s:`*`,u:1}],r:{s:`number`}},NPER:{p:[{n:`rate`},{n:`pmt`},{n:`pv`},{n:`fv`,m:`?`,v:0},{n:`type`,m:`?`,v:0}],r:{s:`number`}},NPV:{p:[{n:`rate`},{n:`value`,g:[{n:`value`,s:`number`,r:`r`}]}],r:{s:`number`}},PDURATION:{p:[{n:`rate`},{n:`pv`},{n:`fv`}],r:{s:`number`}},PMT:{p:[{n:`rate`},{n:`nper`},{n:`pv`},{n:`fv`,m:`?`,v:0},{n:`type`,m:`?`,v:0}],r:{s:`number`}},PPMT:{p:[{n:`rate`},{n:`per`},{n:`nper`},{n:`pv`},{n:`fv`,m:`?`,v:0},{n:`type`,m:`?`,v:0}],r:{s:`number`}},PRICEDISC:{p:[{n:`settlement`},{n:`maturity`},{n:`discount`},{n:`redemption`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}},PV:{p:[{n:`rate`},{n:`nper`},{n:`pmt`},{n:`fv`,m:`?`,v:0},{n:`type`,m:`?`,v:0}],r:{s:`number`}},RATE:{p:[{n:`nper`},{n:`pmt`},{n:`pv`},{n:`fv`,m:`?`,v:0},{n:`type`,m:`?`,v:0},{n:`guess`,m:`?`,v:.1}],r:{s:`number`}},RRI:{p:[{n:`nper`},{n:`pv`},{n:`fv`}],r:{s:`number`}},SLN:{p:[{n:`cost`},{n:`salvage`},{n:`life`}],r:{s:`number`}},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`}},SYD:{p:[{n:`cost`},{n:`salvage`},{n:`life`},{n:`per`}],r:{s:`number`}},TBILLEQ:{p:[{n:`settlement`},{n:`maturity`},{n:`discount`}],r:{s:`number`}},TBILLPRICE:{p:[{n:`settlement`},{n:`maturity`},{n:`discount`}],r:{s:`number`}},TBILLYIELD:{p:[{n:`settlement`},{n:`maturity`},{n:`pr`}],r:{s:`number`}},XIRR:{p:[{n:`values`,r:`r`},{n:`dates`,r:`r`},{n:`guess`,m:`?`,v:.1}],r:{s:`*`}},XNPV:{p:[{n:`rate`},{n:`values`,r:`r`},{n:`dates`,r:`r`}],r:{s:`*`}}},on={ACCRINTM:{p:[{n:`issue`},{n:`settlement`},{n:`rate`},{n:`par`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}},INTRATE:{p:[{n:`settlement`},{n:`maturity`},{n:`investment`},{n:`redemption`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}},RECEIVED:{p:[{n:`settlement`},{n:`maturity`},{n:`investment`},{n:`discount`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}},YIELDDISC:{p:[{n:`settlement`},{n:`maturity`},{n:`pr`},{n:`redemption`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}},PRICEMAT:{p:[{n:`settlement`},{n:`maturity`},{n:`issue`},{n:`rate`},{n:`yld`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}},YIELDMAT:{p:[{n:`settlement`},{n:`maturity`},{n:`issue`},{n:`rate`},{n:`pr`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}},AMORLINC:{p:[{n:`cost`},{n:`datePurchased`},{n:`firstPeriod`},{n:`salvage`},{n:`period`},{n:`rate`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}}},sn={COUPDAYBS:{p:[{n:`settlement`},{n:`maturity`},{n:`frequency`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}},COUPDAYS:{p:[{n:`settlement`},{n:`maturity`},{n:`frequency`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}},COUPDAYSNC:{p:[{n:`settlement`},{n:`maturity`},{n:`frequency`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}},COUPNCD:{p:[{n:`settlement`},{n:`maturity`},{n:`frequency`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}},COUPPCD:{p:[{n:`settlement`},{n:`maturity`},{n:`frequency`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}},COUPNUM:{p:[{n:`settlement`},{n:`maturity`},{n:`frequency`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}}},cn={PRICE:{p:[{n:`settlement`},{n:`maturity`},{n:`rate`},{n:`yld`},{n:`redemption`},{n:`frequency`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}},DURATION:{p:[{n:`settlement`},{n:`maturity`},{n:`coupon`},{n:`yld`},{n:`frequency`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}},MDURATION:{p:[{n:`settlement`},{n:`maturity`},{n:`coupon`},{n:`yld`},{n:`frequency`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}},YIELD:{p:[{n:`settlement`},{n:`maturity`},{n:`rate`},{n:`pr`},{n:`redemption`},{n:`frequency`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}}},ln={ODDFPRICE:{p:[{n:`settlement`},{n:`maturity`},{n:`issue`},{n:`firstCoupon`},{n:`rate`},{n:`yld`},{n:`redemption`},{n:`frequency`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}},ODDFYIELD:{p:[{n:`settlement`},{n:`maturity`},{n:`issue`},{n:`firstCoupon`},{n:`rate`},{n:`pr`},{n:`redemption`},{n:`frequency`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}},ODDLPRICE:{p:[{n:`settlement`},{n:`maturity`},{n:`lastInterest`},{n:`rate`},{n:`yld`},{n:`redemption`},{n:`frequency`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}},ODDLYIELD:{p:[{n:`settlement`},{n:`maturity`},{n:`lastInterest`},{n:`rate`},{n:`pr`},{n:`redemption`},{n:`frequency`},{n:`basis`,m:`?`,v:0}],r:{s:`number`}}},un={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`}}},dn={"FORECAST.ETS":{fn:`FORECAST_ETS`,p:[{n:`targetDate`},{n:`values`,r:`r`},{n:`timeline`,r:`r`},{n:`seasonality`,m:`?`,v:1},{n:`dataCompletion`,m:`?`,v:1},{n:`aggregation`,m:`?`,v: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},{n:`seasonality`,m:`?`,v:1},{n:`dataCompletion`,m:`?`,v:1},{n:`aggregation`,m:`?`,v:1}],r:{s:`*`}},"FORECAST.ETS.SEASONALITY":{fn:`FORECAST_ETS_SEASONALITY`,p:[{n:`values`,r:`r`},{n:`timeline`,r:`r`},{n:`dataCompletion`,m:`?`,v:1},{n:`aggregation`,m:`?`,v: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},{n:`dataCompletion`,m:`?`,v:1},{n:`aggregation`,m:`?`,v:1}],r:{s:`*`}}},fn={LINEST:{p:[{n:`knownYs`,r:`r`},{n:`knownXs`,r:`r`,m:`?`,u:1},{n:`constant`,s:`boolean`,m:`?`,v:!0,u:1},{n:`stats`,s:`boolean`,m:`?`,v:!1}],r:{s:`*`,r:`m`}},LOGEST:{p:[{n:`knownYs`,r:`r`},{n:`knownXs`,r:`r`,m:`?`,u:1},{n:`constant`,s:`boolean`,m:`?`,v:!0,u:1},{n:`stats`,s:`boolean`,m:`?`,v:!1}],r:{s:`*`,r:`m`}},TREND:{p:[{n:`knownYs`,r:`r`},{n:`knownXs`,r:`r`,m:`?`,u:1},{n:`newXs`,r:`r`,m:`?`,u:1},{n:`useConst`,s:`boolean`,m:`?`,v:!0,u:1}],r:{s:`*`,r:`m`}},GROWTH:{p:[{n:`knownYs`,r:`r`},{n:`knownXs`,r:`r`,m:`?`,u:1},{n:`newXs`,r:`r`,m:`?`,u:1},{n:`useConst`,s:`boolean`,m:`?`,v:!0,u:1}],r:{s:`number`,r:`m`}}},pn={TTEST:{p:[{n:`array1`,s:`number`,r:`r`},{n:`array2`,s:`number`,r:`r`},{n:`tails`},{n:`type`}],r:{s:`number`}},"T.TEST":{fn:`T_TEST`,p:[{n:`array1`,s:`number`,r:`r`},{n:`array2`,s:`number`,r:`r`},{n:`tails`},{n:`type`}],r:{s:`number`}}},mn={REGEXEXTRACT:{p:[{n:`text`,s:`string`},{n:`pattern`,s:`string`},{n:`returnMode`,m:`?`,v:0},{n:`caseInsensitive`,s:`boolean`,m:`?`,v:!1}],r:{r:`r`}},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:`caseInsensitive`,s:`boolean`,m:`?`,v:!1}],r:{s:`*`}},REGEXTEST:{p:[{n:`text`,s:`string`},{n:`pattern`,s:`string`},{n:`caseInsensitive`,s:`boolean`,m:`?`,v:!1}],r:{s:`*`}}},hn=()=>Promise.resolve().then(()=>require("./CW-b31_-r-_raT8Y.cjs")),gn=()=>Promise.resolve().then(()=>require("./lEQC21-Sk4lwHy2r.cjs")),_n=()=>Promise.resolve().then(()=>require("./B4JJfKSI4ppwU855.cjs")),vn=()=>Promise.resolve().then(()=>require("./JfM6P_qoQQTWakZf.cjs")),yn=()=>Promise.resolve().then(()=>require("./Clu7XiAsCB48GDXN.cjs")),bn=()=>Promise.resolve().then(()=>require("./h3dw1jAp2J5Pu4p3.cjs")),xn=()=>Promise.resolve().then(()=>require("./BwLx9ix5Sq7suAYP.cjs")),Sn=()=>Promise.resolve().then(()=>require("./C2uDl8VIJqh58YF_.cjs")),Cn=()=>Promise.resolve().then(()=>require("./DsFZgtSQpC75d1M0.cjs")),wn=()=>Promise.resolve().then(()=>require("./BWDfauDHqB6U_2ka.cjs")),Tn=()=>Promise.resolve().then(()=>require("./jev6VGWTdgEgm4Yk.cjs")),En=()=>Promise.resolve().then(()=>require("./CnZfa45XxA-9Jhmp.cjs")),Dn=()=>Promise.resolve().then(()=>require("./bM25C5avKgBAJVfk.cjs")),On=()=>Promise.resolve().then(()=>require("./fqTQ_p3ehzUvc1tF.cjs"));module.exports=(e,t,n)=>(n||=new Map,t(n,e,r,en,hn,`Cube`),t(n,e,ae,tn,gn,`Financial`),t(n,e,ce,nn,_n,`Financial`),t(n,e,de,rn,vn,`Financial`),t(n,e,pe,an,yn,`Financial`),t(n,e,Xe,on,bn,`Financial`),t(n,e,at,sn,xn,`Financial`),t(n,e,pt,cn,Sn,`Financial`),t(n,e,vt,ln,Cn,`Financial`),t(n,e,Tt,un,wn,`Financial`),t(n,e,Dt,dn,Tn,`Statistical`),t(n,e,Bt,fn,En,`Statistical`),t(n,e,Gt,pn,Dn,`Statistical`),t(n,e,Yt,mn,On,`Text`),n);
|
|
@@ -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=Max, 4=Median, 5=Min, 6=Sum, 7=None (#NUM! if duplicates exist).`}}},"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=Max, 4=Median, 5=Min, 6=Sum, 7=None.`}}},"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=Max, 4=Median, 5=Min, 6=Sum, 7=None.`}}},"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=Max, 4=Median, 5=Min, 6=Sum, 7=None.`}}}};
|
|
@@ -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.`}}}};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/formulas-extended - Formulas Enterprise - TypeScript formulas compatible with Excel built-ins. - v0.8.0-beta.1
|
|
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 = { ACCRINT: {
|
|
8
|
-
s: "Returns the accrued interest for a security that pays periodic interest.",
|
|
9
|
-
p: {
|
|
10
|
-
issue: { d: "is the security's issue date, expressed as a serial date number." },
|
|
11
|
-
firstInterest: { d: "is the security's first interest date, expressed as a serial date number." },
|
|
12
|
-
settlement: { d: "is the security's settlement date, expressed as a serial date number." },
|
|
13
|
-
rate: { d: "is the security's annual coupon rate." },
|
|
14
|
-
par: { d: "is the security's par value." },
|
|
15
|
-
frequency: { d: "is the number of coupon payments per year." },
|
|
16
|
-
basis: { d: "is the type of day count basis to use." },
|
|
17
|
-
calcMethod: { d: "is a logical value: to accrued interest from issue date = TRUE; to calculate from last coupon payment date = FALSE." }
|
|
18
|
-
}
|
|
19
|
-
} };
|
|
20
|
-
export { e as default };
|