populate_div_yield: Populate dividend yield using closest dividend

Description Usage Arguments Value

View source: R/populate_div_yield.R

Description

This function will add a yield column to a data.table which will be populated with the dividend yield. This yield uses the daily closing price and the dividend closest in time to that date (so likely an overestimate for about a month prior to any historic dividend raise).

Usage

1

Arguments

d

a data.table that includes the columns that come from pull_dat (divCash, date, splitFactor, close)

Value

a data.table with the same information as d but with a column for yield added (and sorted by date if not already)


David-Statistics/djmisc documentation built on Jan. 1, 2022, 4:04 p.m.