Do you want to forecast, conditioning on the last observed value or also redrawing the observed timepoints?
If it’s the first, the easiest is to add a Deterministic:
with pm.Model() as m:
...
obs = pm.AR("obs", ..., observed=data)
pred = pm.Deterministic(
"preds",
pm.AR.dist(
init_dist=pm.DiracDelta.dist(data[-1]),
...,
steps=100,
),
)
Passing the same parameters that you use for the observed timeseries, which I omitted with ...
If the second, just use the default sample_posterior_predictive. You can make the shape depend on a MutableData to increase the number of steps that are simulated.