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

F79DF Assignment 3 – Chapter 6 – 8%

You are to write an ‘R’ function that will calculate the the price of an option, the risk neutral probability of an asset ending in the ‘up’ state and the hedge parameters (δ for the underlying; 6, for the numeraire). You should assume a liquid, frictionless and efficient market.

The function should be named ‘one step’ and should be initiated and teminated as

one step  <-  function(S 0,  S u,  S d,  B 0,  B u,  B d,  F u,  F d  )( . . .

return( c(f 0,  q u,  delta,  rho) )

}

(e.g. you need to fill in the “. . . ”).

 

Here

S 0,  S u,  S d These are the initial and upper and lower terminal prices of the underlying asset (s0 0 sT(U)0 sT(D))

B 0,  B u,  B d These are the initial and upper and lower terminal prices of the numeraire asset (B0 0 BT(U)0 BT(D))

F u,  F d These are the upper and lower payoffs of the derivative asset (fT(U)0 fT(D)) The function should return (in exactly the same order as given above and belo) f 0 The time zero nominal price of the derivative (f0 )

q u The time zero risk-neutral probability of the asset price ending in the ‘up’ state (gu )

delta The hedge ratio for the underlying asset (δ).

rho The hedge ratio for the numeraire asset (6).

You should submit a ‘.R’ file via TurnItIn by the due date given in Vision. The file should be named as follows “(Loc} F79DF 2 (Hnumber} .R” where (Loc} defines whether you are in Edinburgh (Loc=‘E’) or Malaysia (Loc=‘M’) and (Hnumber} is your student registration number (e.g. a file might be

named “ M F79DF 2 H00123456.R”). Penalties will be imposed for mis-naming your submission file.

 

Students’ programme files will be compared for similarities that might indicate pla- giarism.

This assignment is weighted at 8% of the course, requiring at least  12 hours ef- fort. Marks will be awarded for correctly calculating parameters and the derivative price for a variety of pay-offs.