indexedSeries#
- swordfish.function.indexedSeries()#
indexedSeries supports alignment operations for panel data. When performing binary operations between matrices or vectors, calculations are performed on the corresponding elements, and the shape of these matrices or vectors must be the same.
But when performing binary operations between indexed series or between indexed series and indexed matrix, the data is automatically aligned according to the row or column labels (index), and the shape of the matrices or series can be the same or not.
The following binary operations are supported:
Arithmetic operators and functions: +, -, *, /(exact division), \(ratio), %(mod), pow
Logical operators and functions: <, <=, >, >=, ==, !=, <>, &&, ||, &, |, ^
Sliding window functions: mwavg, mwsum, mbeta, mcorr, mcovar
Cumulative window functions: cumwavg, cumwsum, cumbeta, cumcorr, cumcovar
Aggregate functions: wavg, wsum, beta, corr, covar