Class SeriesAligner

java.lang.Object
com.quantfinlib.data.SeriesAligner

public final class SeriesAligner extends Object
Aligns multi-asset bar series onto one shared timeline — the bridge from raw vendor files (CsvBarLoader) to the index-aligned input the PortfolioBacktester requires. Real data never lines up: different holidays, listing dates, and gaps.
  • Method Details

    • intersect

      public static Map<String, BarSeries> intersect(Map<String, BarSeries> input)
      Timestamps common to all series, in order; input map order preserved.
    • unionForwardFill

      public static Map<String, BarSeries> unionForwardFill(Map<String, BarSeries> input)
      Union of timestamps from the latest series start onward; missing bars are forward-filled as flat bars at the previous close with zero volume.