2017年8月2日水曜日

PAYEMS and UNDCONTSA forecast

# --------------------------------------- starts here
 library(forecast)
 as.xts(forecast(auto.arima(PA),h=10)$mean[1:10],as.Date(as.yearmon(seq(mondate(index(last(PA)))+1,by=1,length.out=10))))[(3-month(index(last(PA))) %% 3) + c(1,4,7)]
# --------------------------------------- ends here
               [,1]
2017-10-01 147069.6
2018-01-01 147531.6
2018-04-01 147967.9

# --------------------------------------- starts here
as.xts(forecast(auto.arima(UC),h=10)$mean[1:10],as.Date(as.yearmon(seq(mondate(index(last(UC)))+1,by=1,length.out=10))))[(3-month(index(last(UC))) %% 3) + c(1,4,7)]
# --------------------------------------- ends here
               [,1]
2017-10-01 1063.764
2018-01-01 1060.613
2018-04-01 1058.185

my_sp5(as.xts(as.vector(last(GDP)) * 1.05**(2/4),as.Date("2017-10-01")),147069.6,1063.764)


> my_sp5(as.xts(as.vector(last(GDP)) * 1.05**(2/4),as.Date("2017-10-01")),147069.6,1063.764)
[1] "m_m params! apply.quarter - UC w/ nominal GDP"
               [,1]
2017-10-01 2584.023
> my_sp5(as.xts(as.vector(last(GDP)) * 1.05**(3/4),as.Date("2018-01-01")),147531.6,1060.613)
[1] "m_m params! apply.quarter - UC w/ nominal GDP"
               [,1]
2018-01-01 2677.544
> my_sp5(as.xts(as.vector(last(GDP)) * 1.05**(4/4),as.Date("2018-04-01")),147967.9,1058.185)
[1] "m_m params! apply.quarter - UC w/ nominal GDP"
               [,1]
2018-04-01 2767.471

0 件のコメント: