pyfinance
pyfinance copied to clipboard
min_window option in RollingOLS
i would like to have min_window in the rollingOLS function, because if we have a window of 90 it does not perform OLS on first 90 values. i would like to perform a OLS expanding until 90 observations starting when there is at least 12 observation (min_window), then rolling of 90 (window)
Is it possible to implement that or someone has a quick workaround for this?
Thanks
Hi @AlessandroQI .. I understand what you're trying to do here, but unfortunately I'm not sure if this can be implemented without sacrificing a lot of speed that is gained through NumPy. NumPy wants equally-sized blocks along all dimensions.
I will keep this open for now, and try to take a stab at it when I have some more time. Sorry that I can't help further at the moment.
thanks for your reply!
it would be great if you implent this, even if it will be slower!
thanks again
It's funny, I was about to open a request for the same feature. I realize that this might not be possible using stride_tricks and have no idea what a working solution would look like.