Serving the Quantitative Finance Community

 
User avatar
selmabeyaz
Topic Author
Posts: 0
Joined: February 24th, 2010, 5:47 am

Finding minimum or maximum value

May 12th, 2010, 1:44 pm

Actually, i want to find x (in terms of the parameters in the function) which maximize above function
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Finding minimum or maximum value

May 12th, 2010, 3:50 pm

QuoteOriginally posted by: selmabeyazActually, i want to find x (in terms of the parameters in the function) which maximize above function Have you defined all params? What's I_n? Bessel, first kind?And some representative input parameters would be nice, especially some known solutions to test against.
Last edited by Cuchulainn on May 11th, 2010, 10:00 pm, edited 1 time in total.
 
User avatar
selmabeyaz
Topic Author
Posts: 0
Joined: February 24th, 2010, 5:47 am

Finding minimum or maximum value

May 12th, 2010, 4:31 pm

QuoteOriginally posted by: CuchulainnQuoteOriginally posted by: selmabeyazActually, i want to find x (in terms of the parameters in the function) which maximize above function Have you defined all params? What's I_n? Bessel, first kind?And some representative input parameters would be nice, especially some known solutions to test against.The parameters represent stock prices, probabilities etc. and In is natural logarithm. Unfortunately, I do not have any knowledge about Bessel function etc. I just google your suggestions and try to learn things. I am a poor student who has to solve this problem
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Finding minimum or maximum value

May 12th, 2010, 4:58 pm

Maybe this code in C++ with Boost. You need to install boost from here.boostinstall Brent
Last edited by Cuchulainn on May 11th, 2010, 10:00 pm, edited 1 time in total.
 
User avatar
selmabeyaz
Topic Author
Posts: 0
Joined: February 24th, 2010, 5:47 am

Finding minimum or maximum value

May 12th, 2010, 5:11 pm

QuoteOriginally posted by: CuchulainnMaybe this code in C++ with Boost. You need to install boost from here.boostinstall BrentI will try thanks a lot
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Finding minimum or maximum value

May 12th, 2010, 5:15 pm

You're welcome. It's just a matter of plugging in the values. I reckon the results will be good.
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Finding minimum or maximum value

May 13th, 2010, 9:07 am

QuoteOriginally posted by: outrunI'm a big Brent fan myself, but a Boost they recommend a different algo (with a 3 digit number in it's name). That algo is nearly always better than Brent, I didn't know about the existence of a algo that's apparenty always better than Brent3 digits? Remez algo.//I see they also have Halley's and Schroeder's mehod for root finding which are new to me but they assume f''(x) exists.. Are they used a lot?BTW all these methods experimental.. I see you are in the Boost list of authors of the Maths Toolkit,
Last edited by Cuchulainn on May 12th, 2010, 10:00 pm, edited 1 time in total.
 
User avatar
AVt
Posts: 90
Joined: December 29th, 2001, 8:23 pm

Finding minimum or maximum value

May 13th, 2010, 10:27 am

I guess your 'In' means ln = log and all besides x are given constants.If it is so then it is neither clear why that function is real valued.Nor why there should exist a global (absolute) maximum.Note that you can write it in t = x*u as variable and for t=0 you havesome value and assuming you have real constants for t ---> infinity the1st and 3rd term explodes the only chance will be, if m and n have theirsigns different (ignoring cases where parameters are zero) or c^2=m^2or c^2=n^2.But may be I see it the false way
 
User avatar
sidmaestro
Posts: 0
Joined: August 20th, 2009, 4:53 pm

Finding minimum or maximum value

May 23rd, 2010, 10:59 am

alright here is the solution but please do follow with concentration as i am not good at typing this :first substitute u*x=tnow since u said that stock prices and probabilities,etc are involved, i am assuming that quantities are +ve here.so first we establish as to why should we have a maximum.hence x,u>=0 => t>=0for the three logarithms to be defined, there arguments must be >0 which gives us 3 inequalities :t*m^2+(q-t)*c^2>0 t*m*n+(q-t)*c^2>0t*n^2+(q-t)*c^2>0also at t=0 all 3 quantities are +ve (assuming q >0). so we already have a lower limit for tnow we strive to find the upper limit for t.working on the first inequality :t*(m^2-c^2)>-q*c^2or, t*(c^2-m^2)<q*c^2case 1: m^2>=c^2 in which case all values of t are allowedcase 2: m^2<c^2 in which case t has an upper limit in q*c^2/(c^2-m^2)now we have assumed t>=0. hence if c^2<=m^2, any value of t>=0 will suffice.but if c^2>m^2, we can writet<q*c^2/(c^2-m^2)hence we have an upper limit for t here.similarly for the case of comparison of c^2 and n^2 and c^2 and m*n. if c^2 > max(n^2,m^2)the expression is a decreasing and the maximum occurs at t=0. if c^2 < min(m^2,n^2) then the expression attains max at infinity.for all the cases in between these 2 extremes, there is a finite maximum at a point in the interval for which each of the three logarithms is defined and it can be found out if theprecise values are provided. because if u differentiate the expression wrt t, it can be either+ve, -ve or non monotone. so if u can provide specific values, i will happily solve it.