Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 1.1 KB

File metadata and controls

28 lines (22 loc) · 1.1 KB

Project Title: Calculating the Return of Indices

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.

Prerequisites

  • Python 3.x
  • NumPy
  • Pandas
  • Pandas DataReader
  • Matplotlib

Installation

To install the required libraries, use the following commands:

pip install numpy
pip install pandas
pip install pandas-datareader
pip install matplotlib

Usage

  1. Clone the repository to your local machine.
  2. Open the Jupyter notebook or your Python IDE.
  3. Run the code to calculate the simple returns and the average annual return of each index.

Results

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.