---
title: "Comment on `Point Forecasting with Unknown Directive'"
author: "Fabian"
date: "5 Oktober 2018"
output:
  html_document:
    df_print: paged
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

# The Fed looks pretty similar to a random walk forecaster 

You view the Fed's forecast $X_{t|t-1}$ as a quantile at level $\alpha_{t-1}$, where $t-1$ is the data at which the forecast is made, and $t$ is the target date. You then document that $\alpha_{t-1}$ is low when $X_{t|t-1}$ is low, and that $\alpha_{t-1}$ is high when $X_{t|t-1}$ is high. Compared to a median forecaster (with $\alpha_{t-1} = 0.5$ for all $t$), the Fed thus exaggerates, i.e. its low forecasts are too low, and its high forecasts are too high. 

The following shows that this type of behavior can be generated by a simple random walk type forecaster, with
\begin{eqnarray}
Y_t &=& \gamma Y_{t-1} + \varepsilon_t, \\
X_{t|t-1} &=& Y_{t-1} + \zeta_t,
\end{eqnarray}
where $\varepsilon_t \stackrel{iid}{\sim}\mathcal{N}(0, \sigma^2_{\varepsilon})$ and 
$\zeta_t \stackrel{iid}{\sim}\mathcal{N}(0, \sigma^2_{\zeta}),$ independently of each other. I set $\gamma = 0.8$, $\sigma^2_{\varepsilon} = 1$ and $\sigma^2_{\zeta} = .001^2$.\footnote{Note that the second error term $\zeta_t$ is included to avoid numerical issues with `estimate.functional`. I guess these issues arise when state variable (= forecast) and instrument (= lag of realization) are exactly the same.} The following plot shows $n = 200$ realizations and forecasts of the process just described:

```{r message = FALSE, echo = FALSE}
rm(list = ls())
library(devtools)
#install_github("Schmidtpk/PointFore")
library(PointFore)
library(dplyr)
#set.seed(1)

plot_fc <- function(df){
  matplot(df, type = "l", bty = "n", col = c("blue4", "green4"),
          lwd = 1.4, ylab = "", xlab = "Time Period")
  legend("bottomleft", c("Realization", "Forecast"),
         col = c("blue4", "green4"), lwd = 1.4, bty = "n", lty = 1:2)  
}

# Simulate AR(1) model along with simple random walk forecaster
# AR parameter
g <- .8
# Sample size
n <- 200
# Simulate data
df <- data.frame(Y = arima.sim(model = list(ar = g), n = n)) %>%
  mutate(X = c(NA, Y[-n] + rnorm(n-1, sd = .001))) %>% na.omit
# Plot forecast/realization
plot_fc(df)

```

The forecast time series is simply the observation time series shifted by one period. While this pattern is simplistic, it does not look all too different from many examples I've seen in economic forecasting at short horizons. Applying `estimate.functional` to the simulated data and plotting the result then yields

```{r message = FALSE, echo = FALSE}
# Estimate functional
res <- estimate.functional(Y = df$Y, X = df$X, model = logistic,
                           theta0 = c(0,0), stateVariable = df$X)
plot(res)
```

The picture looks very similar to the one from your Fed/Greenbook example. That is, the finding you document is observationally (roughly) equivalent to a random walk forecaster. 

# What to do with that? 

I think the observational equivalence is actually a good thing, in that your method provides a formal characterization of a relevant empirical phenomenon. (While I am not aware of a reference, the `shifted curve' type picture of forecasts and realizations looks very familiar to me, and my sense is that many applied people would agree. Of course, there are various possible explanations of the phenomenon.) Hence your method can be used to diagnose that phenomenon. While the above example is a drastic one, more moderate ones (e.g., a forecaster who quotes an average of the conditional median and the random walk) are likely relevant as well, and would correspond to a flatter curve in your picture. 
