beta_trailing50: Beta for Last 50 Daily Gains

Description Usage Arguments Value Note Author(s) References Examples

Description

Calculate beta for a ticker symbol based on the previous 50 daily gains. The function loads historical prices from Yahoo! Finance and calculates beta by regressing the fund's gains vs. the benchmark's gains and extracting the slope.

Usage

1
beta.trailing50(ticker, benchmark.ticker = "SPY", ...)

Arguments

ticker

Ticker symbol for fund that you want to calculate beta for.

benchmark.ticker

Ticker symbol for benchmark fund.

...

Arguments to pass to load.gains function, which is called internally by this function.

Value

Numeric value indicating the trailing 50-day beta.

Note

NA

Author(s)

Dane R. Van Domelen

References

Acknowledgment: This material is based upon work supported by the National Science Foundation Graduate Research Fellowship under Grant No. DGE-0940903.

Examples

1
2
# Calculate TLT's beta based on the previous 50 daily gains
# beta.trailing50("TLT")

stocks documentation built on May 2, 2019, 5:22 p.m.