diff options
| -rw-r--r-- | R/intex_deal_functions.R | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/R/intex_deal_functions.R b/R/intex_deal_functions.R index 5184129a..0b6bfcbe 100644 --- a/R/intex_deal_functions.R +++ b/R/intex_deal_functions.R @@ -345,7 +345,9 @@ get.reinvassets <- function(dealname, tradedate){ }
getpayday <- function(dealdata, tradedate){
- ## try to compute the previous deal pay date
+ ## try to compute the previous pay date of a deal
+ ## it relies on thwo things to be accurate: the pay_day
+ ## as well as the first_pay_date (that's how we get the month)
m <- as.numeric(format(dealdata$first_pay_date, "%m"))
m <- m %%3+9
y <- as.numeric(format(tradedate, "%Y"))
|
