betaf: Calculating beta for a company or a select of companies

Description Usage Arguments Examples

View source: R/betaf.R

Description

Calculating beta using common method or linear regression(OLS)

Usage

1
betaf(x,y,method)

Arguments

x

:a vector or a data.frame of rate of return of companies

y

:name of the independent variable

method

:method of calculation; method = 1 for a common expression of beta(see detail); method = 2 using linear regression to estimate the beta

Examples

1
#betaf(appl,sp500)

Example output



FinAna documentation built on May 2, 2019, 2:51 p.m.

Related to betaf in FinAna...