Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Risk Management Quantative Techniques

library(XLConnect)

locat<-"Data.xlsx"

datap<-as.matrix.data.frame(readNamedRegionFromFile(locat,"data",FALSE))

datao <- matrix(, nrow = 20, ncol = 20)

for(j in 1:20)

for(i in 1:400)

datao[i][j]<

return <- matrix(, nrow = 19, ncol = 20)

for(j in 20:1)

for(i in 20:2 )

return[i-1][j]<-(datap[i-1][j]-datap[i][j])/datap[i][j]

You might also like