---
title: 'Stocks with Potential short-term Growth Under Pandemic of COVID-19'
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: scroll
source_code: embed
---
Individual Stocks Performances
=====================================
Intro {.sidebar}
-------------------------------------
With the pandemic of COVID-19 in the US, market has shown the largest jump since the financial crisis. However, there're still some stocks rebounded and performed well on the next week. People started stocking up tissues, paper towels, Lysol, hand sanitizers, etc. Pharmaceutical companies also accelerated to investigate vaccines and medications. Therefore I picked up the following 4 correlated companies and predict them to have momentum growth in short term.
```{r setup, include=FALSE}
library(flexdashboard)
library(dplyr)
library(magrittr)
library(xts)
library(dygraphs)
library(pdfetch)
```
Column
-----------------------------------------------------------------------
### Costco
```{r}
COST <- pdfetch_YAHOO('cost', fields = c('open', 'high', 'low', 'close'), from = as.Date('2020-01-02'))
colnames(COST)=c('Open', 'High', 'Low', 'Close')
dygraph(COST, main = 'Costco Stock Price') %>%
dyAxis('y', label = 'Price($)') %>%
dyAxis('x', label = 'Date') %>%
dyOptions(fillGraph = T, drawXAxis = T,
drawYAxis = T, includeZero = F, drawAxesAtZero = F, disableZoom = T) %>%
dyRangeSelector() %>%
dyCandlestick()
```
### Procter&Gamble
```{r}
PG <- pdfetch_YAHOO('pg', fields = c('open', 'high', 'low', 'close'), from = as.Date('2020-01-02'))
colnames(PG)=c('Open', 'High', 'Low', 'Close')
dygraph(PG, main = 'Procter&Gamble Stock Price') %>%
dyAxis('y', label = 'Price($)') %>%
dyAxis('x', label = 'Date') %>%
dyOptions(fillGraph = T, drawXAxis = T,
drawYAxis = T, includeZero = F, drawAxesAtZero = F, disableZoom = T) %>%
dyRangeSelector() %>%
dyCandlestick()
```
Column
-----------------------------------------------------------------------
### Tonix Pharmaceutic
```{r}
TNXP <- pdfetch_YAHOO('tnxp', fields = c('open', 'high', 'low', 'close'), from = as.Date('2020-01-02'))
colnames(TNXP)=c('Open', 'High', 'Low', 'Close')
dygraph(TNXP, main = 'Tonix Pharma Stock Price') %>%
dyAxis('y', label = 'Price($)') %>%
dyAxis('x', label = 'Date') %>%
dyOptions(fillGraph = T, drawXAxis = T,
drawYAxis = T, includeZero = F, drawAxesAtZero = F, disableZoom = T) %>%
dyRangeSelector() %>%
dyCandlestick()
```
### Gild Sciences
```{r}
GILD <- pdfetch_YAHOO('gild', fields = c('open', 'high', 'low', 'close'), from = as.Date('2020-01-02'))
colnames(GILD)=c('Open', 'High', 'Low', 'Close')
dygraph(GILD, main = 'Gilead Sciences Stock Price') %>%
dyAxis('y', label = 'Price($)') %>%
dyAxis('x', label = 'Date') %>%
dyOptions(fillGraph = T, drawXAxis = T,
drawYAxis = T, includeZero = F, drawAxesAtZero = F, disableZoom = T) %>%
dyRangeSelector() %>%
dyCandlestick()
```
Index Performance
=====================================
Intro {.sidebar}
-------------------------------------
Track the performance of S&P500 and the volatility on the market. On Monday, the market decline marked the largest single-session percentage hit since the financial tsunami and triggered circuit breaker the second time in history, hammered by both coronavirus panic and oil price crash.
Column
-------------------------------------
### S&P500 Performance
```{r}
sp500 <- pdfetch_YAHOO('^GSPC', fields = c('adjclose', 'volume'), from = as.Date('2020-01-02'))
colnames(sp500) <- c('points', 'volume')
dygraph(sp500) %>%
dyAxis('y', label = 'Index') %>%
dyAxis('y2', label = 'Trading Volume', independentTicks = T) %>%
dyAxis('x', label = 'Date') %>%
dyOptions(fillGraph = F, drawXAxis = T,
drawYAxis = T, includeZero = F, drawAxesAtZero = F, disableZoom = T, colors = c('red', 'blue')) %>%
dySeries('volume', axis = 'y2', fillGraph = T, color = 'blue')
```
### Volatility Index
```{r}
vix <- pdfetch_YAHOO('^vix', fields = c('adjclose'), from = as.Date('2020-01-02'))
dygraph(vix) %>%
dyAxis('y', label = 'VIX') %>%
dyAxis('x', label = 'Date') %>%
dyOptions(fillGraph = T, drawXAxis = T,
drawYAxis = T, includeZero = F, drawAxesAtZero = F, disableZoom = T) %>%
dySeries()
```