@fintekkers/ledger-models 1.1.15 → 1.1.16
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/catalog/measures.json +141 -0
- package/package.json +1 -1
package/catalog/measures.json
CHANGED
|
@@ -276,6 +276,147 @@
|
|
|
276
276
|
],
|
|
277
277
|
"implemented": false
|
|
278
278
|
},
|
|
279
|
+
{
|
|
280
|
+
"name": "PROFIT_LOSS",
|
|
281
|
+
"enum_value": 18,
|
|
282
|
+
"display_name": "Profit / Loss",
|
|
283
|
+
"description": "The profit or loss on a position relative to its cost basis.",
|
|
284
|
+
"formula": "ProfitLoss = MarketValue - (UnadjustedCostBasis / d * DirectedQuantity), where d = 100 for par-quoted securities (bonds, TIPS, FRNs) and d = 1 for dollar-quoted securities (equities, cash)",
|
|
285
|
+
"units": "Dollars (or settlement currency)",
|
|
286
|
+
"category": "valuation",
|
|
287
|
+
"applies_to": ["BOND", "TIPS", "TREASURY_FRN", "STOCK", "CASH_INSTRUMENT"],
|
|
288
|
+
"model_assumptions": [
|
|
289
|
+
"The measure is absent, never 0, when MarketValue, UnadjustedCostBasis or DirectedQuantity is unavailable"
|
|
290
|
+
],
|
|
291
|
+
"implemented": true
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"name": "PROFIT_LOSS_PERCENT",
|
|
295
|
+
"enum_value": 19,
|
|
296
|
+
"display_name": "Profit / Loss Percent",
|
|
297
|
+
"description": "The profit or loss as a percentage of the original cost basis.",
|
|
298
|
+
"formula": "ProfitLossPercent = ProfitLoss / (UnadjustedCostBasis / d * DirectedQuantity), where d = 100 for par-quoted securities (bonds, TIPS, FRNs) and d = 1 for dollar-quoted securities (equities, cash)",
|
|
299
|
+
"units": "Decimal (0-1 scale; e.g. 0.05 = 5.00% gain)",
|
|
300
|
+
"category": "valuation",
|
|
301
|
+
"applies_to": ["BOND", "TIPS", "TREASURY_FRN", "STOCK", "CASH_INSTRUMENT"],
|
|
302
|
+
"model_assumptions": [
|
|
303
|
+
"The measure is absent, never 0, when MarketValue, UnadjustedCostBasis or DirectedQuantity is unavailable"
|
|
304
|
+
],
|
|
305
|
+
"implemented": true
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"name": "ACCRUED_INTEREST",
|
|
309
|
+
"enum_value": 20,
|
|
310
|
+
"display_name": "Accrued Interest",
|
|
311
|
+
"description": "The coupon interest accrued from the last coupon date up to (but not including) the settlement date, per the security's day count. Earned but not yet received.",
|
|
312
|
+
"formula": "Fixed-coupon bonds and TIPS: AccruedInterest = (coupon_rate / coupon_frequency) * (days_since_last_coupon / days_in_period) * directed_quantity. Treasury FRNs: AccruedInterest = Σ_{each day} (index_fixing_d + spread) / 360 * directed_quantity, where directed_quantity is the position's face",
|
|
313
|
+
"units": "Dollars (absolute dollar amount for the position)",
|
|
314
|
+
"category": "valuation",
|
|
315
|
+
"applies_to": ["BOND", "TIPS", "TREASURY_FRN"],
|
|
316
|
+
"model_assumptions": [
|
|
317
|
+
"Day count: the security's (Actual/Actual (ICMA) for US Treasuries)",
|
|
318
|
+
"Treasury FRNs: the fixings are the ones supplied in the request; no curve is used",
|
|
319
|
+
"Returns null/zero for Equity, Cash, and zero-coupon bonds"
|
|
320
|
+
],
|
|
321
|
+
"implemented": true
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"name": "CONVEXITY",
|
|
325
|
+
"enum_value": 21,
|
|
326
|
+
"display_name": "Convexity",
|
|
327
|
+
"description": "The second derivative of a bond's price with respect to yield, normalised by price. Convexity measures how the duration of a bond changes as yield changes — a bond with higher convexity gains more in price when yields fall and loses less when yields rise, compared to a bond with lower convexity of equal duration.",
|
|
328
|
+
"formula": "Convexity = (1/P) × Σ_{t=1}^{N} [CF_t × t × (t+1) / (1+y/n)^(t+2)] / n²",
|
|
329
|
+
"units": "Years² (e.g. 20.5 = 20.5 years²)",
|
|
330
|
+
"category": "risk",
|
|
331
|
+
"applies_to": ["BOND", "TIPS", "TREASURY_FRN"],
|
|
332
|
+
"model_assumptions": [
|
|
333
|
+
"Same as MACAULAY_DURATION (flat yield curve, YTM-based discounting)",
|
|
334
|
+
"For TIPS: y = REAL_YIELD and CF_t are the inflation-adjusted cash flows",
|
|
335
|
+
"For FRN: uses flat-forwards effective YTM (same model as PRESENT_VALUE)",
|
|
336
|
+
"Settlement on a coupon date (integer period exponents)"
|
|
337
|
+
],
|
|
338
|
+
"implemented": true
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"name": "DIRTY_PRICE",
|
|
342
|
+
"enum_value": 22,
|
|
343
|
+
"display_name": "Dirty Price",
|
|
344
|
+
"description": "The full (invoice) price of a bond including accrued interest, expressed as a percentage of face value.",
|
|
345
|
+
"formula": "DirtyPrice = CLEAN_PRICE + accrued_interest_per_bond / face_value * 100, where CLEAN_PRICE is the supplied market clean price and accrued_interest_per_bond is ACCRUED_INTEREST for one bond of face_value, as of the settlement date. The result is a percentage of par, per bond, and is never scaled by quantity",
|
|
346
|
+
"units": "Percentage of par (e.g. 99.5 = 99.5% of par)",
|
|
347
|
+
"category": "valuation",
|
|
348
|
+
"applies_to": ["BOND", "TIPS", "TREASURY_FRN"],
|
|
349
|
+
"model_assumptions": [],
|
|
350
|
+
"implemented": true
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"name": "CLEAN_PRICE",
|
|
354
|
+
"enum_value": 23,
|
|
355
|
+
"display_name": "Clean Price",
|
|
356
|
+
"description": "The market clean price per 100 of face (excluding accrued interest), as supplied in the request — e.g. the FedInvest end-of-day price via price-service. An input, never computed: valuation-service returns UNIMPLEMENTED for it.",
|
|
357
|
+
"formula": null,
|
|
358
|
+
"units": "Percentage of par (e.g. 98.75 = 98.75% of par)",
|
|
359
|
+
"category": "input",
|
|
360
|
+
"applies_to": ["BOND", "TIPS", "TREASURY_FRN"],
|
|
361
|
+
"model_assumptions": [],
|
|
362
|
+
"implemented": false
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"name": "MODIFIED_DURATION",
|
|
366
|
+
"enum_value": 24,
|
|
367
|
+
"display_name": "Modified Duration",
|
|
368
|
+
"description": "Measures the percentage price change of a bond for a 1% (100bp) change in yield. Unlike Macaulay Duration (which is expressed in years), Modified Duration is a direct measure of price sensitivity: a bond with ModifiedDuration=5 will move approximately 5% in price for a 100bp parallel shift in yield.",
|
|
369
|
+
"formula": "ModifiedDuration = MacaulayDuration / (1 + ytm/n), where ytm = yield to maturity (annual), n = coupon periods per year. For TIPS, ytm = REAL_YIELD (on the inflation-adjusted cash flows)",
|
|
370
|
+
"units": "Years (dimensionally equivalent to years, interpreted as % per 100bp)",
|
|
371
|
+
"category": "risk",
|
|
372
|
+
"applies_to": ["BOND", "TIPS", "TREASURY_FRN"],
|
|
373
|
+
"model_assumptions": [],
|
|
374
|
+
"implemented": true
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"name": "DV01",
|
|
378
|
+
"enum_value": 25,
|
|
379
|
+
"display_name": "DV01",
|
|
380
|
+
"description": "DV01 (Dollar Value of 01) = the dollar P&L impact of a 1bp (0.01%) yield increase.",
|
|
381
|
+
"formula": "DV01 = ModifiedDuration × MarketValue × 0.0001",
|
|
382
|
+
"units": "Dollars per basis point",
|
|
383
|
+
"category": "risk",
|
|
384
|
+
"applies_to": ["BOND", "TIPS", "TREASURY_FRN"],
|
|
385
|
+
"model_assumptions": [],
|
|
386
|
+
"implemented": true
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"name": "DISCOUNT_YIELD",
|
|
390
|
+
"enum_value": 26,
|
|
391
|
+
"display_name": "Discount Yield",
|
|
392
|
+
"description": "U.S. Treasury Bill discount-basis yield. The market convention used by TreasuryDirect auction results (\"High discount rate\"), Bloomberg TBILL screens, and most short-tenor money-market quotes.",
|
|
393
|
+
"formula": "DiscountYield = (F - P) / F × 360 / days_to_maturity, where F = face value (par), P = dollar price, day count is Actual/360",
|
|
394
|
+
"units": "Decimal (0-1 scale; e.g. 0.0363 = 3.63%)",
|
|
395
|
+
"category": "yield",
|
|
396
|
+
"applies_to": ["TBILL", "STRIPS"],
|
|
397
|
+
"model_assumptions": [
|
|
398
|
+
"Simple (non-compounded) discount basis — standard U.S. money-market",
|
|
399
|
+
"360-day year (Actual/360 day count)",
|
|
400
|
+
"Assumes the security has a defined maturity_date and face_value; null for instruments where days_to_maturity is undefined"
|
|
401
|
+
],
|
|
402
|
+
"implemented": true
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"name": "BOND_EQUIVALENT_YIELD",
|
|
406
|
+
"enum_value": 27,
|
|
407
|
+
"display_name": "Bond-Equivalent Yield",
|
|
408
|
+
"description": "Bond-Equivalent Yield (BEY) for U.S. Treasury Bills — also known as the \"investment rate\" published alongside DISCOUNT_YIELD on TreasuryDirect. The conventional way to compare TBill returns to coupon-bearing bond yields (which conventionally use a 365-day year).",
|
|
409
|
+
"formula": "BondEquivalentYield = (F - P) / P × 365 / days_to_maturity, where F = face value (par), P = dollar price, day count is Actual/365",
|
|
410
|
+
"units": "Decimal (0-1 scale; e.g. 0.0371 = 3.71%)",
|
|
411
|
+
"category": "yield",
|
|
412
|
+
"applies_to": ["TBILL", "STRIPS"],
|
|
413
|
+
"model_assumptions": [
|
|
414
|
+
"Simple (non-compounded) basis",
|
|
415
|
+
"365-day year (Actual/365 day count)",
|
|
416
|
+
"Same applicability constraints as DISCOUNT_YIELD"
|
|
417
|
+
],
|
|
418
|
+
"implemented": true
|
|
419
|
+
},
|
|
279
420
|
{
|
|
280
421
|
"name": "REFERENCE_CPI",
|
|
281
422
|
"enum_value": 28,
|