I have the following code that is pulling data from Bloomberg on a quarterly basis for the last 6 calendar quarters. My issue is I want the fields such as EBITDA_MARGIN_ADJUSTED to be a cumulative trailing 12 months (or cumulative for the last 4 quarters. In Bloomberg terminal it is controlled with FUND_PER = C.
I have looked through the documentation I could find and tried different periodicity values I could think of. Not much information on the options part.
fields <- c("TRAIL_12M_CASH_FROM_OPER", "CF_CASH_FROM_OPER", "EBITDA_MARGIN_ADJUSTED", "TOT_DEBT_TO_EBITDA")
opt <- c(periodicitySelection="QUARTERLY", periodicityAdjustment="FISCAL", returnRelativeDate=TRUE)
test <- bdh(c("NEE Equity","DUK EQUITY"),fields, start.date="-6CQ", options=opt)
The cash flow numbers have a cumulative field and I could pull the components of the EBITDA margin adjustment, but I am trying to limit my data pulls.