Tiago Marques
2016-07-08
This project aims to give a simple way to visualize the evolution of the Google Stock price over the last 10 years.
The built app creates forecast predictions using an ARIMA (1,1,0) model for dynamic time window dataset.
Provide basic KPIs.
if (input$radio == 1){
zf <- z1()
} else if (input$radio == 2){
#Aggregate data - Months
zf <- aggregate(z1(), as.yearmon, mean);
} else {
#Aggregate data - Years
zf <- aggregate(z1(), as.numeric(format(time(z1()), "%Y")), mean);
}
#Model training
fit4 <-arima(li[[1]], order = c(1, 1, 0))
#Forecast values
fcast <- forecast(fit4, h=li[[2]])
This work, rather than presents itself as an accurate method for stock analysis, aims to show basic methods to predict a stock price as well as explore some of the shiny features. In spite of the simplicity, this app presents simple and useful way to visualize a stock evolution