midterm_13-19
.docx
keyboard_arrow_up
School
Georgia Institute Of Technology *
*We aren’t endorsed by this school
Course
OMSA
Subject
Finance
Date
May 3, 2024
Type
docx
Pages
3
Uploaded by DukeSummer7561 on coursehero.com
# Load the required packages library(tidyquant) library(dplyr) # Define the list of stock symbols stocks <- c('TSLA', 'JNJ', 'GOOGL', 'GE') # Download adjusted prices for the specified stocks from Yahoo Finance price_data <- stocks %>% tq_get(get = "stock.prices", from = "2018-01-01", to = "2022-12-31") %>% select(symbol, date, adjusted) # Calculate monthly returns for each stock returns_data <- price_data %>% group_by(symbol) %>% tq_transmute(select = adjusted, mutate_fun = periodReturn, col_rename = "monthly_return", period = "monthly") head(returns_data)
# Create an equally weighted portfolio portfolio_returns <- returns_data %>% group_by(date) %>% tq_portfolio(assets_col = symbol, returns_col = monthly_return, rebalance_on = "months") summary(portfolio_returns)
head(portfolio_returns)
# Join the portfolio returns with the market return and risk-free rate data # Replace "market_returns.csv" and "risk_free_rate.csv" with your data file paths return_riskfree <- read.csv("/Users/srimukiviswanathan/Documents/GeorgiaTech_OMSA/MGT6203_DataAnalytic
sBusiness/Exam/Market_and_RiskFree_Returns_2018_to_2022.csv")
head(return_riskfree)
#class(return_riskfree$)
return_riskfree$date <- ymd(return_riskfree$date)
head(return_riskfree)
market_data <- read.csv("/Users/srimukiviswanathan/Documents/GeorgiaTech_OMSA/MGT6203_DataAnalytic
sBusiness/Exam/MarketRet.csv") risk_free_data <- read.csv("/Users/srimukiviswanathan/Documents/GeorgiaTech_OMSA/MGT6203_DataAnalytic
sBusiness/Exam/Risk_free.csv") # Assuming that the market_data and risk_free_data have columns "date", "market_return", and "risk_free_rate" portfolio_with_market_data <- portfolio_returns %>% left_join(return_riskfree, by = c("date"="date"))
retruns_with_market_data <- returns_data %>% left_join(return_riskfree, by = c("date"="date"))
# Now you have a dataset with the portfolio returns, market return, and risk-free rate for further
analysis.
head(portfolio_with_market_data)
head(portfolio_returns)
head(retruns_with_market_data)
# Assuming you've already loaded the required packages and have the necessary data in 'portfolio_with_market_data' dataframe # Calculate Portfolio Standard Deviation portfolio_std_dev <- portfolio_with_market_data %>% summarise(portfolio_std_dev = sd(portfolio.returns)) %>% pull(portfolio_std_dev) # Calculate GE Standard Deviation ge_std_dev <- retruns_with_market_data %>% filter(symbol == "GE") %>% summarise(ge_std_dev = sd(monthly_return)) %>% pull(ge_std_dev) # Calculate Portfolio Arithmetic Average portfolio_avg <- portfolio_with_market_data %>% summarise(portfolio_avg = mean(portfolio.returns)) %>% pull(portfolio_avg) # Calculate GE Arithmetic Average ge_avg <- retruns_with_market_data %>% filter(symbol == "GE") %>% summarise(ge_avg = mean(monthly_return)) %>% pull(ge_avg) # Round the results to four decimal places portfolio_std_dev <- round(portfolio_std_dev, 4) ge_std_dev <- round(ge_std_dev, 4) portfolio_avg <- round(portfolio_avg, 4) ge_avg <- round(ge_avg, 4)
# Print the results cat("Portfolio Standard Deviation:", portfolio_std_dev, "%\n") cat("GE Standard Deviation:", ge_std_dev, "%\n") cat("Portfolio Arithmetic Average:", portfolio_avg, "%\n") cat("GE Arithmetic Average:", ge_avg, "%\n")
# Assuming you've already loaded the required packages and have the necessary data in 'portfolio_with_market_data' dataframe # Calculate Cumulative Return of the Portfolio cumulative_return <- portfolio_with_market_data %>% summarise(cumulative_return = prod(1 + portfolio.returns) - 1) %>% pull(cumulative_return) # Convert to percentage and round to the nearest percent cumulative_return
cumulative_return_percent <- round(cumulative_return * 100) # Print the cumulative return rounded to the nearest percent cat("Cumulative Return of the Portfolio:", cumulative_return_percent, "%\n")
stocks_monthly_returns %>% filter(portfolio.returns > 0.25 * stocks$mon_return)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
looking for help solving standard deviation for stock x and stock y, preferably with instructions on how to solve in excel.
arrow_forward
During the continuous trading session, orders were placed for CLC stock as follows:i. Calculate the matching prices and the matching volumeii. Which MP order is left over and converted to LO at what price?
arrow_forward
The market and Stock J have the following probability distributions:
Probability
rM
rJ
0.3
15.00
%
19.00
%
0.4
10.00
6.00
0.3
18.00
10.00
The data has been collected in the Microsoft Excel Online file below. Open the spreadsheet and perform the required analysis to answer the questions below.
Open spreadsheet
Calculate the expected rate of return for the market. Do not round intermediate calculations. Round your answer to two decimal places.fill in the blank %Calculate the expected rate of return for Stock J. Do not round intermediate calculations. Round your answer to two decimal places.fill in the blank %
Calculate the standard deviation for the market. Do not round intermediate calculations. Round your answer to two decimal places.fill in the blank %Calculate the standard deviation for Stock J. Do not round intermediate calculations. Round your answer to two decimal places.fill in the blank %
arrow_forward
How many units of each stock will Stephanie buy? Support your response with relevant computations. without using excel
arrow_forward
Hello, which table would I use to find the ratio of exchange in a stock? I'm attaching the tables, but I'm not sure which table to use. Also, what would be the formula to use when doing that on an excel template?
arrow_forward
Which of the following is an "Auction" market:
NASDAQ NMS.
OTC Bulletin Board.
American Stock Exchange.
Pink Sheets.
arrow_forward
Stocks A and B have the following returns: (Click on the following icon o in order to copy its contents into a spreadsheet.)
Stock A
Stock B
1
0.09
0.04
0.06
0.03
3.
0.12
0.06
4
- 0.04
0.02
5
0.09
-0.02
a. What are the expected returns of the two stocks?
b. What are the standard deviations of the returns of the two stocks?
c. If their correlation is 0.47, what is the expected return and standard deviation of a portfolio of 51% stock A and 49% stock B?
a. What are the expected returns of the two stocks?
The expected return for stock A is (Round to three decimal places.)
arrow_forward
1.- Explain the current valuation of your favorite stock (doesn't have to be US). Please make sure you list the Index and Ticker symbol, if applicable..
arrow_forward
What is the cest of pretrred stock for Kylo usng the emestrmesit banker? (Round to fwo docrmal places
arrow_forward
Using the data in the following table,, estimate the:
a. Average return and volatility for each stock.
b. Covariance between the stocks.
c. Correlation between these two stocks.
a. Estimate the average return and volatility for each stock.
The average return of stock Ais %. (Round to two decimal places.)
Data table
(Click on the following icon in order to copy its contents into a spreadsheet.)
Year
2010
2011
2013
Stock A
- 5%
17%
- 6%
Stock B
29%
21%
- 1%
2012
7%
4%
2014
1%
- 15%
2015
13%
20%
arrow_forward
11.
The following graph plots the current security market line (SML) and indicates the return that investors require from holding stock from Happy Corp. (HC).
Based on the graph, complete the table that follows. (Tool tip: Mouse over the points in the graph to see their coordinates.)
arrow_forward
Type the answers with a screen capture of chart.
Produce a daily OHLC bar or Candlestick price chart on PTC us stock. Then, add
(1) Two moving averages (it can be simple moving averages or exponential moving
averages, with one faster and one slower). You can choose any parameter (number
of days, simple or exponential) you prefer.
(2) Trend lines over the period covered. It can be up trend line, down trend line or
channel that you observe from the chart.
(3) Technical indicator(s) such as RSI or MACD.
Note: after done the drawing, capture the screen and save as picture and then work
with your saved pictures. Can use ANY charting app.
On the chart,
1. Identify and mark the current key support and resistance levels. They should
include the immediate support/resistance level and the next support/resistance
levels. "Current" means you are focusing on the current or latest price level, do not
mention the support or resistance levels when the price was, say, several months
ago in the earlier…
arrow_forward
)If you are asked to construct your own portfolio by using information about the individual stocks in the excel spreadsheet, are there any stocks which you should not include in your portfolio? Can you provide your justifications? (You may draw performance graphs of one stock against the market portfolio).
arrow_forward
1.
Consider the following set of orders for the VOD stock:
Time
Trader
Order Side
Size
Price
Sell
Buy
Buy
Sell
Buy
Sll
Sell
10:00
АВС
DEF
GHI
JKL
MNO
PQR
STU
VWX
YZ
4
10:05
10:08
10:09
10:10
10:15
10:18
10:20
10:30
20
21
20
22
18
Market
19
Market
21
7
Buy
Sll
6.
Assume that the above orders are sent to a single-price call
auction.
Consider sending the same set of orders to a
continuous two-sided auction, Apply price-time
priority and the discriminatory pricing rule
and list the first 3 trades. Compute the
trading surplus for these 3 trades. Compare
and contrast single-price auctions and
continuous two-sided auctions.
arrow_forward
Stocks A and B have the following returns:
Stock A
0.09
0.04
0.13
-0.04
0.09
1
2
3
4
5
(Click on the following icon in order to copy its contents into a spreadsheet.)
Stock B
0.04
0.03
0.04
0.01
-0.04
a. What are the expected returns of the two stocks?
b. What are the standard deviations of the returns of the two stocks?
c. If their correlation is 0.48, what is the expected return and standard deviation of a portfolio of 75% stock A and 25% stock B?
a. What are the expected returns of the two stocks?
The expected return for stock A is. (Round to three decimal places.)
arrow_forward
Since stocks can be traded online which purpose is best served by markets
arrow_forward
Given the information in the table below, which company's stock has the highest total value?
Select one:
a.
Microsoft
b.
Block
c.
Adobe
d.
Oracle
Clear my choice
arrow_forward
Go to Yahoo! Finance and download the monthly stock prices for Apple (AAPL) from 1/1/2016 to 12/31/2021.
(1) Sort the data in increasing order by date.
(2) Calculate monthly returns using Adj. Close prices. Align the returns well with the dates.
(3) Calculate the average monthly return and standard deviation of the monthly returns. (Hint: use either STDEV.S or STDEV to calculate the standard deviation.)
On Excel Formulas included
arrow_forward
SupposerRF=5%,rM=12%, andbi=2, what isri, the required rate of return on Stock i?12%7%19%5%
I need answer typing clear urjent no chatgpt .
arrow_forward
Please help I will upvote!!! Can someone recreate this graph and fill in the values using securities M (macys), AAPL, GOOG, and BYND? As well as complete the SML equation: Rfr + (Rm Rfr) Pb and answer what stocks I would benefit from? Thank you so much!
arrow_forward
The following table represents the rate of returns of two stocks in different
economic conditions along with their probabilities (the data are also uploaded on
moodle)
RATES OF RETURN ON STOCKS
EXPECTED
ECONOMIC
PROBABILITY
STOCK A
STOCK B
CONDITIONS
RECESSION
0.55
-0.04
-0.02
STABLE
0.35
0.25
0.30
EXPANDING
0.10
0.15
0.20
Answer the following by using mathematical calculations:
a) Calculate the expected rate of return for each stock respectively. Explain
what the expected value implies.
b) Calculate the standard deviation for each stock respectively. Explain what
the standard deviation implies.
c) If you were an investor in which stock you were going to invest? Justify
your answer.
d) Calculate the covariance between Stock A and stock B. Discuss.
e) Calculate the expected return and the standard deviation of the portfolio
consisting 40% in stock A and 60% in stock B.
f) Discuss the risk and return associated with investing
i All of your funds in stock A
ii. All of your funds in stock…
arrow_forward
Give 3 technical analysis tools that you can use in analyzing stock price and provide an example each on how it is utilized.
arrow_forward
c) Calculate the covariance for the above stockNote: No need excel formula
arrow_forward
financial advisor evaluates four stocks for inclusion in an investor's portfolio. A orrelation matrix showing each stock's correlation with the other stocks is shown below Stock ALK CMN BTY DLE ALK 0.40 0.58 1.00 -0.25 BTY 0.40 1.00 0.16 -0.04 CMN -.25 .16 1.00 .37 DLE .58 .04 .37 1.00 f the goal is to reduce the investor's overall portfolio risk, which two stocks should the advisor recommend? a. ALK and DLE b. ALK and CMN c. BTY and DLE BTY and CM
arrow_forward
You decide to form a portfolio of the following amounts invested in the
following stocks. What is the beta of the portfolio?
SET YOUR CALCULATOR TO 4 DECIMAL PLACES THEN INPUT THE
ANSWER ROUNDING TO 2 DECIMALS i.e. if your answer is 1.2455, enter it as
1.25.
Amount Beta
$5,817 1.65
Microsoft $4,128 0.54
$2,818 1.67
$8,782 2.27
Stock
Apple
Ford
Time
Warner
Expected Return
10.50%
16.90%
15.75%
11.80%
arrow_forward
Using the data in the following table,, estimate the:
a. Average return and volatility for each stock.
b. Covariance between the stocks.
c. Correlation between these two stocks.
Data table
(Click on the following icon in order to copy its contents into a spreadsheet.)
Year
2010
2011
2013
Stock A
- 10%
20%
- 5%
Stock B
21%
7%
- 3%
2012
5%
30%
2014
2%
- 8%
2015
9%
25%
I
arrow_forward
Using the data in the following table,, estimate the:
a. Average return and volatility for each stock.
b. Covariance between the stocks.
c. Correlation between these two stocks.
a. Estimate the average return and volatility for each stock.
The average return of stock A is
%. (Round to two decimal places.)
Data table
(Click on the following icon in order to copy its contents into a spreadsheet.)
Year
Stock A
2010
2011
2012
2013
2014
2015
- 1%
6%
2%
-5%
4%
6%
Stock B
20%
9%
8%
-3%
- 5%
21%
Print
Done
☑
Clear
arrow_forward
Astromet is financed entirely by common stock and has a beta of 1.20. The firm pays no taxes. The stock has a price-earnings multiple
of 11.0 and is priced to offer a 10.9% expected return. The company decides to repurchase half the common stock and substitute an
equal value of debt. Assume that the debt yields a risk-free 4.6%. Calculate the following:
Required:
a. The beta of the common stock after the refinancing
b. The required return and risk premium on the common stock before the refinancing
c. The required return and risk premium on the common stock after the refinancing
d. The required return on the debt
e. The required return on the company (i.e, stock and debt combined) after the refinancing
If EBIT remains constant:
f. What is the percentage increase in earnings per share after the refinancing?
g-1. What is the new price-earnings multiple?
g-2. Has anything happened to the stock price?
Complete this question by entering your answers in the tabs below.
Reg A to E
Reg F to G2…
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
EBK CONTEMPORARY FINANCIAL MANAGEMENT
Finance
ISBN:9781337514835
Author:MOYER
Publisher:CENGAGE LEARNING - CONSIGNMENT
Related Questions
- looking for help solving standard deviation for stock x and stock y, preferably with instructions on how to solve in excel.arrow_forwardDuring the continuous trading session, orders were placed for CLC stock as follows:i. Calculate the matching prices and the matching volumeii. Which MP order is left over and converted to LO at what price?arrow_forwardThe market and Stock J have the following probability distributions: Probability rM rJ 0.3 15.00 % 19.00 % 0.4 10.00 6.00 0.3 18.00 10.00 The data has been collected in the Microsoft Excel Online file below. Open the spreadsheet and perform the required analysis to answer the questions below. Open spreadsheet Calculate the expected rate of return for the market. Do not round intermediate calculations. Round your answer to two decimal places.fill in the blank %Calculate the expected rate of return for Stock J. Do not round intermediate calculations. Round your answer to two decimal places.fill in the blank % Calculate the standard deviation for the market. Do not round intermediate calculations. Round your answer to two decimal places.fill in the blank %Calculate the standard deviation for Stock J. Do not round intermediate calculations. Round your answer to two decimal places.fill in the blank %arrow_forward
- How many units of each stock will Stephanie buy? Support your response with relevant computations. without using excelarrow_forwardHello, which table would I use to find the ratio of exchange in a stock? I'm attaching the tables, but I'm not sure which table to use. Also, what would be the formula to use when doing that on an excel template?arrow_forwardWhich of the following is an "Auction" market: NASDAQ NMS. OTC Bulletin Board. American Stock Exchange. Pink Sheets.arrow_forward
- Stocks A and B have the following returns: (Click on the following icon o in order to copy its contents into a spreadsheet.) Stock A Stock B 1 0.09 0.04 0.06 0.03 3. 0.12 0.06 4 - 0.04 0.02 5 0.09 -0.02 a. What are the expected returns of the two stocks? b. What are the standard deviations of the returns of the two stocks? c. If their correlation is 0.47, what is the expected return and standard deviation of a portfolio of 51% stock A and 49% stock B? a. What are the expected returns of the two stocks? The expected return for stock A is (Round to three decimal places.)arrow_forward1.- Explain the current valuation of your favorite stock (doesn't have to be US). Please make sure you list the Index and Ticker symbol, if applicable..arrow_forwardWhat is the cest of pretrred stock for Kylo usng the emestrmesit banker? (Round to fwo docrmal placesarrow_forward
- Using the data in the following table,, estimate the: a. Average return and volatility for each stock. b. Covariance between the stocks. c. Correlation between these two stocks. a. Estimate the average return and volatility for each stock. The average return of stock Ais %. (Round to two decimal places.) Data table (Click on the following icon in order to copy its contents into a spreadsheet.) Year 2010 2011 2013 Stock A - 5% 17% - 6% Stock B 29% 21% - 1% 2012 7% 4% 2014 1% - 15% 2015 13% 20%arrow_forward11. The following graph plots the current security market line (SML) and indicates the return that investors require from holding stock from Happy Corp. (HC). Based on the graph, complete the table that follows. (Tool tip: Mouse over the points in the graph to see their coordinates.)arrow_forwardType the answers with a screen capture of chart. Produce a daily OHLC bar or Candlestick price chart on PTC us stock. Then, add (1) Two moving averages (it can be simple moving averages or exponential moving averages, with one faster and one slower). You can choose any parameter (number of days, simple or exponential) you prefer. (2) Trend lines over the period covered. It can be up trend line, down trend line or channel that you observe from the chart. (3) Technical indicator(s) such as RSI or MACD. Note: after done the drawing, capture the screen and save as picture and then work with your saved pictures. Can use ANY charting app. On the chart, 1. Identify and mark the current key support and resistance levels. They should include the immediate support/resistance level and the next support/resistance levels. "Current" means you are focusing on the current or latest price level, do not mention the support or resistance levels when the price was, say, several months ago in the earlier…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- EBK CONTEMPORARY FINANCIAL MANAGEMENTFinanceISBN:9781337514835Author:MOYERPublisher:CENGAGE LEARNING - CONSIGNMENT
EBK CONTEMPORARY FINANCIAL MANAGEMENT
Finance
ISBN:9781337514835
Author:MOYER
Publisher:CENGAGE LEARNING - CONSIGNMENT