首页 >
> 详细

ISyE 6767 Sys-Computation Finance Fall 2023

Interim Project

Due: Oct 16, 2023

Implementing a dynamic delta hedging strategy.

Delta-hedging is a hedging strategy that aims to replicate the value of a financial derivative, such as a

Call option, written on a traded asset through dynamically buying (or selling) a proper number of shares of

the underlying asset and borrowing from (or lending to) a bank.

Description of the delta-hedging process:

1. Let the hedging period be from a start-date t0 to an end-date tN . At start date t0, assuming there is

an initial cash position in the amount of $0.

2. At t0, we sell a European call option contract with expiration date T, strike price K. Assume the

option contract is written on one share of stock and t0 < tN ≤ T.

3. To hedge the short position in the European call, we decide to buy δ shares of the underlying stock

at t0, where δ =

∂V

∂S is the rate of change of option value V with respect to changes in the underlying

price S.

4. As δ changes during the hedging period, we need to re-balance our portfolio (buy/sell stocks) everyday

to maintain a long position of δi shares of stock for each date ti

, i = 1, 2, ..., N. δi shall be calculated

using implied volatility for each date.

5. For each date ti

, i = 1, 2, ..., N, calculate the cumulative hedging error till ti

:

HEi = δi−1Si + Bi−1e

ri−1∆t − Vi

where Bi = δi−1Si + Bi−1e

ri−1∆t − δiSi (i ≥ 1) and B0 = V0 − δ0S0. Si

, Vi

, ri respectively denote the

stock price, option price, risk-free rate at time ti

, i = 0, 1, ..., N. ∆t represents 1 business day, which is

1

252 year.

6. For each date ti

, two types of profit-and-loss (PNL) of selling a Call option at time 0 are defined as

follows. Assume no transaction costs.

• PNL = Call option market quote at time 0 – Call option market quote at time ti

.

• PNL with hedge = Cumulative hedging error.

Project tasks are:

1. Test your delta hedging implementation using the Black-Scholes model.

• Use the following model to simulate the price series {S0, S∆t, S2∆t, · · · , ST } at N equally-spaced

time points over time horizon [0, T] where ∆t =

T

N

:

St+∆t = St + µSt∆t + σSt

√

∆tZt,

where {Zt : t = 1, 2, · · · , N} are independent standard Normal random variables. Generate 1000

sample paths with the following set of parameters: S0 = 100, T = 0.4, µ = 0.05, σ = 0.24,

r = 0.025, N = 100. Plot any 100 of these paths ((Excel, matlab, R, or Python can be used to

generate plots using data generated by C++ codes).

• Apply Black-Scholes formula to obtain the option price series {C0, C∆t, C2∆t, · · · , CT } on each

stock price sample path.

• Assume S0 = 100, T = 0.4, µ = 0.05, σ = 0.24, r = 0.025, N = 100. Consider a European Call

option on ST with K = 105 and T = 0.4. Construct the delta-hedging portfolios for all N periods

using delta obtained from the B-S model. Repeat this for all 1000 sample paths and report/plot

the distribution of the hedging errors.

2. Use the real market data given in the project data files to test the validity of Black-Scholes model by

using the Black-Scholes formula to construct the delta-hedging portfolio.

(a) At each time ti

, calculate the total wealth if we sell a call without putting on any hedge.

(b) Given t0, tN , T and K, the program should output a file “result.csv” containing stock price,

option price, implied volatility, delta, hedging error, PNL, PNL with hedge.

For example, if t0=2011-07-05, tN =2011-07-29, T=2011-09-17, K = 500, the output should be

like:

date S V ... PNL PNL (with hedge)

2011-07-05 532.44 44.2

2011-07-06 535.36 46.9

...

2011-07-28 610.94

2011-07-29 603.69

(c) The following data files are provided. Data files should not be modified manually or by other

tools.

• “interest.csv” contains daily risk-free rates in 2011. When calculating implied volatility and

delta for each date, use the risk-free rate of corresponding date.

• “sec GOOG.csv” contains adjusted closing stock prices in 2011. Assume there is no dividend.

• “op GOOG.csv” contains option prices data in 2011. Option price=(best bid+best offer)/2.

cp flag is C for call option, P for put option. exdate is expiration date. For option at date

ti

, time to expiry = (number of business days between ti and T)/252.

Note: Feel free to modify the sample codes in the lab session to make it work. It is encouraged to design your own Option classes and you are required to use OOP or generic

programming style to finish this project. Using only functions or trivial classes without any

member variables are not acceptable.

Project deliverables:

1. Ready-to-compile codes in one zip file

2. A project report which contains the following components:

• Problem addressed by the project and the model(s) used in the project

• The structure of the model implementation: functionality of each code block or each code piece.

• Unittest cases for the code

• Outcome of the implementation, present discussion on whether the outcome solves the practical

problem of hedging call/put options, and draw some conclusions.

联系我们

- QQ：99515681
- 邮箱：99515681@qq.com
- 工作时间：8:00-21:00
- 微信：codinghelp

- 辅导 program、讲解 python编程... 2024-02-19
- 辅导 cs2910、讲解cs2910 asse... 2024-02-19
- 讲解 cs 532、cs 532: homewor... 2024-02-19
- 讲解business decision analyt... 2024-02-18
- 辅导data structures project... 2024-02-18
- 辅导 hw2: shared memory part... 2024-02-18
- 辅导 econ 323、econ 323: eco... 2024-02-17
- b31se编程讲解 、image proces... 2024-02-17
- 辅导 discrete event systems、... 2024-02-16
- 辅导 ece438、讲解ece438: com... 2024-02-16
- 讲解 program、spatial networ... 2024-02-16
- a03.firstgit编程辅导 、pytho... 2024-02-16
- 辅导 cs9053、讲解introductio... 2024-02-15
- 辅导 comp26020、讲解comp2602... 2024-02-15
- 讲解 csci3280、辅导 introdu... 2024-02-14
- 讲解 consider the following ... 2024-02-14
- 辅导 ems5730、讲解homework #... 2024-02-14
- 辅导 cs 211编程、讲解compute... 2024-02-13
- 辅导assignment 1 – business... 2024-02-13
- prog10065讲解 、辅导interact... 2024-02-13