portfolio_vol_2stocks<-function(ret_mat,weight_1){
    x1<-weight_1
    x2<-1-x1
    s1<-sd(ret_matrix[,1])
    s2<-sd(ret_matrix[,2])
    temp1<-x1^2*s1^2
    temp2<-x2^2*s2^2
    temp3<-2*x1*x2*cov(ret_mat[,1],ret_mat[,2])
    v<-temp1+temp2+temp3
    return(sqrt(v))
}

