Country code(s) for business calendar (holidays, resampling). Default "SE".
ReadonlydatesReadonlyinstrumentReadonlynameReadonlytimeseriesReadonlyvaluesThe earliest date in tsdf.
The latest date in tsdf.
Number of observations in tsdf.
Average number of observations per year, based on length and yearfrac.
Number of calendar days between firstIdx and lastIdx.
spanOfDays expressed in years (365.25-day year).
Autocorrelation function for specified lags. If lags is an int, compute ACF from lag 0 through that value (inclusive).
Annualized arithmetic mean return over the sliced date range.
Lag-k autocorrelation of demeaned returns. For price series, returns are derived via pct_change; for return series, values are demeaned. Matches Python openseries autocorr_func.
Historical Conditional Value at Risk (expected shortfall) at the given confidence level.
Annualized downside deviation: volatility of returns falling short of a
minimum acceptable return (mar, annualized).
EWMA Value at Risk series at the given confidence level, derived from ewmaVolFunc.
Annualized EWMA (exponentially weighted moving average) volatility series.
The first dayChunk log-returns seed the initial volatility estimate.
Filters tsdf to retain only business days. Mutates in place.
Returns an independent copy of this series (dates/values arrays are cloned).
Annualized geometric (compound) return over the sliced date range.
Returns the current dates from tsdf, in date order.
Returns the current values from tsdf, in date order.
Sample excess kurtosis of returns over the sliced date range.
Ljung-Box test for autocorrelation at the given lags.
Largest peak-to-trough decline over the sliced date range, expressed as a negative fraction.
Returns the date when the max drawdown bottom occurs (the date of the lowest point relative to the preceding peak). Returns undefined if no drawdown occurs.
Partial autocorrelation function for specified lags. If lags is an int, compute PACF from lag 0 through that value (inclusive).
Partial autocorrelation at a given lag.
Fraction of periods with a positive return over the sliced date range.
Resamples to business period-end frequency (week, month, quarter, year). Mutates tsdf.
Sharpe ratio: annualized excess return over riskfreeRate, divided by volatility.
Sets label and/or valuetype in place. Either argument may be omitted to leave it unchanged.
OptionallvlZero: stringOptionallvlOne: ValueTypeSample skewness of returns over the sliced date range.
Sortino ratio: annualized excess return over riskfreeRate, divided by downside deviation.
Converts to a cumulative-return price series (rebased to 1 at the first date), in place.
Converts to a drawdown series (fraction below the running peak, always <= 0), in place.
Simple (non-annualized) return between the first and last value in the sliced range.
Converts a price series to period-over-period returns in place.
Historical Value at Risk at the given confidence level over the sliced date range.
Annualized volatility (sample standard deviation of returns) over the sliced date range.
Annualized volatility implied by the historical VaR at the given confidence level.
Worst rolling sum of observations consecutive returns over the sliced date range.
Worst single calendar month return (business-month-end based). Uses filterToBusinessDays + resampleToPeriodEnd(ME) + min of monthly returns.
Z-score of the most recent return relative to the mean and standard deviation of the range.
StaticfromCreates an OpenTimeSeries from a name, dates array, and values array.
Optionaloptions: {StaticfromCreates an OpenTimeSeries from simulation dateColumns by column index.
Optionaloptions: { columnIndex?: number; countries?: string | string[]; valuetype?: ValueType }StaticfromCreates an OpenTimeSeries from a record or array of {date, value}.
Timeseries of dates and values with methods for risk metrics.