Description Usage Arguments Examples
This function takes a data frame of stock prices and a date variable created by get_close and creates a new data frame with returns for different durations. The default options are daily, weekly, monthly, and total. By specifying a number for per.len, the returns will be for a period of that many days.
1 |
df |
data frame |
per.len |
character or number. The length of the period. E.g. weekly, monthly, daily, total |
per.st |
the start of the period. Default to 1. For weekdays, 1 corresponds to Sunday. |
ann |
If TRUE, the returns be annualized. Default to FALSE |
quietly |
TRUE, If FALSE, then it will print the period length |
1 | ret_type()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.