Download presentation
Presentation is loading. Please wait.
Published byÍΑἰνείας Βικελίδης Modified over 6 years ago
1
Lecture 5 – Improved Monte Carlo methods in finance: lab
The goals: Modify VBA package to implement Monte Carlo antithetic sampling. 11/16/2018
2
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: Generate_random_numbers_vector: to generate a vector of normal random numbers Flip_random_numbers_vector: to flip the sign of a vector 11/16/2018
3
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 Get the pay_off_mirror Compute the mean value of the two pay offs (pay_off and pay_off_mirror) 11/16/2018
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.