.navbar { background-color:lightgrey; border-color:black; } .navbar-brand { color:black!important; }
Due to the inherent growth in the electronic production and storage of information, there is often a feeling of “information overload” or inundation when facing the process of quantitative decision making. As an analyst your job will often be to conduct analyses or create tools to support quantitative decision making.
A principle tool used in industry, government, non-profits, and academic fields to compensate for the information overload is the information dashboard. Functionally, a dashboard is meant to provide a user with a central resource to present in a clear and concise manner all the information necessary to support day-to-day decision making and support operations.
The objective of this laboratory is to plan, design, and create an information dashboard to support quantitative decision making. To accomplish this task, you will have to complete a number of steps:
1.Delineate the necessary decision (I will do that below). 2.Identify what information will be relevant to decision making. 3.Find and collect the data necessary to create your visualization plan. 4.Organize and summarize the collected data. 5.Design and create the best visualizations to present that information. 6.Finally organize the layout of those visualizations in a way that conforms to the theory of dashboarding. 7.Write a summary about what decisions you made based on the visualizations that you developed.
You make investments for an organization; your objective is to purchase securities/commodities for the key objective of maximizing profits. You want to make an investment in securities/commodities to make some short-term gains. You are considering investing in one of any four companies, for example: Twitter (TWTR), Microsoft (MSFT), or Apple (AAPL) (don’t use these). Choose 4 companies or commodities and determine which one of the four will produce the most short-term gains. Use your imagination.
There are lots of places we can get financial data to support this decision. The simplest would be to go to for instance to the Yahoo Finance (https://finance.yahoo.com/) for data on the Hershey Company (HSY) the URL would be: (https://finance.yahoo.com/quote/HSY/history?p=HSY) and collect historical price data, and other financial and company information.
Below is the summary table for the kep financial metrics taken for evaluating all the four companies performances - NETFLIX, FACEBOOK, APPLE, GOOGLE. All these companies are from different industries say - Entertainment, Social network, communication & technology, and search engine respecitvely. The reason to chose these specific companies are due to high trending in its financial status among other companies. So it will be helpful in understanding at what place they stand in terms of profits as well as to chose for us to invest in for short term gains. We can see that P-E ratio of FACEBOOK is high in compared to others but lowest in EPS. Since P-E ratio plays a major role in attracting investors it might have greater risk when it’s stock price starts fluctuating. Coming to the market cap, APPLE stands at top place as it has high worth in the market which investors might be looking at it currently. Also, APPLE has the only one among others who is having dividend yield.
[1] "NFLX"
[1] "META"
[1] "AAPL"
[1] "GOOG"
In addition to the individual stock analysis, below is the comparison of their Monthly return in one combined plot.
From the generated logs of individual stock rates and monthly return comparison, My first preference to invest for would be AAPL based on Yearly return.
---
title: "ANLY 512 Lab1"
author: "Xiao Chen"
date: "2022-10-25"
output:
flexdashboard::flex_dashboard:
orientation: rows
social: menu
source: embed
vertical_layout: fill
html_document:
df_print: paged
pdf_document: default
---
.navbar {
background-color:lightgrey;
border-color:black;
}
.navbar-brand {
color:black!important;
}
# Conclusion {.sidebar}
**Table of Contents:**
* Agenda
Overview
Objective
The Decision & Rules
Methods Help
* Key Indicator Analysis
Metrics
Metric Analysis
* Individual Stock Analysis
Companys Stocks Performances
* Monthly Return Comparision
* Conclusion
# **Agenda**
Row {data-height=250}
-------------------------------------
### **Overview**
Due to the inherent growth in the electronic production and storage of information, there is often a feeling of “information overload” or inundation when facing the process of quantitative decision making. As an analyst your job will often be to conduct analyses or create tools to support quantitative decision making.
A principle tool used in industry, government, non-profits, and academic fields to compensate for the information overload is the information dashboard. Functionally, a dashboard is meant to provide a user with a central resource to present in a clear and concise manner all the information necessary to support day-to-day decision making and support operations.
Row
-------------------------------------
### **Objective**
The objective of this laboratory is to plan, design, and create an information dashboard to support quantitative decision making. To accomplish this task, you will have to complete a number of steps:
1.Delineate the necessary decision (I will do that below).
2.Identify what information will be relevant to decision making.
3.Find and collect the data necessary to create your visualization plan.
4.Organize and summarize the collected data.
5.Design and create the best visualizations to present that information.
6.Finally organize the layout of those visualizations in a way that conforms to the theory of dashboarding.
7.Write a summary about what decisions you made based on the visualizations that you developed.
### **The Decision & Rules**
You make investments for an organization; your objective is to purchase securities/commodities for the key objective of maximizing profits. You want to make an investment in securities/commodities to make some short-term gains. You are considering investing in one of any four companies, for example: Twitter (TWTR), Microsoft (MSFT), or Apple (AAPL) (don’t use these). Choose 4 companies or commodities and determine which one of the four will produce the most short-term gains. Use your imagination.
### **Methods Help**
##### *Getting data*
There are lots of places we can get financial data to support this decision. The simplest would be to go to for instance to the Yahoo Finance (https://finance.yahoo.com/) for data on the Hershey Company (HSY) the URL would be: (https://finance.yahoo.com/quote/HSY/history?p=HSY) and collect historical price data, and other financial and company information.
# **Key Indicator Analysis**
Row {data-height=200}
-------------------------
### **Financial Indicators/Metrics**
+ `r kableExtra::text_spec("**P-E Ratio**", color = "#5c5c5c")` - It is the ratio of a company's share price to the company's earnings per share. This ratio is used for valuing companies and to find out whether they are overvalued or undervalued.
+ `r kableExtra::text_spec("**EPS**", color = "#5c5c5c")` - It is the portion of a company's profit that is allocated to every individual share of the stock and helps in understanding the financial strength of a company
+ `r kableExtra::text_spec("**Dividend Yield Ratio**", color = "#5c5c5c")` - is a financial ratio that shows how much a company pays out in dividends each year relative to its stock price.
+ `r kableExtra::text_spec("**Market Cap**", color = "#5c5c5c")` - the total value of a company's shares.
Row {data-height=200}
-------------------------
### **Key Indicator Analysis at a glance**
Below is the summary table for the kep financial metrics taken for evaluating all the four companies performances - NETFLIX, FACEBOOK, APPLE, GOOGLE. All these companies are from different industries say - Entertainment, Social network, communication & technology, and search engine respecitvely. The reason to chose these specific companies are due to high trending in its financial status among other companies. So it will be helpful in understanding at what place they stand in terms of profits as well as to chose for us to invest in for short term gains. We can see that P-E ratio of FACEBOOK is high in compared to others but lowest in EPS. Since P-E ratio plays a major role in attracting investors it might have greater risk when it's stock price starts fluctuating. Coming to the market cap, APPLE stands at top place as it has high worth in the market which investors might be looking at it currently. Also, APPLE has the only one among others who is having dividend yield.
```{r, echo = TRUE, include = FALSE, message = FALSE}
install.packages("xts",repos = "http://cran.us.r-project.org")
install.packages("dygraphs",repos = "http://cran.us.r-project.org")
install.packages("lubridate",repos = "http://cran.us.r-project.org")
install.packages("DT",repos = "http://cran.us.r-project.org")
install.packages("pdfetch", repos = "http://cran.us.r-project.org")
install.packages("PerformanceAnalytics", repos = "http://cran.us.r-project.org")
install.packages("stocks", repos = "http://cran.us.r-project.org")
install.packages("flexdashboard", repos = "http://cran.us.r-project.org")
library(xts)
library(pdfetch)
library(DT)
library(lubridate)
library(dygraphs)
library(quantmod)
library(dplyr)
library(knitr)
library(ggplot2)
library(tidyr)
library(plyr)
library(PerformanceAnalytics)
library(stocks)
library(kableExtra)
library(flexdashboard)
```
Row
-------------------------
```{r}
library(quantmod)
library(plyr)
what_metrics <- yahooQF(c("Price/Sales",
"P/E Ratio",
"Price/EPS Estimate Next Year",
"PEG Ratio",
"Dividend Yield",
"Market Capitalization"))
tickers <- c("NFLX", "META", "AAPL", "GOOG")
metrics <- getQuote(paste(tickers, sep = ",", collapse = ";"), what = what_metrics)
metrics <- data.frame(Symbol = tickers, metrics[,2:length(metrics)])
DT::datatable(metrics)
```
# **Individual Stock Analysis**
#### **Stocks**
```{r, echo=FALSE}
getSymbols("NFLX", from = "2021-01-01", to = "2022-01-1")
NFLXlog <- NFLX %>% Ad() %>% dailyReturn(type = 'log')
getSymbols("META", from = "2021-01-01", to = "2022-01-1")
FBlog <- META %>% Ad() %>% dailyReturn(type = 'log')
getSymbols("AAPL", from = "2021-01-01", to = "2022-01-1")
AAPLlog <- AAPL %>% Ad() %>% dailyReturn(type = 'log')
getSymbols("GOOG", from = "2021-01-01", to = "2022-01-1")
GOOGlog <- GOOG %>% Ad() %>% dailyReturn(type = 'log')
```
Row {.tabset .tabset-fade}
-------------------------------------
### NETFLIX
```{r}
NFLX %>% Ad() %>% chartSeries()
NFLX %>% chartSeries(TA = 'addBBands();addVo();addMACD()',subset='2021')
```
### FACEBOOK
```{r}
META %>% Ad() %>% chartSeries()
META %>% chartSeries(TA = 'addBBands();addVo();addMACD()',subset='2021')
```
### APPLE
```{r}
AAPL %>% Ad() %>% chartSeries()
AAPL %>% chartSeries(TA = 'addBBands();addVo();addMACD()',subset='2021')
```
### GOOGLE
```{r}
GOOG %>% Ad() %>% chartSeries()
GOOG %>% chartSeries(TA = 'addBBands();addVo();addMACD()',subset='2021')
```
Monthly Return Comparison & Conclusion
=====================================
Row {data-height=850}
-------------------------------------
### **Monthly Return Comparison**
In addition to the individual stock analysis, below is the comparison of their Monthly return in one combined plot.
```{r}
NFLXmr <- monthlyReturn(NFLX)
FBmr <- monthlyReturn(META)
AAPLmr <- monthlyReturn(AAPL)
GOOGmr <- monthlyReturn(GOOG)
mg.return <- merge.xts(NFLXmr, FBmr, AAPLmr, GOOGmr)
colnames(mg.return) <- c("NETFLIX", "FACEBOOK", "AAPLE", "GOOGLE")
dygraph(mg.return, main = "Monthly Return") %>%
dyAxis("y", label = "Return") %>%
dyOptions(colors = RColorBrewer::brewer.pal(4, "Dark2")) %>%
dyHighlight(highlightSeriesBackgroundAlpha = 0.3,
highlightSeriesOpts = list(strokeWidth = 3)) %>%
dyRangeSelector(height = 30)
```
Row {data-height=150}
-------------------------------------
### **Conclusion**
From the generated logs of individual stock rates and monthly return comparison, My first preference to invest for would be AAPL based on Yearly return.