VARMAXResults.predict().
So, how should I do if I want to do in-sample prediction of SVAR model?Is it possible to develop, would make sense? and if it does, how long you think it would take? just to evaluate if I can offer some help in order to get it fully devloped...
On Thu, Feb 1, 2018 at 7:34 PM, rriveral <rrodolf...@gmail.com> wrote:Is it possible to develop, would make sense? and if it does, how long you think it would take? just to evaluate if I can offer some help in order to get it fully devloped...My guess would be that it is theoretically easy, for the actual code it's necessary to check how easy it is to wire it up, i.e. connect the pieces.AFAIK, SVAR is just VAR with parameter restrictions. So after the SVAR parameters have been estimated, we can just reuse the existing VAR post estimation tools.thinking again: SVAR is in general a simultaneous equation system, so we might need to find the reduced form first to bring it into the VAR representation.I'm not sure this is just premultiplying by inv(A). but it seems like it https://en.wikipedia.org/wiki/Vector_autoregression#Reduced-form_VARI haven't looked at this area since I merged VECM, so I need to check to figure out how this can work or to answer questions about the implementation.For example VECM has a helper method to create the short term VAR model, but might reestimate the model which we cannot do for SVAR.how long it would take is difficult to tellOne day to figure out what to do. One day coding, One to five days of getting all the pieces to work correctly and unit tests. Maybe double or triple that if there are unforseen problems, bugs, corner cases, .... Maybe less if all pieces fit together well.(And possibly 3 weeks getting lost in background readings about other things that would be useful to add. Maybe that part is just me.)
On Thu, Feb 1, 2018 at 8:15 PM, <josef...@gmail.com> wrote:On Thu, Feb 1, 2018 at 7:34 PM, rriveral <rrodolf...@gmail.com> wrote:Is it possible to develop, would make sense? and if it does, how long you think it would take? just to evaluate if I can offer some help in order to get it fully devloped...My guess would be that it is theoretically easy, for the actual code it's necessary to check how easy it is to wire it up, i.e. connect the pieces.AFAIK, SVAR is just VAR with parameter restrictions. So after the SVAR parameters have been estimated, we can just reuse the existing VAR post estimation tools.thinking again: SVAR is in general a simultaneous equation system, so we might need to find the reduced form first to bring it into the VAR representation.I'm not sure this is just premultiplying by inv(A). but it seems like it https://en.wikipedia.org/wiki/Vector_autoregression#Reduced-form_VARI haven't looked at this area since I merged VECM, so I need to check to figure out how this can work or to answer questions about the implementation.For example VECM has a helper method to create the short term VAR model, but might reestimate the model which we cannot do for SVAR.how long it would take is difficult to tellOne day to figure out what to do. One day coding, One to five days of getting all the pieces to work correctly and unit tests. Maybe double or triple that if there are unforseen problems, bugs, corner cases, .... Maybe less if all pieces fit together well.(And possibly 3 weeks getting lost in background readings about other things that would be useful to add. Maybe that part is just me.)AFAICS, after browsing the code a bit:SVARResults should have all the required intermediates as attributes If there are some missing, then they need to be attached.First step is to get the VAR representation, i.e. depending only on past values.then for forecast it looks like there are two options- full support by creating a VARResults instance, similar to the last lines of VAR._estimate_var or- support only forecasting using the standalone function in var_model.py. The predict method in VECMResults that does this is quite large because it needs to prepare all the special arrays for the explanatory variables, I think in SVAR it would be shorter.one question: in-sample prediction or out of sample forecastingin-sample prediction are just the residuals of the equivalent OLS/linear equationout of sample forecasting requires the handling of the new regressors and needs to be recursive for h-step ahead prediction.