Return rate
1 | return_rate(stock.price, type = "raw", days = NA)
|
stock.price |
Vector of a stock price series, time level could be 1day, 1hour or 1min. |
type |
Value of type muste be one of 'raw','day' and 'year'. When type equals to 'raw' then calculate the total return rate, when type equals to 'day' then calculate daily return rate, when type equals to year then calculate annual return rate. |
days |
Time span of day of the input stock data. If type is set to 'day' or 'year', this value must given. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.