Use history to obtain historical data for a specific security.
To obtain historical data for a specified field of a particular security, run:
d = history(Connect,Security,Field,FromDate,ToDate)
history returns data for the date range from FromDate through ToDate.
For example, to obtain the closing price for IBM for the dates July 15, 2009 through August 2, 2009 using the connection c, enter:
c = blp data = history(c, 'IBM US Equity', 'Last_Price',... '07/15/2009', '08/02/2009');