Advanced Derivative Securities – VBA coding

0 Comments

Create an Excel worksheet to compute and compare the values of the following three types of call options on foreign assets: (i) call options struck in foreign currency, (ii) call options struck in domestic currency, and (iii) quanto call options1. Prompt the user to input 𝑋𝑋(0), 𝑆 𝑆(0), 𝐾𝐾, π‘Ÿπ‘Ÿ, π‘Ÿπ‘Ÿπ‘“π‘“, Οƒπ‘₯π‘₯, σ𝑠𝑠, ρ, π‘žπ‘ž, and 𝑇𝑇. Take the strike price of the option struck in foreign currency to be 𝐾𝐾, take the strike price of both the option struck in domestic currency and the quanto option to be 𝑋𝑋(0)𝐾𝐾 (so 𝐾𝐾 is interpreted as an amount in foreign currency), and take the fixed exchange rate in the quanto to be 𝑋𝑋� = 𝑋𝑋(0). You should be able to confirm that if π‘Ÿ π‘Ÿ =π‘Ÿπ‘Ÿπ‘“π‘“ and ρ β‰₯ 0, then (i) the option struck in domestic currency is more valuable than the option struck in foreign currency, and (ii) the option struck in foreign currency is more valuable than the quanto. 2. Create an Excel worksheet in which the user inputs π‘Ÿπ‘Ÿ, π‘Ÿπ‘Ÿπ‘“π‘“, and the exchange rate. Compute the forward exchange rate at maturities 𝑇𝑇 = 0.1, 0.2, …, 2.0, and plot the forward rate against the maturity in a scatter plot. A market is said to be in β€œcontango” if this curve is upward sloping and to be in β€œbackwardation” if this curve is downward sloping. For currencies, what determines whether the market is in contango or in backwardation? 3. Create a VBA subroutine to simulate a path of the exchange rate and the forward exchange rate under the risk-neutral measure, prompting the user to input 𝑋𝑋(0), π‘Ÿπ‘Ÿ, π‘Ÿπ‘Ÿπ‘“π‘“, Οƒπ‘₯π‘₯, the maturity 𝑇 𝑇 of the forward contract, and the number of periods 𝑁𝑁. Plot the simulated exchange rate and forward exchange rate together. Note that you need to first derive the process of 𝑋𝑋 with the risk-free asset as the numeraire (recall what you learned in Chapter 2), then write the VBA codes to implement the simulation, and lastly, make the plot. 4. Create a VBA subroutine to simulate a path of the exchange rate under the actual probability measure, prompting the user to input 𝑋𝑋(0), Οƒπ‘₯π‘₯, and the expected rate of growth πœ‡πœ‡π‘₯π‘₯ of the exchange rate. Prompt the user also to input 𝑆𝑆(0), π‘Ÿπ‘Ÿ, π‘Ÿπ‘Ÿπ‘“π‘“, σ𝑠𝑠, π‘žπ‘ž, ρ, the fixed exchange rate 𝑋𝑋�, the maturity 𝑇𝑇, the number of periods 𝑁𝑁, and the expected rate of growth πœ‡πœ‡π‘ π‘  of the asset in the foreign currency. Note that both πœ‡πœ‡π‘₯π‘₯ and πœ‡πœ‡π‘ π‘  are under the actual probability measure, and πœ‡πœ‡π‘ π‘  includes the dividend (so πœ‡πœ‡π‘ π‘  βˆ’ π‘žπ‘ž is the expected rate of price appreciation). Use the subroutine also to generate a path of the foreign asset price along with the exchange rate. Then, calculate the gain/loss from the portfolio that promises to pay 𝑋𝑋�𝑆𝑆(𝑇𝑇) at date 𝑇𝑇 and uses a discretely ⁄ , similar to the rebalanced hedge, rebalancing at dates 𝑑𝑑1, …, 𝑑𝑑𝑁𝑁 = 𝑇𝑇, where 𝑑𝑑𝑖𝑖 βˆ’ π‘‘π‘‘π‘–π‘–βˆ’1 = 𝑇𝑇 𝑁𝑁 calculation in the function Simulated_Delta_Hedge_Profit. Use the money-market hedge, which means investing 𝑉𝑉(0) at date 0, holding the number of shares of the foreign asset shown in Equation (9) [also Equation (6.14) in the textbook] at each date 𝑑𝑑𝑖𝑖, and having a short position in the foreign risk-free asset of the same value at each date 𝑑𝑑𝑖𝑖. Cash flow generated at each date from buying/selling the foreign asset and lending/borrowing at the foreign risk-free rate should be withdrawn/deposited in the domestic risk-free asset. Note that because of discrete rebalancing, this is not a perfect hedge, and the investment in the domestic risk-free asset will not always equal 𝑉𝑉(𝑑𝑑). Save your VBA codes and results (including plots and narrative answers) for all four problems in an Excel Macro-Enabled Workbook with the file extension β€œ.xlsm.” Also, name the worksheets β€œProblem 1,” β€œProblem 2,” β€œProblem 3,” and β€œProblem 4,” respectively. Submit your Excel file electronically on Canvas with the rest of your work [i.e., derivation of the process of 𝑋𝑋 with the risk-free asset as the numeraire in Problem 3].

Get Homework Help Now

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts