ANLY 512 - Dashboarding Lab - Group Amit,Dhanisha,Nikhil

Nikhil Rao

7/23/2019

Conclusion

  • This dashboard is for visualizing the stock price movements and some key ratios of 4 companies: INTEL, QUALCOMM Inc., Amazon and Tesla
  • Amazon has the highest stock closing price at the end of the observed period, while Intel has the lowest
  • INTEL has the highest traded average daily volume, in the observed period
  • Long-term stock price growth analysis of these companies shows that Amazon is likely a better bet for long-term investing
  • The monthly return for QCOM and INTC are relatively stable, compared to Amazon and Tesla. Tesla has the most volatile monthly return among the four stocks
  • Our goal is to make short-term gains, which leaves us with Tesla as the best option. Its 50 day and 200 day moving averages are both lower than its last closing price, and its stock price has proven that it is more volatile compared to INTC Tesla is comparatively profitable stock to invest in, for short-term gain followed by QCOM as it had had some latest volatility due to market sentiments in recent times

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, goverment, 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 neccessary 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: Delineate the necessary decision (I will do that) Identify what information will be relevant to decision making. Find and collect the data necessary to create your visualization plan. Organize and summarize the collected data. Design and create the best visualizations to present that information. Finally organize the layout of those visualizations in a way that conforms to the theory of dashbaording.

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. ###Dates & Deliverables You are responsible for submitting a link to your dashboard hosted on the Rpubs site. The dashboard must include the source_code = TRUE parameter. The due date for this project is Oct 23 at the start of class. This assignment is worth 75 points, 3x a normal homework, the additional time should allow you to spend the neccessary effort on this assignment. You are welcome to work in groups of ???2 people. However, each person in a group must submit their own link to the assignment on moodle for grading! Each team member can submit the same link to a single rpubs account, however it may be a good idea for each of you to post your own copy to rpubs in case you want to share it to prospective employers ect. There is one caveat to this project. While you can use any package to pull or obtain data, DO NOT use package like quantmod() to make your graphics. I want to see that you designed and built all the graphics yourself and did not use a precanned stock visualizing function like chartSeries(). There a number of great packages that allow you to use financial graphic types for which you build them see candlestick dygraphs for examples. ###Methods Help Getting data There are lots of places we can get financial data to support these 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. Alternatively, and more professionally, there are tons of packages that allow you to access data from R. See here quick examples. This is not a complete list but will get you started. #Key Indicators Analysis This section takes a look at some key ratios and indicators on the four stocks mentioned. The indicators included are Price/Earnings ratio, Price/EPS estimate for next year, dividend yield, market capitalization of the company, 50 day moving average, 200 day Moving average and average daily volume traded for the stock. The first few indicators are to spot check the outlook and health of the company (Price/Earnings ratio, Price/EPS estimate for next year, dividend yield, market capitalization), while the last few are for checking the short-term profitability out of trading the stock (0 day moving average, 200 day Moving average and average daily volume) Based on the short-term indicators, my choice is to buy & hold Tesla, with a view of creating some short-term gains.

metrics_list <- yahooQF(c("P/E Ratio",
"Price/EPS Estimate Next Year",
"Dividend Yield",
"Market Capitalization",
"50-day Moving Average",
"200-day Moving Average",
"Average Daily Volume"))
tickers <- c("TSLA", "QCOM", "AMZN", "INTC")
metrics <- getQuote(paste(tickers, sep=",", collapse=";"), what=metrics_list)
metrics <- data.frame(Symbol=tickers, metrics[,2:length(metrics)])
DT::datatable(metrics)

Stock Analysis By Company

Here, we can see the historical stock price closing data since July 23, 2009. Column {.tabset} ———————————————————————–

## [1] "INTC"
## [1] "QCOM"
## [1] "AMZN"
## [1] "TSLA"

The first graph shows the change in closing stock price for the four companies, from July 23, 2009 to July 23, 2019 The second graph shows the volume of shares traded each day, the convergence/divergence of the moving average, and the upper/lower range of the stock price as it moves through the observation period. ###Intel

INTC%>%Ad()%>%chartSeries(theme = chartTheme("white"),
color.vol = TRUE, multi.col = FALSE)

INTC%>%chartSeries(TA='addBBands();addVo();addMACD()',subset='2019',
up.col = "Blue", dn.col = "Yellow",
theme = chartTheme("white"),
color.vol = TRUE, multi.col = FALSE)

###Qualcomm Inc.

QCOM%>%Ad()%>%chartSeries(theme = chartTheme("white"),
color.vol = TRUE, multi.col = FALSE)

QCOM%>%chartSeries(TA='addBBands();addVo();addMACD()',subset='2019',
up.col = "Blue", dn.col = "Yellow",
theme = chartTheme("white"),
color.vol = TRUE, multi.col = FALSE)

###Amazon

AMZN%>%Ad()%>%chartSeries(theme = chartTheme("white"),
color.vol = TRUE, multi.col = FALSE)

AMZN%>%chartSeries(TA='addBBands();addVo();addMACD()',subset='2019',
up.col = "Blue", dn.col = "Yellow",
theme = chartTheme("white"),
color.vol = TRUE, multi.col = FALSE)

###Tesla

TSLA%>%Ad()%>%chartSeries(theme = chartTheme("white"),
color.vol = TRUE, multi.col = FALSE)

TSLA%>%chartSeries(TA='addBBands();addVo();addMACD()',subset='2019',
up.col = "Blue", dn.col = "Yellow",
theme = chartTheme("white"),
color.vol = TRUE, multi.col = FALSE)

#Other Analysis ##Stock Closing Price

tickers_1 <- c("INTC", "QCOM", "AMZN", "TSLA")
ClosingPrices <- do.call(merge, lapply(tickers_1, function(x) Cl(get(x))))
dateperiod<-c("2009-07-23", "2019-07-23")
dygraph(ClosingPrices, main="Closing Price in USD", group="Stock") %>%
dyAxis("y", label="Closing Price(USD)") %>%
dyOptions( colors = RColorBrewer::brewer.pal(5, "Set2")) %>%
dyHighlight(highlightSeriesBackgroundAlpha = 0.5,
highlightSeriesOpts = list(strokeWidth = 4)) %>%
dyRangeSelector(height = 30)

##Monthly Return

m.rt.INTC <- monthlyReturn(INTC)
m.rt.QCOM <- monthlyReturn(QCOM)
m.rt.AMZN <- monthlyReturn(AMZN)
m.rt.TSLA <- monthlyReturn(TSLA)
mg.return <- merge.xts(m.rt.INTC,m.rt.QCOM, m.rt.AMZN, m.rt.TSLA)
colnames(mg.return) <- c('INTC','QCOM','AMZN','TSLA')
dygraph(mg.return, main = "Monthly Return") %>%
dyAxis("y", label = "Return") %>%
dyOptions(colors = RColorBrewer::brewer.pal(5, "Set2")) %>%
dyHighlight(highlightSeriesBackgroundAlpha = 0.5,
highlightSeriesOpts = list(strokeWidth = 4)) %>%
dyRangeSelector(height = 30)