forum.alglib.net
http://forum.alglib.net/

Levenberg Marquardt - Objective Function with const inputs
http://forum.alglib.net/viewtopic.php?f=2&t=4574
Page 1 of 1

Author:  ucapehr [ Thu Jul 20, 2023 3:07 pm ]
Post subject:  Levenberg Marquardt - Objective Function with const inputs

I am completely new to ALGLIB. I have to find parameters for a function that also accepts multiple inputs for each observation. The function is an option pricing function that accepts time to expiry and strike Price and also the scalar flag to indicate if it is a Put or a Call. So, if I ahve 200 observed option prices over all expiries and deltas over the vol surface, I will have my function accept 3 constant vectors besides the parameter vector to be optimised. Parameters to be optimised also are box constrained such as correlations, mean reversion params and volatilities.

My MATLAB objective looks like this:

f = @(p)pricingFunc(p, tVec, consts(:,1), consts(:,2)) - y_dat_lm;

clearly p is the set of parameters to be found
tVec is the vector of time to expiry for each option price
consts(:,1), consts(:,2) are strike and PutCall flag vectors
y_dat_lm is the vector of market observed option Prices

How can this be done in ALGLIB for C++?
Is there a MultiStart method available with Non Linear Least squares Optimisation to counter local minima issues with high dimensional optimisation problems?

Will be very grateful for your help.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/