I want to accomplish the task of creating an optimal portfolio of stocks, the yield between which is modeled using kopulas.

And I have data: return of 4 stocks:

s1 <- read.csv('s1.csv',header=F)$V2
s2 <- read.csv('s2.csv',header=F)$V2
s3 <- read.csv('s3.csv',header=F)$V2
s4 <- read.csv('s4.csv',header=F)$V2

Then I tried to fit t-copula and plot the density

t.cop <- tCopula(dim=4)
m <- pobs(as.matrix(cbind(s1,s2,s3,s4)))
fit <- fitCopula(t.cop,m,method='ml')
rho <- coef(fit)[1]
df <- coef(fit)[2]

But I cant understand how to build other types of copulas(vine copulas for example). And how can I find an optimal portfolio?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.