首页 >
> 详细

Sys-Computation Finance

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.

• 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
- 微信：codinghelp2

- 辅导comp30027帮做python编程 2021-08-02
- 辅导csse2002/7023-Assignment 1辅导留学... 2021-08-02
- 辅导rush2辅导c/C++ 2021-08-02
- 辅导r语言编程|辅导spss|辅导web开发|辅导... 2021-05-10
- Data留学生编程辅导、辅导analysis程序、Sql语言程序调试辅导r语 2021-05-10
- 辅导31748程序语言、辅导programming编程设计、Java，Pyt 2021-05-10
- 辅导cis 657编程、辅导c/C++程序、C++编程调试帮做haskell 2021-05-10
- Com1005程序辅导、辅导java编程语言、辅导java程序辅导留学生pr 2021-05-10
- 辅导sit283程序、辅导c/C++，Python编程设计、Cs，Java程 2021-05-09
- C++程序辅导、辅导c++程序、辅导program编程语言辅导r语言编程|辅 2021-05-09
- 辅导0ccs0cse编程、辅导r，Java，Python程序语言辅导web开 2021-05-09
- Comp124编程语言辅导、Java程序辅导、辅导program语言编程辅导 2021-05-09
- Comp122编程语言辅导、辅导java程序语言、Java程序调试帮做has 2021-05-09
- 辅导ele00041i 调试java Programming 2021-05-08
- 辅导econ 2014-Assignment 1 Managerial... 2021-05-08
- 辅导mast90044-Assignment 1 Thinking An... 2021-05-08
- 辅导cs310-Assignment 2 Hash Tables 2021-05-08
- 辅导5pm 调试java编程、Java编程辅导 2021-05-08
- 辅导cs544 Final Exam Preparation Guide... 2021-05-08
- 辅导infs7450 Social Media Analytics 2021-05-08