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