Serving the Quantitative Finance Community

Search found 4 matches

by yoki
August 6th, 2004, 8:29 pm
Forum: Technical Forum
Topic: Complex logarithm in Heston Model
Replies: 14
Views: 188577

Complex logarithm in Heston Model

<t>Hi! As we know that to implement the Heston Model, we need the complex logarithm log(z)=log|z|+i(arg(z)+2*pi*n). But Matlab, Excel and C++ usually restrict the logarithm to its principle branch by restricting arg(z) in [-pi, pi] and setting n=0. This makes the log-function discontinuous at the cu...
by yoki
August 5th, 2004, 3:36 pm
Forum: Student Forum
Topic: Monte Carlo of Heston Model
Replies: 13
Views: 182038

Monte Carlo of Heston Model

<t>QuoteOriginally posted by: SPAAGGtake absolute valueThank you, SPAAGG. Does it the usual way people do when this problem happens. At first I am also thinking about to set V=0 when it gets negative number, what do think about it? What I worry about is if I make such change, taking absolute value o...
by yoki
August 5th, 2004, 3:25 pm
Forum: Student Forum
Topic: Pitfalls of complex logarithm in Heston Model
Replies: 0
Views: 179195

Pitfalls of complex logarithm in Heston Model

<t>Hi! As we know that to implement the Heston Model, we need the complex logarithm log(z)=log|z|+i(arg(z)+2*pi*n). But Matlab, Excel and C++ usually restrict the logarithm to its principle branch by restricting arg(z) in [-pi, pi] and setting n=0. This makes the log-function discontinuous at the cu...
by yoki
August 5th, 2004, 2:55 pm
Forum: Student Forum
Topic: Monte Carlo of Heston Model
Replies: 13
Views: 182038

Monte Carlo of Heston Model

<t>Hi, every one. I am doing the Monte Carlo of Heston Model. But I found that when I impletement the second SDE (actually it is CIR model)for the volatility dV(t)=k*(theta-V(t))*dt+sigma*sqrt(V(t))*dW. It will get negative number sometimes which is inconsistent with the fact that it can only be non...