Menu

Python Finance

Loucas Papayiannis

Python Code

BlackScholes.py

Implementation of the Analytical Solution to the BlackScholes (equities) equation it includes:

  • callPrice
  • putPrice
  • forwardPrice
  • callDelta
  • putDelta
  • callGamma
  • putGamma
  • callTheta
  • putTheta
  • callRho
  • putRho
  • callVega
  • putVega
  • callImpliedVol
  • putImpliedVol
GarmanKohlagen.py

Implementation of the Analytical Solution to the BlackScholes (equities) equation it includes:

  • callPrice
  • putPrice
  • forwardPrice
  • callDelta
  • putDelta
  • callGamma
  • putGamma
  • callTheta
  • putTheta
  • callDomesticRho
  • putDomesticRho
  • callForeignRho
  • putForeignRho
  • callVega
  • putVega
  • callImpliedVol
  • putImpliedVol
PDESolver.py

Implementation of a Backward Euler algorithm for solving arbitrary payoffs (passed to the class as an array of equispaced log payoff and an array of equispaced log spot). At this point the Greeks available are rather limited:

  • price
  • delta
  • gamma

OpenOffice

Disclamer

The OpenOffice extension and the build process for it are no longer working with the introduction of LibreOffice. I am working on restoring them.

BlackScholesOO.oxt

Using the OpenOffice Extension Manager - load the oxt file. Looking through the functions list you should be able to find a lot of new BlackScholes functions (like BlackScholesCallPrices, BlackScholesPutPrice).

How to make

A Makefile is provided, just call $make

Example Spreadsheet

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.