OpenBI Docs Buy

Bloomberg.HistoricalData OpenBI

Bloomberg's history of fields for securities between two dates, as Excel's BDH gives it.

Group: Online services. OpenBI’s own: Power Query M has no function of this name.

Syntax

Bloomberg.HistoricalData(securities as any, fields as any, startDate as any, endDate as any, optional options as nullable record) as table
ParameterTypeDescription
securitiesanyA security, or a list of them.
fieldsanyA field, or a list of them.
startDateanyThe first day: a date, a datetime, or text as 2026-01-31.
endDateanyThe last day, given the same way.
optionsnullable record
optional
Periodicity ("DAILY", "WEEKLY", "MONTHLY", "QUARTERLY" or "YEARLY"), Overrides, Host and Port.

Returns

table. Security, Date and a column per field; a row per security and date.

Remarks

  • Daily unless Periodicity says otherwise.
  • It asks a Bloomberg Terminal running on this computer, signed in, through its Desktop API; the computer's Python, with Bloomberg's blpapi and pandas, sends the request. Host and Port in the options point to a Terminal elsewhere, or a B-PIPE server (localhost and 8194 unless you say).

Compared with Power Query

An OpenBI function: Power Query has none like it, so a query that uses it runs in OpenBI only, not in Power BI Desktop or the Power BI service.

Examples

A month of closing prices

Bloomberg.HistoricalData({"SPX Index", "OBX Index"}, "PX_LAST", #date(2026, 1, 1), #date(2026, 1, 31))

Result: not shown here: it needs a Bloomberg Terminal, running and signed in.

Month ends for a year

Bloomberg.HistoricalData("OBX Index", {"PX_LAST", "PX_VOLUME"}, #date(2025, 1, 1), #date(2025, 12, 31), [Periodicity = "MONTHLY"])

Result: not shown here: it needs a Bloomberg Terminal, running and signed in.

Bloomberg.ReferenceData, Bloomberg.Query.

Last updated · OpenBI Studio 0.3.79