Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Instructions 1. Type your data assignment in MS word and then convert it into a pdf for uploading on to Canvas. Use your last name

image text in transcribedimage text in transcribed

image text in transcribed

Instructions 1. Type your data assignment in MS word and then convert it into a pdf for uploading on to Canvas. Use your last name for naming the final submission pdf file. 2. In your pdf file you should only include: R code Relevant output. Simple rule to follow-do not include graphs, tables that you don't want to talk about directly in your answer. Read each question carefully and decide what output will be relevant to support your analysis. I will penalize for including needless details in your assignment. This is a skill that you must learn if you want to survive in this industry-no employer will tolerate waste of space and time. I will not answer any questions on R that are already covered in the video tutorials. Part of the grade is based on how you handle R programming. Answer in as much details as possible. Interpretation of findings and thoughtful comments on estimation results will be rewarded in my grading. This is an individual assignment so do not work in groups. Primary aim of this assignment is to teach you how to carry out an independent data analysis. If I see too much similarity between two assignments that will count as violation of the honor code and suitable action will be taken against both parties involved. I will be using the Turnitin app on Canvas for checking for plagiarism. Assignment From Canvas download the cav file called data_assignment1.csv. This file contains monthly data from Dec-2014 through Jan-2020 on the following two variables: 1. BAC: stock price for Bank of America 2. AMZN: stock price for Amazon 3. JAN: a binary variable that takes a value of 1 if the month is January and otherwise. Answer the following questions using R. a. Plot BAC stock price over time. In a separate graph plot AMZN over time. b. In financial markets there is an empirical phenomenon called January effect where every year in January there is an increase in stock prices. Compute average stock price for both Amazon and Bank of America separately for January and non-January months. Do you find evidence of January effect? Explain. c. Using the variable called JAN, now create 4 new variables: BAC_jan, BAC_nonjan, AMZN_jan, AMZN_nonjan. c.l. Test whether mean stock price of January is greater than mean stock price of non-January months. Do this for both BAC and AMZN. Note that you will be comparing mean of BAC jan with BAC nonjan and mean of AMZN_jan with AMZN_nonjan. c.2. Test whether variance of stock price crime in January is greater than the variance of stock price in non-January months. d. Compute the average monthly return and standard deviation for BAC and Amazon. Stock return is defined as follows: Return = [In(P) - In(P-1)] x 100 where P denotes stock price at time t and P-1 is the stock price for period t- 1. You can compute return for each stock price in your data by first taking the natural logs of stock price (use log command in R) and then taking a difference of the logged stock price (use diff command in R). Finally multiply this difference by 100 to get % return. Which stock has a higher return? Which stock is more risky? Explain. e. Create a scatter plot with return on amazon on x-axis and return on Bank of America on y-axis. What kind of relationship you detect for these two variable? A B jan bacamz 16.4 310.35 13.93 354.53 14.54 380.16 14.15 372.1 14.69 421.78 15.22 429.23 15.7 434.09 16.54 536.15 15.21 512.89 14.41 511.89 15.57 625.9 16.17 664.8 15.62 675.89 13.16 587 11.65 552.52 12.58 593.64 13.6 659.59 13.82722.79 12.4 715.62 13.58 758.81 15.13 769.16 14.74 837.31 15.54 789.82 19.89 750.57 21.82 768.66 21.4 823.48 23.33 845.04 22.3 886.54 22.13 924.99 21.25 994.62 23.08 968 22.94987.78 22.72 980.6 24.23 961.35 26.19 1105.3 26.93 1176.8 28.34 1169.5 30.72 1450.9 30.82 1512.5 28.791447.3 28.83 1566.1 27.99 1629.6 27.28 1699.8 29.88 1777.4 29.93 2012.7 28.51 2003 26.74 1598 27.61 1690.2 23.96 1502 27.84 1718.7 28.43 1639.8 27.11 1780.8 30.05 1926.5 26.14 1775.1 28.5 1893.6 30.31 1866.8 27.18 1776.3 28.82 1735.9 31.1 1776.7 33.14 1800.8 35.03 1847.8 32.83 2008.7 Instructions 1. Type your data assignment in MS word and then convert it into a pdf for uploading on to Canvas. Use your last name for naming the final submission pdf file. 2. In your pdf file you should only include: R code Relevant output. Simple rule to follow-do not include graphs, tables that you don't want to talk about directly in your answer. Read each question carefully and decide what output will be relevant to support your analysis. I will penalize for including needless details in your assignment. This is a skill that you must learn if you want to survive in this industry-no employer will tolerate waste of space and time. I will not answer any questions on R that are already covered in the video tutorials. Part of the grade is based on how you handle R programming. Answer in as much details as possible. Interpretation of findings and thoughtful comments on estimation results will be rewarded in my grading. This is an individual assignment so do not work in groups. Primary aim of this assignment is to teach you how to carry out an independent data analysis. If I see too much similarity between two assignments that will count as violation of the honor code and suitable action will be taken against both parties involved. I will be using the Turnitin app on Canvas for checking for plagiarism. Assignment From Canvas download the cav file called data_assignment1.csv. This file contains monthly data from Dec-2014 through Jan-2020 on the following two variables: 1. BAC: stock price for Bank of America 2. AMZN: stock price for Amazon 3. JAN: a binary variable that takes a value of 1 if the month is January and otherwise. Answer the following questions using R. a. Plot BAC stock price over time. In a separate graph plot AMZN over time. b. In financial markets there is an empirical phenomenon called January effect where every year in January there is an increase in stock prices. Compute average stock price for both Amazon and Bank of America separately for January and non-January months. Do you find evidence of January effect? Explain. c. Using the variable called JAN, now create 4 new variables: BAC_jan, BAC_nonjan, AMZN_jan, AMZN_nonjan. c.l. Test whether mean stock price of January is greater than mean stock price of non-January months. Do this for both BAC and AMZN. Note that you will be comparing mean of BAC jan with BAC nonjan and mean of AMZN_jan with AMZN_nonjan. c.2. Test whether variance of stock price crime in January is greater than the variance of stock price in non-January months. d. Compute the average monthly return and standard deviation for BAC and Amazon. Stock return is defined as follows: Return = [In(P) - In(P-1)] x 100 where P denotes stock price at time t and P-1 is the stock price for period t- 1. You can compute return for each stock price in your data by first taking the natural logs of stock price (use log command in R) and then taking a difference of the logged stock price (use diff command in R). Finally multiply this difference by 100 to get % return. Which stock has a higher return? Which stock is more risky? Explain. e. Create a scatter plot with return on amazon on x-axis and return on Bank of America on y-axis. What kind of relationship you detect for these two variable? A B jan bacamz 16.4 310.35 13.93 354.53 14.54 380.16 14.15 372.1 14.69 421.78 15.22 429.23 15.7 434.09 16.54 536.15 15.21 512.89 14.41 511.89 15.57 625.9 16.17 664.8 15.62 675.89 13.16 587 11.65 552.52 12.58 593.64 13.6 659.59 13.82722.79 12.4 715.62 13.58 758.81 15.13 769.16 14.74 837.31 15.54 789.82 19.89 750.57 21.82 768.66 21.4 823.48 23.33 845.04 22.3 886.54 22.13 924.99 21.25 994.62 23.08 968 22.94987.78 22.72 980.6 24.23 961.35 26.19 1105.3 26.93 1176.8 28.34 1169.5 30.72 1450.9 30.82 1512.5 28.791447.3 28.83 1566.1 27.99 1629.6 27.28 1699.8 29.88 1777.4 29.93 2012.7 28.51 2003 26.74 1598 27.61 1690.2 23.96 1502 27.84 1718.7 28.43 1639.8 27.11 1780.8 30.05 1926.5 26.14 1775.1 28.5 1893.6 30.31 1866.8 27.18 1776.3 28.82 1735.9 31.1 1776.7 33.14 1800.8 35.03 1847.8 32.83 2008.7

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions