@sheetxl/formulas-extended 0.8.0-beta.12 → 0.8.0-beta.14
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/{B2E-ZG8fILqD-sK1.mjs → B8SoM9jQdDXwtgKl.mjs} +1 -1
- package/browser/esm/{Ci4ASx39Ynmcu_Rv.mjs → BBakdOGC1cqfF6Iu.mjs} +1 -1
- package/{node/esm/l_mAU10VLex7MbNS.mjs → browser/esm/BKOSUaPOspNA3UiR.mjs} +1 -1
- package/browser/esm/{3YF5WqtiNL_6UP5n.mjs → BYB98ngJrP8aUEUh.mjs} +1 -1
- package/{node/esm/Ho2ku6yiOsikJBtk.mjs → browser/esm/Bg9SWNEspWJ7vEAh.mjs} +1 -1
- package/browser/esm/{Cc7LIKPWiyCgJqYn.mjs → BjazhB-rkLGqWTP9.mjs} +1 -1
- package/{node/esm/DVbiWA-_uacThTwT.mjs → browser/esm/BnqqSrfJVCEx19PQ.mjs} +1 -1
- package/{node/esm/BDqS1P5pTbn9aAV_.mjs → browser/esm/BtNcXw7rVlHo7gOf.mjs} +1 -1
- package/{node/esm/CZJOUlr4oLNPJITg.mjs → browser/esm/BymHQ6d0GuLbbJvM.mjs} +1 -1
- package/{node/esm/BB1d7qGfuPz7e-f7.mjs → browser/esm/C0LxMpWsn2I0bY9l.mjs} +1 -1
- package/{node/esm/Bv61jGkVgv0dkZ5e.mjs → browser/esm/CA-J-CuKvqHcKua5.mjs} +1 -1
- package/browser/esm/{pUCLFwRpkkiUF_c2.mjs → CQpm3BBIhHls0ymg.mjs} +1 -1
- package/browser/esm/{BB3P4ykXH-rBCOGY.mjs → CZssZc0NRsK86rhA.mjs} +1 -1
- package/browser/esm/{BckB_3BgZOuSlZFK.mjs → CayxCfr6Req5OBnt.mjs} +1 -1
- package/{node/esm/kTIyJgfiglzdgupY.mjs → browser/esm/CwLe_zJj5hXFWIYA.mjs} +1 -1
- package/browser/esm/{BdRI3Llx4gJRAgEK.mjs → CwfGkuVMc5cxV4zD.mjs} +1 -1
- package/browser/esm/{C_iF7M9kaGbs3TCH.mjs → DDAPeOZHl2lPDy8F.mjs} +1 -1
- package/browser/esm/{D4OUOSNs4L6CaX6_.mjs → DGL-3YiIvZL1aezr.mjs} +1 -1
- package/browser/esm/{D0-OgCQX5hIZ6lNv.mjs → DnC76PQFsjGNd0ED.mjs} +1 -1
- package/browser/esm/{5VSZrR_zA2OmxqwM.mjs → La5T3OKHn32uWF7E.mjs} +1 -1
- package/{node/esm/Bv-tN3y9Dc4WI9P_.mjs → browser/esm/XHM3EQlFTOHq3jQP.mjs} +1 -1
- package/browser/esm/declarations.mjs +2 -2
- package/browser/esm/index.mjs +59 -56
- package/{node/esm/QPgwxV6CKVRfiMgU.mjs → browser/esm/lPwbrKEbLIYzRLFP.mjs} +1 -1
- package/node/esm/{B2E-ZG8fILqD-sK1.mjs → B8SoM9jQdDXwtgKl.mjs} +1 -1
- package/node/esm/{Ci4ASx39Ynmcu_Rv.mjs → BBakdOGC1cqfF6Iu.mjs} +1 -1
- package/{browser/esm/l_mAU10VLex7MbNS.mjs → node/esm/BKOSUaPOspNA3UiR.mjs} +1 -1
- package/node/esm/{3YF5WqtiNL_6UP5n.mjs → BYB98ngJrP8aUEUh.mjs} +1 -1
- package/{browser/esm/Ho2ku6yiOsikJBtk.mjs → node/esm/Bg9SWNEspWJ7vEAh.mjs} +1 -1
- package/{browser/esm/DVbiWA-_uacThTwT.mjs → node/esm/BnqqSrfJVCEx19PQ.mjs} +1 -1
- package/{browser/esm/BDqS1P5pTbn9aAV_.mjs → node/esm/BtNcXw7rVlHo7gOf.mjs} +1 -1
- package/{browser/esm/CZJOUlr4oLNPJITg.mjs → node/esm/BymHQ6d0GuLbbJvM.mjs} +1 -1
- package/{browser/esm/BB1d7qGfuPz7e-f7.mjs → node/esm/C0LxMpWsn2I0bY9l.mjs} +1 -1
- package/{browser/esm/Bv61jGkVgv0dkZ5e.mjs → node/esm/CA-J-CuKvqHcKua5.mjs} +1 -1
- package/node/esm/{pUCLFwRpkkiUF_c2.mjs → CQpm3BBIhHls0ymg.mjs} +1 -1
- package/node/esm/{BckB_3BgZOuSlZFK.mjs → CayxCfr6Req5OBnt.mjs} +1 -1
- package/node/esm/{CNXBMkJ9KPYEmoGF.mjs → CiAc0OZCRv1uRsiF.mjs} +1 -1
- package/{browser/esm/kTIyJgfiglzdgupY.mjs → node/esm/CwLe_zJj5hXFWIYA.mjs} +1 -1
- package/node/esm/{C_iF7M9kaGbs3TCH.mjs → DDAPeOZHl2lPDy8F.mjs} +1 -1
- package/node/esm/{D4OUOSNs4L6CaX6_.mjs → DGL-3YiIvZL1aezr.mjs} +1 -1
- package/node/esm/{Mdb0g5H17I3Oon-f.mjs → D_YJXQ3IoCVzkEWy.mjs} +1 -1
- package/node/esm/{D0-OgCQX5hIZ6lNv.mjs → DnC76PQFsjGNd0ED.mjs} +1 -1
- package/node/esm/{5VSZrR_zA2OmxqwM.mjs → La5T3OKHn32uWF7E.mjs} +1 -1
- package/{browser/esm/Bv-tN3y9Dc4WI9P_.mjs → node/esm/XHM3EQlFTOHq3jQP.mjs} +1 -1
- package/node/esm/declarations.mjs +2 -2
- package/node/esm/index.mjs +153 -150
- package/{browser/esm/QPgwxV6CKVRfiMgU.mjs → node/esm/lPwbrKEbLIYzRLFP.mjs} +1 -1
- package/node/esm/{CoiYUgAPry1qUyhB.mjs → shH8FSZ-wXbrxVx7.mjs} +1 -1
- package/package.json +3 -3
- package/types/src/_utils/AnyArgs.d.ts +0 -12
- package/types/src/_utils/FinanaceSolver.d.ts +0 -27
- package/types/src/_utils/FinanceAmor.d.ts +0 -9
- package/types/src/_utils/FinanceCashflow.d.ts +0 -17
- package/types/src/_utils/FinanceCoupon.d.ts +0 -63
- package/types/src/_utils/FinanceDate.d.ts +0 -7
- package/types/src/_utils/FinanceDayCount.d.ts +0 -74
- package/types/src/_utils/FinanceOdd.d.ts +0 -62
- package/types/src/_utils/FinanceSecurity.d.ts +0 -21
- package/types/src/_utils/FinanceUtils.d.ts +0 -34
- package/types/src/financial/ACCRINT.d.ts +0 -23
- package/types/src/financial/AMORDEGRC.d.ts +0 -22
- package/types/src/financial/Cashflow.d.ts +0 -49
- package/types/src/financial/Coupon.d.ts +0 -14
- package/types/src/financial/Date.d.ts +0 -29
- package/types/src/financial/Depreciation.d.ts +0 -9
- package/types/src/financial/Odd.d.ts +0 -18
- package/types/src/financial/Security.d.ts +0 -10
- package/types/src/financial/SecurityMaturity.d.ts +0 -40
- package/types/src/financial/TBill.d.ts +0 -17
- package/types/src/financial/VDB.d.ts +0 -17
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import { Omittable, Scalar, NoLift } from '@sheetxl/primitives';
|
|
2
|
-
/**
|
|
3
|
-
* Coupon date and day-count functions.
|
|
4
|
-
*
|
|
5
|
-
* The six share one argument reader, `readCouponArgs` — every slot is Excel-declared `any`,
|
|
6
|
-
* the dates and frequency validate before the basis is read — and one coupon chain,
|
|
7
|
-
* `FinanceCoupon`'s, both measured against Excel 16.0 (fn-battery financial/COUP*,
|
|
8
|
-
* 2026-08-28). COUPNCD and COUPPCD return date serials, not day counts.
|
|
9
|
-
*/
|
|
10
2
|
/**
|
|
11
3
|
* Returns the number of days from the beginning of the coupon period to the settlement date.
|
|
12
4
|
* @param settlement is the security's settlement date, expressed as a serial date number.
|
|
@@ -37,12 +29,6 @@ export declare function COUPDAYSNC(settlement: NoLift<Omittable<Scalar>>, maturi
|
|
|
37
29
|
* @param maturity is the security's maturity date, expressed as a serial date number.
|
|
38
30
|
* @param frequency is the number of coupon payments per year.
|
|
39
31
|
* @param basis is the type of day count basis to use.
|
|
40
|
-
*
|
|
41
|
-
* @remarks
|
|
42
|
-
* Returns a date serial and leaves the cell's format alone — Excel does not hint one here, on a
|
|
43
|
-
* serial argument, on `DATE(...)` or on a date-formatted reference (measured 2026-08-29). No
|
|
44
|
-
* ATP-era date function does; `DATE` and `TODAY` do, and an operator such as `B1+1` propagates
|
|
45
|
-
* its operand's.
|
|
46
32
|
*/
|
|
47
33
|
export declare function COUPNCD(settlement: NoLift<Omittable<Scalar>>, maturity: NoLift<Omittable<Scalar>>, frequency: NoLift<Omittable<Scalar>>, basis?: NoLift<Omittable<Scalar>>): number;
|
|
48
34
|
/**
|
|
@@ -5,17 +5,6 @@ import { AcceptError, Scalar, Omittable, NoLift } from '@sheetxl/primitives';
|
|
|
5
5
|
* @param startDate is a serial date number that represents the start date.
|
|
6
6
|
* @param endDate is a serial date number that represents the end date.
|
|
7
7
|
* @param unit is a string that specifies the unit of time to use.
|
|
8
|
-
*
|
|
9
|
-
* @remarks
|
|
10
|
-
* Measured against Excel 16.0 (fn-battery financial/DATEDIF, 2026-08-28). Both serials are
|
|
11
|
-
* truncated before anything is compared (`DATEDIF(37179.6,37179.5,"d")` is 0); a serial outside
|
|
12
|
-
* the calendar is #NUM!, as is a start after the end, and so is a unit that is not exactly one
|
|
13
|
-
* of Y M D MD YM YD in either case — nothing is trimmed, and a number or a boolean arrives as
|
|
14
|
-
* text and is refused the same way. `"MD"` re-anchors the start's day into the end's month
|
|
15
|
-
* (the documented negative answers are Excel's own: Jan 31 → Mar 1 is −2). `"YD"` is the
|
|
16
|
-
* `"YM"` months and `"MD"` days walked forward from the start, so it counts on the START year's
|
|
17
|
-
* calendar — Jan 1 2004 → Mar 1 2005 is 60 where Jan 1 2003 → Mar 1 2004 is 59 (the documented
|
|
18
|
-
* leap-year quirk), and Feb 29 2004 → Mar 1 2005 is 0.
|
|
19
8
|
*/
|
|
20
9
|
export declare function DATEDIF(startDate: number, // Date
|
|
21
10
|
endDate: number, // Date
|
|
@@ -26,17 +15,6 @@ unit: string): number;
|
|
|
26
15
|
* @param endDate is a serial date number that represents the end date.
|
|
27
16
|
* @param basis is the type of day count basis to use.
|
|
28
17
|
* @category Date & Time
|
|
29
|
-
*
|
|
30
|
-
* @remarks
|
|
31
|
-
* Measured against Excel 16.0 (fn-battery financial/YEARFRAC, 2026-08-28). Excel declares all
|
|
32
|
-
* three arguments `any`: a boolean is #VALUE!, an empty argument is #N/A where a blank cell is
|
|
33
|
-
* serial 0, and a multi-cell reference does not broadcast while an array constant does. The
|
|
34
|
-
* basis is read and validated FIRST — truncated, #NUM! below 0 or above 4, so
|
|
35
|
-
* `YEARFRAC("x",39814,5)` is #NUM! and `YEARFRAC(NA(),39814,"x")` is #VALUE! (the dates
|
|
36
|
-
* accept an error so that the body, not the marshaller, decides which is seen first) — then
|
|
37
|
-
* the start, then the end, each coerced and range-checked in turn (`YEARFRAC(-1,"x",0)` is
|
|
38
|
-
* #NUM!). The day counts are `getYearFrac`'s: serials truncated, dates ordered, basis 0
|
|
39
|
-
* signed.
|
|
40
18
|
*/
|
|
41
19
|
export declare function YEARFRAC(startDate: NoLift<Omittable<AcceptError<Scalar>>>, endDate: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<Scalar>>): number;
|
|
42
20
|
/**
|
|
@@ -44,13 +22,6 @@ export declare function YEARFRAC(startDate: NoLift<Omittable<AcceptError<Scalar>
|
|
|
44
22
|
* @param endDate startDate and endDate are the two dates between which you want to know the number of days.
|
|
45
23
|
* @param startDate startDate and endDate are the two dates between which you want to know the number of days.
|
|
46
24
|
* @param method is a logical value specifying the calculation method: U.S. (NASD) = FALSE; European = TRUE.
|
|
47
|
-
*
|
|
48
|
-
* @remarks
|
|
49
|
-
* Measured against Excel 16.0 (fn-battery financial/DAYS360, 2026-08-28). Excel declares the
|
|
50
|
-
* dates `number` and the method `logical`, so the engine's coercion applies: a boolean date is
|
|
51
|
-
* its serial, a number is a method, `"TRUE"` is one while `"1"` is #VALUE!. A serial outside
|
|
52
|
-
* the calendar is #NUM! at either slot and the fraction is discarded. The US rules are
|
|
53
|
-
* `getDays360US`'s, applied to (start, end) as given.
|
|
54
25
|
*/
|
|
55
26
|
export declare function DAYS360(startDate: number, // date
|
|
56
27
|
endDate: number, // date
|
|
@@ -44,15 +44,6 @@ export declare function DDB(cost: number, salvage: number, life: number, period:
|
|
|
44
44
|
* @param period is the period.
|
|
45
45
|
* @param rate is the rate of depreciation.
|
|
46
46
|
* @param basis year basis : 0 for year of 360 days, 1 for actual, 3 for year of 365 days.
|
|
47
|
-
*
|
|
48
|
-
* @remarks
|
|
49
|
-
* Measured against Excel 16.0 (fn-battery financial/AMORLINC, 2026-08-28). Period 0 is the
|
|
50
|
-
* stub from purchase to the end of the first period, pro-rated by `getAmorDayCount` (a
|
|
51
|
-
* zero-day stub is a whole period; a stub longer than a year is not capped) and capped at
|
|
52
|
-
* `cost − salvage`; every following period is `cost·rate` until the one that takes what is
|
|
53
|
-
* left, and 0 beyond. A period under 1 is period 1, above it truncates. Basis truncates and 2 is
|
|
54
|
-
* refused. Every argument is Excel-declared `any`: a boolean is refused, an empty argument is
|
|
55
|
-
* missing, a multi-cell reference does not broadcast.
|
|
56
47
|
*/
|
|
57
48
|
export declare function AMORLINC(cost: NoLift<Omittable<Scalar>>, datePurchased: NoLift<Omittable<Scalar>>, firstPeriod: NoLift<Omittable<Scalar>>, salvage: NoLift<Omittable<Scalar>>, period: NoLift<Omittable<Scalar>>, rate: NoLift<Omittable<Scalar>>, basis?: NoLift<Omittable<Scalar>>): number;
|
|
58
49
|
//# sourceMappingURL=Depreciation.d.ts.map
|
|
@@ -10,16 +10,6 @@ import { AcceptError, Omittable, Scalar, NoLift } from '@sheetxl/primitives';
|
|
|
10
10
|
* @param redemption is the security's redemption value per $100 face value.
|
|
11
11
|
* @param frequency is the number of coupon payments per year.
|
|
12
12
|
* @param basis is the type of day count basis to use.
|
|
13
|
-
*
|
|
14
|
-
* @remarks
|
|
15
|
-
* The odd FIRST period `[issue, firstCoupon]` is short (a stub of one regular period) or long
|
|
16
|
-
* (several quasi-coupon periods); which, and the day-count sums of either, are
|
|
17
|
-
* {@link oddFirstSums} — measured against Excel 16.0 on 1,125 (shape, frequency, basis) triples
|
|
18
|
-
* and every row of its battery (fn-battery financial/ODDFPRICE, 2026-08-29), Excel's own
|
|
19
|
-
* month-end exponent quirk included. Reading and validation are {@link readOddArgs}'s, then
|
|
20
|
-
* `issue < settlement < firstCoupon < maturity` once truncated, the first coupon on the
|
|
21
|
-
* maturity's coupon grid, `rate ≥ 0`, `yld ≥ 0`, `redemption > 0`; an odd period exactly one
|
|
22
|
-
* regular period long is #NUM!.
|
|
23
13
|
*/
|
|
24
14
|
export declare function ODDFPRICE(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, issue: NoLift<Omittable<AcceptError<Scalar>>>, firstCoupon: NoLift<Omittable<AcceptError<Scalar>>>, rate: NoLift<Omittable<AcceptError<Scalar>>>, yld: NoLift<Omittable<AcceptError<Scalar>>>, redemption: NoLift<Omittable<AcceptError<Scalar>>>, frequency: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
|
|
25
15
|
/**
|
|
@@ -50,14 +40,6 @@ export declare function ODDFYIELD(settlement: NoLift<Omittable<AcceptError<Scala
|
|
|
50
40
|
* @param redemption is the amount to be received at maturity.
|
|
51
41
|
* @param frequency is the number of coupon payments per year.
|
|
52
42
|
* @param basis is the type of day count basis to use.
|
|
53
|
-
*
|
|
54
|
-
* @remarks
|
|
55
|
-
* `(redemption + C·ΣDCᵢ/NLᵢ) / (1 + yld/frequency · ΣDSCᵢ/NLᵢ) − C·ΣAᵢ/NLᵢ` with
|
|
56
|
-
* `C = 100·rate/frequency` — linear in the yield, since the whole bond is the one irregular
|
|
57
|
-
* period. The three sums are {@link oddLastSums}; a product that overflows is 0. Measured
|
|
58
|
-
* bit-for-bit on Excel 16.0 (fn-battery financial/ODDLPRICE, 556 numeric rows, 2026-08-28).
|
|
59
|
-
* Reading and validation are {@link readOddArgs}'s: `lastInterest < settlement < maturity` once
|
|
60
|
-
* truncated, `rate ≥ 0`, `yld ≥ 0`, `redemption > 0`.
|
|
61
43
|
*/
|
|
62
44
|
export declare function ODDLPRICE(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, lastInterest: NoLift<Omittable<AcceptError<Scalar>>>, rate: NoLift<Omittable<AcceptError<Scalar>>>, yld: NoLift<Omittable<AcceptError<Scalar>>>, redemption: NoLift<Omittable<AcceptError<Scalar>>>, frequency: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
|
|
63
45
|
/**
|
|
@@ -53,16 +53,6 @@ export declare function MDURATION(settlement: NoLift<Omittable<AcceptError<Scala
|
|
|
53
53
|
* @param redemption is the security's redemption value per $100 face value.
|
|
54
54
|
* @param frequency is the number of coupon payments per year.
|
|
55
55
|
* @param basis is the type of day count basis to use.
|
|
56
|
-
*
|
|
57
|
-
* @remarks
|
|
58
|
-
* PRICE inverted: the yield `y` with `PRICE(…, y, …) = pr`. With one coupon left the doc's closed
|
|
59
|
-
* form is used, over a coupon period that is the real span from the previous coupon to the
|
|
60
|
-
* maturity (so at bases 2 and 3 the single-coupon yield does not invert PRICE's 360/f or 365/f
|
|
61
|
-
* period). With more than one it is `solveYieldByNewton` on `calculatePrice` from
|
|
62
|
-
* `approximateYield` — an iteration that STOPS SHORT of the root, so the answer sits ~1e-10 away
|
|
63
|
-
* from it, and on a bond it cannot converge on (a redemption that dwarfs the price) it is simply
|
|
64
|
-
* where the walk stood after a hundred steps. Measured, fn-battery financial/YIELD and
|
|
65
|
-
* /adhoc-yield-* (2026-08-28, iteration 2026-09-09).
|
|
66
56
|
*/
|
|
67
57
|
export declare function YIELD(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, rate: NoLift<Omittable<AcceptError<Scalar>>>, pr: NoLift<Omittable<AcceptError<Scalar>>>, redemption: NoLift<Omittable<AcceptError<Scalar>>>, frequency: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
|
|
68
58
|
//# sourceMappingURL=Security.d.ts.map
|
|
@@ -6,13 +6,6 @@ import { AcceptError, Scalar, Omittable, NoLift } from '@sheetxl/primitives';
|
|
|
6
6
|
* @param pr is the security's price per $100 face value.
|
|
7
7
|
* @param redemption is the security's redemption value per $100 face value.
|
|
8
8
|
* @param basis is the type of day count basis to use.
|
|
9
|
-
*
|
|
10
|
-
* @remarks
|
|
11
|
-
* `(1 − pr/redemption)` over YEARFRAC's year fraction of the two dates — the signed NASD count
|
|
12
|
-
* at basis 0, the 365/366 rules at basis 1 — measured against Excel 16.0 (fn-battery
|
|
13
|
-
* financial/DISC, 2026-08-28); a price above the redemption is a negative rate, and a
|
|
14
|
-
* zero-day 30/360 span (Mar 30 → Mar 31) is #NUM!. The arguments read as
|
|
15
|
-
* {@link readDiscountArgs} describes.
|
|
16
9
|
*/
|
|
17
10
|
export declare function DISC(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, pr: NoLift<Omittable<AcceptError<Scalar>>>, redemption: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
|
|
18
11
|
/**
|
|
@@ -22,12 +15,6 @@ export declare function DISC(settlement: NoLift<Omittable<AcceptError<Scalar>>>,
|
|
|
22
15
|
* @param discount is the security's discount rate.
|
|
23
16
|
* @param redemption is the amount to be received at maturity.
|
|
24
17
|
* @param basis is the type of day count basis to use.
|
|
25
|
-
*
|
|
26
|
-
* @remarks
|
|
27
|
-
* `redemption − discount · redemption · yearfrac` with YEARFRAC's year fraction, measured
|
|
28
|
-
* against Excel 16.0 (fn-battery financial/PRICEDISC, 2026-08-28): a discount that exhausts
|
|
29
|
-
* the redemption gives a negative price, and the product overflowing is #NUM!. The arguments
|
|
30
|
-
* read as {@link readDiscountArgs} describes.
|
|
31
18
|
*/
|
|
32
19
|
export declare function PRICEDISC(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, discount: NoLift<Omittable<AcceptError<Scalar>>>, redemption: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
|
|
33
20
|
/**
|
|
@@ -37,11 +24,6 @@ export declare function PRICEDISC(settlement: NoLift<Omittable<AcceptError<Scala
|
|
|
37
24
|
* @param pr is the security's price per $100 face value.
|
|
38
25
|
* @param redemption is the security's redemption value per $100 face value.
|
|
39
26
|
* @param basis is the type of day count basis to use.
|
|
40
|
-
*
|
|
41
|
-
* @remarks
|
|
42
|
-
* `(redemption − pr)/pr` over YEARFRAC's year fraction, measured against Excel 16.0 (fn-battery
|
|
43
|
-
* financial/YIELDDISC, 2026-08-28); a price above the redemption is a negative yield. The
|
|
44
|
-
* arguments read as {@link readDiscountArgs} describes.
|
|
45
27
|
*/
|
|
46
28
|
export declare function YIELDDISC(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, pr: NoLift<Omittable<AcceptError<Scalar>>>, redemption: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
|
|
47
29
|
/**
|
|
@@ -51,11 +33,6 @@ export declare function YIELDDISC(settlement: NoLift<Omittable<AcceptError<Scala
|
|
|
51
33
|
* @param investment is the amount invested in the security.
|
|
52
34
|
* @param redemption is the amount to be received at maturity.
|
|
53
35
|
* @param basis is the type of day count basis to use.
|
|
54
|
-
*
|
|
55
|
-
* @remarks
|
|
56
|
-
* `(redemption − investment)/investment` over YEARFRAC's year fraction, measured against Excel 16.0
|
|
57
|
-
* (fn-battery financial/INTRATE, 2026-08-28); a redemption below the investment is a negative
|
|
58
|
-
* rate. The arguments read as {@link readDiscountArgs} describes.
|
|
59
36
|
*/
|
|
60
37
|
export declare function INTRATE(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, investment: NoLift<Omittable<AcceptError<Scalar>>>, redemption: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
|
|
61
38
|
/**
|
|
@@ -65,12 +42,6 @@ export declare function INTRATE(settlement: NoLift<Omittable<AcceptError<Scalar>
|
|
|
65
42
|
* @param investment is the amount invested in the security.
|
|
66
43
|
* @param discount is the security's discount rate.
|
|
67
44
|
* @param basis is the type of day count basis to use.
|
|
68
|
-
*
|
|
69
|
-
* @remarks
|
|
70
|
-
* `investment / (1 − discount · yearfrac)` with YEARFRAC's year fraction, measured against
|
|
71
|
-
* Excel 16.0 (fn-battery financial/RECEIVED, 2026-08-28); a denominator at or below zero (a
|
|
72
|
-
* discount of 4 over a 90/360 quarter) is #NUM!. The arguments read as
|
|
73
|
-
* {@link readDiscountArgs} describes.
|
|
74
45
|
*/
|
|
75
46
|
export declare function RECEIVED(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, investment: NoLift<Omittable<AcceptError<Scalar>>>, discount: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
|
|
76
47
|
/**
|
|
@@ -81,12 +52,6 @@ export declare function RECEIVED(settlement: NoLift<Omittable<AcceptError<Scalar
|
|
|
81
52
|
* @param rate is the interest rate.
|
|
82
53
|
* @param yld is the security's annual yield.
|
|
83
54
|
* @param basis is the type of day count basis to use.
|
|
84
|
-
*
|
|
85
|
-
* @remarks
|
|
86
|
-
* The doc's `(100 + DIM/B·rate·100) / (1 + DSM/B·yld) − A/B·rate·100`, measured against Excel
|
|
87
|
-
* 16.0 (fn-battery financial/PRICEMAT, 2026-08-28) with the counts {@link readMatArgs}
|
|
88
|
-
* describes (DSM is `DIM − A`); a coupon term that overflows is 0, so a rate of 1E307 prices
|
|
89
|
-
* the redemption alone.
|
|
90
55
|
*/
|
|
91
56
|
export declare function PRICEMAT(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, issue: NoLift<Omittable<AcceptError<Scalar>>>, rate: NoLift<Omittable<AcceptError<Scalar>>>, yld: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
|
|
92
57
|
/**
|
|
@@ -97,11 +62,6 @@ export declare function PRICEMAT(settlement: NoLift<Omittable<AcceptError<Scalar
|
|
|
97
62
|
* @param rate is the interest rate.
|
|
98
63
|
* @param pr is the security's price per $100 face value.
|
|
99
64
|
* @param basis is the type of day count basis to use.
|
|
100
|
-
*
|
|
101
|
-
* @remarks
|
|
102
|
-
* PRICEMAT inverted in closed form, `((1 + DIM/B·rate) / (pr/100 + A/B·rate) − 1) / (DSM/B)`,
|
|
103
|
-
* measured against Excel 16.0 (fn-battery financial/YIELDMAT, 2026-08-28) with the counts
|
|
104
|
-
* {@link readMatArgs} describes.
|
|
105
65
|
*/
|
|
106
66
|
export declare function YIELDMAT(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, issue: NoLift<Omittable<AcceptError<Scalar>>>, rate: NoLift<Omittable<AcceptError<Scalar>>>, pr: NoLift<Omittable<AcceptError<Scalar>>>, basis?: NoLift<Omittable<AcceptError<Scalar>>>): number;
|
|
107
67
|
//# sourceMappingURL=SecurityMaturity.d.ts.map
|
|
@@ -4,11 +4,6 @@ import { AcceptError, Scalar, Omittable, NoLift } from '@sheetxl/primitives';
|
|
|
4
4
|
* @param settlement is the Treasury bill's settlement date, expressed as a serial date number.
|
|
5
5
|
* @param maturity is the Treasury bill's maturity date, expressed as a serial date number.
|
|
6
6
|
* @param discount is the Treasury bill's discount rate.
|
|
7
|
-
*
|
|
8
|
-
* @remarks
|
|
9
|
-
* `100·(1 − discount·days/360)`, measured against Excel 16.0 (fn-battery financial/TBILLPRICE,
|
|
10
|
-
* 2026-08-28): a negative price is #NUM!, and a `discount·days` that overflows is 0 (a price of
|
|
11
|
-
* 100). The arguments read as {@link readTbillArgs} describes.
|
|
12
7
|
*/
|
|
13
8
|
export declare function TBILLPRICE(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, discount: NoLift<Omittable<AcceptError<Scalar>>>): number;
|
|
14
9
|
/**
|
|
@@ -16,11 +11,6 @@ export declare function TBILLPRICE(settlement: NoLift<Omittable<AcceptError<Scal
|
|
|
16
11
|
* @param settlement is the Treasury bill's settlement date, expressed as a serial date number.
|
|
17
12
|
* @param maturity is the Treasury bill's maturity date, expressed as a serial date number.
|
|
18
13
|
* @param pr is the Treasury Bill's price per $100 face value.
|
|
19
|
-
*
|
|
20
|
-
* @remarks
|
|
21
|
-
* `(100 − pr)/pr · 360/days`, measured against Excel 16.0 (fn-battery financial/TBILLYIELD,
|
|
22
|
-
* 2026-08-28); a price above 100 is a negative yield. The arguments read as
|
|
23
|
-
* {@link readTbillArgs} describes.
|
|
24
14
|
*/
|
|
25
15
|
export declare function TBILLYIELD(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, pr: NoLift<Omittable<AcceptError<Scalar>>>): number;
|
|
26
16
|
/**
|
|
@@ -28,13 +18,6 @@ export declare function TBILLYIELD(settlement: NoLift<Omittable<AcceptError<Scal
|
|
|
28
18
|
* @param settlement is the Treasury bill's settlement date, expressed as a serial date number.
|
|
29
19
|
* @param maturity is the Treasury bill's maturity date, expressed as a serial date number.
|
|
30
20
|
* @param discount is the Treasury bill's discount rate.
|
|
31
|
-
*
|
|
32
|
-
* @remarks
|
|
33
|
-
* Measured against Excel 16.0 (fn-battery financial/TBILLEQ, 2026-08-28). Through 182 days the
|
|
34
|
-
* doc's `365·discount / (360 − discount·days)`; from 183 days the Treasury's bond-equivalent
|
|
35
|
-
* quadratic on the discounted price, over a 365-day year — 366 for a 366-day span. A
|
|
36
|
-
* denominator at or below zero is #NUM!; a product that overflows is 0. The arguments read as
|
|
37
|
-
* {@link readTbillArgs} describes.
|
|
38
21
|
*/
|
|
39
22
|
export declare function TBILLEQ(settlement: NoLift<Omittable<AcceptError<Scalar>>>, maturity: NoLift<Omittable<AcceptError<Scalar>>>, discount: NoLift<Omittable<AcceptError<Scalar>>>): number;
|
|
40
23
|
//# sourceMappingURL=TBill.d.ts.map
|
|
@@ -7,23 +7,6 @@
|
|
|
7
7
|
* @param endPeriod is the last period in the calculation.
|
|
8
8
|
* @param factor is the rate at which the balance declines.
|
|
9
9
|
* @param noSwitch switch to straight-line depreciation when depreciation is greater than the declining balance = FALSE; do not switch = TRUE.
|
|
10
|
-
*
|
|
11
|
-
* @remarks
|
|
12
|
-
* Measured against Excel 16.0 (fn-battery financial/VDB and `adhoc-vdb-clamp`, 2026-08-28).
|
|
13
|
-
*
|
|
14
|
-
* `no_switch = TRUE` is DDB period by period from the original cost, the first and last periods
|
|
15
|
-
* pro-rated by the fraction of them inside the window.
|
|
16
|
-
*
|
|
17
|
-
* With the switch, Excel runs two passes. The first walks from 0 to `start` to find the balance
|
|
18
|
-
* there — the FRACTIONAL part of `start` first (a partial period charged as `raw·fraction`,
|
|
19
|
-
* clamped at salvage and never negative), then whole periods with the straight-line switch, each
|
|
20
|
-
* period's straight line measured against the life remaining at that point (so a start of 2.5
|
|
21
|
-
* or 6.5 switches on the same `[1.5, 2.5]` period). The second pass depreciates that balance over
|
|
22
|
-
* `end − start` periods with a remaining life of `life − start`, each period's declining-balance
|
|
23
|
-
* charge clamped at salvage (then pro-rated if partial), switching to straight-line when that is
|
|
24
|
-
* larger. The second pass is NOT floored at zero: an asset already below salvage is written UP
|
|
25
|
-
* to it in its first period (VDB(300,2400,10,0,1) is −2100), which is also why a whole-period
|
|
26
|
-
* start on such an asset is 0 — the first pass has already moved the balance to salvage.
|
|
27
10
|
*/
|
|
28
11
|
export declare function VDB(cost: number, salvage: number, life: number, startPeriod: number, endPeriod: number, factor?: number, noSwitch?: boolean): number;
|
|
29
12
|
//# sourceMappingURL=VDB.d.ts.map
|