My new baby: Silver Fern

Just a little gardening as today is a Wellington holiday.

Silver Fern (Cyathea Dealbata)

How social is Anymatters?

Instead of personal webpages like:, KeziaWatch, MasakanNina, KezianaGallery, Anymatters, Anymatters Photoblog, FinMod, and AstraWatch, Anymatters has also helped out some friends to create their own webpages:

A missionary teacher heritage

Graveyard of Maria Magdalena (Madeline) Frans-Schalkwijk, wife of Cornelius Umboh. Madeline Frans-Schalkwijk is the daughter of a Dutch missionary teacher commissioned by Nederlandse Hervormde Kerk to develop secondary primary education in Minahasa, Indonesia circa 1860-1890. She is the grandmother of Soleman Karel Umboh.

Hier Rust
Ood 68 Jaar
25 Juni '09

Holiday pics

I go back to work on Monday the 7th. This holiday season we just spent our time in NZ, instead of visiting our family in Jakarta and Manado like we did last year.

Update: yes, we've been enjoying our summer mainly at beaches around Wellington: Oriental Bay, Breaker Bay and Scorching Bay.

A noisy market siren

The idea is to automatically activate a noisy siren from a sound file when opening the excel file as the market index value drops to, or is below, the minimum expected value. The market index value is refreshed every 30 minutes.

Eg. the index value alert is 4,300. If the market index value is below 4,300, the noisy siren will be automatically activated.

I first set a WebQuery for the market index latest price with automatic refresh every 30 minutes. Then, apply VBA macro to call a sound file.

I modified the VBA codes taken from and as follows:

Public Declare Function sndPlaySound Lib "winmm.dll" _
Alias "sndPlaySoundA" (ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long
Sub PlayWavFile(WavFileName As String, Wait As Boolean)

If Dir(WavFileName) = "" Then Exit Sub
If Wait Then
sndPlaySound WavFileName, 0
sndPlaySound WavFileName, 1
End If

End Sub
Sub PlaySoundAlert()

For i = 1 To 5

PlayWavFile "c:\WINDOWS\Media\notify.wav", True

Next i

End Sub
Function Alarm(V)

x = Range("alert")

If V <= x Then

Call PlaySoundAlert

Alarm = True
Exit Function
Alarm = False

End If

End Function

VBA Progress Indicator

I learn how to create an VBA progress indicator from j-walk blog after surfing around and finally found the simplest one.

And now I can apply it into my portfolio optimisation model, as follows:

Sub optimise()

Dim PctDone As Single

Application.ScreenUpdating = False

nosim = Range("nosim")

For i = 1 To nosim

Application.DisplayStatusBar = True
Application.StatusBar = "Please be patient..."

Range("simmeanresult").Cells(71 + i, 1).PasteSpecial Paste:=xlPasteValues

Count = Count + 1
PctDone = Count / nosim

With UserForm1
.FrameProgress.Caption = Format(PctDone, "0%")
.LabelProgress.Width = PctDone * (.FrameProgress.Width - 10)
End With


Next i

Unload UserForm1

Application.StatusBar = False

SolverOk SetCell:=Range("tangency"), MaxMinVal:=1, ValueOf:=0, ByChange:=Range("proweight")
SolverAdd CellRef:=Range("proweight"), Relation:=3, FormulaText:="0"
SolverAdd CellRef:=Range("one"), Relation:=2, FormulaText:="100%"
SolverSolve UserFinish:=True

Application.ScreenUpdating = True

End Sub

Selected works from

Today is Kezia's birthday and Keziana Financial Modelling website ( is launched. Here some selected works from it.

Dow Jones Index in the future

Happy New Year 2008. Wishing you a prosperous year of 2008 and years after.

I was again playing with random numbers simulation and found everlasting properous years of Dow Jones Index in the future.

Bear in mind, this is just a rough simulation played to get rid of boredness in the first day of 2008.

The process is as follows:

  1. Gather Dow Jones Index daily prices since 1-Oct-1928 and calculate the mean and standard deviation.
  2. Using NORMINV(rand(), cumulative mean, cumulative stdev), simulate the daily return.
  3. Using Price n * (1 + simulated daily return), estimate Price until n equals to 1-Jan-2100.

That's it. Easy.

Lotto generator


This lotto generator might not explain how I was so lucky two years ago. At least, randomness may still explain how people could win a lotto.

The process of this lotto generator:

1. Running a set of Monte Carlo simulations for getting 6 numbers from 1 to 40 randomly.
2. Calculating the probability statistics from the simulations.
3. Incorporating the historical statistics since the 1st draw until the latest one.
3. Picking up the highest probability numbers.

Powered by Blogger.