Use a Datastream Web Services connection to retrieve historical data for the specified
security.
Create a Datastream Web Services connection using your user name and password.
c =
datastreamws with properties:
Username: 'ABCDEF'
TimeOut: 100
c
is the datastreamws
connection object with the
Username
and TimeOut
properties. The
Username
property contains the specified user name. The
TimeOut
property specifies waiting for a maximum of 100 seconds to
return historical data before canceling the request.
Adjust the display format to display currency.
Retrieve historical end-of-day price data for the last year. Specify the
VOD
security. d
is a timetable that contains the
date in the first variable and the end-of-day price in the second variable.
Display the first few prices.
ans =
8×1 timetable
Time VOD
____________________ ______
03-May-2017 00:00:00 202.95
04-May-2017 00:00:00 203.70
05-May-2017 00:00:00 204.95
08-May-2017 00:00:00 205.15
09-May-2017 00:00:00 205.15
10-May-2017 00:00:00 206.60
11-May-2017 00:00:00 206.25
12-May-2017 00:00:00 211.05
Use the end-of-day prices to make investment decisions for the VOD
security.