Archive for the 'General' category

The Latest and Greatest Pandas Features (since v 0.11)

Jun 20 2014 Published by under Finance, General, Python

On May 28, 2014 Phillip Cloud, core contributor for the Pandas data analytics Python library, spoke at a joint meetup of the New York Quantitative Python User’s Group (NY QPUG) and the NY Finance PUG. Enthought hosted and about 60 people joined us to listen to Phillip present some of the less-well-known, but really useful features that have come out since Pandas version 0.11 and some that are coming soon. We all learned more about how to take full advantage of the Pandas Python library, and got a better sense of how excited Phillip was to discover Pandas during his graduate work.

Pandas to MATLAB

After a fairly comprehensive overview of Pandas, Phillip got into the new features. In version 0.11 he covered:

  • indexers loc/at, iloc/iat,
  • dtypes,
  • using numexpr to evaluate arithmetic expressions for large objects, focusing mainly on numexpr. Then in version 0.12 he went into some depth on read_html. In the process he read data from a website and re-created a plot from the website. His examples are valuable as a way to see how an expert uses the Pandas package. He also goes over read_json and others new features as well, again with some really interesting examples.

Phillip covered some experimental features in version 0.13 including query/eval, msgpack IO and Google BigQuery IO. He then wrapped up with a sneak peak at some version 0.14 (soon to be released) features including MultiIndex slicing. His MultiIndex slicing example comes from his work on neuroscience (his cool data collection system is in the figure below).

You can watch his presentation below (thank you to Aaron Watters for holding up my iPhone for close to 30min from the second row to get shots of Phillip speaking), and you can get his iPython Notebooks from the talk as well.

The Latest and Greatest Pandas Features (since v 0.11) from NYQPUG.

 

No responses yet

Implied Volatility with Python’s Pandas Library AND Python in Excel

Mar 31 2014 Published by under General

Authors: Brett Murphy and Aaron Waters

The March 6 New York Quantitative Python User’s Group (NY QPUG) Meetup included presentations by NAG (Numerical Algorithms Group), known for its high quality numerical computing software and high performance computing (HPC) services, and Enthought, a provider of scientific computing solutions powered by Python.

Brian Spector, a technical consultant at NAG, presented “Implied Volatility using Python’s Pandas Library.” He covered a technique and script for calculating implied volatility for option prices in the Black–Scholes formula using Pandas and nag4py. With this technique, you can determine for what volatility the Black–Scholes equation price equals the market price. This volatility is then denoted as the implied volatility observed in the market. Brian fitted varying degrees of polynomials to the volatility curves, then examined the volatility surface and its sensitivity with respect to the interest rate. See the full presentation in the video below:

Brian Spector of NAG demonstrates a technique and script for calculating Implied Volatility using Python’s Pandas Library at the March 2014 NYQPUG Meetup.

Implied Volatility Plot

An interactive Implied Volatility plot with Numpy, Pandas, Chaco, Matplotlib and nag4py

Then Aaron Watters, scientific software developer at Enthought, presented an overview of replacing VBA with Python in Excel using the PyXLL package. Instead of uncontrolled spreadsheet versions spreading across an organization, PyXLL allows you to load centrally-managed Python code and execute it in Excel, giving you the full breadth and power of the Python analytic computing ecosystem within the familiar user interface of Excel. Aaron showed a demo of a tool in Excel where he could browse his disk usage graphically.

Enthought: Chaco GUI in Excel

Chaco GUI running in Excel with data recalculating live in the spreadsheet

For those looking to get their latest Python models and algorithms out to Excel users, PyXLL greatly streamlines the process. See Aaron’s full demo of the functionality below:

Aaron Watters of Enthought presented an overview of replacing VBA with Python for Excel with PyXLL at the March 2014 NYQPUG Meetup.

No responses yet

Older posts »

Featuring Advanced Search Functions plugin by YD