Conversation
|
@Shunsuke-Hori I didn't know you were writing Python code now :-) This looks good. Random thought: Will we end up with a few filters? Should we have a subpackage? I guess we can created one later on if others are added... |
|
@jstac If more filters are added, we may be better to make it. Al least, I don't have any plan to add more filters now. Two questions: |
|
Hi @Shunsuke-Hori if you are not using windows you can use |
|
Thank you @mmcky, I can run the test locally now. It's ready for review. |
|
Regarding the difference with matlab output, original matlab code is using |
|
@Shunsuke-Hori can you please update the |
|
@mmcky Thank you for pointing it out. It's updated. |
|
thanks @Shunsuke-Hori this is looking good. I think we can leave it in |
|
thanks @Shunsuke-Hori for this contribution. Merging now. |

This PR adds "Hamilton filter" from Why You Should Never Use the Hodrick-Prescott Filter
Proposition 4 in the paper shows that the error term v_{t+h} of the regression
y_{t+h} = beta_0 + beta_1 y_{t} + ... + beta_p y{t-p+1} + v_{t+h}
gives cyclical component.
If
*arg(p in the paper) is not passed, the true process is assumed to be a random walk. Then, we no longer need to do regression and we just take the difference.Example: