align

Defined in fynance.data

align(series, how='outer', fill='ffill')[source]

Align several series onto a common index.

Parameters:
seriesdict of str to PriceSeries

Named series to align.

how{“outer”, “inner”}

outer uses the union of indices, inner the intersection.

fill{“ffill”, None}

Forward-fill (past-only) missing values after an outer align.

Returns:
dict of str to PriceSeries

Series sharing a common index.

Raises:
ValueError

If how is unknown, or if any input series has duplicate index entries. Duplicate timestamps would otherwise be silently collapsed (the index-to-value mapping keeps only the last value), shrinking the series to its unique count without warning.