Public Function Levy_process(ByVal lambda, ByVal N, ByVal start, ByVal fin, ByVal r, ByVal sigma, ByVal a, ByVal G) 'Simulate a Levy process of the following form 'Xt=at+gWt+CPt 'Wt : Standard Brownian motion 'CPt : Compound Poisson process with N(r,sigma) underprocesses and parameter lambda Dim i As Long Dim dt As Double Dim vec() As Double ReDim vec(0 To N) CP = CompoundPoisson_process(lambda, N, start, fin, r, sigma) w = Brownian_process(0, N, 0, 1) dt = (fin - start) / N For i = 0 To N vec(i) = a * dt + G * w(i) + CP(i) Next i Levy_process = vec End Function