Deliverables and Output33
pdf
keyboard_arrow_up
School
McMaster University *
*We aren’t endorsed by this school
Course
1DA3
Subject
Finance
Date
Jan 9, 2024
Type
Pages
2
Uploaded by Rabiddog
Deliverables and Output: 1. Download Data • Download Historical stock prices for all companies
in your portfolio at the daily frequency from January 2002 to December 2022 from Yahoo
Finance. Save close and adjusted close prices as well as Volume in separate sheets in an Excel
file; sheet_names “Price_daily”, “Adj_Price_daily”, and “Volume_daily”. o If, for any reason,
Yahoo Finance does allow you to access the data of a group of firms for the whole 21 years,
download as much as it provides. o The preferred method is to use the
Pandas_datareader/yfinance to directly connect to the Yahoo Finance website from Python.
With tickers STZ ADP JCI BKNG AMGN CPT JKHY ALGN AMZN LUV COP ORLY BIIB MS GD MTB
HRL TEL ABNB ISRG TROW KO RSG NRG LIN o If you cannot perform this with these libraries,
search for the tickers assigned to you on the Yahoo Finance website and manually download the
data from the Yahoo Finance website. Save the data for each firm in separate CSV files. Then
read these files to Python and convert them to timeseries dataFrames. Select the Close price
columns for each company and merge them all by Date. Save this dataFrame in the output Excel
file, sheet “Price_daily”. Do the same for the adj. close prices and volume data. • Download
prices for the S&P 500 index (^GSPC) from Yahoo Finance similarly and save it in an Excel sheet
“S&P 500” on the same file. This is our proxy for the market portfolio.
2. Calculate Firm Information • Calculate the market capitalization of each firm per year. That is,
multiply the number of shares outstanding by the close prices on the last trading day of each
year to get the total market capitalization of each firm per year. The Nov 2023 shares
outstanding data is in sheet S&P 500 Constituents in the tickers STZ ADP JCI BKNG AMGN CPT
JKHY ALGN AMZN LUV COP ORLY BIIB MS GD MTB HRL TEL ABNB ISRG TROW KO RSG NRG LIN .
Save the total market capitalization of firms in a new sheet and call it “Size” in the excel file. •
Calculate the sum of daily Volume for each firm per year, divide it by the total shares
outstanding, and save it in the sheet “Liquidity_annual”. This is a measure of how frequently a
stock is traded, and generally, it is perceived as a measure of its liquidity. • Using adjusted close
prices at the annual, monthly, and daily frequencies compute the annual, monthly, and daily
returns. Save them in new sheets labeled “Returns_annual”, “Returns_monthly”, and
“Returns_daily”. • Using Returtns_daily, calculate the standard deviation of each stock in each
year. Save these in a new sheet called “Risk_annual”.
3. Provide summary statistics for your portfolio holdings (in sheet “Firm_Summary_Stat”): • For
each firm, report its Minimum, Maximum, Mean, and volatility of returns, annualized. • For
each firm, report the market capitalization (label it size) at the end of your sample, • For each
firm, report the industry of each company with tickers STZ ADP JCI BKNG AMGN CPT JKHY ALGN
AMZN LUV COP ORLY BIIB MS GD MTB HRL TEL ABNB ISRG TROW KO RSG NRG LIN . • Compute
and report the market beta for each firm using the last 5 years (2018:2022) return data,
assuming the risk-free rate is 0 at the monthly frequency. • For each firm, report the market
Beta in Nov 2023 with tickers STZ ADP JCI BKNG AMGN CPT JKHY ALGN AMZN LUV COP ORLY
BIIB MS GD MTB HRL TEL ABNB ISRG TROW KO RSG NRG LIN • Compare the beta values that
you calculate with the Beta information in the sheet S&P 500 Constituents (Nov 2023 prices).
Report how different these values are in the same Excel sheet. Write code for all parts in a way
an amateur coder should write.
4. Portfolio Analysis Each fund has its own investment strategy and rebalances its portfolio
weights annually. The fund strategy is given in the sheet Student_Tickers in the
Company_Student_List.xlsx file. Below are the general definitions of these strategies. Strategy =
Size: Every January, invest more in firms that were larger in December last year. Strategy =
Liquidity: Every January, invest more in firms that had a larger liquidity last year. Strategy =
Return: Every January, invest more in firms that had a larger return last year. If they had
negative returns, do not invest in them this year. Strategy = Risk: Every January, invest more in
firms with a lower risk last year. Here, first, generate a new measure for the firms by dividing 1
over their last year's risk (as measured above), call it inverse_volatility. Then, invest more in
firms with a larger inverse_volatility value. Strategy = Equal: Every January, invest equally in all
firms. • Construct your portfolio by investing in each firm with respect to the fund’s strategy
from January 2003 to December 2022. Save the monthly returns of your portfolio in the sheet
“PortfolioReturn_monthly”. For this task, you need to o Find the portfolio weights for each year
based on firms’ information in the previous year. For example, for the Size strategy, the portfolio
weight for firm j for the Year 2010 ([Equation]is calculated from the equation below:
𝑤?
,2010=
??𝑧??
,2009∑
???𝑧??
,2009 This means you need to find the sum of the market capitalization of all
firms per year (the denominator). Then, calculate the above ratio, which shows the relative size
of firm j with respect to the other firms. For the Liquidity strategy, substitute size with Volume
per total share outstanding (Liquidity measure that you previously calculated) in the above
equation. Do similarly, for Return and Risk strategies. For the Equal strategy, first, find how many
of the firms had return data in the past year. Then invest equally in them. If there is no data for
a firm in that year, then adjust the weight accordingly for all firms. o Using this weight (which is
calculated from the previous year’s data) and monthly firms’ returns ([Equation] calculate the
fund return ([Equation] from January to December of this year
𝑅??𝑛?
,
?
=∑
?𝑤?∗𝑅?
,
?
o Repeat
the above process the next January. • Report the summary statistics of your portfolio and S&P
500 index return in sheet “Fund_summary”: o Report the average, standard deviation,
minimum, and maximum of these portfolio returns in annual percentage rates, o Calculate and
report their Alpha, Beta, R2, with respect to S&P 500 index, using the whole length of data (i.e.
since 2003) o Calculate and report their Sharpe ratio, Treynor ratio., • Report industry
composition in sheet “Funds_Holdings_Composition” o In Excel, report at the end of the
sample, how much you’ve invested in each firm, in percentage. o In the same sheet, plot a pie
chart which shows, at the end of the sample, how much you’ve invested in each industry, in
percentage. • Plot the fund’s performance o Plot the histogram for your funds return as well as
the S&P 500 index returns with 20 bins. o Plot the cumulative return of your portfolio and S&P
500 from January 2003 to December 2022. This is equivalent to calculating the value of your
fund if you start the fund with $1 in January 2003. For the S&P 500, find its monthly return
similar to the other stocks. o Plot the annual return of your fund (i.e. the sum of monthly
returns per year) and the S&P 500 using bar plots, on the same graph. Write code for all parts in
a way an amateur coder should write.
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 Documents
Related Questions
please help me analyze and asnwer the questions with formula so that i can learn and get ready for my exam :<
arrow_forward
1. Stock WatcherMark Martin has created a basic stock watcher worksheet that he uses to report on gains or losses from when he purchased the stock and the last recorded date and price. Mark has given you a snapshot of his spreadsheet (see Figure T2.20) that you can use to re-create this spreadsheet for yourself. Here are some basic steps to follow:1. Create a new workbook.2 . Enter all the information provided in Figure T2.20 .
3. Apply the Currency format to the respective columns.4. The date should be entered as a function. Hint: Use the NOW function.5. Enter a formula for the Gain/Loss (%) column. Hint: You should subtract the Last columnfrom the Purchase column, and then divide by the Purchase column.6 . Format for percent in the Gain/Loss (%) column.
arrow_forward
You are given the following set of data:
HISTORICAL RATES OF RETURN
Year
NYSE
Stock X
1
- 26.5%
- 22.0%
2
37.2
15.0
3
23.8
10.0
4
- 7.2
4.0
5
6.6
11.8
6 9
20.5
30.6
18.9
17.6
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.
X
Open spreadsheet
a. Use a spreadsheet (or a calculator with a linear regression function) to determine Stock X's beta
coefficient. Do not round intermediate calculations. Round your answer to two decimal places.
Beta =
b. Determine the arithmetic average rates of return for Stock X and the NYSE over the period given.
Calculate the standard deviations of returns for both Stock X and the NYSE. Do not round intermediate
calculations. Round your answers to two decimal places.
NYSE
Stock X
Average return,π Avg
%
%
Standard deviation, σ
%
%
c. Assume that the situation during Years 1 to 7 is expected to prevail in the future (i.e.,
x = TX, Average
↑ M
= TM,…
arrow_forward
help please answer in text form with proper workings and explanation for each and every part and steps with concept and introduction no AI no copy paste remember answer must be in proper format with all working
arrow_forward
Daily Stock Return Analysis
a. Data Download and Preparation (2p)
Download historical stock data for Tesla (TSLA), Amazon (AMZN), Apple (AAPL), Netflix (NFLX), and IBM from Yahoo Finance for the past 5 years, covering the period from September 1, 2019, to September 1, 2024.
Import the data into a spreadsheet and ensure the dataset includes the daily adjusted closing prices for each stock.
arrow_forward
Daily Stock Return Analysis
a. Data Download and Preparation (2p)
Download historical stock data for Tesla (TSLA), Amazon (AMZN), Apple (AAPL), Netflix (NFLX), and IBM from Yahoo Finance for the past 5 years, covering the period from September 1, 2019, to September 1, 2024.
Import the data into a spreadsheet and ensure the dataset includes the daily adjusted closing prices for each stock.
b. Daily Returns Calculation (3p)
Compute the daily returns for each stock using the formula:
Daily Return = (Current Price /Prior Period Price) – 1
Express the daily returns as percentages.
c. Descriptive Statistics (10p)
For each stock, calculate fallowing statistics for daily returns:
Mean Daily Return: The average daily return.
Standard Deviation of Daily Returns: A measure of the volatility of daily returns.
d. Histograms (5p)
Create histograms for the daily returns of each stock to visualize their distribution. Ensure that each histogram has appropriate titles and…
arrow_forward
Need help with the earnings per share of common stock.
arrow_forward
How many shares of stock have been sold? How many shares are outstanding? Why are they different?
arrow_forward
This scenario is shown to the right
of your screen.
What is Amazon's PE ratio? (Enter
answer with one decimal place.)
Materials on the right have been updated
Scenario 2.1
Stock price
Shares outstanding
$57.00
11,656,000
$664,392,000
Excess Cash
$106, 560,000
Market cap
EPS
$1.78
»
Enter a response then click Submit below
0
Submit
arrow_forward
How will the issuance of stock dividends affect total equity?
arrow_forward
Using Microsoft Office / Excel 365 STOCKHISTORY and FORECASTING functions available, prepare a line
graph of the weekly share price history (from 1/7/2022 to 31/3/2024) for any two (2) listed companies that
you have been allocated (separate graphs). Forecast the share price for the next 6 months (i.e
., 30/9/2024). Please note, graphs should also include a trendline and formula. Predicted weekly share
price figures should be shown using the FORECAST SHEET function or FORECAST formula function
available.
arrow_forward
Read carefully the following scenarios and answer the questions asked in each scenario after analysis:
1. The following quote on Yahoo! stock appeared on April 11, 2016, on Yahoo! Finance(please see attached picture):
If you wanted to buy Yahoo!, what price would you pay per share? How much would you receive per share if you wanted to sell Yahoo!?
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
help please answer in text form with proper workings and explanation for each and every part and steps with concept and introduction no AI no copy paste remember answer must be in proper format with all working
arrow_forward
Answer in step by step with explanation.
Don't use Ai and chatgpt.
arrow_forward
Solve Using with Accounting Method
arrow_forward
I need this question answer general Accounting
arrow_forward
help please answer in text form with proper workings and explanation for each and every part and steps with concept and introduction no AI no copy paste remember answer must be in proper format with all working
arrow_forward
Sketch the drawdown curve based on the monthly stock prices listed below:
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
The following table contains prices and dividends for a stock: All prices are after the dividend has been paid. If you bought the stock on January 1 and sold it on December 31, what is your realized return? Hint: Make sure to round all
intermediate calculations to at least five decimal places.
Your realized return is
%. (Round to two decimal places.)
Data table
(Click on the following icon in order to copy its contents into a spreadsheet.)
Price
Dividend
Jan 1
$9.76
Mar 31
$10.76
$0.15
Jun 30
$10.26
$0.15
Sep 30
$10.86
$0.15
Dec 31
$10.76
$0.15
arrow_forward
Manshukh
Don't upload image please
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you

Fundamentals Of Financial Management, Concise Edi...
Finance
ISBN:9781337902571
Author:Eugene F. Brigham, Joel F. Houston
Publisher:Cengage Learning

Fundamentals of Financial Management, Concise Edi...
Finance
ISBN:9781285065137
Author:Eugene F. Brigham, Joel F. Houston
Publisher:Cengage Learning

Excel Applications for Accounting Principles
Accounting
ISBN:9781111581565
Author:Gaylord N. Smith
Publisher:Cengage Learning

EBK CONTEMPORARY FINANCIAL MANAGEMENT
Finance
ISBN:9781337514835
Author:MOYER
Publisher:CENGAGE LEARNING - CONSIGNMENT
Related Questions
- please help me analyze and asnwer the questions with formula so that i can learn and get ready for my exam :<arrow_forward1. Stock WatcherMark Martin has created a basic stock watcher worksheet that he uses to report on gains or losses from when he purchased the stock and the last recorded date and price. Mark has given you a snapshot of his spreadsheet (see Figure T2.20) that you can use to re-create this spreadsheet for yourself. Here are some basic steps to follow:1. Create a new workbook.2 . Enter all the information provided in Figure T2.20 . 3. Apply the Currency format to the respective columns.4. The date should be entered as a function. Hint: Use the NOW function.5. Enter a formula for the Gain/Loss (%) column. Hint: You should subtract the Last columnfrom the Purchase column, and then divide by the Purchase column.6 . Format for percent in the Gain/Loss (%) column.arrow_forwardYou are given the following set of data: HISTORICAL RATES OF RETURN Year NYSE Stock X 1 - 26.5% - 22.0% 2 37.2 15.0 3 23.8 10.0 4 - 7.2 4.0 5 6.6 11.8 6 9 20.5 30.6 18.9 17.6 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. X Open spreadsheet a. Use a spreadsheet (or a calculator with a linear regression function) to determine Stock X's beta coefficient. Do not round intermediate calculations. Round your answer to two decimal places. Beta = b. Determine the arithmetic average rates of return for Stock X and the NYSE over the period given. Calculate the standard deviations of returns for both Stock X and the NYSE. Do not round intermediate calculations. Round your answers to two decimal places. NYSE Stock X Average return,π Avg % % Standard deviation, σ % % c. Assume that the situation during Years 1 to 7 is expected to prevail in the future (i.e., x = TX, Average ↑ M = TM,…arrow_forward
- help please answer in text form with proper workings and explanation for each and every part and steps with concept and introduction no AI no copy paste remember answer must be in proper format with all workingarrow_forwardDaily Stock Return Analysis a. Data Download and Preparation (2p) Download historical stock data for Tesla (TSLA), Amazon (AMZN), Apple (AAPL), Netflix (NFLX), and IBM from Yahoo Finance for the past 5 years, covering the period from September 1, 2019, to September 1, 2024. Import the data into a spreadsheet and ensure the dataset includes the daily adjusted closing prices for each stock.arrow_forwardDaily Stock Return Analysis a. Data Download and Preparation (2p) Download historical stock data for Tesla (TSLA), Amazon (AMZN), Apple (AAPL), Netflix (NFLX), and IBM from Yahoo Finance for the past 5 years, covering the period from September 1, 2019, to September 1, 2024. Import the data into a spreadsheet and ensure the dataset includes the daily adjusted closing prices for each stock. b. Daily Returns Calculation (3p) Compute the daily returns for each stock using the formula: Daily Return = (Current Price /Prior Period Price) – 1 Express the daily returns as percentages. c. Descriptive Statistics (10p) For each stock, calculate fallowing statistics for daily returns: Mean Daily Return: The average daily return. Standard Deviation of Daily Returns: A measure of the volatility of daily returns. d. Histograms (5p) Create histograms for the daily returns of each stock to visualize their distribution. Ensure that each histogram has appropriate titles and…arrow_forward
- Need help with the earnings per share of common stock.arrow_forwardHow many shares of stock have been sold? How many shares are outstanding? Why are they different?arrow_forwardThis scenario is shown to the right of your screen. What is Amazon's PE ratio? (Enter answer with one decimal place.) Materials on the right have been updated Scenario 2.1 Stock price Shares outstanding $57.00 11,656,000 $664,392,000 Excess Cash $106, 560,000 Market cap EPS $1.78 » Enter a response then click Submit below 0 Submitarrow_forward
- How will the issuance of stock dividends affect total equity?arrow_forwardUsing Microsoft Office / Excel 365 STOCKHISTORY and FORECASTING functions available, prepare a line graph of the weekly share price history (from 1/7/2022 to 31/3/2024) for any two (2) listed companies that you have been allocated (separate graphs). Forecast the share price for the next 6 months (i.e ., 30/9/2024). Please note, graphs should also include a trendline and formula. Predicted weekly share price figures should be shown using the FORECAST SHEET function or FORECAST formula function available.arrow_forwardRead carefully the following scenarios and answer the questions asked in each scenario after analysis: 1. The following quote on Yahoo! stock appeared on April 11, 2016, on Yahoo! Finance(please see attached picture): If you wanted to buy Yahoo!, what price would you pay per share? How much would you receive per share if you wanted to sell Yahoo!?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Fundamentals Of Financial Management, Concise Edi...FinanceISBN:9781337902571Author:Eugene F. Brigham, Joel F. HoustonPublisher:Cengage LearningFundamentals of Financial Management, Concise Edi...FinanceISBN:9781285065137Author:Eugene F. Brigham, Joel F. HoustonPublisher:Cengage Learning
- Excel Applications for Accounting PrinciplesAccountingISBN:9781111581565Author:Gaylord N. SmithPublisher:Cengage LearningEBK CONTEMPORARY FINANCIAL MANAGEMENTFinanceISBN:9781337514835Author:MOYERPublisher:CENGAGE LEARNING - CONSIGNMENT

Fundamentals Of Financial Management, Concise Edi...
Finance
ISBN:9781337902571
Author:Eugene F. Brigham, Joel F. Houston
Publisher:Cengage Learning

Fundamentals of Financial Management, Concise Edi...
Finance
ISBN:9781285065137
Author:Eugene F. Brigham, Joel F. Houston
Publisher:Cengage Learning

Excel Applications for Accounting Principles
Accounting
ISBN:9781111581565
Author:Gaylord N. Smith
Publisher:Cengage Learning

EBK CONTEMPORARY FINANCIAL MANAGEMENT
Finance
ISBN:9781337514835
Author:MOYER
Publisher:CENGAGE LEARNING - CONSIGNMENT