I use the function pandas.olsfrom version 0.7.3. I am interested in doing moving regression, for example:
model = pandas.ols(y = realizedData, x = pastData, intercept = 0, window_type="rolling", window = 80, min_periods = 80)
The inputs contain data about 600 dates, of which 15 are NA values. But the output contains only the regression results of about 120 dates. The problem is that whenever a window contains at least one NA value, there is no output for this window. The problem goes away if I change window_type to expandingand I get about 500 output points as expected, but I don't want to do an expanding regression.
Can you tell me how to fix this?
source
share