I want to invest $1,000 in Stocks for the last quarter of 2021.
As the use of a CRM software seems increasingly important for every company that has an online presence, I want to look at the Stocks of some of the most popular CRM software companies such as:
I will be analyzing the financial performance of each of these Stocks in 2020 before making a decision.
Although Microsoft has the highest Market Cap of $2T, Oracle has the best P/E ratio out of the four followed by SAP.
Salesforce has the worst P/E ratio out of the four.
[1] "CRM"
[1] "MSFT"
[1] "SAP"
[1] "ORCL"
Oracle's Monthly Returns have been the most consistent followed by Microsoft. Oracle not only has the best P/E Ratio but it also has the best Forward P/E Ratio.
Although, SAP has the second best P/E and Forward P/E Ratios, it's Monthly Returns have not been as consistent as that of Microsoft or Oracle.
Looking at the Forward P/E Ratio of both Microsoft and Oracle, Oracle's Forward P/E ratio is 40% less than that of Microsoft. Hence, I want to invest 60% of my money in Oracle, which is $600 and 40% of my money in Microsoft, which is $400.
---
title: "ANLY 512 Lab1"
author: "Nischal Bondalapati"
output:
flexdashboard::flex_dashboard:
orientation: rows
social: menu
source: embed
vertical_layout: fill
html_document:
df_print: paged
pdf_document: default
---
# **Introduction**
Row {data-height=250}
-------------------------------------
### **Scenario**
I want to invest $1,000 in Stocks for the last quarter of 2021.
As the use of a CRM software seems increasingly important for every company that has an online presence, I want to look at the Stocks of some of the most popular CRM software companies such as:
1. Salesforce
2. Microsoft
3. SAP
4. Oracle
I will be analyzing the financial performance of each of these Stocks in 2020 before making a decision.
# **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. The more the P/E, the more the price one has to pay to earn a dollar from the stock. Hence, companies with more P/E are less attractive for investors.
+ `r kableExtra::text_spec("**Forward P/E Ratio**", color = "#5c5c5c")` - It is the projected P/E Ratio of a company for next year.
+ `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**
Although Microsoft has the highest Market Cap of $2T, Oracle has the best P/E ratio out of the four followed by SAP.
Salesforce has the worst P/E ratio out of the four.
```{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("CRM", "MSFT", "SAP", "ORCL")
metrics <- getQuote(paste(tickers, sep = ",", collapse = ";"), what = what_metrics)
metrics <- data.frame(Symbol = tickers, metrics[,2:length(metrics)])
names(metrics)[names(metrics) == "P.E.Ratio"] <- "P/E Ratio"
names(metrics)[names(metrics) == "Price.EPS.Estimate.Next.Year"] <- "Forward P/E Ratio"
names(metrics)[names(metrics) == "Dividend.Yield"] <- "Dividend Yield Ratio"
names(metrics)[names(metrics) == "Market.Capitalization"] <- "Market Cap"
DT::datatable(metrics)
```
# **Individual Stock Analysis**
#### **Stocks**
```{r, echo=FALSE}
getSymbols("CRM", from = "2020-01-01", to = "2021-01-01")
CRMlog <- CRM %>% Ad() %>% dailyReturn(type = 'log')
getSymbols("MSFT", from = "2020-01-01", to = "2021-01-01")
MSFTlog <- MSFT %>% Ad() %>% dailyReturn(type = 'log')
getSymbols("SAP", from = "2020-01-01", to = "2021-01-01")
SAPlog <- SAP %>% Ad() %>% dailyReturn(type = 'log')
getSymbols("ORCL", from = "2020-01-01", to = "2021-01-01")
ORCLlog <- ORCL %>% Ad() %>% dailyReturn(type = 'log')
```
Row {.tabset .tabset-fade}
-------------------------------------
### Salesforce
```{r}
CRM %>% Ad() %>% chartSeries()
CRM %>% chartSeries(TA = 'addBBands();addVo();addMACD()',subset='2020')
```
### Microsoft
```{r}
MSFT %>% Ad() %>% chartSeries()
MSFT %>% chartSeries(TA = 'addBBands();addVo();addMACD()',subset='2020')
```
### SAP
```{r}
SAP %>% Ad() %>% chartSeries()
SAP %>% chartSeries(TA = 'addBBands();addVo();addMACD()',subset='2020')
```
### Oracle
```{r}
ORCL %>% Ad() %>% chartSeries()
ORCL %>% chartSeries(TA = 'addBBands();addVo();addMACD()',subset='2020')
```
Comparison of Monthly Returns and Conclusion
=====================================
Row {data-height=700}
-------------------------------------
### **Comparison of Monthly Returns**
```{r}
CRMmr <- monthlyReturn(CRM)
MSFTmr <- monthlyReturn(MSFT)
SAPmr <- monthlyReturn(SAP)
ORCLmr <- monthlyReturn(ORCL)
mg.return <- merge.xts(CRMmr, MSFTmr, SAPmr, ORCLmr)
colnames(mg.return) <- c("Salesforce", "Microsoft", "SAP", "Oracle")
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=300}
-------------------------------------
### **Conclusion**
Oracle's Monthly Returns have been the most consistent followed by Microsoft. Oracle not only has the best P/E Ratio but it also has the best Forward P/E Ratio.
Although, SAP has the second best P/E and Forward P/E Ratios, it's Monthly Returns have not been as consistent as that of Microsoft or Oracle.
Looking at the Forward P/E Ratio of both Microsoft and Oracle, Oracle's Forward P/E ratio is 40% less than that of Microsoft. Hence, I want to invest 60% of my money in Oracle, which is $600 and 40% of my money in Microsoft, which is $400.