Skip to content

jamesmawm/mastering-python-for-finance-second-edition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mastering Python for Finance - Second Edition

This is the code repository for Mastering Python for Finance - Second Edition, published by Packt.

This book is also available for purchase on Amazon.

Implement advanced state-of-the-art financial statistical applications using Python

Update on Oct 13, 2020

There have been reports that certain market indices are no longer available for download from Alpha Vantage.

It is not known when Alpha Vantage will resume its services.

In the interim, equity symbols can be used in place, examples are MSFT, GOOG, IBM, and AAPL. As a result, the output values may vary from the book.

A permanent solution would be to purchase accurate data from a data provider.

What is this book about?

The second edition of Mastering Python for Finance will guide you through carrying out complex financial calculations practiced in the industry of finance by using next-generation methodologies. You will master the Python ecosystem by leveraging publicly available tools to successfully perform research studies and modeling, and learn to manage risks with the help of advanced examples.

This book covers the following exciting features:

  • Solve linear and nonlinear models representing various financial problems
  • Perform principal component analysis on the DOW index and its components
  • Analyze, predict, and forecast stationary and non-stationary time series processes
  • Create an event-driven backtesting tool and measure your strategies
  • Build a high-frequency algorithmic trading platform with Python

Software and Hardware List

Chapter Software required OS required
1-10 Python 3.7 Windows, Mac OS X, and Linux (Any)
11 Python 3.6 Windows, Mac OS X, and Linux (Any)

Related links

Book info

  • 426 pages
  • Available on Paperback and Kindle
  • ISBN-10: 1789346460
  • ISBN-13: 978-1789346466

Table of Contents

  1. Overview of Financial Analysis with Python

    • Getting Python
    • Introduction to Quandl
    • Plotting a time series chart
    • Performing financial analytics on time series data
  2. The Importance of Linearity in Finance

    • The Capital Asset Pricing Model and the security market line
    • The Arbitrage Pricing Theory model
    • Multivariate linear regression of factor models
    • Linear optimization
    • Solving linear equations using matrices
    • The LU decomposition
    • The Cholesky decomposition
    • The QR decomposition
    • Solving with other matrix algebra methods
  3. Nonlinearity in Finance

    • Nonlinearity modeling
    • Root-finding algorithms
    • SciPy implementations in root-finding
  4. Numerical Methods for Pricing Options

    • Introduction to options
    • Binomial trees in option pricing
    • Pricing European options
    • Writing the StockOption base class
    • The Greeks for free
    • Trinomial trees in option pricing
    • Lattices in option pricing
    • Finite differences in option pricing
    • Putting it all together – implied volatility modeling
  5. Modeling Interest Rates and Derivatives

    • Fixed-income securities
    • Yield curves
    • Valuing a zero-coupon bond
    • Bootstrapping a yield curve
    • Forward rates
    • Calculating the yield to maturity
    • Calculating the price of a bond
    • Bond duration
    • Bond convexity
    • Short–rate modeling
    • Bond options
    • Pricing a callable bond option
  6. Statistical Analysis of Time Series Data

    • The Dow Jones industrial average and its 30 components
    • Applying a kernel PCA
    • Stationary and non-stationary time series
    • The Augmented Dickey-Fuller Test
    • Analyzing a time series with trends
    • Making a time series stationary
    • Forecasting and predicting a time series
  7. Interactive Financial Analytics with the VIX

    • Volatility derivatives
    • Financial analytics of the S&P 500 and the VIX
    • Calculating the VIX Index
  8. Building an Algorithmic Trading Platform

    • Introducing algorithmic trading
    • Building an algorithmic trading platform
    • Building a mean-reverting algorithmic trading system
    • Building a trend-following trading platform
    • VaR for risk management
  9. Implementing a Backtesting System

    • Introducing backtesting
    • Designing and implementing a backtesting system
    • Ten considerations for a backtesting model
    • Discussion of algorithms in backtesting
  10. Machine Learning for Finance

    • Introduction to machine learning
    • Predicting prices with a single-asset regression model
    • Predicting returns with a cross-asset momentum model
    • Predicting trends with classification-based machine learning
    • Conclusion on the use of machine learning algorithms
  11. Deep Learning for Finance

    • A brief introduction to deep learning
    • A deep learning price prediction model with TensorFlow
    • Credit card payment default prediction with Keras

About

Sources codes for: Mastering Python for Finance, Second Edition

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published