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

The related graph showing the positions of a stock only, call, and covered-call is

given here. Obviously, when the stock price is under $17 (15 +2), the covered-call

is better than long a share:

Straddle – buy a call and a put with the same

exercise prices

Let's look at the simplest scenario. A firm faces an uncertain event next month. The

issue is that we are not sure about its direction, that is, a good event or bad one. To

take advantage of such an opportunity, we could u a call and buy a put with the

same exercise prices. This means that we will benefit either way: the stock moves up

or down. Assume further that the exercise price is $30. The payoff of such a strategy

is given here:

import matplotlib.pyplot as plt

import numpy as np

sT = np.arange(30,80,5)

x=50; c=2; p=1

straddle=(abs(sT-x)+sT-x)/2-c + (abs(x-sT)+x-sT)/2-p

y0=np.zeros(len(sT))

plt.ylim(-6,20)

plt.xlim(40,70)

plt.plot(sT,y0)

plt.plot(sT,straddle,'r')

plt.plot([x,x],[-6,4],'g-.')

[ 352 ]

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

Saved successfully!

Ooh no, something went wrong!