| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Datafeed Toolbox |
| Contents | Index |
| Learn more about Datafeed Toolbox |
d = history(c,s,f,fromdate,todate)
d = history(c,s,f,fromdate,todate,per)
d = history(c,s,f,fromdate,todate,per,cur)
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.
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.
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.
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.
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.
![]() | bloomberg.getdata | bloomberg.isconnection | ![]() |
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 |