Class SeriesAligner
java.lang.Object
com.quantfinlib.data.SeriesAligner
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.
intersect(java.util.Map<java.lang.String, com.quantfinlib.core.BarSeries>)— keep only timestamps present in every series (strictest, no synthetic bars).unionForwardFill(java.util.Map<java.lang.String, com.quantfinlib.core.BarSeries>)— union of timestamps from each series' first bar onward; gaps carry the previous close forward as a flat zero-volume bar.
-
Method Summary
Modifier and TypeMethodDescriptionTimestamps common to all series, in order; input map order preserved.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.
-
Method Details
-
intersect
-
unionForwardFill
-