Economic link to stock market?
Proud Economy 0006
library(forecast)
library(quantmod)
“U.S. stocks slip, still on pace for weekly gain”
Being the last day of the quarter, the financial news are reporting disappointment.
“NEW YORK (MarketWatch) – U.S. stocks lost ground Friday, but still aimed for their first weekly gain in three weeks as investors digested Federal Reserve comments and mixed consumer-sentiment and business-conditions data.” by Victor Reklaitis, MarketWatch (emphasis mine)
“The data came after a report showed that the Chicago purchasing managers' index fell to 51.6 this month, from 58.7 in May, exceeding expectations for a decline to 56.0 but still remaining in expansion territory.” investing.com
napm_upd <- xts(51.6, as.Date("2013-06-01"))
“The Thomson Reuters/University of Michigan said today that its final index of confidence eased to 84.1 this month from 84.5 at the end of May, which was the highest since July 2007. The median forecast in a Bloomberg survey of economists called for 83 in the gauge after a preliminary reading of 82.7.” Bloomberg
So I'll attempt to work with the things that they are talking about, specifically the consumer-sentiment and business-conditions data if I can find them.
Extend and analyse data from FRED:
I've combined several of my prior ideas into the analyzets function.
analyzets <- function(series) {
op <- par(no.readonly = TRUE)
layout(matrix(c(1, 1, 2, 3), 2, 2, byrow = TRUE))
plot(series, main = "series")
acf(series, main = "Autocorrelations", ylab = "", ylim = c(-1, 1), ci.col = "black")
pacf(series, main = "Partial Autocorrelations", ylab = "", ylim = c(-1,
1), ci.col = "black")
par(op)
return(summary(forecast(auto.arima(series), h = 2)))
}
University of Michigan: Consumer Sentiment (UMCSENT):
“The University of Michigan Consumer Sentiment Index Thomson Reuters/University of Michigan Surveys of Consumers is a consumer confidence index published monthly by the University of Michigan and Thomson Reuters. The index is normalized to have a value of 100 in December 1964. At least 500 telephone interviews are conducted each month of a continental United States sample (Alaska and Hawaii are excluded). Five core questions are asked. The consumer confidence measures were devised in the late 1940s by Professor George Katona at the University of Michigan. They have now developed into an ongoing, nationally representative survey based on telephonic household interviews. The Index of Consumer Sentiment (ICS) is developed from these interviews. The Index of Consumer Expectations (a sub-index of ICS) is included in the Leading Indicator Composite Index published by the U.S. Department of Commerce, Bureau of Economic Analysis.” wikipedia
Bloomberg has a page on the data at University of Michigan Survey of Consumer Confidence Sentiment.
FRED has the data, but holds back 6 months to allow it to go out to the proprietary subscribers.
“At the request of the source, the data is delayed by 6 months. … Copyright, 2011, Survey Research Center, Thomson Reuters/University of Michigan. Reprinted with permission.” FRED
The numbers have been published and can be displayed from Bloomberg's chart (CONSSENT:IND).
conssent_upd <- xts(c(XX.X, XX.X, XX.X, XX.X, XX.X, XX.X, XX.X, XX.X), order.by=seq(as.Date("2012-11-01"), by="1 month", length=8))
We'll get the older data directly from FRED.
getSymbols("UMCSENT", src = "FRED", env = .GlobalEnv)
## [1] "UMCSENT"
umcsent <- rbind(UMCSENT, conssent_upd)
analyzets(umcsent)
##
## Forecast method: ARIMA(1,1,2)
##
## Model Information:
## Series: series
## ARIMA(1,1,2)
##
## Coefficients:
## ar1 ma1 ma2
## 0.556 -0.608 -0.101
## s.e. 0.190 0.192 0.060
##
## sigma^2 estimated as 15.6: log likelihood=-1187
## AIC=2382 AICc=2382 BIC=2398
##
## Error measures:
## ME RMSE MAE MPE MAPE MASE ACF1
## Training set -0.005677 3.945 3.011 -17.96 372.9 0.9772 -2.077e-06
##
## Forecasts:
## Point Forecast Lo 80 Hi 80 Lo 95 Hi 95
## 427 83.10 78.03 88.16 75.36 90.84
## 428 82.55 75.57 89.52 71.88 93.22
This forecast is for the next two months, July and August. It's really just a smoothing and extrapolation of the data with an automatic ARIMA model. I'll have to return to see how it did. The point here is to see if it's possible to do one's own analysis in response to the information that we see. I have a lot of learning to do to be able to build valid models that help give insight into the economy as we see it.
ISM Manufacturing: PMI Composite Index (NAPM)
“The Institute for Supply Management (ISM) is responsible for maintaining the Purchasing Managers Index (PMI), which is the headline indicator in the monthly ISM Report on Business. The ISM is a non-profit group boasting more than 40,000 members engaged in the supply management and purchasing professions. … The magic number for the PMI is 50. A reading of 50 or higher generally indicates that the industry is expanding. If manufacturing is expanding, the general economy should be doing likewise. As such, it is considered a good indicator of future GDP levels. Many economists will adjust their GDP estimates after reading the PMI report.” investopedia
getSymbols("NAPM", src = "FRED", env = .GlobalEnv)
## [1] "NAPM"
napm <- rbind(NAPM, napm_upd)
analyzets(napm)
##
## Forecast method: ARIMA(3,0,0) with non-zero mean
##
## Model Information:
## Series: series
## ARIMA(3,0,0) with non-zero mean
##
## Coefficients:
## ar1 ar2 ar3 intercept
## 1.125 -0.088 -0.126 52.738
## s.e. 0.035 0.054 0.036 1.015
##
## sigma^2 estimated as 6.5: log likelihood=-1852
## AIC=3714 AICc=3714 BIC=3737
##
## Error measures:
## ME RMSE MAE MPE MAPE MASE ACF1
## Training set -0.0004003 2.55 1.921 -26.18 377.3 0.9568 0.0004835
##
## Forecasts:
## Point Forecast Lo 80 Hi 80 Lo 95 Hi 95
## 787 52.04 48.78 55.31 47.05 57.04
## 788 52.53 47.61 57.45 45.01 60.05
A current value of 51.6, and my extrapolations for the next two months at 52.04 and 52.53 would suggest that we're in for some positive times, but look at the forecast spread and the plot of what the series has done in the past. It's all over the map. Apparently the past values aren't a very good predictor for the future.
Gary Young
No comments:
Post a Comment