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.

6. If we want to hedge our $5 portfolio, we should short n futures

contracts. For the specification, see http://www3.canisius.

edu/~yany/doc/sp500futures.pdf:

Chapter 10

Here, Vp is the portfolio value, βp is the portfolio beta, and the index level is

the S&P500 index level. Applying the preceding formula, we should short

ten futures contracts. Assume, in three months, it is 2090.4, that is, ten points

down. Since we know that beta is a measure of market risk, assume that

annul risk-free rate is 1%, that is, 0.25% for three months.

2. Estimate the portfolio beta by applying the following linear regression:

3. Identify several moments when the market falls dramatically.

You can use a business cycle Python dataset called:

import pandas as pd

x=pd.read_pickle("c:/temp/businessCycle.pkl")

print(x.head())

print(x.tail())

date

1926-10-01 1.000

1926-11-01 0.846

1926-12-01 0.692

1927-01-01 0.538

1927-02-01 0.385

cycle

date

2009-02-01 -0.556

2009-03-01 -0.667

2009-04-01 -0.778

2009-05-01 -0.889

2009-06-01 -1.000

[ 383 ]

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

Saved successfully!

Ooh no, something went wrong!