17. april 2008

10 x speed increase in gaussian random numbers in excel


For generating Gaussian random numbers in Excel, one could simply do

=NORMSINV(RAND())


but the performance is horrible. Instead, try this VBA function from www.vbnumericalmethods.com.
It will easily give you a 10x speed increase:

'From Jack at www.vbnumericalmethods.com
'Simulate a Gaussian variable N(0,1)
Public Function Gauss()
Dim fac As Double, r As Double, V1 As Double, V2 As Double
10 V1 = 2 * Rnd - 1
V2 = 2 * Rnd - 1
r = V1 ^ 2 + V2 ^ 2
If (r >= 1) Then GoTo 10
fac = Sqr(-2 * Log(r) / r)
Gauss = V2 * fac
End Function

3. april 2008

Young entrepreneur



Do you ever google yourself? I did so today, and found this article in Universitas from 2003. Looking back five years feels good, I recognize both who I was and who I am.

The article describes a venture we did in 2003-2005. Building your own business and making it cash-positive is a great, although hard, experience. The mindset of business rally can't be learned any other way, and the start-up experience really helped shape who I am as a professional.