Skip to content

historical simulation with EWMA fitting

1 message · J Konnonen

#
Dear All,

I am trying to do a historical simulation with EWMA fitting for the variances, but I ran into some problems

The relevant part of my code is the following (using the EWMA function in fTrading package)
However, for some reason it doesn't produce the expected results.

I ran the same simulation on the same data with GARCH fitting for the standard deviations, and that works perfectly. 

My debugging showed that the obvious difference between my GARCH and EWMA fittings is, that while the values in the yearly timeseries of the standard deviations from the GARCH fitting move with minimal change from one day to another, the variances from the above EWMA fitting are jumping almost random from day to day in a fairly wide range, resulting the varloss and the VaR variables also do the same. 

I also tried to do the EWMA fitting using the ewmaSmooth function in the qcc package the following way
and it seemed to result the same behaviour is above. 

So I suppose I must do something wrongly in coding the EWMA fitting itself, but I was not able to figure it so far

Any suggestions are very much appreciated.

Best regards,
/Johan