Skip to content

Financial indicators in python. (stocks, crypto, index)

Notifications You must be signed in to change notification settings

CarlosGatti/python-finance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Financial indicators in python. (stocks, crypto, index)

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages