Nixtla / hierarchicalforecast

Probabilistic Hierarchical forecasting 👑 with statistical and econometric methods.
https://nixtlaverse.nixtla.io/hierarchicalforecast
Apache License 2.0
569 stars 69 forks source link

Question: Reconciliation of varying hierarchy size? #70

Open edgBR opened 1 year ago

edgBR commented 1 year ago

Dear colleagues,

I am working with a problem where I do need to predict the performance of a financial portfolio formed by different assets. As of today I am approaching this as a combination of a classification and regression problem but now I have been task to do this by all of the portfolios that our firm has.

I can replicate the same method as before as I am predicting at asset level but I have been thinking to frame this as a hierarchical forecasting problem.

The only thing is that the number of portfolios grow over time and the number of assests is different from portfolio to portfolio and I am bit unsure if there is a way to reconcialiate forecasts if the hierachy size is changing over time without retraining the models.

Looking to the notation that R.Hyndman uses:

image

It seems that the matrixes they need to be mxn compatible.

Is this the right interpreation or is there any way to reforecast at hierarchical level without retraining again the models.

kdgutier commented 1 year ago

Hi @edgBR,

The ability to create hierarchical forecasting systems capable of incorporating new series without retraining poses an interesting research line.

For the moment, as mentioned, the models would need to be retrained with the new hierarchical structure. Luckily StatsForecast library can help to retrain the models efficiently with the cross_validation method.

edgBR commented 1 year ago

Hi @kdgutier

I don't know why but I was expecting this answer. I think the closest thing I have seen is this:

https://arxiv.org/abs/2204.07207

But this does not guarantee reconciliation. However it can work with varying hierarchies.

I have been thinking that a workaround is to try to forecast the new time series in the hierarchy as the mean of the time series forecasts (this will be kind of similar to what you do with a mixed model then the group is not in the training set).

What Im thinking is that in MinTrace the covariance matrix will not change if you add something that behaves like the mean.

Any thoughts?