/PyOpt

A dangerously simple python library for Options and Greeks

Primary LanguagePythonMIT LicenseMIT

PyOpt is a library that implements a variety of option calculations, starting with the implementation of the Garman–Kohlhagen, the canonical pricing model for Foreign Exchange.

This library is meant to be smooth, easy to use, and extensible. It is accessible as both a learning tool or for actual usage in investment research. For example, this library calculates the Greeks using a finite difference estimation, so we can easily implement alternative option pricing models which may have no closed form solutions for the Greeks.

Most of options pricing today is done via VBA, which has the benefit of an intuitive table and graphic interface. On excel, however, it is difficult to input prices programmatically, or analyze combined option positions

If you're a beginner to options, try generating some on your own options, plot relationships between the various Greeks, and playing around with certain inputs to the model.

Plot option prices against spot

Graphical functionality

Plot

To options books with love: Dynamic Hedging FX Derivatives Trader School