Stock Analysis

Palash Jain
09/12/2018

The Idea

A lightweight app to view stock prices for a handful of companies over any time interval since 2010.

plot of chunk unnamed-chunk-1

The features

The app allows a user to input:

  • Select one of the five available companies - a selectInput.
  • Specify a start date - a dateInput.
  • Specify an end date - a dateInput.

The app outputs:

  • A line chart to visualize stock prices across the interval.
  • Stock price at start date.
  • Stock price at end date.
  • How much has the stock price risen/decreased by in the interval (as percentage).

How does the app work?

It uses the Quandl R package to download stock prices for the available companies as shown below.

library(Quandl)
library(kableExtra)
Quandl.api_key('U4bZCz7B3NsBiXcPQsL2')
aapl<-Quandl('WIKI/AAPL')
kable(head(aapl)) %>%
  scroll_box(width = '1350px',height = '400px')
Date Open High Low Close Volume Ex-Dividend Split Ratio Adj. Open Adj. High Adj. Low Adj. Close Adj. Volume
2018-03-27 173.68 175.15 166.92 168.340 38962839 0 1 173.68 175.15 166.92 168.340 38962839
2018-03-26 168.07 173.10 166.44 172.770 36272617 0 1 168.07 173.10 166.44 172.770 36272617
2018-03-23 168.39 169.92 164.94 164.940 40248954 0 1 168.39 169.92 164.94 164.940 40248954
2018-03-22 170.00 172.68 168.60 168.845 41051076 0 1 170.00 172.68 168.60 168.845 41051076
2018-03-21 175.04 175.09 171.26 171.270 35247358 0 1 175.04 175.09 171.26 171.270 35247358
2018-03-20 175.24 176.80 174.94 175.240 19314039 0 1 175.24 176.80 174.94 175.240 19314039

How does the app work?

It allows the user to select one of the five available companies.

plot of chunk unnamed-chunk-3

How does the app work?

It allows the user to select start and end date between 2010 and yesterday's date.

plot of chunk unnamed-chunk-4

App Documentation and link

The documentation and the files for the app can be found at:

The app itself can be found at: