[R-SIG-Finance] Value-at-risk
Brian G. Peterson
brian at braverock.com
Thu May 12 13:57:38 CEST 2011
There is over 100 pages of documentation available with
PerformanceAnalytics.
I suggest you start with
install.packages("PerformanceAnalytics")
#you only need to do the install the first time
require(PerformanceAnalytics)
?VaR
from the R prompt. See the examples at the bottom of the VaR
documentation.
Hopefully that will get you started. If you have trouble, you may email
the R-SIG-Finance list or me with an example of what you're trying to
do. Ideally, start with some publicly available data (use the edhec or
managers data in Performanceanalytics, or use getSymbols to pull stock
data from Yahoo or Google) so that others can replicate what you're
trying to do and help you with code rather than vague suggestions.
Regards,
- Brian
On Thu, 2011-05-12 at 13:47 +0200, Emmanuel Senyo wrote:
> Dear Brian,
> Thanks for the mail, I have now located the PerformanceAnalytics.
> Could you please elaborate on it how I could use this package, the
> fact is that I am new to R, how i would like compute value at risk
> for prices and volumes. If I can get a sample scripts with explanation
> that would be very helpful to me to enable me build my own scripts.
> Regards
> Emma
>
> On Thu, May 12, 2011 at 1:21 PM, Brian G. Peterson
> <brian at braverock.com> wrote:
>
> On Thu, 2011-05-12 at 12:38 +0200, Emmanuel Senyo wrote:
> > Dear All,
> > I am currently work on Value-at-risk and would like to know
> the package that
> > is helpful in this regard. It consist of three method, that
> is variance
> > covariance method, Monte carlo simulation, and Historical
> simulation.
> > Regards
> > Em
>
>
> The Gaussian and Historical methods are available in
> PerformanceAnalytics.
>
> You can easily use the Monte Carlo method of your choice to
> create a
> longer sample, and then use PerformanceAnalytics to calculate
> the VaR.
>
> There are also several bootstrap Monte Carlo methods in
> PerformanceAnalytics that have been contributed by Eric Zivot,
> but which
> we have not yet documented and exposed.
>
> Regards,
>
> - Brian
>
> --
> Brian G. Peterson
> http://braverock.com/brian/
> Ph: 773-459-4973
> IM: bgpbraverock
>
>
--
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock
More information about the R-SIG-Finance
mailing list