Difference between revisions of "Manipulating Financial Data in Python"
Jump to navigation
Jump to search
Line 25: | Line 25: | ||
==Module 3: Numpy Fundamentals== | ==Module 3: Numpy Fundamentals== | ||
*Creating Arrays | *Creating Arrays | ||
− | *Basic Indexing and Slicing | + | **empty, zeros, ones |
+ | *Basic Indexing and Slicing (start at 0 not 1) | ||
+ | *[quiz: print 2nd & 3rd columns] | ||
+ | *Index one array by another | ||
+ | *Reshaping | ||
*Data Processing using Arrays | *Data Processing using Arrays | ||
+ | **Sum rows, Sum columns | ||
+ | **Statistics on columns: Mean, Median, stddev | ||
+ | *See: http://wiki.quantsoftware.org/index.php?title=Numpy_Tutorial_1 | ||
==Module 2: Pandas DS- Series== | ==Module 2: Pandas DS- Series== |
Revision as of 11:51, 3 March 2015
Contents
- 1 Module 1: Reading, Slicing and Plotting Stock Data
- 2 Module 2: Building and plotting a dataframe with lots of stocks
- 3 Module 3: Numpy Fundamentals
- 4 Module 2: Pandas DS- Series
- 5 Module 3: Pandas DS- Data Frame
- 6 Module 4: Data Analysis- Reading/Writing Data
- 7 Module 5
- 8 Module 6: Date And Time
- 9 Module 7: Graphs Part I
- 10 Module 8: Graphs Part II
Module 1: Reading, Slicing and Plotting Stock Data
- Overview of data we'll be working with: AAPL.csv, SPY.csv (note date order)
- Meaning of various columns
- The Pandas dataframe
- Read CSV into a dataframe (AAPL example)
- Slice according to dates
- [quiz: read SPY.csv and slice against different dates]
- Plot (note date order wrong)
- Sort
- Plot
Module 2: Building and plotting a dataframe with lots of stocks
- Overview of what we want to end up with: Rows: Dates, Columns: Symbols
- Step by step how to build it
- SPY.csv will be our reference -- it trades every day the market is open.
- Read SPY.csv, slice to date range, sort
- Read AAPL.csv, merge() into existing dataframe
- Repeat with GLD, IBM, GOOG
- Plot and display legend
- Observe: Scale not good, let's normalize
- Print some of the numbers
- Plot after normalization
- [quiz: normalize at a different date]
Module 3: Numpy Fundamentals
- Creating Arrays
- empty, zeros, ones
- Basic Indexing and Slicing (start at 0 not 1)
- [quiz: print 2nd & 3rd columns]
- Index one array by another
- Reshaping
- Data Processing using Arrays
- Sum rows, Sum columns
- Statistics on columns: Mean, Median, stddev
- See: http://wiki.quantsoftware.org/index.php?title=Numpy_Tutorial_1
Module 2: Pandas DS- Series
- Working with index
- Operations
- Filtering
- Handling Incomplete Data
Module 3: Pandas DS- Data Frame
- Creating Data frame
- Operations
- Columns and rows
- Essential Function
- Reindexing
- Indexing and Filtering
Module 4: Data Analysis- Reading/Writing Data
- Importing Data using Pandas
- Importing data without pandas
- Saving and exporting data using pandas
- Saving and exporting data without pandas
Module 5
- Pre-processing Data
- Statistical Functions for Analysis
Module 6: Date And Time
- Creating Date and Time
- Date Mathematics
- Time Series Plotting