Google Stock Evolution

Tiago Marques
2016-07-08

Overview

  • 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.

Data manipulation

  • Aggregation (daily, monthly, yearly)
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);
    }
  • Time window selection (10 years)

Results presentation

  • Stock price evolution
  • Forecast prediction for the next year with confidence intervals (80%, 95%)
      #Model training
      fit4 <-arima(li[[1]], order = c(1, 1, 0))
      #Forecast values
      fcast <- forecast(fit4, h=li[[2]])
  • Stock minimum value
  • Stock mean value
  • Stock max value

Results

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

alt text