Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get trading holidays from the Bloomberg API

I'm using Bloomberg Java api to download trading data. I need somebody to tell me if there exists a function which can return a list of trading holidays. I looked through the manual but couldn't find one. If there's no such a thing, is there a good way that I can create one? Thanks.

like image 287
Shang Wang Avatar asked Oct 26 '11 17:10

Shang Wang


People also ask

Does Bloomberg provide API?

Bloomberg Server API (SAPI) delivers a powerful complement to the Bloomberg Terminal. SAPI allows you to consume Bloomberg's unique real-time market, historical, and key reference data, as well as calculation engine capabilities when using proprietary and third-party applications.

What is Bloomberg API used for?

With Bloomberg Server API (SAPI), clients can access real-time market, historical, and key reference data, as well as calculation tools. SAPI integrates Bloomberg data with both proprietary and third-party client server applications, making SAPI a solution for clients looking to better manage their datasets.

Is there a way to download a Bloomberg holiday calendar?

The Bloomberg API will tell you, for a given security, the appropriate calendar code using DS853 (CALENDAR_CODE). Given a calendar code, I do not believe that Bloomberg provides a way to download a holiday calendar. You may need to use a third party vendor such as Financial Calendar. Show activity on this post.

What can I do with the Bloomberg API?

In the future, the Bloomberg API may support delivering information other than market data through a subscription service. 5.1 Starting a Subscription There are four parts to creating a subscription; however several have default values:

How do I log in to my Bloomberg Terminal?

Press the "Enter" key or "GO" button on your Bloomberg Terminal to access the log in screen and log in. Type the name or ticker of the publicly traded company in the search bar at the top of the screen. Scroll down with the arrow keys on your keyboard until the company you selected is highlighter under "Securities". Then press on GO your keyboard.

What is the Bloomberg API 18?

1 Introduction to the Bloomberg API 18 The Desktop API The Desktop APIis used when the end-user application resides on the same machine as the installed BLOOMBERG PROFESSIONAL service and connects to the local Bloomberg Communications Server (BBComm) to obtain data from the Bloomberg Data Center (see Figure 1-3). Figure 1-3: The Desktop API


3 Answers

String field = "CALENDAR_HOLIDAYS";
//String field = "CALENDAR_NON_SETTLEMENT_DATES";
Request request = this._refDataServiceM.CreateRequest("ReferenceDataRequest");
Element securities = request.GetElement("securities");
securities.AppendValue("AAPL US Equity");
Element fields = request.GetElement("fields");
fields.AppendValue(field);

Element overridefields = request.GetElement("overrides");
Element overrides = request.GetElement("overrides");
Element override1 = overrides.AppendElement();
override1.SetElement("fieldId", "SETTLEMENT_CALENDAR_CODE");
override1.SetElement("value", calendar_code);
Element override2 = overrides.AppendElement();
override2.SetElement("fieldId", "CALENDAR_START_DATE");
override2.SetElement("value", startDate.ToString("yyyyMMdd"));
Element override3 = overrides.AppendElement();
override3.SetElement("fieldId", "CALENDAR_END_DATE");
override3.SetElement("value", endDate.ToString("yyyyMMdd"));
like image 128
9swampy Avatar answered Oct 20 '22 00:10

9swampy


The Bloomberg API will tell you, for a given security, the appropriate calendar code using DS853 (CALENDAR_CODE). Given a calendar code, I do not believe that Bloomberg provides a way to download a holiday calendar. You may need to use a third party vendor such as Financial Calendar.

like image 34
Frank Avatar answered Oct 20 '22 01:10

Frank


I had issues getting the accepted answer to work. Turned out the SETTLEMENT_CALENDAR_CODE isn't needed. The following worked:

{
securities[] = {
    /bbgid/BBG00HZZLBT7
}
fields[] = {
    CALENDAR_NON_SETTLEMENT_DATES
}
overrides[] = {
    overrides = {
        fieldId = "CALENDAR_START_DATE"
        value = "20180101"
    }
    overrides = {
        fieldId = "CALENDAR_END_DATE"
        value = "20190101"
    }
}
tableOverrides[] = {
}
}

Response:

{
securityData[] = {
    securityData = {
        security = "UXA INDEX"
        eidData[] = {
        }
        fieldExceptions[] = {
        }
        sequenceNumber = 0
        fieldData = {
            CALENDAR_NON_SETTLEMENT_DATES[] = {
                CALENDAR_NON_SETTLEMENT_DATES = {
                    Holiday Date = ...
                }
                CALENDAR_NON_SETTLEMENT_DATES = {
                    Holiday Date = ...
                }
                ...
            }
        }
    }
}
}
like image 25
ruediste Avatar answered Oct 19 '22 23:10

ruediste