Stock Performance

Row

Simple Daily Stock Return

Row

Daily Stock Price

Daily Stock Volumn

Historical Valuation Ratio

Column

PE Ratio

Price to Cash Flow Ratio

Conclusion

Investment Suggestion: pick Micheal Kors.

Reasons:

---
title: "Lab 1 Stock Pick --Ling Shen"
output: 
  flexdashboard::flex_dashboard:
    vertical_layout: fill
    orientation: rows
    source_code: embed
---

Stock Performance
===========================================

```{r setup, include=FALSE}
library(flexdashboard)
library(quantmod)
library(reshape)
library(ggplot2)
library(scales)
library(wesanderson)
library(readxl)

getSymbols('KORS',from='2012-01-01',to='2017-12-31')
getSymbols('ANF',from='2012-01-01',to='2017-12-31')
getSymbols('LB',from='2012-01-01',to='2017-12-31')

```


Intro {.sidebar}
------------------------------------------
Stock Performance:

* According to the simple daily return plot on the top, we can find that A&F has relatively higher volatility than Michale Kors and Lucky Brand and Lucky Brand has the lowest volatility among three stocks during the past 4 years. 

* Michael Kors's stock price peak is around 2014 with a stock price of $99.84 and its stock price has a decreasing trend from year 2014 to year 2017. Stock price of both Lucky Brand and Michael Kors started to increase in the fourth quarter of 2017. The stock price of A&F kept decreasing.

* Trading volumn is a good indicator to measure the market's activity and liquidity. Higer trade volumes stands for a more active market for connecting a buyer and seller and it is good for investor. Michael Kors and A&F are more actively traded in the market than Lucky Brand.


Row {data-height=400}
--------------------------------------------------------------
###Simple Daily Stock Return

```{r}
stock.price <- data.frame(KORS$KORS.Close,ANF$ANF.Close,LB$LB.Close)
colnames(stock.price) <- c("Michael Kors","A&F","Lucky Brand")
stock.price <- cbind(Date = rownames(stock.price),stock.price)
rownames(stock.price) <- 1:nrow(stock.price)
stock.price$Date = as.Date(stock.price$Date)
srmk <- diff(stock.price$`Michael Kors`)/stock.price$`Michael Kors`
sranf <- diff(stock.price$`A&F`)/stock.price$`A&F`
srlb <- diff(stock.price$`Lucky Brand`)/stock.price$`Lucky Brand`
stock.return <- data.frame(srmk,sranf,srlb,stock.price$Date)
colnames(stock.return) <- c("Michale kors","A&F","Lucky Brand","Date")
stock.return.long <- melt(stock.return,id=c("Date"))
colnames(stock.return.long) <- c("Date","Company","DailyReturn")
#3.1 Stock Return Visual
ggplot(stock.return.long,aes(x=Date,y=DailyReturn,group=Company))+
  geom_line(aes(color=Company),size=1)+
  xlab("Date") + ylab("Stock Simple Daily Return")+
  theme(legend.position = "bottom")+
  ggtitle("Simple Daily Return Comparison: MK, A&F and Lucky Brand") +
  scale_color_manual(values=wes_palette(n=3,name="GrandBudapest1"))

```

Row {.tabset .tabset-fade}
-----------------------------------------------------------------------

### Daily Stock Price

```{r}
stock.price <- data.frame(KORS$KORS.Close,ANF$ANF.Close,LB$LB.Close)
colnames(stock.price) <- c("Michael Kors","A&F","Lucky Brand")
stock.price <- cbind(Date = rownames(stock.price),stock.price)
rownames(stock.price) <- 1:nrow(stock.price)
stock.price$Date = as.Date(stock.price$Date)
stock.price.long <- melt(stock.price,id=c("Date"))
colnames(stock.price.long) <- c("Date","Company","Price")
#1.1 Stock Price Visual
ggplot(stock.price.long,aes(x=Date,y=Price,group=Company))+
  geom_line(aes(color=Company),size=1)+
  xlab("Date") + ylab("Stock Price ($)")+
  theme(legend.position = "bottom")+
  ggtitle("Daily Closing Stock Price Comparison: MK, A&F and Lucky Brand") +
  scale_color_manual(values=wes_palette(n=3,name="GrandBudapest1"))
```

### Daily Stock Volumn

```{r}
stock.volume <- data.frame(KORS$KORS.Volume,ANF$ANF.Volume,LB$LB.Volume)
colnames(stock.volume) <- c("Michael Kors","A&F","Lucky Brand")
stock.volume <- cbind(Date = rownames(stock.volume),stock.volume)
rownames(stock.volume) <- 1:nrow(stock.volume)
stock.volume$Date = as.Date(stock.volume$Date)
stock.volume.long <- melt(stock.volume,id=c("Date"))
stock.volume.long$volume_t <- stock.volume.long$value/1000000
colnames(stock.volume.long) <- c("Date","Company","Volume","Volume_T")
ggplot(stock.volume.long,aes(x=Date,y=Volume_T,fill=Company))+
  geom_bar(stat="identity",position = "stack")+
  xlab("Date") + ylab("Stock Volume in Thousands")+
  theme(legend.position = "bottom")+
  ggtitle("Daily Stock Volume Comparison: MiK, A&F and Lucky Brand") +
  scale_fill_manual(values=wes_palette(n=3,name="GrandBudapest1"))+
  facet_grid(Company ~ .)
```


Historical Valuation Ratio
=========================================
Intro {.sidebar}
-------------------------------------------
Financial Ratio Analysis:

* PE ratio gives investors an idea if the stock has sufficient growth potential and usually stocks with low PE indicates good bargains and stocks with high PE suggests it is over priced. The PE ratio of A&F increased dramatically from year 2014 to year 2017 while the PE ratio of both Mk and LB keeps stable.

* Cash is king! Price to cash flow ratio shows whether the company has the ability to generate enough cash flows to support the multiple. In theory, the lower a stock's PCF is, the better value that stock is. MK's PCF decreased from 23.91 (Year 2014) to 6.46 (Year 2016) and had a slightly increase in 2017.A&F had the lowest PCF among three companies during the past 4 years.

Column
------------------------------------------------
### PE Ratio

```{r}

Ratio<- read_excel("D:/HU/2018 Summer/ANLY512/Lab/Lab1/ANLY Lab1 Financial Ratio.xlsx")
Ratio$Year=as.character(Ratio$Year)
ggplot(Ratio,aes(x = Year,y = PE,fill = Company))+
  geom_bar(stat="identity",position=position_dodge())+
  xlab("Year") + ylab("Price / Earnings Ratio") +
  theme(legend.position = "bottom") +
  ggtitle("PE Ratio Comparison: MK, A&F and Lucky Brand") +
  scale_fill_manual(values=wes_palette(n=3,name="GrandBudapest1"))

```

### Price to Cash Flow Ratio 
```{r}
ggplot(Ratio,aes(x = Year,y = PCF,fill = Company))+
  geom_bar(stat="identity",position=position_dodge())+
  xlab("Year") + ylab("Price / Cash Flow Ratio") +
  theme(legend.position = "bottom") +
  ggtitle("Price to Cash Flow Ratio Comparison: MK, A&F and Lucky Brand") +
  scale_fill_manual(values=wes_palette(n=3,name="GrandBudapest1"))
```


Conclusion
=======================================
Investment Suggestion: pick Micheal Kors. 

Reasons:

* Median Volatility
* Price increasing trend in 3rd quearter 2017
* Active trading volumn
* Lowest PE ratio among three companies and good PCF ratio