analysis module¶
Module for analysis of historical level data.
-
analysis.
polyfit
(dates, levels, p)¶ Create polynomial of order p that fits the level data.
- Parameters
dates (list[DateTime]) – list of dates with data points.
levels (list[floats]) – list of levels corresponding to each point in dates.
p (int) – order of polynomial to fit.
- Returns
poly (np.poly1d) – polynomial object that fits level data.
DateTime – offset used to normalize dates to start at 0, equal to the first date in dates.