10.12.2019 Views

Python for Finance

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Options and Futures

A graphical representation is shown here:

A put option gives its buyer a right to sell a security (commodity) to the put option

buyer in the future at a predetermined price, X. Here is its payoff function:

Here, ST is the stock price at maturity and X is the exercise price (strike price). For a

put option buyer, the profit/loss function is given here:

The profit/loss function for a put option seller is just the opposite:

The related program and graph for the profit and loss functions for a put option

buyer and a seller are shown here:

import scipy as sp

import matplotlib.pyplot as plt

s = sp.arange(30,70,5)

[ 344 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!