Raul - I've thought about this. Basically, you want to replace "N" (normal distribution) with "L" (Levy distribution) in the formula. This would require changing the "cnd" verb in McDonnel's essay to a "cld" (cumulative Levy distribution) verb, which gets right to the heart of the most complex piece of that code.
I guess you've figured out how to write the Levy distribution verb? This is the crucial thing to get right - here's some graphs of it: http://en.wikipedia.org/wiki/L%C3%A9vy_distribution . What is "levychar"? Do you have some examples of using these verbs? Regards, Devon On Tue, Apr 17, 2012 at 2:04 PM, Raul Miller <rauldmil...@gmail.com> wrote: > I was reading > http://triplehelixblog.com/2012/04/fractal-finance-a-rogue-mathematician%E2%80%99s-search-for-answers/ > and then I was reading wikipedia's writeup on the levy distribution > (http://en.wikipedia.org/wiki/L%C3%A9vy_distribution) and then I was > poking around on jsoftware.com to find an implementation of erfc > > That gets me to here: > > require 'stats/distribs' > erfc=: erfc_pdistribs_ > > NB. m: location parameter (domain: y > m) > NB. n: scale parameter > levypdf=:2 :0 > (%: n%o.2) * ^@(n % 2 * m - ]) % 1.5 ^~ m -~ ] > ) > > levydist=:2 :0 > erfc@%:@(n % 2 * m -~ ]) > ) > > NB. no graph of this one -- it's complex -- not sure how to detect > stupid mistakes > levychar=:2 :0 > ^@((0j1*m)&* - 0j_2 %:@*n*]) > ) > > But I noticed this writeup on black-scholes: > http://www.jsoftware.com/papers/play193.htm and I got to wondering how > that would be rephrased if it used the assumptions that lead to the > levy distribution. > > Does anyone know how to approach this problem? > > Thanks, > > -- > Raul > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm -- Devon McCormick, CFA ^me^ at acm. org is my preferred e-mail ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm