Serving the Quantitative Finance Community

 
User avatar
Ziggy
Topic Author
Posts: 1
Joined: January 27th, 2002, 10:59 pm

Price path generator - Matlab

July 8th, 2003, 11:45 pm

I'm looking for an efficient and/or advanced price path generator for Matlab for Monte Carlo simulations. Please share if you have something on the subject.What I am looking for isa) Variance reduction, increased efficiencyb) inputing a vol matrix (smile+vol term structure)c) ..... anything else which helps in Exotic modelingStarting the subject I'm sharing my three lines Monte Carlo for comment (and possible public embarrassment):A=randn([no_points,no_simulations]);B=(((rd - rf) - sigma^2 / 2) * dt + sigma * sqrt(dt) *A);C=exp(log(s0)+cumsum(B));% no_points = number of individual periods% no_simulations = Total number of simulations done% rd = domestic interest rate% rf = divident yield / foreign interest rate% Sigma = the volatility% dt = The duration between individual points, measured in years (e.g. month = 1/12)% s0 = initial spot price
 
User avatar
mbacke
Posts: 0
Joined: May 18th, 2003, 2:29 pm

Price path generator - Matlab

July 30th, 2003, 6:21 pm

what is it that you want to price? can you explain the problem more in detail?
 
User avatar
mbacke
Posts: 0
Joined: May 18th, 2003, 2:29 pm

Price path generator - Matlab

July 30th, 2003, 6:24 pm

your code looks fine but am not sure whether it is doing the job properly. tell me what kind of values you get when you compute s0. take s0 to be 100
 
User avatar
Ziggy
Topic Author
Posts: 1
Joined: January 27th, 2002, 10:59 pm

Price path generator - Matlab

August 1st, 2003, 1:38 am

The values look pretty much like a random walk to me and I get good pricing, but I'm not a Matlab specialist. What I am searching for is a more efficient code to generate the price paths, using advanced Monte Carlo techniques. Mine is just a basic one.
 
User avatar
edoardobarra
Posts: 1
Joined: January 7th, 2003, 12:11 pm

Price path generator - Matlab

August 7th, 2003, 12:08 pm

Try this :www.polito.it/~brandimarteand download the zip archive with lot of matlab code, that could be useful...of course you may also take a look to the book.(hope this helps)edoardo