Function Heston(Actualvol, m, theta, col, nSim) As Double
Dim Actualvol As Double,FinalVol As DOuble, VT As Double, i As Integer, theta As Double, col As Double, m As Double, nSim As Long
dt = 1 / 252
For i = 1 To nSim
VT = Actualvol + m * (theta - Actualvol) * dt + col * Sqr(Actualvol) * Application.NormInv(Rnd(), 0, 1) * Sqr(dt)
Sum = Sum + VT
Next
FinalVol = Sqr(VT)
Heston = FinalVol
End Function
请检查编译器说的原因"在当前范围之外复制错误" ?