- Joined
- 10/11/11
- Messages
- 6
- Points
- 11
Hi,
I need to repeat many times of MATLAB simulations by changing two parameters. Are there some ways / methods/ suggestions in which MATLAB can read the values of the two parameters from an excel file and repeat the simulations automatically. Thus, I can leave the simulations to run overnights without being required to change the values of the two parameters each time the simulation ends.
Actually I'm working on determining the value of convertible bonds. The first part of the valuation is to simulate the underlying stock price with changing volatility using the CEV model. Once I got the simulated stock price, I've to calculate the conversion value and determine the in-the-money path to finally determine the convertible bond value using the least squares Monte Carlo (LSM) model of Longstaff and Schwartz (2001). My major problem is the how can I allow the simulation to repeat with different stock price and nsteps (ie. the first part of the valuation process).
Attached are the matlab code and the values of the two parameters. Each time the simulation ends, the value of S0 (Stock Price) and NSteps have to be changed. The attached Matlab code is a complete code of my model.
Kindly advise. Many thanks
I need to repeat many times of MATLAB simulations by changing two parameters. Are there some ways / methods/ suggestions in which MATLAB can read the values of the two parameters from an excel file and repeat the simulations automatically. Thus, I can leave the simulations to run overnights without being required to change the values of the two parameters each time the simulation ends.
Actually I'm working on determining the value of convertible bonds. The first part of the valuation is to simulate the underlying stock price with changing volatility using the CEV model. Once I got the simulated stock price, I've to calculate the conversion value and determine the in-the-money path to finally determine the convertible bond value using the least squares Monte Carlo (LSM) model of Longstaff and Schwartz (2001). My major problem is the how can I allow the simulation to repeat with different stock price and nsteps (ie. the first part of the valuation process).
Attached are the matlab code and the values of the two parameters. Each time the simulation ends, the value of S0 (Stock Price) and NSteps have to be changed. The attached Matlab code is a complete code of my model.
Kindly advise. Many thanks