r != R (you mis-typed the first argument to VaR). This works:
library(PerformanceAnalytics)
data(sample_matrix)
x <- Return.calculate(as.xts(sample_matrix))
VaR(R=x, p=0.99, method="historical")
Best,
--
Joshua Ulrich | about.me/joshuaulrich
FOSS Trading | www.fosstrading.com
On Tue, Jun 2
The code is as follows:
monthreturns<-read.zoo('monthlyReturn date.csv',sep=",",header=T)
monthreturns<-as.xts(monthreturns,order.by
=index(monthreturns),frequency=NULL)*W0
head(monthreturns)
dim(monthreturns)
portnames<-c('acc','cipla','cmc','idbi','ifci') portfolio names (5
stocks)
Hi,
I am your member. Pl help me with the solution.
rgds
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-gu
3 matches
Mail list logo