Mastering Python for Finance

Understand, design, and implement state-of-the-art mathematical and statistical applications used in finance with Python

Mastering Python for Finance

James Ma Weiming

1 customer reviews
Understand, design, and implement state-of-the-art mathematical and statistical applications used in finance with Python
Mapt Subscription
FREE
$29.99/m after trial
eBook
$28.00
RRP $39.99
Print + eBook
$49.99
RRP $49.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$28.00
$49.99
$29.99p/m after trial
RRP $39.99
RRP $49.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781784394516
Paperback340 pages

Book Description

Built initially for scientific computing, Python quickly found its place in finance. Its flexibility and robustness can be easily incorporated into applications for mathematical studies, research, and software development.

With this book, you will learn about all the tools you need to successfully perform research studies and modeling, improve your trading strategies, and effectively manage risks. You will explore the various tools and techniques used in solving complex problems commonly faced in finance.

You will learn how to price financial instruments such as stocks, options, interest rate derivatives, and futures using computational methods. Also, you will learn how you can perform data analytics on market indexes and use NoSQL to store tick data.

Table of Contents

Chapter 1: Python for Financial Applications
Is Python for me?
Objected-oriented versus functional programming
Which Python version should I use?
Introducing IPython
Summary
Chapter 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
Summary
Chapter 3: Nonlinearity in Finance
Nonlinearity modeling
Examples of nonlinear models
An introduction to root-finding
Incremental search
The bisection method
Newton's method
The secant method
Combining root-finding methods
SciPy implementations
Summary
Chapter 4: Numerical Procedures
Introduction to options
Binomial trees in options pricing
The Greeks for free
Trinomial trees in options pricing
Lattices in options pricing
Finite differences in options pricing
Putting it all together – implied volatility modeling
Summary
Chapter 5: 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
Summary
Chapter 6: Interactive Financial Analytics with Python and VSTOXX
Volatility derivatives
Gathering the EUROX STOXX 50 Index and VSTOXX data
Merging the data
Financial analytics of SX5E and V2TX
Correlation between SX5E and V2TX
Calculating the VSTOXX sub-indices
Calculating the VSTOXX main index
Summary
Chapter 7: Big Data with Python
Introducing big data
Hadoop for big data
Is big data for me?
Getting Apache Hadoop
A word count program in Hadoop
Going deeper – Hadoop for finance
Introducing NoSQL
Summary
Chapter 8: Algorithmic Trading
Introduction to algorithmic trading
List of trading platforms with public API
Which is the best programming language to use?
System functionalities
Algorithmic trading with Interactive Brokers and IbPy
Building a mean-reverting algorithmic trading system
Forex trading with OANDA API
Building a trend-following forex trading platform
VaR for risk management
Summary
Chapter 9: Backtesting
An introduction to backtesting
Designing and implementing a backtesting system
Ten considerations for a backtesting model
Discussion of algorithms in backtesting
Summary
Chapter 10: Excel with Python
Overview of COM
Excel for finance
Building a COM server
Building the COM client in Excel
What else can I do with COM?
Summary

What You Will Learn

  • Perform interactive computing with IPython Notebook
  • Solve linear equations of financial models and perform ordinary least squares regression
  • Explore nonlinear modeling and solutions for optimum points using root-finding algorithms and solvers
  • Discover different types of numerical procedures used in pricing options
  • Model fixed-income instruments with bonds and interest rates
  • Manage big data with NoSQL and perform analytics with Hadoop
  • Build a high-frequency algorithmic trading platform with Python
  • Create an event-driven backtesting tool and measure your strategies

Authors

Table of Contents

Chapter 1: Python for Financial Applications
Is Python for me?
Objected-oriented versus functional programming
Which Python version should I use?
Introducing IPython
Summary
Chapter 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
Summary
Chapter 3: Nonlinearity in Finance
Nonlinearity modeling
Examples of nonlinear models
An introduction to root-finding
Incremental search
The bisection method
Newton's method
The secant method
Combining root-finding methods
SciPy implementations
Summary
Chapter 4: Numerical Procedures
Introduction to options
Binomial trees in options pricing
The Greeks for free
Trinomial trees in options pricing
Lattices in options pricing
Finite differences in options pricing
Putting it all together – implied volatility modeling
Summary
Chapter 5: 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
Summary
Chapter 6: Interactive Financial Analytics with Python and VSTOXX
Volatility derivatives
Gathering the EUROX STOXX 50 Index and VSTOXX data
Merging the data
Financial analytics of SX5E and V2TX
Correlation between SX5E and V2TX
Calculating the VSTOXX sub-indices
Calculating the VSTOXX main index
Summary
Chapter 7: Big Data with Python
Introducing big data
Hadoop for big data
Is big data for me?
Getting Apache Hadoop
A word count program in Hadoop
Going deeper – Hadoop for finance
Introducing NoSQL
Summary
Chapter 8: Algorithmic Trading
Introduction to algorithmic trading
List of trading platforms with public API
Which is the best programming language to use?
System functionalities
Algorithmic trading with Interactive Brokers and IbPy
Building a mean-reverting algorithmic trading system
Forex trading with OANDA API
Building a trend-following forex trading platform
VaR for risk management
Summary
Chapter 9: Backtesting
An introduction to backtesting
Designing and implementing a backtesting system
Ten considerations for a backtesting model
Discussion of algorithms in backtesting
Summary
Chapter 10: Excel with Python
Overview of COM
Excel for finance
Building a COM server
Building the COM client in Excel
What else can I do with COM?
Summary

Book Details

ISBN 139781784394516
Paperback340 pages
Read More
From 1 reviews

Read More Reviews