| fg_ratingsEvents | R Documentation |
Calls tidyquant::tq_get() to get dividends for a given set of tickers. A previously created data.frame can also be input.
Created event_ds from alphavantagepf::av_get_pf quarterly earnings data.
fg_ratingsEvents(credit, ratings_db, agency = "S.P")
fg_tq_divs(tickers, divs_ds = NULL, ticker_in_label = TRUE)
fg_av_earnings(indt, field = "reportedEPS", ticker_in_label = FALSE)
credit |
String with name of credit to look up in 'ratings_db' | |||||||||||||||||||
ratings_db |
A 'data.table' or 'data.frame' with the all of the following columns:
| |||||||||||||||||||
agency |
String (default 'S.P') with 'AGENCY to look up in 'ratings_db' | |||||||||||||||||||
tickers |
List of tickers to get dividends for. | |||||||||||||||||||
divs_ds |
Alternatively a | |||||||||||||||||||
ticker_in_label |
(Default: TRUE) Make label ticker and the earnings | |||||||||||||||||||
indt |
| |||||||||||||||||||
field |
(Default: |
Investment grade ratings are shaded in blue, High Yield are in red. Darker areas are closest to the cutoff between the two.
data.table suitable for passing into fgts_dygraph() via the event_ds parameter
data.table suitable for passing into fgts_dygraph() via the event_ds parameter
data.table suitable for passing into fgts_dygraph() via the event_ds parameter
data("nomfxdta")
copdta <- nomfxdta |> dplyr::filter(variable=="COP")
fgts_dygraph(copdta,title="COP with Ratings",dtstartfrac=0.3,
event_ds=fg_ratingsEvents("COLOM",ratings_db,agency="S.P"))
if (requireNamespace("tidyquant", quietly = TRUE)) {
fgts_dygraph(eqtypx,title="With divs",dtstartfrac=0.8,event_ds=fg_tq_divs(c("IBM","QQQ")))
}
if (requireNamespace("alphavantagepf", quietly = TRUE)) {
earnings = alphavantagepf::av_get_pf("IBM","EARNINGS") |>
alphavantagepf::av_extract_df("quarterlyEarnings") |>
fg_av_earnings()
toplot = dplyr::select(eqtypx,date,IBM)
fgts_dygraph(toplot,title="With earnings",dtstartfrac=0.8,event_ds=earnings)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.