Bloomberg user forum and Bloomberg automation?

mizhael

Junior member
Messages
31
Likes
0
Hey folks,

Anybody knows of a user forum or newsgroup (like this one) for Bloomberg?

I am trying to obtain some data from Bloomberg terminal. They told me for this specific block of data, it's impossible to export it to Excel. I have to copy and paste these data for each date and for each company one by one, manually.

OMG, that's tens of thousands of copy&paste.

I am looking for some ways of automating key strokes and clicks to Bloomberg terminal.

Any thoughts? Thanks a lot!
 
Automating keystrokes is possible from Excel but not very stable.

This sub routine should give you an idea . . . .
'
'=========================================
'
Sub Bloomberg(Isin As String, BondType As String, Command As String, Optional Panel As Integer = 1)
'Bond type is the bloomberg yellow key as a string : "Corp", "Govt" etc
'Command can be DES or ALLQ or whatever
'Panel is 1 to 4 indicating the panel that is used
Dim blp As Variant

On Error GoTo ErrorHandler

If Panel < 1 Or Panel > 4 Then
MsgBox "Panel must be between 1 and 4.", vbExclamation

GoTo ErrorHandler
End If

Application.DisplayAlerts = False
On Error Resume Next

blp = DDEInitiate("winblp", "bbk")

Application.DisplayAlerts = True
On Error GoTo 0
Call DDEExecute(blp, "<blp-" & Panel - 1 & ">" & Command & " <GO>")

Call DDETerminate(blp)

Exit Sub
ErrorHandler:
End Sub
'
'=========================================
'

Else would be surprised if you wern't able to put the data in the api (type WAPI <GO> ) for bbg's help on this.

All possible bloomberg fields are in your C:\Program Files\Bloomberg\Bloomberg_03\API\BBFIELDS.TBL file
 
Automating keystrokes is possible from Excel but not very stable.

This sub routine should give you an idea . . . .
'
'=========================================
'
Sub Bloomberg(Isin As String, BondType As String, Command As String, Optional Panel As Integer = 1)
'Bond type is the bloomberg yellow key as a string : "Corp", "Govt" etc
'Command can be DES or ALLQ or whatever
'Panel is 1 to 4 indicating the panel that is used
Dim blp As Variant

On Error GoTo ErrorHandler

If Panel < 1 Or Panel > 4 Then
MsgBox "Panel must be between 1 and 4.", vbExclamation

GoTo ErrorHandler
End If

Application.DisplayAlerts = False
On Error Resume Next

blp = DDEInitiate("winblp", "bbk")

Application.DisplayAlerts = True
On Error GoTo 0
Call DDEExecute(blp, "<blp-" & Panel - 1 & ">" & Command & " <GO>")

Call DDETerminate(blp)

Exit Sub
ErrorHandler:
End Sub
'
'=========================================
'

Else would be surprised if you wern't able to put the data in the api (type WAPI <GO> ) for bbg's help on this.

All possible bloomberg fields are in your C:\Program Files\Bloomberg\Bloomberg_03\API\BBFIELDS.TBL file

Wow, there are lots of experts on this forum...

Thanks a lot!

To confirm, I don't want to use the Bloomberg Excel interface to do the stuff. I really want a simulation of human being with key strokes to automate things. That's more generic and versatile I think. Does the code above do the desired job?

For example, the keystrokes I would like to use:

(1) In the Excel sheet, there is a column with a list of tickers for CDS for different firms;
(2) In BB, type
the ticker, then CDS, then "hp" historical price,
(3) I made a "button" already in the BB, called "hp1", it will give me a certain window of past historical price.
I just need to assign that "hp1" to a command, or a special key.
(4) For each ticker, I just need to invoke that "hp1", it will give me the historical price in that past time window.
(5) Need to simulate "copy&paste" those historical price quotes into Excel,
(6) Repeat the above for thousands of times for different ticker...

Any thoughts? Thanks a lot!
 
Last edited:
What is the data? You can usually get most stuff into Excel I find (although the interface can be clunky at times).

GJ

For example, CDS historical quotes for a company, say AMD. If you choose a different data source than the CBGN data source, you won't be able to export to Excel. There are lots of other numbers on the screen that are not ready to be exported. I just want to find a way to automate things, it's fun that way!
 
Hi,

I don't see any resolution on this thread. I am also trying to figure out a way to automate human keystrokes onto a BBG terminal. My teams does quality assurance and the only application so far we have been unable to automate has been BBG. Does anyone know of a way to do this? We are trying to set up offerings, verify information on test trades, and fill orders via automated scripts.

Thanks!
 
Top