get_annual_dividends: Get Annualized Security Dividends

Description Usage Arguments Details Value Examples

View source: R/Symbols.R

Description

Wrapper function around get_dividends function that returns annualized dividends based on prior years dividend payments. Annual dividend used to calculate security yield

Usage

1

Arguments

symbols

vector of stock symbol characters. can be 1 or more

Details

Annual dividend is calculated as the sum of prior years payments. Note if either 5 or 13 payments returned, dividend trims the first payment

Value

data.frame with 1 record per symbol with annual dividend, avg payment, number of payments per year and last payment date

Examples

1
2
3
4
library(tidyverse)
library(quantmod)
symbols <- c("spy", "tlt")
dividends <- symbols %>% get_annual_dividends(., start_date = "2016-01-01")

chrishaarstick/madstork documentation built on Jan. 3, 2022, 8:34 p.m.