
Hi Krishna

One more query that how can the two VaR numbers be so much different...
I have also worked on different types of VaR methods especially like "best 
of the both worlds"

> require(VaR)
[1] TRUE
>  data(DJIA)
>  require(MASS)
[1] TRUE
>  nsim<-1000
>  ticker<-c("INTC","IBM","GE")
>  mydata<-as.matrix(subset(DJIA,select=ticker))
>  retdata<-diff(log(mydata))
>  cov.mat<-cov(retdata)
>  wts<-c(0.2,0.4,0.4) # define your portfolio weights.
>  hist.vol<- sqrt(wts %*% cov.mat %*% wts)
>  ret.mean<-apply(retdata,2,mean)
>  hist.mean<-sum(ret.mean,wts)
>  #Historical VaR estimate
>  hist.var <- qnorm(0.05,mean=hist.mean,sd=hist.vol)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  cat("historical VaR at the 95% level \n ", format(hist.var,digits=2))
historical VaR at the 95% level 
  0.97
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  sim.ret<-mvrnorm(nsim,mu=ret.mean,Sigma=cov.mat)
>  sim.wtret<-t(wts * t(sim.ret))
>  x11()
>  hist(sim.wtret)
>  #read the VaR as the quantile of the loss distribution
>  mc.var<-quantile(sim.wtret,0.05)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  cat("mc VaR at the 95% level \n ", format(mc.var,digits=2))
mc VaR at the 95% level 
  -0.013> 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
thanks




   Sayonara With Smile & With Warm Regards :-)

  G a u r a v   Y a d a v
  Senior Executive Officer,
  Economic Research & Surveillance Department,
  Clearing Corporation Of India Limited.

  Address: 5th, 6th, 7th Floor, Trade Wing 'C',  Kamala City, S.B. Marg, 
Mumbai - 400 013
  Telephone(Office): - +91 022 6663 9398 ,  Mobile(Personal) (0)9821286118
  Email(Office) :- gyadav@ccilindia.co.in ,  Email(Personal) :- 
emailtogauravyadav@gmail.com


============================================================================================
DISCLAIMER AND CONFIDENTIALITY CAUTION:\ \ This message and ...{{dropped}}

