[Titolo] - International Centre for Theoretical Physics
Download
Report
Transcript [Titolo] - International Centre for Theoretical Physics
Lecture 5 – Improved Monte
Carlo methods in finance: lab
The goals:
Modify VBA package to implement Monte
Carlo antithetic sampling.
7/18/2015
MC Lab: VBA code for
antithetic variables (I).
Add a new button to excel file (in order to
perform antithetic variables)
Add a new module: Module_core_functions_av
Define a new function to generate path, which gets
as an input the vector of random numbers.
Add two new functions:
7/18/2015
Generate_random_numbers_vector: to generate a vector of
normal random numbers
Flip_random_numbers_vector: to flip the sign of a vector
MC Lab: VBA code for
antithetic variables (II).
Define a new function Compute_price_av to
implement the antithetic variables algorithm (by
using the above functions).
Call Generate_random_numbers_vector to generate a vector of random
numbers
Call Single_path_generation_2
Get the pay_off
Call Flip_random_numbers_vector to flip the above random numbers vector
Call Single_path_generation_2
Get the pay_off_mirror
Compute the mean value of the two pay offs (pay_off and pay_off_mirror)
7/18/2015