powered by
Calculates beta for a ticker symbol based on the previous 50 daily gains.
beta_trailing50(ticker, bench = "SPY", ...)
Character string with ticker symbols that Yahoo! Finance recognizes.
Character string with ticker symbol for benchmark.
Arguments to pass to load_gains.
load_gains
Numeric value.
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.
# NOT RUN { # Calculate TLT's beta based on the previous 50 daily gains beta_trailing50("TLT") # } # NOT RUN { # }
Run the code above in your browser using DataLab