Skip to content

WinPooh32/series

Repository files navigation

Series

test Go Report Card Go Reference

Liteweight library of series data processing functions written in pure ideomatic Go (golang). Inspired by python library Pandas.

Mostly designed for ordered time series data.

Optionally accelerated by AVX2 instructions.

Functions

  • Column/Scalar math operators:

    • Add +
    • Sub -
    • Mul *
    • Div /
    • Mod %
  • Column math functions:

    • Cos, Sin, Tan
    • Pow, Log, Log2, Exp
    • Sign
    • Min
    • Max
    • ...
    • Apply custom function
  • Rolling aggregation by functions:

    • Sum
    • Mean
    • Median (only for sorted values)
    • Min
    • Max
    • Skew
    • Variance
    • Std (standard deviation)
    • Apply custom function
  • Exponential rolling aggregation:

    • (not) adjusted Mean
  • Resampling:

    • Upsampling empty values filling:
      • Interpolate by linear method;
      • Pad known values;
      • Keep empty values.
    • Downsampling aggregation functions:
      • Sum
      • Mean
      • Max
      • Min
      • First
      • Last
      • Apply custom function
  • Series manipulations:

    • Slice, Clone
    • Sort, Reverse, Compare (indices or values)
    • Diff, Shift
    • Fill N/A values: interpolate, pad existing values or replace by the constant.
    • Delete N/A values with Shrink method.

Drawing plots

series.Data implements gonum/plot/plotter.XYer interface. You can check these plotters:

Data types

For enabling float32 use build tag series_f32, otherwise float64 will be used as data type.

Build command example:

go build -tags series_f32

Examples

financial technical indicators

drawing plots