Skip to content

ntrang086/analyze_financial_data

Repository files navigation

Explore and analyze stock data using Python

There are nine parts:

1 Reading, slicing and plotting stock data

2 Working with many stocks at once

3 Using Numpy

4 Statistical analysis of time series

5 Incomplete data

6 Histograms and scatter plots

7 Sharpe ratio & other portfolio statistics

8 Optimizers: Building a parameterized model

9 Projects:

a) Portfolio analysis: Assess a portfolio by computing statistics such as cumulative return, average period return, standard deviation, Sharpe ratio and end value of portfolio

b) Optimizing a portfolio: Find an optimal allocation of stocks in a portfolio and compute its statistics

Setup

You need Python 2.7+, and the following packages: pandas, numpy, scipy and matplotlib.

Data

Data files can be downloaded from this link or from Yahoo Finance

Place the data into a directory named 'data' and it should be one level above this repository.

Run

To run any script file, use:

python <script.py>

Source: Part 1 of Machine Learning for Trading by Georgia Tech