Mastering Python for Finance
This module wraps into standalone functions the contents of James Ma Weiming's "Mastering Python for Finance", published by Packt.
Chapters
- Overview of Financial Analysis with Python
- Introduction to Quandl
- Plotting a time series chart
- Performing financial analysis on time series data
- Importance of Linearity in Finance
- The Captial Asset Pricing Model and the security market line
- The Arbitrage Pricing Theory Model
- Multivariate linear regression of factors
- Linear optimization
- Solving linear equations using matrices
- The LU decomposition
- The Cholesky decomposition
- The QR decomposition
- Solving with other matrix algebra methods
- Nonlinearity in Finance
- Nonlinearity modeling
- Root-finding algorithms
- SciPy implementations in root-finding
- Numerical Methods for Pricing Options
- Binomial trees in option pricing
- Pricing European and American options
- The Greeks for free
- Trinomial trees in option pricing
- Lattices in option pricing
- Finite differences in option pricing
Dependencies
Usage
Overview of chapters is given above. To run all code for a particular chapter, e.g. chapter 1, simply run
python chap1.py
To specify a particular method(s), then enter the name of the method after the
filename, e.g. to run the methods plot_time_series
and correlation
inside
chap1.py
, do
python chap1.py plot_time_series correlation