Longsaff&Schwartz and fmincon in matlab
Posted: March 21st, 2012, 3:04 pm
Hi,I am trying to find parameters (in this case sigma and r), so that squared difference between price obtained by Longstaff&Schwartz algorithm and market price is minimal. Below are attached two codes. LSMX simulates paths of prices, then finds price of American option by Longstaff&Schwartz, and squares difference of this price from real market price. Second code is algorithm by fmincon to find parameters, sigma and r, which give minimal value for squared difference from market price (LSMX value).During optimization by fmincon, values of sigma and r, do not converge to any values but oscillate. What am I doing wrong?