Re: [R] Value at Risk

From: <gyadav_at_ccilindia.co.in>
Date: Fri, 11 May 2007 10:52:38 +0530

reply is inline

          \\\|||||///
       \\   -    -   //
        (  o   o  )

oOOo-(_)-oOOo--------
|
| Gaurav Yadav
| Assistant Manager, CCIL, Mumbai (India)
| Mob: +919821286118 Email: emailtogauravyadav_at_gmail.com
| Man is made by his belief, as He believes, so He is.
| --- Bhagavad Gita
|_______Oooo________
         oooO(      )
         (      )   )   /
          \   (    (_/
            \_ )



++++++++++++++++++

apply(tstock,2,function(x) VaR(x,alpha=0.01)) # are these the right VaR's for the stockfonds?
@@@ you can yourself see it, you have around 579 observation and 1% of it mean 5.79th observation
Thus if you become risk averse then you take the 5th smallest value and otherwise 6th value.
So just sort the returns in ascending order and then see the 5th and the 6th values

> sorted_espa_stock_europe<-sort(tstock[,2]) > sorted_espa_stock_europe[5]
[1] -2.86
> sorted_espa_stock_europe[6]
[1] -2.74
>

your code gives -2.86 thus you can get the rest :-) cheers

.



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

R-help_at_stat.math.ethz.ch mailing list
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. Received on Fri 11 May 2007 - 05:26:22 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 11 May 2007 - 05:31:54 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.