Import daily historical prices (Open,Low,High,Close,Volume,Adj Close) of Commonwealth Bank of Australia (CBA.AX) in the past 5 years,
Fantastic news! We've Found the answer you've been seeking!
Question:
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.
b. Return the last 8 rows of the DataFrame.
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))".
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.
Related Book For
Posted Date: