Hello,

I have a problem with calculating the VaR of stockfonds.

Here the stockfonds dataset:
http://www.ci.tuwien.ac.at/~weingessel/FStat2006/stockfonds.csv

library(VaR)
library(fPortfolio)
library(e1071)

stock <- read.table("stockfonds.csv", header=TRUE, sep=",")
tstock = ts(impute(stock[,2:6]), start=c(2004, 1), end=c(2006, 68),
frequency=256) # imputing the NA's
plot(tstock)
tstock <- diff(tstock)

apply(tstock,2,function(x) VaR(x,alpha=0.01)) # are these the right VaR's
for the stockfonds?

apply(tstock,2,function(x) VaR.norm(x,p=0.99)$VaR) # this doesnt work :( I
want to calculate the same VaR as above, but under normal distribution

And I also have a problem with the historical simulation.
If I would invest 1000 dollars in one of these stockfonds on 2.5.2006, what
would be the 99%VaR/1day under historical simulation.
Is there a function for calculating this? I cant find something usefull on
google :(

KR,
Alin

	[[alternative HTML version deleted]]

