Column

Open Price

This will helps us get the opening price of the stock and we can compare it with the closing price. Now this will help day traders to get the spread of the stock.

[1] "TCS"  "INFY" "BLMT" "AMD"  "LLY"  "SAP" 

Volume

It helps us in getting very important data as the volume of stocks being traded on the stock market. This helps to again get the spread and also the resistance of the stock.

[1] "TCS"  "INFY" "BLMT" "AMD"  "LLY"  "SAP" 

Close Price

This will helps us get the closing price of the stock and we can compare it with opening price. Now this will help day traders to get the spread of the stock. This helps the speculative traders to see the trend of the stocks Opening Vs Closing price.

[1] "TCS"  "INFY" "BLMT" "AMD"  "LLY"  "SAP" 

Column

TCS (The Container Store Group, Inc)

INFOSYS

Bancorp

AMD

Eli Lilly

SAP

---
title: "ANLY 512 Dashboard lab"
author: "Chirag Moily, Swapnil Deshpande and Vikrant Kumatkar"
date: "`r Sys.Date()`"
output: 
  flexdashboard::flex_dashboard:
    orientation: columns
    vertical_layout: fill
    social: menu
    source_code: embed
---

```{r setup, include=FALSE}
library(flexdashboard)
library(lubridate)
library(quantmod)
library(flexdashboard)
library(dygraphs)
```

Column {data-width=550}
-----------------------------------------------------------------------




###Open Price
This will helps us get the opening price of the stock and we can compare it with the closing price. Now this will help day traders to get the spread of the stock. 

```{r message=FALSE, warning=FALSE}
tickers<-c("TCS", "INFY", "BLMT","AMD", "LLY","SAP")
getSymbols(tickers)
openPrice<-do.call(merge, lapply(tickers, function(x) Op(get(x))))
dateWindow<-c("2017-01-01", "2018-02-10")
dygraph(openPrice, main="Open Price", group="Stock") %>%
  #dyRebase(value=100) %>%
  dyAxis("y", label="Open Price(USD)") %>%
  dyOptions(axisLineWidth = 2,  colors = RColorBrewer::brewer.pal(3, "Set1")) %>%
  dyRangeSelector(dateWindow = dateWindow)
```



###Volume
 It helps us in getting very important data as the volume of stocks being traded on the stock market. This helps to again get the spread and also the resistance of the stock. 

```{r message=FALSE, warning=FALSE}
tickers<-c("TCS", "INFY", "BLMT","AMD", "LLY","SAP")
getSymbols(tickers)
volume<-do.call(merge, lapply(tickers, function(x) Vo(get(x))))
dateWindow<-c("2017-01-01", "2018-02-10")
dygraph(volume, main="Volume", group="Stock") %>%
  #dyRebase(value=100) %>%
  dyAxis("y", label="Volume") %>%
  dyOptions(axisLineWidth = 2,  colors = RColorBrewer::brewer.pal(3, "Set1")) %>%
  dyRangeSelector(dateWindow = dateWindow)
```



###Close Price
 This will helps us get the closing price of the stock and we can compare it with opening price. Now this will help day traders to get the spread of the stock.
 This helps the speculative traders to see the trend of the stocks Opening Vs Closing price. 

```{r message=FALSE, warning=FALSE}
tickers<-c("TCS", "INFY", "BLMT","AMD", "LLY","SAP")
getSymbols(tickers)
closePrice<-do.call(merge, lapply(tickers, function(x) Cl(get(x))))
dateWindow<-c("2017-01-01", "2018-02-10")
dygraph(closePrice, main="Close Price", group="Stock") %>%
  #dyRebase(value=100) %>%
  dyAxis("y", label="Open Price(USD)") %>%
  dyOptions(axisLineWidth = 2,  colors = RColorBrewer::brewer.pal(3, "Set1")) %>%
  dyRangeSelector(dateWindow = dateWindow)
```



Column {.tabset data-width=600}
-----------------------------------------------------------------------
### TCS (The Container Store Group, Inc)
```{r}
invisible(getSymbols("TCS", src = "yahoo", from='2017-01-01'))
TCS_x <- TCS
dygraph(TCS_x[, -5], main = "TCS") %>%
  dyCandlestick() %>%
  dyAxis("y", label="Price") %>%
  dyOptions(colors= RColorBrewer::brewer.pal(5, "Set1")) %>%
  dyHighlight(highlightCircleSize = 4,
              highlightSeriesOpts = list(strokeWidth = 3),
              highlightSeriesBackgroundAlpha = 1) %>%
  dyRangeSelector(height = 120)
```


### INFOSYS 
```{r message = FALSE}
invisible(getSymbols("INFY", src = "yahoo", from = '2017-01-01'))
INFY_xts <- INFY
dygraph(INFY_xts[, -5], main = "INFOSYS") %>%
  dyCandlestick() %>%
  dyAxis("y", label="Price") %>%
  dyOptions(colors= RColorBrewer::brewer.pal(5, "Set1")) %>%
  dyRangeSelector(height = 120)
```

###  Bancorp
```{r}
invisible(getSymbols("BLMT", src = "yahoo", from = '2017-01-01'))
BLMT_xts <- BLMT
dygraph(BLMT_xts[, -5], main = "Bancorp") %>%
  dyCandlestick() %>%
  dyAxis("y", label="Price") %>%
  dyOptions(colors= RColorBrewer::brewer.pal(5, "Set1")) %>%
  dyRangeSelector(height = 120)
```

### AMD
```{r}
invisible(getSymbols("AMD", src = "yahoo", from = '2017-01-01'))
AMD_xts <- AMD
dygraph(AMD_xts[, -5], main = "AMD") %>%
  dyCandlestick() %>%
  dyAxis("y", label="Price") %>%
  dyOptions(colors= RColorBrewer::brewer.pal(5, "Set1")) %>%
  dyRangeSelector(height = 120)
```

### Eli Lilly
```{r}
invisible(getSymbols("LLY", src = "yahoo", from = '2017-01-01'))
LLY_xts <- LLY
dygraph(LLY_xts[, -5], main = "Eli Lilly") %>%
  dyCandlestick() %>%
  dyAxis("y", label="Price") %>%
  dyOptions(colors= RColorBrewer::brewer.pal(5, "Set1")) %>%
  dyRangeSelector(height = 120)
```


###  SAP
```{r}
invisible(getSymbols("SAP", src = "yahoo", from = '2017-01-01'))
SAP_xts <- SAP
dygraph(SAP_xts[, -5], main = "SAP") %>%
  dyCandlestick() %>%
  dyAxis("y", label="Price") %>%
  dyOptions(colors= RColorBrewer::brewer.pal(5, "Set1")) %>%
  dyRangeSelector(height = 120)
```