You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Pavel Ryzhov <pa...@gmail.com> on 2010/12/21 21:38:12 UTC

[math] Levy distribution

Hi,

I've implemented Levy distribution on top of commons-math. The implementation is pretty straightforward by http://en.wikipedia.org/wiki/Lévy_distribution So it was not a big deal. The distribution is of interest to the financial modeling, so it might worth to include it into the library.

So, do we need it in commons-math?

Regards,
Pavel


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [math] Levy distribution

Posted by Phil Steitz <ph...@gmail.com>.
On Tue, Dec 21, 2010 at 3:38 PM, Pavel Ryzhov <pa...@gmail.com>wrote:

> Hi,
>
> I've implemented Levy distribution on top of commons-math. The
> implementation is pretty straightforward by
> http://en.wikipedia.org/wiki/Lévy_distribution<http://en.wikipedia.org/wiki/L%C3%A9vy_distribution>So it was not a big deal. The distribution is of interest to the financial
> modeling, so it might worth to include it into the library.
>
> So, do we need it in commons-math?
>
> +1 - thanks in advance for the patch :)

Phil


> Regards,
> Pavel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Re: [math] Levy distribution

Posted by Pavel Ryzhov <pa...@gmail.com>.
Thanks, I see. So there is a sample generator for Levy.
It might be not that easy for stable distributions. I should start with naive implementation.

Pavel

On Dec 21, 2010, at 23:32 PM, Phil Steitz wrote:

> On Tue, Dec 21, 2010 at 5:03 PM, Pavel Ryzhov <pa...@gmail.com>wrote:
> 
>> No, right now.
>> 
>> But i'll definitely make sample generation as i'm writing small Monte Carlo
>> engine.
>> My current plan is:
>> 1. Levy distribution as the first step for contribution.
>> 2. Stable distribution and generic distributions by characteristic
>> function. I've already started working on it.
>> 3. Generators for 1 and 2.
>> 4. Generator for Ito process. I'm not sure about Stratanovich processes as
>> they are rarely used in finance.
>> 
> 
> Have a look at o.a.c.m.distribution if you have not already done so.  If you
> just provide an implementation of the distribution, a default
> inversion-based sampler will be inherited from the base class.  If you want
> to improve the sampling, you can (eventually) override the sample() method.
> 
> Phil
> 
> 
>> 
>> Regards,
>> Pavel
>> 
>> On Dec 21, 2010, at 22:27 PM, Ted Dunning wrote:
>> 
>>> Sounds interesting to have to me.
>>> 
>>> Do you generate samples?
>>> 
>>> On Tue, Dec 21, 2010 at 12:38 PM, Pavel Ryzhov <pavel.ryzhov@gmail.com
>>> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> I've implemented Levy distribution on top of commons-math. The
>>>> implementation is pretty straightforward by
>>>> http://en.wikipedia.org/wiki/Lévy_distribution<http://en.wikipedia.org/wiki/L%C3%A9vy_distribution>
>> <http://en.wikipedia.org/wiki/L%C3%A9vy_distribution>So it was not a big
>> deal. The distribution is of interest to the financial
>>>> modeling, so it might worth to include it into the library.
>>>> 
>>>> So, do we need it in commons-math?
>>>> 
>>>> Regards,
>>>> Pavel
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>> 
>>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [math] Levy distribution

Posted by Phil Steitz <ph...@gmail.com>.
On Tue, Dec 21, 2010 at 5:03 PM, Pavel Ryzhov <pa...@gmail.com>wrote:

> No, right now.
>
> But i'll definitely make sample generation as i'm writing small Monte Carlo
> engine.
> My current plan is:
> 1. Levy distribution as the first step for contribution.
> 2. Stable distribution and generic distributions by characteristic
> function. I've already started working on it.
> 3. Generators for 1 and 2.
> 4. Generator for Ito process. I'm not sure about Stratanovich processes as
> they are rarely used in finance.
>

Have a look at o.a.c.m.distribution if you have not already done so.  If you
just provide an implementation of the distribution, a default
inversion-based sampler will be inherited from the base class.  If you want
to improve the sampling, you can (eventually) override the sample() method.

Phil


>
> Regards,
> Pavel
>
> On Dec 21, 2010, at 22:27 PM, Ted Dunning wrote:
>
> > Sounds interesting to have to me.
> >
> > Do you generate samples?
> >
> > On Tue, Dec 21, 2010 at 12:38 PM, Pavel Ryzhov <pavel.ryzhov@gmail.com
> >wrote:
> >
> >> Hi,
> >>
> >> I've implemented Levy distribution on top of commons-math. The
> >> implementation is pretty straightforward by
> >> http://en.wikipedia.org/wiki/Lévy_distribution<http://en.wikipedia.org/wiki/L%C3%A9vy_distribution>
> <http://en.wikipedia.org/wiki/L%C3%A9vy_distribution>So it was not a big
> deal. The distribution is of interest to the financial
> >> modeling, so it might worth to include it into the library.
> >>
> >> So, do we need it in commons-math?
> >>
> >> Regards,
> >> Pavel
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >> For additional commands, e-mail: dev-help@commons.apache.org
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Re: [math] Levy distribution

Posted by Pavel Ryzhov <pa...@gmail.com>.
No, right now.

But i'll definitely make sample generation as i'm writing small Monte Carlo engine. 
My current plan is:
1. Levy distribution as the first step for contribution.
2. Stable distribution and generic distributions by characteristic function. I've already started working on it.
3. Generators for 1 and 2.
4. Generator for Ito process. I'm not sure about Stratanovich processes as they are rarely used in finance.

Regards,
Pavel

On Dec 21, 2010, at 22:27 PM, Ted Dunning wrote:

> Sounds interesting to have to me.
> 
> Do you generate samples?
> 
> On Tue, Dec 21, 2010 at 12:38 PM, Pavel Ryzhov <pa...@gmail.com>wrote:
> 
>> Hi,
>> 
>> I've implemented Levy distribution on top of commons-math. The
>> implementation is pretty straightforward by
>> http://en.wikipedia.org/wiki/Lévy_distribution<http://en.wikipedia.org/wiki/L%C3%A9vy_distribution>So it was not a big deal. The distribution is of interest to the financial
>> modeling, so it might worth to include it into the library.
>> 
>> So, do we need it in commons-math?
>> 
>> Regards,
>> Pavel
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [math] Levy distribution

Posted by Ted Dunning <te...@gmail.com>.
Sounds interesting to have to me.

Do you generate samples?

On Tue, Dec 21, 2010 at 12:38 PM, Pavel Ryzhov <pa...@gmail.com>wrote:

> Hi,
>
> I've implemented Levy distribution on top of commons-math. The
> implementation is pretty straightforward by
> http://en.wikipedia.org/wiki/Lévy_distribution<http://en.wikipedia.org/wiki/L%C3%A9vy_distribution>So it was not a big deal. The distribution is of interest to the financial
> modeling, so it might worth to include it into the library.
>
> So, do we need it in commons-math?
>
> Regards,
> Pavel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>