Jun 03

Python for Finance-review

Python for Finance
375 pages
Author: Yuxing Yan
April 2014
Published by Packt Publishing Ltd.
Livery Place
35 Livery Place
Birmingham, B3 2PB, UK
ISBN: 978-1-78328-437-5

I received a copy of the e-book for review from the publisher.

Audience: This book is aimed at Finance professionals and/or students with an interest in options trading and portfolio composition and evaluation.

Python for Finance

It assumes no Python programming experience. The author primarily uses Windows as the platform of choice. The author primarily refers to Python 3.3, strangely there are no cautionary or explanatory notes on the differences and usage requirements between the Python 2.7 series and the 3.3 series. This may cause some serious confusion to people new to Python. While none of the code is platform specific, it is Python after all, using Windows makes the code examples and installation instructions somewhat easier to follow for Windows users and a large percentage of people in Financial institutions and students seem to be locked in to the Windows platform.

Summary:

  • Ch1 Introduction and Installation of Python
  • Ch2 Using Python as an Ordinary Calculator
  • Ch3 Using Python as a Financial Calculator
  • Ch4 13 Lines of Python to Price a Call Option
  • Ch5 Introduction to Modules
  • Ch6 Introduction to Numpy Scipy
  • Ch7 Visual Finance via Matplotlib
  • Ch8 Statistical Analysis of Time Series
  • Ch9 The Black-Scholes-Merton Option Model
  • Ch10 Python Loops and Implied Volatility
  • Ch11 Monte Carlo Simulation and Options
  • Ch12 Volatility Measures and GARCH

The book takes a somewhat unique approach in interweaving Python concepts on an as needed basis with the introduction of progressively more advanced mathematics specific to the Finance field, primarily Options oriented.

I found the approach quite useful. In addition the book includes examples of retrieving financial data from a number of sources. specific code for retrieving data from Yahoo, Google, Federal Reserve and Prof French library is provided.

The introduction to NumPy, SciPy, and Matplotlib (graphing library) are quite well done with well chosen examples.

The book is a strong addition to the growing body of work for finance professionals who want to learn Python.

The book falls short in some of its more lofty goals including exploring Statsmodels and Pandas. And it has almost no mention of IPython notebook, which has rapidly become the default environment for many in the Finance field. Critically in my opinion, the book lacks a good explanation of the differences between floating point and integer arithmetic with its critical implications for Finance professionals.

To some degree this is to be expected since each of those topic areas is in fact subject to books of their own. That is, they are very large libraries and have numerous features that can and do interact with each other.

While the book does cover Pandas it’s usage examples are somewhat limited. The text does not point out how Pandas is built on top of Numpy/Scipy. It does not cover the use of resample to change frequency or offset to offset frequencies. Nor does it cover in much depth the extensive IO libraries built into Pandas, which provide cleaner access to many external data sources like Yahoo, Google the Federal Reserve as well as SQL databases. The coverage is limited to a subset of the CSV IO and some use of the Pickle module. Further there is no mention of the Pandas Dataframe Plotting capabilities.

Statsmodels, like Pandas is a newer Python library with rapidly expanding capabilities. Basic capabilities are nicely explained but more advanced capabilities are not. I was hoping to see some usage examples of some of the more advanced capabilities with explanations, but I admit that that is due to my own current frustration with figuring out some of those things myself.

Advanced Financial concepts such as, Time Series with Efficient frontier, Monte carlo simulation for options and GARCH are each well covered with good examples.

While some of the above sounds somewhat critical, I enjoyed the book and will keep it for quick reference, particularly for the Options valuation material. For those new to Python with a Finance interest, I would recommend the book highly, but I would augment it with additional Python material. The book is an excellent introduction and can provide a solid foundation for exploring the more advanced facilities of the various Python Financially oriented modules.

Tags: Finance, Python

About OSWCO

OSWCO is dedicated to introducing and supporting Open Source Software to the Enterprise. The Open Source movement and products have become highly sophisticated, cost effective, and mature. Many leading companies and organizations are making rapidly increasing investments in it's use.


To see our Information about Google Apps click Google Apps Info

OSWCO is an authorized Google Apps reseller. Some organizations need help and a place to turn to for, consulting, product development or commercial support. We have developed an extensive network of reliable experts to assist you, able to take on the largest turnkey projects. Contact us to help you examine the options. Phone: 205-267-1089. More info:


Subscribe to us:

Elsewhere

Categories

Recent Posts

Archive

BlogRoll

Popular Posts

Django Popular