Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task 1 (2 marks) . Import daily historical prices (Open,Low,High,Close,Volume,Adj Close) of Commonwealth Bank of Australia (CBA.AX) in the past 5 years, store it in

Task 1 (2 marks) . Import daily historical prices (Open,Low,High,Close,Volume,Adj Close) of Commonwealth Bank of Australia (CBA.AX) in the past 5 years, store it in a DataFrame and complete the following tasks:

a. Return the first 10 rows of the DataFrame. (0.5 mark)

b. Return the last 8 rows of the DataFrame. (0.5 mark)

c. Compute daily returns (using Adj Close) during the period. Store the data in a new variable and plot the returns with the following styles "(kind = 'line',title= 'CBA daily stock returns ', ylabel='Return', figsize = (12,8))". (0.5 mark)

d. Calculate the total return that investors would earn if they invested in CBA 5 years ago (according to the latest date in your dataframe). Round up to 2 decimal places and display the output. (0.5 mark)

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

Recommended Textbook for

Personal Finance

Authors: Jeff Madura

5th edition

132994348, 978-0132994347

More Books

Students also viewed these Finance questions