betas: Compute the betas provided the returns and covariance matrx...

Description Usage Arguments Value Author(s) Examples

View source: R/capm.R

Description

This function computes the betas by inputting the vector of returns and the covaraince matrix of some assets as well as a vector of weights of some portfolio.

Usage

1
betas(wt_p, mu, Omega)

Arguments

wt_p

a vector of weights of some portfolio.

mu

a vector of returns of some assets.

Omega

a positive definite covaraince matrix of the returns.

Value

a vector of betas.

Author(s)

Yukai Yang, yukai.yang@statistik.uu.se

Examples

1
2
3
4
5
6
Omega = crossprod(matrix(rnorm(25),5,5))
mu = runif(5,min=.05,max=.15)
wt_p = rnorm(5)
wt_p = wt_p/sum(wt_p)

betas(wt_p, mu, Omega)

yukai-yang/FE documentation built on May 29, 2019, 12:19 p.m.