help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Maxi/minimization stupid question - CIR stochastic process


From: Michael Creel
Subject: Re: Maxi/minimization stupid question - CIR stochastic process
Date: Fri, 9 Jul 2010 08:09:05 -0700 (PDT)

On Fri, Jul 9, 2010 at 3:58 PM, AlbFrigerio [via Octave]
<[hidden email]> wrote:

> Wow Michale, it sounds great to me ... but running it I've got a problem.
>
> I found a way to calculate a suitable initial params vectors using the
> following code :
>
> N=length(data);
> params = [ones(N -1,1) , data(1:N -1)];
> ols = (params'*params)^(-1)*(params'* data(2: N));
> m= mean(data); v= var(data);
> params = [- log(ols(2))/ dt , m, sqrt(2*ols(2)*v/m)];
>
> I wonder this choice would have helped the bfgsmin function to reach the
> solution in a little time, but using this Input Octave crashes :(
>
> May you tell if it is a problem of my PC ?
>
> Thanks again, your idea was really really smart!
>
>    Alberto
>
> ________________________________
> View message @
> http://octave.1599824.n4.nabble.com/Maxi-minimization-stupid-question-CIR-stochastic-process-tp2282588p2283220.html
> To unsubscribe from Re: Maxi/minimization stupid question - CIR stochastic
> process, click here.
>

Hi Alberto,
In general, bulletproofing the objective function in a way to avoid
taking logs of negative numbers, and so forth, is a good idea. I
believe that this problem can easily occur with the way your function
is written. I don't know anything about this model, so I can't say
much more than that.
Cheers,
Michael


View this message in context: Re: Maxi/minimization stupid question - CIR stochastic process
Sent from the Octave - General mailing list archive at Nabble.com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]