@sheetxl/formulas-extended 0.8.0-beta.1 → 0.8.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/esm/{BuGemmv84T8m0wqw.mjs → B8U2Eza2ZD4YA-kx.mjs} +1 -1
- package/browser/esm/{DpoZ7h1ScIJvbOY9.mjs → BFtgupqxZCxn0dyD.mjs} +5 -5
- package/{node/esm/vu0NRDeeTbEHPMYS.mjs → browser/esm/Bg1eKDrYnq3wm8Vk.mjs} +2 -2
- package/browser/esm/Bg54DWqi-iRcswhc.mjs +119 -0
- package/browser/esm/BiXqZc5QZjxe9VkT.mjs +32 -0
- package/browser/esm/BskZz_6FiOeOABjK.mjs +20 -0
- package/browser/esm/C2QrdSuGHG9jhlMh.mjs +23 -0
- package/{node/esm/BRwwvGaJ6HvkxjFC.mjs → browser/esm/C9G09aQXW2LLuPt3.mjs} +1 -1
- package/browser/esm/CFee1d5IBiv4fv1i.mjs +37 -0
- package/browser/esm/{BFnDPCjxJcoIItFa.mjs → CHIJMJGn8-ecsv3s.mjs} +3 -3
- package/browser/esm/CJjzoao3hDloxUGc.mjs +19 -0
- package/browser/esm/CcDbY4A8EXqKtmVV.mjs +47 -0
- package/{node/esm/DodhOXkSzelSxHmB.mjs → browser/esm/Cl3Yo2J4W4DMr8oz.mjs} +27 -29
- package/browser/esm/D02eJGMi5PwKHsoL.mjs +58 -0
- package/{node/esm/Bma3CN4_Nec6_4n7.mjs → browser/esm/DEQlCPiGb8bsBizr.mjs} +6 -6
- package/browser/esm/{B1VmvhXuEn7zaTB9.mjs → DSBsgMaUW3RQ6ceC.mjs} +1 -1
- package/{node/esm/COqdI1LYTHd9oLA6.mjs → browser/esm/Db0ejvxhdCFJuDKI.mjs} +1 -1
- package/{node/esm/srpVt74r2zbvm1N0.mjs → browser/esm/Dcl4zSjM1tlh53wy.mjs} +5 -5
- package/browser/esm/Djzfm7ZsIsQvtPGt.mjs +32 -0
- package/{node/esm/CnVJ8GAsshRjRGA-.mjs → browser/esm/WS_eaJSI0r2L5MVv.mjs} +2 -2
- package/browser/esm/g9IHvvfn4bYTwHgl.mjs +33 -0
- package/browser/esm/index.mjs +3818 -1682
- package/browser/esm/{DY3kG36QGyDbrANO.mjs → yS93vAhNdRw2bt-z.mjs} +1 -1
- package/node/esm/{BuGemmv84T8m0wqw.mjs → B8U2Eza2ZD4YA-kx.mjs} +1 -1
- package/node/esm/{DpoZ7h1ScIJvbOY9.mjs → BFtgupqxZCxn0dyD.mjs} +5 -5
- package/node/esm/BHHFJIl22DBeM9aP.mjs +19 -0
- package/{browser/esm/vu0NRDeeTbEHPMYS.mjs → node/esm/Bg1eKDrYnq3wm8Vk.mjs} +2 -2
- package/node/esm/Bg54DWqi-iRcswhc.mjs +119 -0
- package/node/esm/BiXqZc5QZjxe9VkT.mjs +32 -0
- package/node/esm/BskZz_6FiOeOABjK.mjs +20 -0
- package/node/esm/C2QrdSuGHG9jhlMh.mjs +23 -0
- package/{browser/esm/BRwwvGaJ6HvkxjFC.mjs → node/esm/C9G09aQXW2LLuPt3.mjs} +1 -1
- package/node/esm/CFee1d5IBiv4fv1i.mjs +37 -0
- package/node/esm/{BQyZVLTMNFLbjVap.mjs → C_IrfNxfWXKc8kjo.mjs} +3 -3
- package/node/esm/{LAkTk93odAfpvx50.mjs → Cc4Bkwtihl8DmEub.mjs} +1 -1
- package/node/esm/CcDbY4A8EXqKtmVV.mjs +47 -0
- package/{browser/esm/DodhOXkSzelSxHmB.mjs → node/esm/Cl3Yo2J4W4DMr8oz.mjs} +27 -29
- package/node/esm/D02eJGMi5PwKHsoL.mjs +58 -0
- package/{browser/esm/Bma3CN4_Nec6_4n7.mjs → node/esm/DEQlCPiGb8bsBizr.mjs} +6 -6
- package/node/esm/{B1VmvhXuEn7zaTB9.mjs → DSBsgMaUW3RQ6ceC.mjs} +1 -1
- package/{browser/esm/COqdI1LYTHd9oLA6.mjs → node/esm/Db0ejvxhdCFJuDKI.mjs} +1 -1
- package/{browser/esm/srpVt74r2zbvm1N0.mjs → node/esm/Dcl4zSjM1tlh53wy.mjs} +5 -5
- package/node/esm/Djzfm7ZsIsQvtPGt.mjs +32 -0
- package/{browser/esm/CnVJ8GAsshRjRGA-.mjs → node/esm/WS_eaJSI0r2L5MVv.mjs} +2 -2
- package/node/esm/g9IHvvfn4bYTwHgl.mjs +33 -0
- package/node/esm/index.mjs +4147 -1993
- package/package.json +5 -6
- package/types/src/.generated/decl/financial/Annuity.decl.d.ts +5 -0
- package/types/src/.generated/decl/financial/{Financial.decl.d.ts → Cashflow.decl.d.ts} +1 -1
- package/types/src/.generated/decl/financial/Convert.decl.d.ts +4 -0
- package/types/src/.generated/decl/financial/Coupon.decl.d.ts +4 -0
- package/types/src/.generated/decl/financial/{Financial2.decl.d.ts → Depreciation.decl.d.ts} +1 -1
- package/types/src/.generated/decl/financial/Growth.decl.d.ts +4 -0
- package/types/src/.generated/decl/financial/{ODD.decl.d.ts → Odd.decl.d.ts} +1 -1
- package/types/src/.generated/decl/financial/{Financial3.decl.d.ts → STOCKHISTORY.decl.d.ts} +1 -1
- package/types/src/.generated/decl/financial/Security.decl.d.ts +4 -0
- package/types/src/.generated/decl/financial/{Financial4.decl.d.ts → SecurityMaturity.decl.d.ts} +1 -1
- package/types/src/.generated/decl/{statistical/TTEST.decl.d.ts → financial/TBill.decl.d.ts} +1 -1
- package/types/src/.generated/decl/lookupReference/GroupBy.decl.d.ts +4 -0
- package/types/src/.generated/decl/lookupReference/PivotBy.decl.d.ts +4 -0
- package/types/src/.generated/decl/statistical/{ETS.decl.d.ts → Ets.decl.d.ts} +1 -1
- package/types/src/.generated/decl/statistical/TTest.decl.d.ts +4 -0
- package/types/src/.generated/desc/financial/Annuity.desc.d.ts +5 -0
- package/types/src/.generated/desc/financial/{Financial.desc.d.ts → Cashflow.desc.d.ts} +1 -1
- package/types/src/.generated/desc/financial/Convert.desc.d.ts +4 -0
- package/types/src/.generated/desc/financial/Coupon.desc.d.ts +4 -0
- package/types/src/.generated/desc/financial/{Financial2.desc.d.ts → Depreciation.desc.d.ts} +1 -1
- package/types/src/.generated/desc/financial/Growth.desc.d.ts +4 -0
- package/types/src/.generated/desc/financial/{ODD.desc.d.ts → Odd.desc.d.ts} +1 -1
- package/types/src/.generated/desc/financial/{Financial3.desc.d.ts → STOCKHISTORY.desc.d.ts} +1 -1
- package/types/src/.generated/desc/financial/Security.desc.d.ts +4 -0
- package/types/src/.generated/desc/financial/{Financial4.desc.d.ts → SecurityMaturity.desc.d.ts} +1 -1
- package/types/src/.generated/desc/{statistical/TTEST.desc.d.ts → financial/TBill.desc.d.ts} +1 -1
- package/types/src/.generated/desc/lookupReference/GroupBy.desc.d.ts +4 -0
- package/types/src/.generated/desc/lookupReference/PivotBy.desc.d.ts +4 -0
- package/types/src/.generated/desc/statistical/{ETS.desc.d.ts → Ets.desc.d.ts} +1 -1
- package/types/src/.generated/desc/statistical/TTest.desc.d.ts +4 -0
- package/types/src/_utils/AnyArgs.d.ts +17 -3
- package/types/src/_utils/FinanaceSolver.d.ts +39 -2
- package/types/src/_utils/FinanceAmor.d.ts +23 -0
- package/types/src/_utils/FinanceCashflow.d.ts +42 -0
- package/types/src/_utils/FinanceCoupon.d.ts +92 -82
- package/types/src/_utils/FinanceDate.d.ts +24 -0
- package/types/src/_utils/FinanceDayCount.d.ts +46 -0
- package/types/src/_utils/FinanceOdd.d.ts +93 -0
- package/types/src/_utils/FinanceSecurity.d.ts +84 -0
- package/types/src/_utils/FinanceUtils.d.ts +37 -1
- package/types/src/_utils/LeastSquares.d.ts +20 -22
- package/types/src/_utils/Pivot.d.ts +205 -0
- package/types/src/_utils/RegexCompile.d.ts +33 -0
- package/types/src/cube/Cube.d.ts +7 -7
- package/types/src/financial/ACCRINT.d.ts +33 -6
- package/types/src/financial/AMORDEGRC.d.ts +22 -40
- package/types/src/financial/Annuity.d.ts +118 -0
- package/types/src/financial/Cashflow.d.ts +84 -0
- package/types/src/financial/Convert.d.ts +26 -0
- package/types/src/financial/Coupon.d.ts +72 -0
- package/types/src/financial/Date.d.ts +34 -5
- package/types/src/financial/Depreciation.d.ts +58 -0
- package/types/src/financial/Growth.d.ts +22 -0
- package/types/src/financial/Odd.d.ts +82 -0
- package/types/src/financial/STOCKHISTORY.d.ts +17 -0
- package/types/src/financial/Security.d.ts +68 -0
- package/types/src/financial/SecurityMaturity.d.ts +107 -0
- package/types/src/financial/TBill.d.ts +40 -0
- package/types/src/financial/VDB.d.ts +15 -13
- package/types/src/lookupReference/GroupBy.d.ts +14 -0
- package/types/src/lookupReference/PivotBy.d.ts +17 -0
- package/types/src/statistical/{ETS.d.ts → Ets.d.ts} +14 -14
- package/types/src/statistical/Regression.d.ts +13 -18
- package/types/src/statistical/{TTEST.d.ts → TTest.d.ts} +5 -5
- package/types/src/text/RegEx.d.ts +34 -11
- package/browser/cjs/B4JJfKSI4ppwU855.cjs +0 -1
- package/browser/cjs/BWDfauDHqB6U_2ka.cjs +0 -1
- package/browser/cjs/BwLx9ix5Sq7suAYP.cjs +0 -1
- package/browser/cjs/C2uDl8VIJqh58YF_.cjs +0 -1
- package/browser/cjs/CW-b31_-r-_raT8Y.cjs +0 -1
- package/browser/cjs/Clu7XiAsCB48GDXN.cjs +0 -1
- package/browser/cjs/CnZfa45XxA-9Jhmp.cjs +0 -1
- package/browser/cjs/DsFZgtSQpC75d1M0.cjs +0 -1
- package/browser/cjs/JfM6P_qoQQTWakZf.cjs +0 -1
- package/browser/cjs/bM25C5avKgBAJVfk.cjs +0 -1
- package/browser/cjs/fqTQ_p3ehzUvc1tF.cjs +0 -1
- package/browser/cjs/h3dw1jAp2J5Pu4p3.cjs +0 -1
- package/browser/cjs/index.cjs +0 -1
- package/browser/cjs/jev6VGWTdgEgm4Yk.cjs +0 -1
- package/browser/cjs/lEQC21-Sk4lwHy2r.cjs +0 -1
- package/browser/esm/CwoMEzOtRihuYUTr.mjs +0 -20
- package/browser/esm/Dy6UD7hQRBsT0WNp.mjs +0 -304
- package/node/esm/CwoMEzOtRihuYUTr.mjs +0 -20
- package/node/esm/Dy6UD7hQRBsT0WNp.mjs +0 -304
- package/types/src/financial/Financial.d.ts +0 -288
- package/types/src/financial/Financial2.d.ts +0 -99
- package/types/src/financial/Financial3.d.ts +0 -95
- package/types/src/financial/Financial4.d.ts +0 -82
- package/types/src/financial/ODD.d.ts +0 -106
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Odd first and last coupon bond price/yield functions.
|
|
3
|
-
*
|
|
4
|
-
* "Odd" means the first or last coupon period is irregular — shorter or longer
|
|
5
|
-
* than a standard coupon period. This happens when a bond is issued between
|
|
6
|
-
* coupon dates (odd first) or the final coupon date doesn't align with
|
|
7
|
-
* maturity (odd last).
|
|
8
|
-
*
|
|
9
|
-
* Why ODDLPRICE lives here and not in financialHelpers:
|
|
10
|
-
* The odd-last formula uses a different internal structure (_getCoupDate,
|
|
11
|
-
* _getFrac) that is not shared by any other function. Keeping it here avoids
|
|
12
|
-
* polluting the shared helper module with single-use private math.
|
|
13
|
-
*
|
|
14
|
-
* Date ordering requirements:
|
|
15
|
-
* ODDFPRICE/ODDFYIELD: issue < settlement < firstCoupon < maturity
|
|
16
|
-
* ODDLPRICE/ODDLYIELD: lastInterest < settlement < maturity
|
|
17
|
-
*/
|
|
18
|
-
/**
|
|
19
|
-
* @summary Returns the price per $100 face value of a security with an odd first period.
|
|
20
|
-
* @param settlement is the security's settlement date, expressed as a serial date number.
|
|
21
|
-
* @param maturity is the security's maturity date, expressed as a serial date number.
|
|
22
|
-
* @param issue is the security's issue date, expressed as a serial date number.
|
|
23
|
-
* @param firstCoupon is the security's first coupon date, expressed as a serial date number.
|
|
24
|
-
* @param yld is the security's annual yield.
|
|
25
|
-
* @param redemption is the security's redemption value per $100 face value.
|
|
26
|
-
* @param frequency is the number of coupon payments per year.
|
|
27
|
-
* @param basis is the type of day count basis to use.
|
|
28
|
-
*
|
|
29
|
-
* @remarks
|
|
30
|
-
* The first coupon period is "odd" (shorter or longer than normal) when the
|
|
31
|
-
* bond is issued between standard coupon dates.
|
|
32
|
-
*/
|
|
33
|
-
export declare function ODDFPRICE(settlement: number, // date
|
|
34
|
-
maturity: number, // date
|
|
35
|
-
issue: number, // date
|
|
36
|
-
firstCoupon: number, // date
|
|
37
|
-
rate: number, yld: number, redemption: number, frequency: number, basis?: number): number;
|
|
38
|
-
/**
|
|
39
|
-
* @summary Returns the yield of a security with an odd first period.
|
|
40
|
-
* @param settlement is the security's settlement date, expressed as a serial date number.
|
|
41
|
-
* @param maturity is the security's maturity date, expressed as a serial date number.
|
|
42
|
-
* @param issue is the security's issue date, expressed as a serial date number.
|
|
43
|
-
* @param firstCoupon is the security's first coupon date, expressed as a serial date number.
|
|
44
|
-
* @param rate is the security's interest rate.
|
|
45
|
-
* @param pr is the security's price.
|
|
46
|
-
* @param redemption is the security's redemption value per $100 face value.
|
|
47
|
-
* @param frequency is the number of coupon payments per year.
|
|
48
|
-
* @param basis is the type of day count basis to use.
|
|
49
|
-
*
|
|
50
|
-
* @remarks
|
|
51
|
-
* Numerically inverts ODDFPRICE via Newton-Raphson. The initial guess uses
|
|
52
|
-
* the same heuristic as Excel: a linear approximation of yield from the
|
|
53
|
-
* price/day-count relationship.
|
|
54
|
-
*/
|
|
55
|
-
export declare function ODDFYIELD(settlement: number, // date
|
|
56
|
-
maturity: number, // date
|
|
57
|
-
issue: number, // date
|
|
58
|
-
firstCoupon: number, // date
|
|
59
|
-
rate: number, pr: number, redemption: number, frequency: number, basis?: number): number;
|
|
60
|
-
/**
|
|
61
|
-
* @summary Returns the price per $100 face value of a security with an odd last period.
|
|
62
|
-
* @param settlement is the security's settlement date, expressed as a serial date number.
|
|
63
|
-
* @param maturity is the security's maturity date, expressed as a serial date number.
|
|
64
|
-
* @param lastInterest is the security's last coupon date, expressed as a serial date number.
|
|
65
|
-
* @param rate is the interest rate.
|
|
66
|
-
* @param yld is the security's annual yield.
|
|
67
|
-
* @param redemption is the amount to be received at maturity.
|
|
68
|
-
* @param frequency is the number of coupon payments per year.
|
|
69
|
-
* @param basis is the type of day count basis to use.
|
|
70
|
-
*
|
|
71
|
-
* @remarks
|
|
72
|
-
* The last coupon period is "odd" when the final coupon date and maturity do
|
|
73
|
-
* not coincide — i.e. the bond matures between regular coupon dates.
|
|
74
|
-
*
|
|
75
|
-
* Unlike the odd-first functions, the odd-last formula is derived from a
|
|
76
|
-
* different spec formula that expresses price as a function of three
|
|
77
|
-
* fractional period lengths (fAi, fDCi, fDSCi — see _calculateOddLPrice).
|
|
78
|
-
*/
|
|
79
|
-
export declare function ODDLPRICE(settlement: number, // date
|
|
80
|
-
maturity: number, // date
|
|
81
|
-
lastInterest: number, // date
|
|
82
|
-
rate: number, yld: number, redemption: number, frequency: number, basis?: number): number;
|
|
83
|
-
/**
|
|
84
|
-
* @summary Returns the yield of a security with an odd last period.
|
|
85
|
-
* @param settlement is the security's settlement date, expressed as a serial date number.
|
|
86
|
-
* @param maturity is the security's maturity date, expressed as a serial date number.
|
|
87
|
-
* @param lastInterest is the security's last coupon date, expressed as a serial date number.
|
|
88
|
-
* @param rate is the interest rate.
|
|
89
|
-
* @param pr is the security's price.
|
|
90
|
-
* @param redemption is the amount to be received at maturity.
|
|
91
|
-
* @param frequency is the number of coupon payments per year.
|
|
92
|
-
* @param basis is the type of day count basis to use.
|
|
93
|
-
*
|
|
94
|
-
* @remarks
|
|
95
|
-
* For the odd-last case Excel uses a closed-form yield formula (not Newton)
|
|
96
|
-
* because the price formula is linear in yield. We follow the same approach.
|
|
97
|
-
*
|
|
98
|
-
* Formula from the Excel spec:
|
|
99
|
-
* yield = (freq*(redemption−pr) + 100*rate*(fDCi−fAi))
|
|
100
|
-
* / (fDSCi*pr + 100*rate*fAi*fDSCi/freq)
|
|
101
|
-
*/
|
|
102
|
-
export declare function ODDLYIELD(settlement: number, // date
|
|
103
|
-
maturity: number, // date
|
|
104
|
-
lastInterest: number, // date
|
|
105
|
-
rate: number, pr: number, redemption: number, frequency: number, basis?: number): number;
|
|
106
|
-
//# sourceMappingURL=ODD.d.ts.map
|