This Python project aims to calculate and compare the average annual return of three famous American market indices: Dow Jones, S&P 500, and the Nasdaq. The data used in this project covers the period from 1st of January 2000 until today.
- Python 3.x
- NumPy
- Pandas
- Pandas DataReader
- Matplotlib
To install the required libraries, use the following commands:
pip install numpy
pip install pandas
pip install pandas-datareader
pip install matplotlib
- Clone the repository to your local machine.
- Open the Jupyter notebook or your Python IDE.
- Run the code to calculate the simple returns and the average annual return of each index.
After normalizing the data to 100 and plotting the results on a graph, we can see the behavior of each index over time. The simple returns of the indices are also calculated and analyzed to estimate the average annual return of each index. According to the results, the Dow Jones index has the highest average annual return, followed by the S&P 500 and the Nasdaq.