bloomberg

Bloomberg API - using .Net API to get the FUT_CHAIN on an underlying security

此生再无相见时 提交于 2019-12-07 00:07:25
I am trying to query the Bloomberg API (.Net) to get the future chain on an underlying security. Preferably, I would be able to get the list of futures for a given date in the past. The equivalent operation in Excel using the worksheet formula API would be the following:- =BDS("ERA COMDTY","FUT_CHAIN","CHAIN_DATE=20120103", "INCLUDE_EXPIRED_CONTRACTS=Yes") I looked at a large number of online resources, and I don't seem to be getting anywhere. For the v3 API, you need to use request overrides. Request request = refDataService.createRequest("ReferenceDataRequest"); request.append("securities",

bloomberg API - Field Search Request

醉酒当歌 提交于 2019-12-06 16:00:22
How to make use of “category” according to “A.3.4 Field Search Request” of developers guide? The Bloomberglp.Blpapi.dll is from blpapi_dotnet_3.4.8.1., development by C# .net. I used the following code in order to get the information but it does not work. Service refDataSvc = session.GetService("//blp/refdata"); Request request = refDataSvc.CreateRequest("ReferenceDataRequest"); request.Append("securities", "/isin/CNE1000002Q2 HK"); Element element = request.GetElement("include"); element.SetElement("productType", "Equity"); element.SetElement("fieldType", "Static"); Element element1 = element

How can I start Bloomberg API in python?

给你一囗甜甜゛ 提交于 2019-12-06 15:57:30
问题 I managed to install blpapi in my python. However, there is error Exception: failed to start session My simple code is as follows. import blpapi import pandas as pd import tia.bbg.datamgr as dm mgr = dm.BbgDataManager() sids = mgr['MSFT US EQUITY', 'IBM US EQUITY', 'CSCO US EQUITY'] df = sids.get_historical('PX_LAST', '1/1/2014', '11/12/2014') What Can I do with this? Can you help? 回答1: Please clarify which IP and port you're attempting to connect to. If connecting to the local process

get data from bloomberg api with python via excel

无人久伴 提交于 2019-12-06 06:33:09
问题 I've written some code which successfully pulls data from the bloomberg api by using python to write a query in excel, it then launches excel gets the data via the bloomberg plugin, transfers the data into a csv (for easier use in python and other downstream needs) and returns. The only issue is that for the data to be pulled into excel I have to set time.sleep(40) before I save the file as the connection through excel needs enough time to pull the data. I am wondering if there is a way to

PyDES with Bloomberg data

帅比萌擦擦* 提交于 2019-12-06 04:37:30
I am trying to decrypt DES encoded Bloomberg financial data with PyDES. The file ends in gz.enc, I am able to read the file to a binary, reload the binary back in to a variable (the variable has data) and then use the following decryption on it. k = pyDes.des(password, pyDes.ECB, padmode=pyDes.PAD_PKCS5) released = k.decrypt(encrypted_data) The problem is I get an empty string for 'released'. I unfortunately cannot share the file nor the password due to privacy laws. I cannot use the bloomberg decryption as they do not support Ubuntu nor Mac. 来源: https://stackoverflow.com/questions/41398026

How do I get trading holidays from the Bloomberg API

痞子三分冷 提交于 2019-12-06 01:34:06
问题 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. 回答1: String field = "CALENDAR_HOLIDAYS"; //String field = "CALENDAR_NON_SETTLEMENT_DATES"; Request request = this._refDataServiceM.CreateRequest("ReferenceDataRequest"); Element securities = request.GetElement(

How to use Bloomberg Data History (BDH) command within Microsoft Visual Basic (VBA for Excel)

╄→尐↘猪︶ㄣ 提交于 2019-12-06 01:19:51
I would like to use a simple VBA script to call the Bloomberg BDH function in specific locations of my spreadsheet, which is computationally primitive. While the use of standard Excel functions doesn't see to be a problem, as soon as I insert the parts of the Bloomberg function that contain quotation marks (such as "Dates,Period", "H,M") I get an expected end of statement error. All I want to do is insert these function calls into specified cells. Unfortunately I have no experience with VBA and don't know why the quotation marks seem to mess it up. Is there an alternative for the =BDH function

How can I start Bloomberg API in python?

余生长醉 提交于 2019-12-04 21:14:16
I managed to install blpapi in my python. However, there is error Exception: failed to start session My simple code is as follows. import blpapi import pandas as pd import tia.bbg.datamgr as dm mgr = dm.BbgDataManager() sids = mgr['MSFT US EQUITY', 'IBM US EQUITY', 'CSCO US EQUITY'] df = sids.get_historical('PX_LAST', '1/1/2014', '11/12/2014') What Can I do with this? Can you help? Please clarify which IP and port you're attempting to connect to. If connecting to the local process 'bbcomm.exe' then the IP is 127.0.0.1 (localhost) and port 8194. Check if bbcomm.exe process is running (e.g. in

get data from bloomberg api with python via excel

血红的双手。 提交于 2019-12-04 13:33:18
I've written some code which successfully pulls data from the bloomberg api by using python to write a query in excel, it then launches excel gets the data via the bloomberg plugin, transfers the data into a csv (for easier use in python and other downstream needs) and returns. The only issue is that for the data to be pulled into excel I have to set time.sleep(40) before I save the file as the connection through excel needs enough time to pull the data. I am wondering if there is a way to automatically detect when the data has been pulled? - The plan is to scale this up to do many queries in

Hourly Data using Bloomberg .Net API

我怕爱的太早我们不能终老 提交于 2019-12-04 12:04:52
I am struggling with the logic to get hourly OPEN, HIGH, LOW and LAST_PRICE snapshot from Bloomberg using .Net API 3.0. I have googled it many times but with no luck! Any help on this will be much appreciated. I am trying to find equivalent of following VBA BDH function in Bloomberg .Net API (C#). BDH(B5,C6:F6,TODAY()-30,"","BarTp=T","BarSz=120","days=T","Dir=V","Dts=S",,"Quot‌​e=C","UseDPDF=Y","Sort=D",,"cols=5;rows=271") where B5 is security name and C6:F6 contain OPEN, HIGH, LOW and LAST_PRICE fields. I have tried Intraday Bar request but it does not return same values as returned by this