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:
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, commodities or any financial instrument you like, and determine which one of the four will produce the most short term gains. Use your imagination.
I want to determine which of the four companies or commodities you have chosen will produce the most short-term gains. Those four companies are Tesla Inc. , Amazon.com Inc. , Bitcoin, Facebook(Meta). Tesla (TSLA): Tesla makes electric cars and renewable energy products. When analyzing Tesla’s stock, consider the demand for electric cars, the company’s ability to make more cars, and competition. Also, think about rules and policies that could affect the electric car industry.
Amazon (AMZN): Amazon is a tech company that sells things online, has cloud computing, and digital streaming. To analyze Amazon’s stock, think about how much money they make and if they are profitable, competition from other companies, and rules and laws that could affect them.
Palantir Technologies Inc (PLTR): Palantir helps governments and companies with data analytics. To analyze Palantir’s stock, consider if they can keep clients and get new ones, competition, and rules and laws about privacy and data analytics.
Meta Platforms Inc (META) (formerly Facebook): Meta runs social media and communication platforms. To analyze Meta’s stock, think about how much money they make and if they are profitable, competition from other social media companies, and rules and laws that could affect them.
P-E Ratio # The P-E Ratio compares a company’s share price to its earnings per share, and is commonly used to assess whether a company is overvalued or undervalued.
EPS # a financial metric that represents the portion of a company’s profit that is attributed to each individual share of its stock. EPS is a key indicator of a company’s financial health and can provide valuable insights into its profitability.
Dividend Yield Ratio # It is a financial ratio that measures the annual dividends paid by a company per share, relative to its current stock price. This ratio provides insights into the income potential of a stock and is commonly used by investors to evaluate its value.
Market Cap # the total value of a company’s outstanding shares of stock.
#Looking at the data shows above,We can tell all four companies have strong market capitalizations. Palantir Technologies Inc. (PLTR) has the lowest market cap but the lowest PEG ratio, which suggests it may be undervalued relative to its expected earnings growth. Tesla Inc. (TSLA) has the highest market cap and a moderately high PEG ratio, indicating that investors have high expectations for its future growth. Meta Platforms Inc. (META) has a high market cap and PEG ratio but a relatively lower price-to-sales ratio. Amazon.com Inc. (AMZN) has the highest enterprise value and a high PEG ratio, which suggests that its current stock price may not be supported by its expected earnings growth. It’s important to note that market trends, company news, and other factors can also impact the value of these companies.
Row ————————————- # From this chart we can see, there is no obvious up
or down trend on Amazon from 2022 Oct31 to 2023 Mar
Row ————————————- #From this chart we can see, there is no obvious up or
down trend on Tesla from 2022 Oct31 to 2023 Mar
Row ————————————- # This is a Ranging trend, the market trends in move
in waves, there iss inverse head and shoulders shape, only from this
chart. This is a flat chart, and you have no idea what the general
direction of the stock is. Usually, it is not suitable for
speculation.
Row ————————————- # Pretty obvious,There is a trend on this
chart.Compared to the other three stocks, this one shows an upward
trend.
[1] "TSLA"
[1] "AMZN"
[1] "PLTR"
[1] "META"
Based on the metrics and charts of all four companies, it’s evident that each company possesses a strong market capitalization. However, there are significant variations in their PEG ratios and price-to-sales ratios. Palantir, although having the lowest market cap, boasts the lowest PEG ratio, indicating its current undervaluation relative to its anticipated earnings growth. In contrast, Tesla’s moderately high PEG ratio and highest market cap signify investor optimism towards its future growth. Meta Platforms, despite having a high market cap and PEG ratio, boasts a relatively lower price-to-sales ratio. Lastly, Amazon, with the highest enterprise value and PEG ratio, may not have enough expected earnings growth to support its current stock price. Additionally, the Closing price chart depicts an upward trend in Meta’s stock compared to the other three stocks. Considering these factors, it is prudent to invest in Meta for lower risk.
---
title: "ANLY 512 - Lab 1 Dashboard"
Name: "Bolun Lu"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
social: menu
source: embed
html_document:
df_print: paged
pdf_document: default
---
# Table of Contents {.sidebar}
* Introduction
* The Decision & Rules
* Key Indicators Analysis
* Stock Analysis by Campany
* Individual Stock Analysis - Candlestick Chart
* Conclusion
# **Introduction**
Row {data-height=500}
-------------------------------------
### **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.
### **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 into a dashboard (use the flexdashboard package) 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.
Row
-------------------------------------
### **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, commodities or any financial instrument you like, and determine which one of the four will produce the most short term gains. Use your imagination.
I want to determine which of the four companies or commodities you have chosen will produce the most short-term gains. Those four companies are Tesla Inc. , Amazon.com Inc. , Bitcoin, Facebook(Meta).
Tesla (TSLA): Tesla makes electric cars and renewable energy products. When analyzing Tesla's stock, consider the demand for electric cars, the company's ability to make more cars, and competition. Also, think about rules and policies that could affect the electric car industry.
Amazon (AMZN): Amazon is a tech company that sells things online, has cloud computing, and digital streaming. To analyze Amazon's stock, think about how much money they make and if they are profitable, competition from other companies, and rules and laws that could affect them.
Palantir Technologies Inc (PLTR): Palantir helps governments and companies with data analytics. To analyze Palantir's stock, consider if they can keep clients and get new ones, competition, and rules and laws about privacy and data analytics.
Meta Platforms Inc (META) (formerly Facebook): Meta runs social media and communication platforms. To analyze Meta's stock, think about how much money they make and if they are profitable, competition from other social media companies, and rules and laws that could affect them.
# Key Indicators Analysis
column{.tabset}
----------------------------------------------------------------------------------------------
```{r Data Loading}
library(kableExtra)
library(kableExtra)
library(flexdashboard)
library(quantmod)
library(plyr)
library(dplyr)
library(highcharter)
library(viridisLite)
library(ggplot2)
library(dygraphs)
library(xts)
library(readxl)
TSLA <- read.csv("~/Documents/ANLY/ANLY512/lab1/TSLA.csv")
PLTR <- read.csv("~/Documents/ANLY/ANLY512/lab1/PLTR.csv")
META <- read.csv("~/Documents/ANLY/ANLY512/lab1/META.csv")
AMZN <- read.csv("~/Documents/ANLY/ANLY512/lab1/AMZN.csv")
Current <- read_excel("~/Documents/ANLY/ANLY512/lab1/Current.xlsx")
```
+ `r kableExtra::text_spec("**P-E Ratio**", color = "#5c5c5c")` # The P-E Ratio compares a company's share price to its earnings per share, and is commonly used to assess whether a company is overvalued or undervalued.
+ `r kableExtra::text_spec("**EPS**", color = "#5c5c5c")` # a financial metric that represents the portion of a company's profit that is attributed to each individual share of its stock. EPS is a key indicator of a company's financial health and can provide valuable insights into its profitability.
+ `r kableExtra::text_spec("**Dividend Yield Ratio**", color = "#5c5c5c")` # It is a financial ratio that measures the annual dividends paid by a company per share, relative to its current stock price. This ratio provides insights into the income potential of a stock and is commonly used by investors to evaluate its value.
+ `r kableExtra::text_spec("**Market Cap**", color = "#5c5c5c")` # the total value of a company's outstanding shares of stock.
```{r }
what_metrics <- yahooQF(c("Symbol",
"Price/Sales",
"P/E Ratio",
"Price/EPS Estimate Next Year",
"PEG Ratio",
"Dividend Yield",
"Market Capitalization"))
tickers <- c("TSLA", "AMZN", "PLTR", "META")
# Not all the metrics are returned by Yahoo.
metrics <- getQuote(paste(tickers, sep="", collapse=";"), what = what_metrics)
#Add tickers as the first column and remove the first column which had date stamps
metrics <- data.frame(Symbol=tickers, metrics[,1:length(metrics)])
#Change colnames
colnames(metrics) <- c("Symbol","Price/Sales", "P/E Ratio","Price EPS Estimate Next Year", "PEG Ratio","Dividend Yield","Market Capitalization")
DT::datatable(metrics)
DT::datatable(Current)
```
```{r,echo=FALSE, include = FALSE, message=FALSE}
getSymbols("TSLA",from="2022-10-30",to="2023-03-24")
TSLA_log_returns<-TSLA%>%Ad()%>%dailyReturn(type='log')
getSymbols("AMZN",from="2022-10-30",to="2023-03-24")
AMZN_log_returns<-AMZN%>%Ad()%>%dailyReturn(type='log')
getSymbols("PLTR",from="2022-10-30",to="2023-03-23")
PLTR_log_returns<-PLTR%>%Ad()%>%dailyReturn(type='log')
getSymbols("META",from ="2022-10-30",to="2023-03-24")
META_log_returns<-META%>%Ad()%>%dailyReturn(type='log')
```
#Looking at the data shows above,We can tell all four companies have strong market capitalizations. Palantir Technologies Inc. (PLTR) has the lowest market cap but the lowest PEG ratio, which suggests it may be undervalued relative to its expected earnings growth. Tesla Inc. (TSLA) has the highest market cap and a moderately high PEG ratio, indicating that investors have high expectations for its future growth. Meta Platforms Inc. (META) has a high market cap and PEG ratio but a relatively lower price-to-sales ratio. Amazon.com Inc. (AMZN) has the highest enterprise value and a high PEG ratio, which suggests that its current stock price may not be supported by its expected earnings growth. It's important to note that market trends, company news, and other factors can also impact the value of these companies.
# Stock Analysis by Campany
Column{.tabset}
--------------------------------------------------------------------
### Facet Chart {data-width=2000}
```{r stock Closing Price CHART}
tickersC <- c("TSLA", "AMZN", "PLTR", "META")
ClosingPrices <- do.call(merge, lapply(tickersC, function(x) Cl(get(x))))
dateperiod<-c("2022-10-30", "2023-03-23")
dygraph(ClosingPrices, main="Closing Price in USD", group="Stock") %>%
dyAxis("y", label="Closing Price(USD)") %>%
dyOptions( colors = RColorBrewer::brewer.pal(5, "Set1")) %>%
dyHighlight(highlightSeriesBackgroundAlpha = 0.5,
highlightSeriesOpts = list(strokeWidth = 4)) %>%
dyRangeSelector(height = 30)
```
### ANZN {data-width=1000}
```{r AMZN}
AMZN%>%Ad()%>%chartSeries()
```
Row
-------------------------------------
# From this chart we can see, there is no obvious up or down trend on Amazon from 2022 Oct31 to 2023 Mar
### TSLA {data-width=1000}
```{r TSLA}
TSLA%>%Ad()%>%chartSeries()
```
Row
-------------------------------------
#From this chart we can see, there is no obvious up or down trend on Tesla from 2022 Oct31 to 2023 Mar
### PLTR {data-width=1000}
```{r PLTR}
PLTR%>%Ad()%>%chartSeries()
```
Row
-------------------------------------
# This is a Ranging trend, the market trends in move in waves, there iss inverse head and shoulders shape, only from this chart. This is a flat chart, and you have no idea what the general direction of the stock is. Usually, it is not suitable for speculation.
### META {data-width=1000}
```{r META}
META%>%Ad()%>%chartSeries()
```
Row
-------------------------------------
# Pretty obvious,There is a trend on this chart.Compared to the other three stocks, this one shows an upward trend.
Row
---------------------------------------------------------------------------------------
# **Individual Stock Analysis - Candlestick Chart**
### TSLA {data-width=900}
```{r Candlestick Charts}
getSymbols("TSLA",from="2022-10-30",to="2023-03-24")
chartSeries(TSLA,subset = '', type = 'auto')
addBBands()
```
### AMZN {data-width=900}
```{r }
getSymbols("AMZN",from="2022-10-30",to="2023-03-24")
chartSeries(AMZN,subset = '', type = 'auto')
addBBands()
```
### PLTR {data-width=900}
```{r }
getSymbols("PLTR",from="2022-10-30",to="2023-03-24")
chartSeries(PLTR,subset = '', type = 'auto')
addBBands()
```
### META {data-width=900}
```{r}
getSymbols("META",from="2022-10-30",to="2023-03-24")
chartSeries(META,subset = '', type = 'auto')
addBBands()
```
## Column {data-height=900 .tabset .tabset-fade}
# **Conclusion**
Based on the metrics and charts of all four companies, it's evident that each company possesses a strong market capitalization. However, there are significant variations in their PEG ratios and price-to-sales ratios. Palantir, although having the lowest market cap, boasts the lowest PEG ratio, indicating its current undervaluation relative to its anticipated earnings growth. In contrast, Tesla's moderately high PEG ratio and highest market cap signify investor optimism towards its future growth. Meta Platforms, despite having a high market cap and PEG ratio, boasts a relatively lower price-to-sales ratio. Lastly, Amazon, with the highest enterprise value and PEG ratio, may not have enough expected earnings growth to support its current stock price. Additionally, the Closing price chart depicts an upward trend in Meta's stock compared to the other three stocks. Considering these factors, it is prudent to invest in Meta for lower risk.
Row
-------------------------