| Contents | Index |
[d, sec] = history(c, s, f, FromDate, ToDate)
[d, sec] = history(c, s, f, FromDate, ToDate, per)
[d, sec] = history(c, s, f, FromDate, ToDate, per,
cur)
[d, sec] = history(c, s, f, FromDate, ToDate, per,
cur, Name, Value, ...)
[d, sec] = history(c, s, f, FromDate, ToDate) returns the historical data for the security list s and the connection object c for the fields f for the dates FromDate to ToDate. Date strings can be input in any format recognized by MATLAB. sec is the security list that maps the order of the return data. The return data, d and sec, is sorted to match the input order of s.
[d, sec] = 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. For example, per = {'daily','calendar'} returns daily data for all calendar days reporting missing data as NaNs. per = {'actual'} returns the data using the default periodicity and default calendar reporting missing data as NaNs. The default periodicity depends on the security. If a security is reported on a monthly basis, the default periodicity is monthly. The default calendar is actual trading days. The possible values of per are as follows:
| Value | Time Period |
|---|---|
| daily | Daily |
| weekly | Weekly |
| monthly | Monthly |
| quarterly | Quarterly |
| semi_annually | Semi annually |
| yearly | Yearly |
| actual | Anchor date specification |
| calendar | Anchor date specification |
| fiscal | Anchor date specification |
| non_trading_weekdays | Non trading weekdays |
| all_calendar_days | Return all calendar days |
| active_days_only | Active trading days only |
| previous_value | Fill missing values with previous values |
| nil_value | Fill missing values with NaN |
[d, sec] = 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.
[d, sec] = history(c, s, f, FromDate, ToDate, per, cur, Name, Value, ...) 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. Name,Value pair arguments are used for additional Bloomberg request settings.
Historical requests made before the market opens on the current date that include the current date as the end date may have missing or skewed data. For example, if the last_price and volume are requested, the last_price may not be returned and the volume data for the last, current date may be shifted into the last_price column.
For better performance, add the Bloomberg file blpapi3.jar to the MATLAB static Java class path by modifying the file $MATLAB/toolbox/local/classpath.txt. For more information about the static Java class path, see The Static Path in the MATLAB User's Guide.
The anchor date is the date to which all other reported dates are related. For blp.history, for periodicities other than daily, ToDate is the anchor date. For example, if you set the period to weekly and the ToDate is a Thursday, every reported data point would also be a Thursday, or the nearest prior business day to Thursday. Similarly, if you set the period to monthly and the ToDate is the 20th of a month, each reported data point would be for the 20th of each month in the date range.
Return the closing price for the given dates for the given security using the default period of the data:
[d, sec] = history(c, 'ABC US Equity', ... 'LAST_PRICE', '8/01/2010', '8/10/2010')
Return the monthly closing price for the given dates for the given security:
[d, sec] = history(c, 'ABC US Equity', ...
'LAST_PRICE', '8/01/2010', '12/10/2010', 'monthly')
Return the monthly closing price converted to US dollars for the given dates for the given security:
[d, sec] = history(c, 'ABC US Equity', ...
'LAST_PRICE', '8/01/2010', '12/10/2010', 'monthly', 'USD')
Return the daily closing price converted to US dollars for the given dates for the given security:
[d, sec] = history(c, 'ABC US Equity', ...
'LAST_PRICE', '8/01/2010', '8/10/2010', {'daily',...
'actual', 'all_calendar_days', 'nil_value'}, 'USD')Return the weekly closing price converted to US dollars for the given dates for the given security. Note that the anchor date is dependent on the date 12/23/1999 in this case. Because this date is a Thursday, each previous value will be reported for the Thursday of the week in question.
[d, sec] = history(c,'ABC US Equity', ...
'LAST_PRICE','11/01/2010','12/23/2010', ...
{'weekly'},'USD')Return the closing price converted to US dollars for the given dates for the given security using the default period of the data. The default period of a security is dependent on the security itself and not set in this function.
[d, sec] = history(c,'ABC US Equity',... 'LAST_PRICE','8/01/2010','9/10/2010',[],'USD')
Return the closing price converted to US dollars for the given dates for the given security using the default period of the data. The prices are adjusted for normal cash and splits.
[d, sec] = history(c,'ABC US Equity','LAST_PRICE',... '8/01/2010','8/10/2010','daily','USD',... 'adjustmentNormal',true,'adjustmentSplit',true)
When specifying Bloomberg override fields, use the 'overrideOption'. The overrideOption argument must be an n-by-2 cell array, where the first column is the override field and the second column is the override value.
reqData3 = history(conn,'AKZA NA Equity', ...
'BEST_EPS_MEDIAN', datenum('01.10.2010', ...
'dd.mm.yyyy'), datenum('30.10.2010','dd.mm.yyyy'), ...
{'daily','calendar'}, [],'overrideOption', ...
{'BEST_FPERIOD_OVERRIDE', 'BF'}, 'CapChg', true);
blp | blp.getdata | blp.realtime | blp.timeseries
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-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |