代做FITE7405: Assignment 3代写R语言

- 首页 >> Web

FITE7405: Assignment 3 (20%)

Due date: 02-04-2024

1    General Information

In this assignment, you will implement a mini option pricer which can price various options including European options, Basket options, Asian options, and American options.  The computational methods available in the pricer include analytical closed-form. formulas, Monte Carlo simulation, and the binomial tree method.

You can freely choose your programming language and platform.  In this assignment, in general you should not use any third-party code except some basic statistics functions (e.g., normal random variable generator, normal cumulative distribution function, and sample covariance function, etc.). If you are not sure, please check with us first.

You are welcome to work independently or in groups (up to 3 team members) on this assignment.

2    Mathematical Background

For this assignment, we assume that an asset follows the geometric Brownian motion presented in our lecture

S(T) = S(t)e(r- 2 )△+σZ ,                                               (1)

If we have two assets, we assume their asset prices can be described by

S1(T)  =  S1(t)e(r- 1(2))△+σ1 Z(1) ,                                         (2)

S2(T)  =  S2(t)e(r- 2(2))△+σ2 Z(2) ,                                         (3)

where σi  are the respective volatilities of the two assets, △ = T - t, Z(1)  and Z(2)  are both standard normal random variables, and P(Z(1), Z(2)) = P.

Similar to Asian options, there are two types of baskets. For a geometric mean basket, its level at time t is

It can be shown that Bg(t) follows a geometric Brownian motion with drift μBg   and volatility σBg   defined by

where pi,j  is the correlation between standard normal random variables Zt(i)  and Zt(j)  corre- sponding to asset i and asset j.

The call/put options on a geometric mean basket have respective payofs at maturity T

max(Bg(T) - K, 0),    max(K - Bg(T), 0).

Then their values are given by

where

An arithmetic mean basket is defined by

As there are no closed-form. formulas for call/put options on such basket, you are required to

implement a Monte Carlo pricer to price them. Their payofs at maturity T are

max(Ba(T) - K, 0),    max(K - Ba(T), 0).

Similar to the Asian options, you can use the option on the geometric mean basket as a control variate.

3 KIKO Put Option with Rebate

As discussed in our lecture, we consider a put option with knock-in and knock-out barriers (KIKO put). Specifically, the payof function at maturity T is

where ti  = T, i = 1, . . . , n, S(ti) is the asset price at ti , K  is the strike price, and L is a given down-and-in barrier which satisfies L < S(t0 ). Moreover, at any time ti, if S(ti) ≥ U , the option terminates and pays out R dollars to the option holder right away. Here U is a positive up-and-out barrier, that is, U > S(t0 ), and R is the rebate payment.

4    Implementation Tasks

The implementation tasks include:

1. Implement Black-Scholes Formulas for European call/put options.

2. Implied volatility calculations.

3. Implement closed-form. formulas for geometric Asian call/put options and geometric basket call/put options.

4. Implement the Monte Carlo method with control variate technique for arithmetic Asian call/put options.

5. Implement the Monte Carlo method with control variate technique for arithmetic mean basket call/put options.  For the arithmetic mean basket options, you only need to consider a basket with two assets.

6. Implement the Quasi-Monte Carlo method for a KIKO-put option.  Calculate the price and the Delta of a given option.

7. The Binomial Tree method for American call/put options.

8. A graphical user interface for users to easily price various options with your pricer.

5    Input Parameters and Output Results

You option pricer should provide the following input parameter list for each type of option:

• European call/put option: the spot price of asset S(0), the volatility σ, risk-free interest rate r, repo rate q, time to maturity (in years) T, strike K, and option type (call or put).

• Implied volatility calculator: the spot price of asset S(0), risk-free interest rate r, repo rate q, time to maturity (in years) T, strike K, the option premium, and the option type (call or put).

• American call/put option: the spot price of asset S(0), the volatility σ, risk-free interest rate r, time to maturity (in years) T, strike K, the number of steps N, and option type (call or put).

•  Geometric Asian option:  S(0), σ , r , T, K, the number of observation times for the geometric average n, and the option type (call or put). With the parameters n and T, you should assume that the geometric average involves S( T n ), S( 2 n T ), . . . , S( (n− n 1)T ), and S(T).

