From my Android phone on T-Mobile. The first nationwide 4G network. -------- Messaggio originale -------- Da: ESMERALDA PODA <podaesmera...@gmail.com> Data:12/22/2014 02:44 PM (GMT+01:00) A: r-help@r-project.org Oggetto: VaR and ES in R Hi everybody, This is the homework I am trying to solve. Ex. Assume that you have a position of 144530 shares of Bill inc.. The object Y2 contains an iid sample of the returns for these shares. Assume that data follow a Student distribution. Compute the maximum likelihood estimate for the model. Compute the estimation of V aRα and of ESα for α = 0.99 based on the obtained estimates, using a parametric formula or with the pure Monte Carlo method Obtain a bootstrap confidence interval for V aRα and of ESα for α = 0.99 at a confidence level 0.90, using B = 1000 replications. I solved point 1. (you can see the screenshot attached). However in point 2, where I have to compute VaR and ES, based on the estimates obtained in point 1. I typed this: #POINT 2 q<-114530 n.val <- 10000 x <- rt(n=n.val, obj=mle.t) loss.mc <- -Q*x but, I obtain error. I am working with a student distribution. I need particularly the obj=mle.t since I need to work on the estimate I have obtained. Can somebody, who is familiar with VaR and ES give me some hint through this? I would really appreciate this. Best Attachments area Preview attachment Schermata 2014-12-22 alle 12.04.16.png Schermata 2014-12-22 alle 12.04.16.png [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.