Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit


BUS 801 – Financial Programming Fundamentals

MATLAB Assignment


Consider an option on an n-year swap that starts in T years (called a swaption) where the holder has the right to pay an interest rate of Rx and receive LIBOR. Then the price of the swaption is given by the formula,

Where

K is a scale factor related to the price of the underlying swap (> 0)

RX is the interest rate that the swap holder pays (> 0)

F0 is the forward swap rate (> 0)

 

 

σ is the volatility of the swap (> 0)

Note that N(∎) is the cumulative probability density function for a standard normal distribution. Hence N(x), is the probability of sampling a variable less than x.

For this assignment, you are required to:

➢ Write a MATLAB script that,

a. Reads data from a spreadsheet, where the spreadsheet contains parameters related to various swaptions. (An example spreadsheet is given as part of the assignment.)

b. Call a function (described below) to price swaptions for each set of parameters read from the file in part a.

c. Price another set of swaptions where K = 200.35, Rx = 0.062, F0 = 0.0609, T = 5, and volatility ranges from 0.1 to 0.3 in steps of 0.01. (That is, the first 4 parameters are constant.)

d. Generates a plot of swaption price (y-axis) versus volatility for the swaptions of part c.

➢ Write a MATLAB function that,

a. Accepts as input the parameters needed to price one or more swaptions.

b. Returns as output the price of the swaptions

(Note: Your code may only use functions from the basic MATLAB package and the Statistics Toolbox.)


Deliverables:

a) An emailed copy of your function and test script. (Email to [email protected])

b) An hard copy of your script and function.


Groups:

a) The assignment may be completed in groups of up to 3 (Please clearly indicate in your script the names and student number of all groups members).

b) All members of the group will receive the same mark.

c) All members of the group must be clearly identified when the assignment is submitted.

d) Irrespective of how many people are in a group, the assignments will be marked to the same standard.


Marks:

a) 40% of the marks will be for calculating the correct parameter values

b) 30% of the marks will be for efficiency of the code.

c) 30% of the marks will be for code structure, layout and readability.