• Arithmetic Asian option: it has all input parameters for geometric Asian option and two extra input parameters. One is the number of paths in the Monte Carlo simulation. The other one is to specify the control variate method (no control variate, or geometric Asian option). Your pricer should output the 95% confidence interval.

•  Geometric basket option: the spot prices of two assets S1(0) and S2(0), the volatilities of the two assets σ 1  and σ2 , r , T, K, the correlation P, and option type (call or put).

•  Arithmetic basket option: it has all input parameters for geometric basket option and two extra input parameters. One is the number of paths in the Monte Carlo simulation. The other one is to specify the control variate method (no control variate, or geometric basket option). Your pricer should output the 95% confidence interval.

• KIKO put option:  S(0), σ , r , T, K, lower barrier L, upper barrier U, the number of observation times n, and the cash rebate R.

6 Test Cases

You can assume r = 0.05, T = 3, and S(0) = 100.  The number of paths in Monte Carlo simulation is m = 100, 000. Note that for the Monte Carlo implementation, please explicitly fix the initial seed/state of the random number generator so that the results from your program are reproducible. You should test the following cases for each type of options:

• Asian options:

σ

K

n

Type

0.3

100

50

Put

0.3

100

100

Put

0.4

100

50

Put

0.3

100

50

Call

0.3

100

100

Call

0.4

100

50

Call

For the arithmetic Asian option, test the MC without/with control variate.

•  Basket options:

S1(0)

S2(0)

K

σ 1

σ2

P

Type

100

100

100

0.3

0.3

0.5

Put

100

100

100

0.3

0.3

0.9

Put

100

100

100

0.1

0.3

0.5

Put

100

100

80

0.3

0.3

0.5

Put

100

100

120

0.3

0.3

0.5

Put

100

100

100

0.5

0.5

0.5

Put

100

100

100

0.3

0.3

0.5

Call

100

100

100

0.3

0.3

0.9

Call

100

100

100

0.1

0.3

0.5

Call

100

100

80

0.3

0.3

0.5

Call

100

100

120

0.3

0.3

0.5

Call

100

100

100

0.5

0.5

0.5

Call

For the arithmetic basket option, test the MC without/with control variate.

For other types of options, you can design your own test cases.

7 Report

You need to submit a report consisting of the following sections:

•  List the contributions to the assignment from each team member.  This is for our information only and doesn’t afect the marks each group/group member receives.

•  Describe the user interface of your mini option pricer.  This is to help us learn how to run your pricer.

•  Describe the functionalities of each class/function. This is to help us understand your code. Keep this part short while informative.

•  Test cases and analysis. For each type of options, test your pricer with diferent param- eters and analyze how each parameter afects the option price.

•  Extensions. If you have implemented something interesting beyond the requirements of the assignment, please present it here.

8 Marking Scheme

• Implementation/Coding (80 marks).  The correctness and reliability of your code will be examined.

{ Closed-form formula implementation for European/geometric Asian/geometric Bas- ket options (10 marks).

{ Monte Carlo option pricing (50 marks). { Implied volatility calculation (5 marks). { Binomial Tree method. (15 marks).

•  Testing and Report (20 marks).  The report doesn’t have to be long.  Please keep it within 5 pages.

9    Possible Extensions

When developing a tool, it is important to foresee potential additional requirements for ex- tensions so that you could have a proper design initially.  In this section, I try to list some possible extensions to your mini option pricer. They are provided here for information only, and you don’t have to implement them in this assignment.

•  Price options on a basket with more than two assets.

•  Price more generic options.  In theory, Monte-Carlo simulation can price any path- dependent options without early exercises. So it is very often you will be asked to price a new type of option quickly.

•  Use GPU to accelerate your pricer.  Monte-Carlo simulation is by nature a very good user case for GPU application.

• Implement better pricer for American options.

{ Better tree-based method: Ting Chen and Mark Joshi, Truncation and Accelera- tion of the Tian Tree for the Pricing of American Put Options.

{ Spectral collocation method: Leif B. G. Andersen, High Performance American Option Pricing.








站长地图