Products & Services Solutions Academia Support User Community Company

Learn more about Datafeed Toolbox   

bloomberg.history - Historical Bloomberg data

Syntax

d = history(c,s,f,fromdate,todate)
d = history(c,s,f,fromdate,todate,per)
d = history(c,s,f,fromdate,todate,per,cur)

Description

d = history(c,s,f,fromdate,todate) returns the historical data for the security list s for the fields f for the dates fromdate to todate. This method uses the Bloomberg ActiveX interface. For more robust functionality, refer to the bloomberg.fetch method.

d = history(c,s,f,fromdate,todate,per) returns the historical data for the field, f, for the dates fromdate to todate. per specifies the period of the data:

'd'Daily.
'w'Weekly.
'm'Monthly.
'q'Quarterly.
'y'Yearly.
' o'Omit all days for which there is no data.
' i'Include all trading days.
' a'Include all calendar days.
'  b'Report missing data using Bloomberg default.
'  s'Show missing data as last found value.
'  n'Report missing data as Nan.

For example, per = 'dan' returns daily data for all calendar days reporting missing data as NaN's. per = '  n' returns the data using the default periodicity and default calendar reporting missing data as NaN's.

If you do not specify per, the method uses default period for the data.

d = history(c,s,f,fromdate,todate,per,cur) returns the historical data for the security list s for the fields f for the dates fromdate to todate based on the given currency, cur. Load the file bloomberg/bbfields to see the list of supported currencies.

Examples

Example 1

The command

d = history(c,'ABC US Equity','LAST_PRICE','8/01/99',...
'8/10/99')

returns the closing price for the given dates for the given security using the default period of the data.

Example 2

The command

D = HISTORY(c,'ABC US Equity','LAST_PRICE','8/01/99',...
'8/10/99','m')

returns the monthly closing price for the given dates for the given security.

Example 3

The command

D = HISTORY(c,'ABC US Equity','LAST_PRICE','8/01/99',...
'8/10/99','m','USD')

returns the monthly closing price converted to US dollars for the given dates for the given security.

Example 4

The command

D = HISTORY(c,'ABC US Equity','LAST_PRICE','8/01/99',...
'8/10/99',[],'USD')

returns the closing price converted to US dollars for the given dates for the given security using the default period of the data.

  


Free Interactive Computational Finance CD

View demos and recorded presentations led by industry experts.

Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS