Returns a matrix containing terms from a Fourier series, up to order K
fourier_series(dates, period = NULL, K = NULL)A matrix of size N (length of dates) by 2*K.
a Date vector representing the length of the series for which the fourier terms are required.
frequency of the underlying series, if NULL will try to infer it from the difference in the Date vector.
maximum order of the Fourier terms.