beta_trailing50 {stocks} | R Documentation |
Beta for Last 50 Daily Gains
Description
Calculates beta for a ticker symbol based on the previous 50 daily gains.
Usage
beta_trailing50(ticker, bench = "SPY", ...)
Arguments
ticker |
Character string with ticker symbols that Yahoo! Finance recognizes. |
bench |
Character string with ticker symbol for benchmark. |
... |
Arguments to pass to |
Value
Numeric value.
References
Ryan, J.A. and Ulrich, J.M. (2017) quantmod: Quantitative Financial Modelling Framework. R package version 0.4-12, https://CRAN.R-project.org/package=quantmod.
Examples
## Not run:
# Calculate TLT's beta based on the previous 50 daily gains
beta_trailing50("TLT")
## End(Not run)
[Package stocks version 1.1.4 Index]