In: Finance
Part 1 : Analyzing "stock market condition". (Note: Collect S&P500 index prices using Yahoo! Finance.)
1) Download S&P500 daily index prices from Dec 31, 2019 to Apr 30, 2020.
2) Calculate daily S&P500 index returns and daily cumulative returns over the sample period.
3) Plot the cumulative returns and analyze the plot.
We use the "Adj. Close" column because it is the price adjusted for corporate actions such as stock dividends and splits.
Daily return for each day = (current day price - previous day price) / previous day price
The calculations are as below :
The plot is below :
It can be seen from the plot that the cumulative returns dropped sharply starting in mid-February, and continued falling until late March. After this, the cumulative returns have steadily increased, and returned to nearly zero by the end of April. This is in line with the overall performance of equity markets, which have seen a sharp fall, and a rapid recovery during these periods due to the COVID scenario.