qntjs-lib 1.0.1 → 1.1.0

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.
@@ -354,98 +354,98 @@ declare function olsMulti(X: number[][], y: number[]): number[] | null;
354
354
  * the `src/math` submodules for convenient imports.
355
355
  */
356
356
 
357
- declare const index_d$2_abs: typeof abs;
358
- declare const index_d$2_add: typeof add;
359
- declare const index_d$2_and: typeof and;
360
- declare const index_d$2_argmax: typeof argmax;
361
- declare const index_d$2_argmin: typeof argmin;
362
- declare const index_d$2_avg: typeof avg;
363
- declare const index_d$2_ceil: typeof ceil;
364
- declare const index_d$2_clamp: typeof clamp;
365
- declare const index_d$2_cummax: typeof cummax;
366
- declare const index_d$2_cummin: typeof cummin;
367
- declare const index_d$2_cumprod: typeof cumprod;
368
- declare const index_d$2_cumsum: typeof cumsum;
369
- declare const index_d$2_diff: typeof diff;
370
- declare const index_d$2_div: typeof div;
371
- declare const index_d$2_dot: typeof dot;
372
- declare const index_d$2_eq: typeof eq;
373
- declare const index_d$2_floor: typeof floor;
374
- declare const index_d$2_gt: typeof gt;
375
- declare const index_d$2_gte: typeof gte;
376
- declare const index_d$2_lt: typeof lt;
377
- declare const index_d$2_lte: typeof lte;
378
- declare const index_d$2_max: typeof max;
379
- declare const index_d$2_min: typeof min;
380
- declare const index_d$2_mul: typeof mul;
381
- declare const index_d$2_neq: typeof neq;
382
- declare const index_d$2_norm: typeof norm;
383
- declare const index_d$2_not: typeof not;
384
- declare const index_d$2_ols: typeof ols;
385
- declare const index_d$2_olsMulti: typeof olsMulti;
386
- declare const index_d$2_or: typeof or;
387
- declare const index_d$2_prod: typeof prod;
388
- declare const index_d$2_randnormal: typeof randnormal;
389
- declare const index_d$2_randuniform: typeof randuniform;
390
- declare const index_d$2_rollargmax: typeof rollargmax;
391
- declare const index_d$2_rollargmin: typeof rollargmin;
392
- declare const index_d$2_rollmax: typeof rollmax;
393
- declare const index_d$2_rollmin: typeof rollmin;
394
- declare const index_d$2_rollminmax: typeof rollminmax;
395
- declare const index_d$2_rollprod: typeof rollprod;
396
- declare const index_d$2_rollsum: typeof rollsum;
397
- declare const index_d$2_round: typeof round;
398
- declare const index_d$2_scale: typeof scale;
399
- declare const index_d$2_sign: typeof sign;
400
- declare const index_d$2_sub: typeof sub;
401
- declare const index_d$2_sum: typeof sum;
402
- declare namespace index_d$2 {
357
+ declare const index_d$3_abs: typeof abs;
358
+ declare const index_d$3_add: typeof add;
359
+ declare const index_d$3_and: typeof and;
360
+ declare const index_d$3_argmax: typeof argmax;
361
+ declare const index_d$3_argmin: typeof argmin;
362
+ declare const index_d$3_avg: typeof avg;
363
+ declare const index_d$3_ceil: typeof ceil;
364
+ declare const index_d$3_clamp: typeof clamp;
365
+ declare const index_d$3_cummax: typeof cummax;
366
+ declare const index_d$3_cummin: typeof cummin;
367
+ declare const index_d$3_cumprod: typeof cumprod;
368
+ declare const index_d$3_cumsum: typeof cumsum;
369
+ declare const index_d$3_diff: typeof diff;
370
+ declare const index_d$3_div: typeof div;
371
+ declare const index_d$3_dot: typeof dot;
372
+ declare const index_d$3_eq: typeof eq;
373
+ declare const index_d$3_floor: typeof floor;
374
+ declare const index_d$3_gt: typeof gt;
375
+ declare const index_d$3_gte: typeof gte;
376
+ declare const index_d$3_lt: typeof lt;
377
+ declare const index_d$3_lte: typeof lte;
378
+ declare const index_d$3_max: typeof max;
379
+ declare const index_d$3_min: typeof min;
380
+ declare const index_d$3_mul: typeof mul;
381
+ declare const index_d$3_neq: typeof neq;
382
+ declare const index_d$3_norm: typeof norm;
383
+ declare const index_d$3_not: typeof not;
384
+ declare const index_d$3_ols: typeof ols;
385
+ declare const index_d$3_olsMulti: typeof olsMulti;
386
+ declare const index_d$3_or: typeof or;
387
+ declare const index_d$3_prod: typeof prod;
388
+ declare const index_d$3_randnormal: typeof randnormal;
389
+ declare const index_d$3_randuniform: typeof randuniform;
390
+ declare const index_d$3_rollargmax: typeof rollargmax;
391
+ declare const index_d$3_rollargmin: typeof rollargmin;
392
+ declare const index_d$3_rollmax: typeof rollmax;
393
+ declare const index_d$3_rollmin: typeof rollmin;
394
+ declare const index_d$3_rollminmax: typeof rollminmax;
395
+ declare const index_d$3_rollprod: typeof rollprod;
396
+ declare const index_d$3_rollsum: typeof rollsum;
397
+ declare const index_d$3_round: typeof round;
398
+ declare const index_d$3_scale: typeof scale;
399
+ declare const index_d$3_sign: typeof sign;
400
+ declare const index_d$3_sub: typeof sub;
401
+ declare const index_d$3_sum: typeof sum;
402
+ declare namespace index_d$3 {
403
403
  export {
404
- index_d$2_abs as abs,
405
- index_d$2_add as add,
406
- index_d$2_and as and,
407
- index_d$2_argmax as argmax,
408
- index_d$2_argmin as argmin,
409
- index_d$2_avg as avg,
410
- index_d$2_ceil as ceil,
411
- index_d$2_clamp as clamp,
412
- index_d$2_cummax as cummax,
413
- index_d$2_cummin as cummin,
414
- index_d$2_cumprod as cumprod,
415
- index_d$2_cumsum as cumsum,
416
- index_d$2_diff as diff,
417
- index_d$2_div as div,
418
- index_d$2_dot as dot,
419
- index_d$2_eq as eq,
420
- index_d$2_floor as floor,
421
- index_d$2_gt as gt,
422
- index_d$2_gte as gte,
423
- index_d$2_lt as lt,
424
- index_d$2_lte as lte,
425
- index_d$2_max as max,
426
- index_d$2_min as min,
427
- index_d$2_mul as mul,
428
- index_d$2_neq as neq,
429
- index_d$2_norm as norm,
430
- index_d$2_not as not,
431
- index_d$2_ols as ols,
432
- index_d$2_olsMulti as olsMulti,
433
- index_d$2_or as or,
434
- index_d$2_prod as prod,
435
- index_d$2_randnormal as randnormal,
436
- index_d$2_randuniform as randuniform,
437
- index_d$2_rollargmax as rollargmax,
438
- index_d$2_rollargmin as rollargmin,
439
- index_d$2_rollmax as rollmax,
440
- index_d$2_rollmin as rollmin,
441
- index_d$2_rollminmax as rollminmax,
442
- index_d$2_rollprod as rollprod,
443
- index_d$2_rollsum as rollsum,
444
- index_d$2_round as round,
445
- index_d$2_scale as scale,
446
- index_d$2_sign as sign,
447
- index_d$2_sub as sub,
448
- index_d$2_sum as sum,
404
+ index_d$3_abs as abs,
405
+ index_d$3_add as add,
406
+ index_d$3_and as and,
407
+ index_d$3_argmax as argmax,
408
+ index_d$3_argmin as argmin,
409
+ index_d$3_avg as avg,
410
+ index_d$3_ceil as ceil,
411
+ index_d$3_clamp as clamp,
412
+ index_d$3_cummax as cummax,
413
+ index_d$3_cummin as cummin,
414
+ index_d$3_cumprod as cumprod,
415
+ index_d$3_cumsum as cumsum,
416
+ index_d$3_diff as diff,
417
+ index_d$3_div as div,
418
+ index_d$3_dot as dot,
419
+ index_d$3_eq as eq,
420
+ index_d$3_floor as floor,
421
+ index_d$3_gt as gt,
422
+ index_d$3_gte as gte,
423
+ index_d$3_lt as lt,
424
+ index_d$3_lte as lte,
425
+ index_d$3_max as max,
426
+ index_d$3_min as min,
427
+ index_d$3_mul as mul,
428
+ index_d$3_neq as neq,
429
+ index_d$3_norm as norm,
430
+ index_d$3_not as not,
431
+ index_d$3_ols as ols,
432
+ index_d$3_olsMulti as olsMulti,
433
+ index_d$3_or as or,
434
+ index_d$3_prod as prod,
435
+ index_d$3_randnormal as randnormal,
436
+ index_d$3_randuniform as randuniform,
437
+ index_d$3_rollargmax as rollargmax,
438
+ index_d$3_rollargmin as rollargmin,
439
+ index_d$3_rollmax as rollmax,
440
+ index_d$3_rollmin as rollmin,
441
+ index_d$3_rollminmax as rollminmax,
442
+ index_d$3_rollprod as rollprod,
443
+ index_d$3_rollsum as rollsum,
444
+ index_d$3_round as round,
445
+ index_d$3_scale as scale,
446
+ index_d$3_sign as sign,
447
+ index_d$3_sub as sub,
448
+ index_d$3_sum as sum,
449
449
  };
450
450
  }
451
451
 
@@ -1095,65 +1095,65 @@ declare function crossunder(a: ArrayLike<number>, b: ArrayLike<number> | number)
1095
1095
  * volatility indicators, as well as utility helpers.
1096
1096
  */
1097
1097
 
1098
- type index_d$1_IchimokuOptions = IchimokuOptions;
1099
- type index_d$1_KstOptions = KstOptions;
1100
- type index_d$1_UltoscOptions = UltoscOptions;
1101
- declare const index_d$1_ad: typeof ad;
1102
- declare const index_d$1_adosc: typeof adosc;
1103
- declare const index_d$1_adx: typeof adx;
1104
- declare const index_d$1_adxr: typeof adxr;
1105
- declare const index_d$1_ao: typeof ao;
1106
- declare const index_d$1_apo: typeof apo;
1107
- declare const index_d$1_aroon: typeof aroon;
1108
- declare const index_d$1_atr: typeof atr;
1109
- declare const index_d$1_bb: typeof bb;
1110
- declare const index_d$1_bbw: typeof bbw;
1111
- declare const index_d$1_cci: typeof cci;
1112
- declare const index_d$1_change: typeof change;
1113
- declare const index_d$1_cmo: typeof cmo;
1114
- declare const index_d$1_cross: typeof cross;
1115
- declare const index_d$1_crossover: typeof crossover;
1116
- declare const index_d$1_crossunder: typeof crossunder;
1117
- declare const index_d$1_dema: typeof dema;
1118
- declare const index_d$1_di: typeof di;
1119
- declare const index_d$1_donchian: typeof donchian;
1120
- declare const index_d$1_dpo: typeof dpo;
1121
- declare const index_d$1_dx: typeof dx;
1122
- declare const index_d$1_ema: typeof ema;
1123
- declare const index_d$1_falling: typeof falling;
1124
- declare const index_d$1_hma: typeof hma;
1125
- declare const index_d$1_ichimoku: typeof ichimoku;
1126
- declare const index_d$1_kama: typeof kama;
1127
- declare const index_d$1_keltner: typeof keltner;
1128
- declare const index_d$1_kst: typeof kst;
1129
- declare const index_d$1_macd: typeof macd;
1130
- declare const index_d$1_mfi: typeof mfi;
1131
- declare const index_d$1_mom: typeof mom;
1132
- declare const index_d$1_natr: typeof natr;
1133
- declare const index_d$1_obv: typeof obv;
1134
- declare const index_d$1_pnvi: typeof pnvi;
1135
- declare const index_d$1_ppo: typeof ppo;
1136
- declare const index_d$1_psar: typeof psar;
1137
- declare const index_d$1_rising: typeof rising;
1138
- declare const index_d$1_rma: typeof rma;
1139
- declare const index_d$1_roc: typeof roc;
1140
- declare const index_d$1_rsi: typeof rsi;
1141
- declare const index_d$1_sma: typeof sma;
1142
- declare const index_d$1_stoch: typeof stoch;
1143
- declare const index_d$1_stochrsi: typeof stochrsi;
1144
- declare const index_d$1_supertrend: typeof supertrend;
1145
- declare const index_d$1_t3: typeof t3;
1146
- declare const index_d$1_tema: typeof tema;
1147
- declare const index_d$1_tr: typeof tr;
1148
- declare const index_d$1_trima: typeof trima;
1149
- declare const index_d$1_ultosc: typeof ultosc;
1150
- declare const index_d$1_vwma: typeof vwma;
1151
- declare const index_d$1_wad: typeof wad;
1152
- declare const index_d$1_wma: typeof wma;
1153
- declare const index_d$1_wpr: typeof wpr;
1154
- declare namespace index_d$1 {
1155
- export { index_d$1_ad as ad, index_d$1_adosc as adosc, index_d$1_adx as adx, index_d$1_adxr as adxr, index_d$1_ao as ao, index_d$1_apo as apo, index_d$1_aroon as aroon, index_d$1_atr as atr, index_d$1_bb as bb, index_d$1_bbw as bbw, index_d$1_cci as cci, index_d$1_change as change, index_d$1_cmo as cmo, index_d$1_cross as cross, index_d$1_crossover as crossover, index_d$1_crossunder as crossunder, index_d$1_dema as dema, index_d$1_di as di, index_d$1_donchian as donchian, index_d$1_dpo as dpo, index_d$1_dx as dx, index_d$1_ema as ema, index_d$1_falling as falling, index_d$1_hma as hma, index_d$1_ichimoku as ichimoku, index_d$1_kama as kama, index_d$1_keltner as keltner, index_d$1_kst as kst, index_d$1_macd as macd, index_d$1_mfi as mfi, index_d$1_mom as mom, index_d$1_natr as natr, index_d$1_obv as obv, index_d$1_pnvi as pnvi, index_d$1_ppo as ppo, index_d$1_psar as psar, index_d$1_rising as rising, index_d$1_rma as rma, index_d$1_roc as roc, index_d$1_rsi as rsi, index_d$1_sma as sma, index_d$1_stoch as stoch, index_d$1_stochrsi as stochrsi, index_d$1_supertrend as supertrend, index_d$1_t3 as t3, index_d$1_tema as tema, index_d$1_tr as tr, index_d$1_trima as trima, index_d$1_ultosc as ultosc, index_d$1_vwma as vwma, index_d$1_wad as wad, index_d$1_wma as wma, index_d$1_wpr as wpr };
1156
- export type { index_d$1_IchimokuOptions as IchimokuOptions, index_d$1_KstOptions as KstOptions, index_d$1_UltoscOptions as UltoscOptions };
1098
+ type index_d$2_IchimokuOptions = IchimokuOptions;
1099
+ type index_d$2_KstOptions = KstOptions;
1100
+ type index_d$2_UltoscOptions = UltoscOptions;
1101
+ declare const index_d$2_ad: typeof ad;
1102
+ declare const index_d$2_adosc: typeof adosc;
1103
+ declare const index_d$2_adx: typeof adx;
1104
+ declare const index_d$2_adxr: typeof adxr;
1105
+ declare const index_d$2_ao: typeof ao;
1106
+ declare const index_d$2_apo: typeof apo;
1107
+ declare const index_d$2_aroon: typeof aroon;
1108
+ declare const index_d$2_atr: typeof atr;
1109
+ declare const index_d$2_bb: typeof bb;
1110
+ declare const index_d$2_bbw: typeof bbw;
1111
+ declare const index_d$2_cci: typeof cci;
1112
+ declare const index_d$2_change: typeof change;
1113
+ declare const index_d$2_cmo: typeof cmo;
1114
+ declare const index_d$2_cross: typeof cross;
1115
+ declare const index_d$2_crossover: typeof crossover;
1116
+ declare const index_d$2_crossunder: typeof crossunder;
1117
+ declare const index_d$2_dema: typeof dema;
1118
+ declare const index_d$2_di: typeof di;
1119
+ declare const index_d$2_donchian: typeof donchian;
1120
+ declare const index_d$2_dpo: typeof dpo;
1121
+ declare const index_d$2_dx: typeof dx;
1122
+ declare const index_d$2_ema: typeof ema;
1123
+ declare const index_d$2_falling: typeof falling;
1124
+ declare const index_d$2_hma: typeof hma;
1125
+ declare const index_d$2_ichimoku: typeof ichimoku;
1126
+ declare const index_d$2_kama: typeof kama;
1127
+ declare const index_d$2_keltner: typeof keltner;
1128
+ declare const index_d$2_kst: typeof kst;
1129
+ declare const index_d$2_macd: typeof macd;
1130
+ declare const index_d$2_mfi: typeof mfi;
1131
+ declare const index_d$2_mom: typeof mom;
1132
+ declare const index_d$2_natr: typeof natr;
1133
+ declare const index_d$2_obv: typeof obv;
1134
+ declare const index_d$2_pnvi: typeof pnvi;
1135
+ declare const index_d$2_ppo: typeof ppo;
1136
+ declare const index_d$2_psar: typeof psar;
1137
+ declare const index_d$2_rising: typeof rising;
1138
+ declare const index_d$2_rma: typeof rma;
1139
+ declare const index_d$2_roc: typeof roc;
1140
+ declare const index_d$2_rsi: typeof rsi;
1141
+ declare const index_d$2_sma: typeof sma;
1142
+ declare const index_d$2_stoch: typeof stoch;
1143
+ declare const index_d$2_stochrsi: typeof stochrsi;
1144
+ declare const index_d$2_supertrend: typeof supertrend;
1145
+ declare const index_d$2_t3: typeof t3;
1146
+ declare const index_d$2_tema: typeof tema;
1147
+ declare const index_d$2_tr: typeof tr;
1148
+ declare const index_d$2_trima: typeof trima;
1149
+ declare const index_d$2_ultosc: typeof ultosc;
1150
+ declare const index_d$2_vwma: typeof vwma;
1151
+ declare const index_d$2_wad: typeof wad;
1152
+ declare const index_d$2_wma: typeof wma;
1153
+ declare const index_d$2_wpr: typeof wpr;
1154
+ declare namespace index_d$2 {
1155
+ export { index_d$2_ad as ad, index_d$2_adosc as adosc, index_d$2_adx as adx, index_d$2_adxr as adxr, index_d$2_ao as ao, index_d$2_apo as apo, index_d$2_aroon as aroon, index_d$2_atr as atr, index_d$2_bb as bb, index_d$2_bbw as bbw, index_d$2_cci as cci, index_d$2_change as change, index_d$2_cmo as cmo, index_d$2_cross as cross, index_d$2_crossover as crossover, index_d$2_crossunder as crossunder, index_d$2_dema as dema, index_d$2_di as di, index_d$2_donchian as donchian, index_d$2_dpo as dpo, index_d$2_dx as dx, index_d$2_ema as ema, index_d$2_falling as falling, index_d$2_hma as hma, index_d$2_ichimoku as ichimoku, index_d$2_kama as kama, index_d$2_keltner as keltner, index_d$2_kst as kst, index_d$2_macd as macd, index_d$2_mfi as mfi, index_d$2_mom as mom, index_d$2_natr as natr, index_d$2_obv as obv, index_d$2_pnvi as pnvi, index_d$2_ppo as ppo, index_d$2_psar as psar, index_d$2_rising as rising, index_d$2_rma as rma, index_d$2_roc as roc, index_d$2_rsi as rsi, index_d$2_sma as sma, index_d$2_stoch as stoch, index_d$2_stochrsi as stochrsi, index_d$2_supertrend as supertrend, index_d$2_t3 as t3, index_d$2_tema as tema, index_d$2_tr as tr, index_d$2_trima as trima, index_d$2_ultosc as ultosc, index_d$2_vwma as vwma, index_d$2_wad as wad, index_d$2_wma as wma, index_d$2_wpr as wpr };
1156
+ export type { index_d$2_IchimokuOptions as IchimokuOptions, index_d$2_KstOptions as KstOptions, index_d$2_UltoscOptions as UltoscOptions };
1157
1157
  }
1158
1158
 
1159
1159
  /**
@@ -1510,64 +1510,324 @@ declare function bootstrap<T>(arr: T[], k: number): T[];
1510
1510
  * Stats barrel: re-export statistical helpers for convenient imports.
1511
1511
  */
1512
1512
 
1513
- declare const index_d_bootstrap: typeof bootstrap;
1514
- declare const index_d_corr: typeof corr;
1515
- declare const index_d_covar: typeof covar;
1516
- declare const index_d_gmean: typeof gmean;
1517
- declare const index_d_hmean: typeof hmean;
1518
- declare const index_d_kurtosis: typeof kurtosis;
1519
- declare const index_d_mad: typeof mad;
1520
- declare const index_d_mean: typeof mean;
1521
- declare const index_d_median: typeof median;
1522
- declare const index_d_norminmax: typeof norminmax;
1523
- declare const index_d_percentiles: typeof percentiles;
1524
- declare const index_d_quantile: typeof quantile;
1525
- declare const index_d_rollcorr: typeof rollcorr;
1526
- declare const index_d_rollcovar: typeof rollcovar;
1527
- declare const index_d_rollkurtosis: typeof rollkurtosis;
1528
- declare const index_d_rollmean: typeof rollmean;
1529
- declare const index_d_rollmedian: typeof rollmedian;
1530
- declare const index_d_rollquantile: typeof rollquantile;
1531
- declare const index_d_rollskew: typeof rollskew;
1532
- declare const index_d_rollstdev: typeof rollstdev;
1533
- declare const index_d_rollvar: typeof rollvar;
1534
- declare const index_d_sample: typeof sample;
1535
- declare const index_d_shuffle: typeof shuffle;
1536
- declare const index_d_skew: typeof skew;
1537
- declare const index_d_stdev: typeof stdev;
1538
- declare const index_d_winsorize: typeof winsorize;
1539
- declare const index_d_zscore: typeof zscore;
1540
- declare namespace index_d {
1513
+ declare const index_d$1_bootstrap: typeof bootstrap;
1514
+ declare const index_d$1_corr: typeof corr;
1515
+ declare const index_d$1_covar: typeof covar;
1516
+ declare const index_d$1_gmean: typeof gmean;
1517
+ declare const index_d$1_hmean: typeof hmean;
1518
+ declare const index_d$1_kurtosis: typeof kurtosis;
1519
+ declare const index_d$1_mad: typeof mad;
1520
+ declare const index_d$1_mean: typeof mean;
1521
+ declare const index_d$1_median: typeof median;
1522
+ declare const index_d$1_norminmax: typeof norminmax;
1523
+ declare const index_d$1_percentiles: typeof percentiles;
1524
+ declare const index_d$1_quantile: typeof quantile;
1525
+ declare const index_d$1_rollcorr: typeof rollcorr;
1526
+ declare const index_d$1_rollcovar: typeof rollcovar;
1527
+ declare const index_d$1_rollkurtosis: typeof rollkurtosis;
1528
+ declare const index_d$1_rollmean: typeof rollmean;
1529
+ declare const index_d$1_rollmedian: typeof rollmedian;
1530
+ declare const index_d$1_rollquantile: typeof rollquantile;
1531
+ declare const index_d$1_rollskew: typeof rollskew;
1532
+ declare const index_d$1_rollstdev: typeof rollstdev;
1533
+ declare const index_d$1_rollvar: typeof rollvar;
1534
+ declare const index_d$1_sample: typeof sample;
1535
+ declare const index_d$1_shuffle: typeof shuffle;
1536
+ declare const index_d$1_skew: typeof skew;
1537
+ declare const index_d$1_stdev: typeof stdev;
1538
+ declare const index_d$1_winsorize: typeof winsorize;
1539
+ declare const index_d$1_zscore: typeof zscore;
1540
+ declare namespace index_d$1 {
1541
1541
  export {
1542
- index_d_bootstrap as bootstrap,
1543
- index_d_corr as corr,
1544
- index_d_covar as covar,
1545
- index_d_gmean as gmean,
1546
- index_d_hmean as hmean,
1547
- index_d_kurtosis as kurtosis,
1548
- index_d_mad as mad,
1549
- index_d_mean as mean,
1550
- index_d_median as median,
1551
- index_d_norminmax as norminmax,
1552
- index_d_percentiles as percentiles,
1553
- index_d_quantile as quantile,
1554
- index_d_rollcorr as rollcorr,
1555
- index_d_rollcovar as rollcovar,
1556
- index_d_rollkurtosis as rollkurtosis,
1557
- index_d_rollmean as rollmean,
1558
- index_d_rollmedian as rollmedian,
1559
- index_d_rollquantile as rollquantile,
1560
- index_d_rollskew as rollskew,
1561
- index_d_rollstdev as rollstdev,
1562
- index_d_rollvar as rollvar,
1563
- index_d_sample as sample,
1564
- index_d_shuffle as shuffle,
1565
- index_d_skew as skew,
1566
- index_d_stdev as stdev,
1542
+ index_d$1_bootstrap as bootstrap,
1543
+ index_d$1_corr as corr,
1544
+ index_d$1_covar as covar,
1545
+ index_d$1_gmean as gmean,
1546
+ index_d$1_hmean as hmean,
1547
+ index_d$1_kurtosis as kurtosis,
1548
+ index_d$1_mad as mad,
1549
+ index_d$1_mean as mean,
1550
+ index_d$1_median as median,
1551
+ index_d$1_norminmax as norminmax,
1552
+ index_d$1_percentiles as percentiles,
1553
+ index_d$1_quantile as quantile,
1554
+ index_d$1_rollcorr as rollcorr,
1555
+ index_d$1_rollcovar as rollcovar,
1556
+ index_d$1_rollkurtosis as rollkurtosis,
1557
+ index_d$1_rollmean as rollmean,
1558
+ index_d$1_rollmedian as rollmedian,
1559
+ index_d$1_rollquantile as rollquantile,
1560
+ index_d$1_rollskew as rollskew,
1561
+ index_d$1_rollstdev as rollstdev,
1562
+ index_d$1_rollvar as rollvar,
1563
+ index_d$1_sample as sample,
1564
+ index_d$1_shuffle as shuffle,
1565
+ index_d$1_skew as skew,
1566
+ index_d$1_stdev as stdev,
1567
1567
  variance as var,
1568
- index_d_winsorize as winsorize,
1569
- index_d_zscore as zscore,
1568
+ index_d$1_winsorize as winsorize,
1569
+ index_d$1_zscore as zscore,
1570
1570
  };
1571
1571
  }
1572
1572
 
1573
- export { arr_d as arr, index_d$2 as math, index_d as stats, index_d$1 as ta };
1573
+ /**
1574
+ * Compute simple period returns from a level series.
1575
+ * For each i>0: returns[i] = source[i]/source[i-1] - 1 when both values are finite and previous != 0.
1576
+ * The first element is always NaN. Invalid or non-finite inputs produce NaN at that position.
1577
+ * @param source Input level series (prices/equity)
1578
+ * @returns Float32Array of simple returns (same length as `source`)
1579
+ */
1580
+ declare function returns(source: ArrayLike<number>): Float32Array;
1581
+ /**
1582
+ * Compute log returns from a level series.
1583
+ * For each i>0: logreturns[i] = log(source[i]/source[i-1]) when both values are finite and previous>0.
1584
+ * The first element is always NaN. Invalid or non-positive previous values yield NaN.
1585
+ * @param source Input level series (prices/equity)
1586
+ * @returns Float32Array of log returns (same length as `source`)
1587
+ */
1588
+ declare function logreturns(source: ArrayLike<number>): Float32Array;
1589
+ /**
1590
+ * Compute cumulative compound returns from a returns series, skipping NaNs.
1591
+ * Cumulative return at i is prod_{j<=i, r_j finite} (1+r_j) - 1; NaN inputs leave an output NaN at that position.
1592
+ * @param returns Simple returns series
1593
+ * @returns Float64Array of cumulative returns
1594
+ */
1595
+ declare function cumreturns(returns: ArrayLike<number>): Float64Array;
1596
+ /**
1597
+ * Compute the compound annual growth rate (CAGR) from a returns series.
1598
+ * Ignores NaNs. `freq` is the number of periods per year (default 252).
1599
+ * @param returns Simple returns series
1600
+ * @param freq Periods per year (default 252)
1601
+ * @returns CAGR as a number, or NaN when insufficient data
1602
+ */
1603
+ declare function cagr(returns: ArrayLike<number>, freq?: number): number;
1604
+ /**
1605
+ * Aggregate irregular (event-aligned) returns into calendar-day returns.
1606
+ *
1607
+ * The function groups `returnsArr` by calendar day (optionally shifted by `tzOffsetMinutes`),
1608
+ * compounds returns within each day (prod(1+r)-1) and returns a continuous range of days
1609
+ * from the minimum to the maximum observed day. Missing days are filled with zero returns.
1610
+ *
1611
+ * @param tsMs Array of timestamps (ms since epoch) aligned to `returnsArr`
1612
+ * @param returnsArr Array of simple returns aligned to `tsMs`
1613
+ * @param tzOffsetMinutes Optional timezone offset in minutes (default 0, UTC)
1614
+ * @returns Object { days: number[], dailyReturns: Float32Array }
1615
+ */
1616
+ declare function dailyReturns(tsMs: ArrayLike<number>, returnsArr: ArrayLike<number>, tzOffsetMinutes?: number): {
1617
+ days: number[];
1618
+ dailyReturns: Float32Array<ArrayBuffer>;
1619
+ };
1620
+
1621
+ type DrawdownDurationResult = {
1622
+ durations: Int32Array;
1623
+ maxDuration: number;
1624
+ };
1625
+ type MaxDrawdownInfo = {
1626
+ maxDrawdown: number;
1627
+ peakIndex: number;
1628
+ troughIndex: number;
1629
+ startIndex: number;
1630
+ endIndex: number;
1631
+ };
1632
+ /**
1633
+ * Compute the drawdown series from an equity/price series.
1634
+ * For valid points: out[i] = equity[i]/peak - 1 (<= 0). NaNs propagate and do not update the peak.
1635
+ * @param equity Array-like equity or price series
1636
+ * @returns Float64Array of drawdowns (same length)
1637
+ */
1638
+ declare function dd(equity: ArrayLike<number>): Float64Array;
1639
+ /**
1640
+ * Compute the maximum drawdown magnitude over the entire series.
1641
+ * Returns a positive number (0..+inf) or NaN when no valid points.
1642
+ * @param equity Array-like equity or price series
1643
+ * @returns Maximum drawdown magnitude (positive) or NaN
1644
+ */
1645
+ declare function maxdd(equity: ArrayLike<number>): number;
1646
+ /**
1647
+ * Compute detailed information about the maximum drawdown, including peak, trough, and recovery indices.
1648
+ * When no valid points exist returns NaN/placeholder indices (-1).
1649
+ * @param equity Array-like equity or price series
1650
+ * @returns MaxDrawdownInfo with `maxDrawdown`, `peakIndex`, `troughIndex`, `startIndex`, and `endIndex`
1651
+ */
1652
+ declare function maxddDetails(equity: ArrayLike<number>): MaxDrawdownInfo;
1653
+ /**
1654
+ * Rolling maximum drawdown over a trailing window.
1655
+ * For each index i computes the max drawdown observed within the trailing window.
1656
+ * @param equity Array-like equity or price series
1657
+ * @param window Rolling window length (positive integer)
1658
+ * @returns Float64Array of rolling max drawdowns
1659
+ */
1660
+ declare function rollmaxdd(equity: ArrayLike<number>, window: number): Float64Array;
1661
+ /**
1662
+ * Compute drawdown durations (consecutive periods in current drawdown) and the maximum duration.
1663
+ * Positions where equity is NaN are marked with -1.
1664
+ * @param equity Array-like equity or price series
1665
+ * @returns DrawdownDurationResult { durations: Int32Array, maxDuration: number }
1666
+ */
1667
+ declare function dduration(equity: ArrayLike<number>): DrawdownDurationResult;
1668
+ /**
1669
+ * Recovery factor: ratio of annualized return (CAGR) to maximum drawdown magnitude.
1670
+ * Returns NaN if insufficient data, invalid start value, or zero/NaN max drawdown.
1671
+ * @param equity Array-like equity or price series
1672
+ * @param freq Periods per year (default 252)
1673
+ * @returns Recovery factor or NaN
1674
+ */
1675
+ declare function recoveryFactor(equity: ArrayLike<number>, freq?: number): number;
1676
+ /**
1677
+ * Calmar ratio: CAGR over a lookback period divided by the max drawdown magnitude over the same period.
1678
+ * If `lookbackPeriodYears` is null uses the entire series. Returns NaN on invalid inputs or zero drawdown.
1679
+ * @param equity Array-like equity or price series
1680
+ * @param lookbackPeriodYears Lookback window in years (null = full span)
1681
+ * @param freq Periods per year (default 252)
1682
+ * @returns Calmar ratio or NaN
1683
+ */
1684
+ declare function calmarRatio(equity: ArrayLike<number>, lookbackPeriodYears?: number | null, freq?: number): number;
1685
+ /**
1686
+ * Ulcer Index: measures depth and duration of drawdowns (root-mean-square of depths).
1687
+ * Returns NaN for empty input.
1688
+ * @param equity Array-like equity or price series
1689
+ * @returns Ulcer Index (>=0) or NaN
1690
+ */
1691
+ declare function ulcerIndex(equity: ArrayLike<number>): number;
1692
+ /**
1693
+ * Rolling Ulcer Index computed over a trailing window.
1694
+ * Returns NaN for windows with insufficient valid samples (< minPeriod) or invalid window.
1695
+ * @param equity Array-like equity or price series
1696
+ * @param window Rolling window length (positive integer)
1697
+ * @param minPeriod Minimum number of valid points required in window
1698
+ * @returns Float64Array of rolling ulcer index values
1699
+ */
1700
+ declare function rollUlcerIndex(equity: ArrayLike<number>, window: number, minPeriod?: number): Float64Array;
1701
+
1702
+ /**
1703
+ * Compute the (annualized) Sharpe ratio for a returns series.
1704
+ * Uses NaN-aware mean and sample standard deviation (ddof=1).
1705
+ * Returns NaN for empty input, zero or NaN volatility, or invalid mean.
1706
+ * @param returns Array-like returns series
1707
+ * @param riskFree Annualized risk-free rate (default 0)
1708
+ * @param freq Periods per year (default 252)
1709
+ * @returns Sharpe ratio (annualized) or NaN
1710
+ */
1711
+ declare function sharpe(returns: ArrayLike<number>, riskFree?: number, freq?: number): number;
1712
+ /**
1713
+ * Compute the (annualized) Sortino ratio for a returns series.
1714
+ * Uses downside deviation (sample corrected) computed over negative excess returns.
1715
+ * Requires at least two downside observations; returns NaN otherwise.
1716
+ * @param returns Array-like returns series
1717
+ * @param requiredReturn Target return to define downside (default 0)
1718
+ * @param freq Periods per year (default 252)
1719
+ * @param minPeriod Minimum valid periods (unused for scalar Sortino)
1720
+ * @returns Sortino ratio (annualized) or NaN
1721
+ */
1722
+ declare function sortino(returns: ArrayLike<number>, requiredReturn?: number, freq?: number, minPeriod?: number): number;
1723
+ /**
1724
+ * Rolling Sharpe ratio computed over a trailing window.
1725
+ * Output is a Float64Array aligned with `returns`; positions before enough data are NaN.
1726
+ * @param returns Array-like returns series
1727
+ * @param window Rolling window length
1728
+ * @param riskFree Annualized risk-free rate (default 0)
1729
+ * @param freq Periods per year (default 252)
1730
+ * @param minPeriod Minimum number of valid samples required per window (default 1)
1731
+ * @returns Float64Array of rolling Sharpe ratios
1732
+ */
1733
+ declare function rollsharpe(returns: ArrayLike<number>, window: number, riskFree?: number, freq?: number, minPeriod?: number): Float64Array;
1734
+ /**
1735
+ * Rolling Sortino ratio computed over a trailing window using downside deviations.
1736
+ * Outputs NaN where insufficient downside or invalid data exists.
1737
+ * @param returns Array-like returns series
1738
+ * @param window Rolling window length
1739
+ * @param requiredReturn Target return to define downside (default 0)
1740
+ * @param freq Periods per year (default 252)
1741
+ * @param minPeriod Minimum number of valid samples required per window (default 1)
1742
+ * @returns Float64Array of rolling Sortino ratios
1743
+ */
1744
+ declare function rollsortino(returns: ArrayLike<number>, window: number, requiredReturn?: number, freq?: number, minPeriod?: number): Float64Array;
1745
+ /**
1746
+ * Annualized volatility (sample standard deviation) of returns.
1747
+ * Uses NaN-aware `stats.stdev` with ddof=1. Returns NaN for empty input or zero/NaN sigma.
1748
+ * @param returns Array-like returns series
1749
+ * @param freq Periods per year (default 252)
1750
+ * @returns Annualized volatility or NaN
1751
+ */
1752
+ declare function vol(returns: ArrayLike<number>, freq?: number): number;
1753
+ /**
1754
+ * Rolling annualized volatility (sample stddev) over a trailing window.
1755
+ * Outputs NaN for windows with insufficient valid samples or zero/NaN sigma.
1756
+ * @param returns Array-like returns series
1757
+ * @param window Rolling window length
1758
+ * @param freq Periods per year (default 252)
1759
+ * @param minPeriod Minimum number of valid samples required per window (default 1)
1760
+ * @returns Float64Array of rolling volatilities
1761
+ */
1762
+ declare function rollvol(returns: ArrayLike<number>, window: number, freq?: number, minPeriod?: number): Float64Array;
1763
+
1764
+ /**
1765
+ * Value-at-Risk (VaR) estimator.
1766
+ * Supports `historical` (empirical quantile) and `parametric` (normal) methods.
1767
+ * Returns NaN for empty inputs or invalid alpha or when parametric stats are invalid.
1768
+ * @param returns Array-like returns series
1769
+ * @param alpha Tail probability (default 0.05)
1770
+ * @param method 'historical' | 'parametric' (default 'historical')
1771
+ * @returns VaR as a number (left-tail) or NaN
1772
+ */
1773
+ declare function valueAtRisk(returns: ArrayLike<number>, alpha?: number, method?: 'historical' | 'parametric'): number;
1774
+ /**
1775
+ * Expected shortfall (conditional tail expectation) estimator.
1776
+ * Supports `historical` (empirical mean of losses <= VaR) and `parametric` (normal) methods.
1777
+ * Returns NaN for empty inputs, invalid alpha, or invalid parametric stats.
1778
+ * @param returns Array-like returns series
1779
+ * @param alpha Tail probability (default 0.05)
1780
+ * @param method 'historical' | 'parametric' (default 'historical')
1781
+ * @returns Expected shortfall (left-tail) or NaN
1782
+ */
1783
+ declare function expectedShortfall(returns: ArrayLike<number>, alpha?: number, method?: 'historical' | 'parametric'): number;
1784
+ /**
1785
+ * Tail ratio: mean of upper tail divided by absolute mean of lower tail.
1786
+ * Returns NaN for empty inputs, invalid alpha, or when either tail has no observations or lower mean is zero.
1787
+ * @param returns Array-like returns series
1788
+ * @param alpha Tail probability (default 0.05)
1789
+ * @returns Tail ratio or NaN
1790
+ */
1791
+ declare function tailRatio(returns: ArrayLike<number>, alpha?: number): number;
1792
+ /**
1793
+ * Omega ratio: sum of gains above `requiredReturn` divided by sum of losses below it.
1794
+ * Returns NaN for empty inputs or when there is no variation (all gains or all losses zero).
1795
+ * @param returns Array-like returns series
1796
+ * @param requiredReturn Threshold for gains/losses (default 0)
1797
+ * @returns Omega ratio number, Infinity if no losses, or NaN when no variation
1798
+ */
1799
+ declare function omegaRatio(returns: ArrayLike<number>, requiredReturn?: number): number;
1800
+
1801
+ type index_d_DrawdownDurationResult = DrawdownDurationResult;
1802
+ type index_d_MaxDrawdownInfo = MaxDrawdownInfo;
1803
+ declare const index_d_cagr: typeof cagr;
1804
+ declare const index_d_calmarRatio: typeof calmarRatio;
1805
+ declare const index_d_cumreturns: typeof cumreturns;
1806
+ declare const index_d_dailyReturns: typeof dailyReturns;
1807
+ declare const index_d_dd: typeof dd;
1808
+ declare const index_d_dduration: typeof dduration;
1809
+ declare const index_d_expectedShortfall: typeof expectedShortfall;
1810
+ declare const index_d_logreturns: typeof logreturns;
1811
+ declare const index_d_maxdd: typeof maxdd;
1812
+ declare const index_d_maxddDetails: typeof maxddDetails;
1813
+ declare const index_d_omegaRatio: typeof omegaRatio;
1814
+ declare const index_d_recoveryFactor: typeof recoveryFactor;
1815
+ declare const index_d_returns: typeof returns;
1816
+ declare const index_d_rollUlcerIndex: typeof rollUlcerIndex;
1817
+ declare const index_d_rollmaxdd: typeof rollmaxdd;
1818
+ declare const index_d_rollsharpe: typeof rollsharpe;
1819
+ declare const index_d_rollsortino: typeof rollsortino;
1820
+ declare const index_d_rollvol: typeof rollvol;
1821
+ declare const index_d_sharpe: typeof sharpe;
1822
+ declare const index_d_sortino: typeof sortino;
1823
+ declare const index_d_tailRatio: typeof tailRatio;
1824
+ declare const index_d_ulcerIndex: typeof ulcerIndex;
1825
+ declare const index_d_valueAtRisk: typeof valueAtRisk;
1826
+ declare const index_d_vol: typeof vol;
1827
+ declare namespace index_d {
1828
+ export { index_d_cagr as cagr, index_d_calmarRatio as calmarRatio, index_d_cumreturns as cumreturns, index_d_dailyReturns as dailyReturns, index_d_dd as dd, index_d_dduration as dduration, index_d_expectedShortfall as expectedShortfall, index_d_logreturns as logreturns, index_d_maxdd as maxdd, index_d_maxddDetails as maxddDetails, index_d_omegaRatio as omegaRatio, index_d_recoveryFactor as recoveryFactor, index_d_returns as returns, index_d_rollUlcerIndex as rollUlcerIndex, index_d_rollmaxdd as rollmaxdd, index_d_rollsharpe as rollsharpe, index_d_rollsortino as rollsortino, index_d_rollvol as rollvol, index_d_sharpe as sharpe, index_d_sortino as sortino, index_d_tailRatio as tailRatio, index_d_ulcerIndex as ulcerIndex, index_d_valueAtRisk as valueAtRisk, index_d_vol as vol };
1829
+ export type { index_d_DrawdownDurationResult as DrawdownDurationResult, index_d_MaxDrawdownInfo as MaxDrawdownInfo };
1830
+ }
1831
+
1832
+ export { arr_d as arr, index_d$3 as math, index_d as perf, index_d$1 as stats, index_d$2 as ta };
1833
+ export type { DrawdownDurationResult, IchimokuOptions, KstOptions, MaxDrawdownInfo, UltoscOptions };