Serving the Quantitative Finance Community

 
User avatar
tkh
Topic Author
Posts: 0
Joined: December 11th, 2005, 11:13 pm

matlab's lsqnonlin to c#

November 23rd, 2007, 8:49 am

Hi;This could be a longshot but..I have exhausted all options available to me. Presently have code that generates the heston parameters for stochastic vol in matlab, calibrated from market data. I need to port it over to c#.quadl has been ported over to c#..works fine. Presently where i'm at, the library is in c#.lsqnonlin is a non linear least squares with bounded constraints algo.The closest i have found is http://www.alglib.net/optimization/lbfgs.php. it works but the output is erroneous as per supplied documentation. could anyone point me in the right direction besides lbfgs i.e. implementation of lsqnonlin in c#? i've been stuck for quite some time.alternatively, anyone has there references?Don't have access to the journals with these pdf's.[1] Coleman, T.F. and Y. Li, "An Interior, Trust Region Approach for Nonlinear Minimization Subject to Bounds," SIAM Journal on Optimization, Vol. 6, pp. 418–445, 1996.[2] Coleman, T.F. and Y. Li, "On the Convergence of Reflective Newton Methods for Large-Scale Nonlinear Minimization Subject to Bounds," Mathematical Programming, Vol. 67, Number 2, pp. 189-224, 1994.[4] Levenberg, K., "A Method for the Solution of Certain Problems in Least-Squares," Quarterly Applied Math. 2, pp. 164–168, 1944.[5] Marquardt, D., "An Algorithm for Least-Squares Estimation of Nonlinear Parameters," SIAM Journal Applied Math., Vol. 11, pp. 431–441, 1963.thanks in advance.
 
User avatar
msperlin
Posts: 5
Joined: July 10th, 2006, 6:21 pm

matlab's lsqnonlin to c#

November 23rd, 2007, 9:14 am

QuoteOriginally posted by: tkhHi;This could be a longshot but..I have exhausted all options available to me. Presently have code that generates the heston parameters for stochastic vol in matlab, calibrated from market data. I need to port it over to c#.quadl has been ported over to c#..works fine. Presently where i'm at, the library is in c#.lsqnonlin is a non linear least squares with bounded constraints algo.The closest i have found is http://www.alglib.net/optimization/lbfgs.php. it works but the output is erroneous as per supplied documentation. could anyone point me in the right direction besides lbfgs i.e. implementation of lsqnonlin in c#? i've been stuck for quite some time.alternatively, anyone has there references?Don't have access to the journals with these pdf's.[1] Coleman, T.F. and Y. Li, "An Interior, Trust Region Approach for Nonlinear Minimization Subject to Bounds," SIAM Journal on Optimization, Vol. 6, pp. 418–445, 1996.[2] Coleman, T.F. and Y. Li, "On the Convergence of Reflective Newton Methods for Large-Scale Nonlinear Minimization Subject to Bounds," Mathematical Programming, Vol. 67, Number 2, pp. 189-224, 1994.[4] Levenberg, K., "A Method for the Solution of Certain Problems in Least-Squares," Quarterly Applied Math. 2, pp. 164–168, 1944.[5] Marquardt, D., "An Algorithm for Least-Squares Estimation of Nonlinear Parameters," SIAM Journal Applied Math., Vol. 11, pp. 431–441, 1963.thanks in advance.You can also try this one:http://csmr.ca.sandia.gov/projects/opt++/It is very complete for optimization packagesn, covering also non linear constraints.I have it here, but couldnt make it work with eclipse/g++. I'll try again this weekend, but if someone is using this package, can please point in some directions of how to make it work at eclipse?
 
User avatar
bhamadicharef
Posts: 0
Joined: September 8th, 2007, 2:30 pm

matlab's lsqnonlin to c#

November 24th, 2007, 1:04 pm

This could maybe help tooIntegrating MATLAB with C# http://www.mathworks.com/matlabcentral/ ... fileBrahim
 
User avatar
bhamadicharef
Posts: 0
Joined: September 8th, 2007, 2:30 pm

matlab's lsqnonlin to c#

November 24th, 2007, 1:36 pm

T.F. Coleman papers a lot of them can be found as report version fromeCommons@Cornell Faculty of Computing and Information Sciencehttp://ecommons.library.cornell.edu/handle/1813/7730search with ColemanRegardsBHC
 
User avatar
bhamadicharef
Posts: 0
Joined: September 8th, 2007, 2:30 pm

matlab's lsqnonlin to c#

November 24th, 2007, 1:36 pm

T.F. Coleman papers ... a lot of them can be found as report version fromeCommons@Cornell Faculty of Computing and Information Sciencehttp://ecommons.library.cornell.edu/handle/1813/7730search with ColemanRegardsBHC
 
User avatar
tkh
Topic Author
Posts: 0
Joined: December 11th, 2005, 11:13 pm

matlab's lsqnonlin to c#

November 26th, 2007, 4:32 am

Thank you perlin and charef for the replies. will look into it.rgds;