Description Usage Arguments Value Examples
View source: R/stockAnalyzer.R
Using the trend of the stock by using exponential smoothing method
1 | visExpSmoothing(data, alpha, name)
|
data |
xts a time series object |
alpha |
A numeric vector of the smoothing parameter which defines the weighting. It should be between 0 and 1 |
name |
a character vector of the name of the column to be used in moving average calculation |
ggplot line plot of specific stock's historical prices and exponentially smoothed prices
1 2 | quantmod::getSymbols("AAPL")
visES_AAPL <- visExpSmoothing(AAPL, 0.3, 'AAPL.Close')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.