Help Files
Time Series
Obtains a quote given a symbol

Syntax

hist = getyearlyrange(connection, symbol, from, to, leadLag, currency, currencySource, unit)

Description

hist = getyearlyrange(connection, symbol, from, to, leadLag, currency, currencySource, unit) takes a connection created using a call to gvconnect, symbol and a date range, plus other optional parameters and returns a standard Matlab tscollection object with history from that range.

Optional parameter leadLag controls how much the data will be shifted into the future or past. Currency and currency source control currency conversions, and the unit parameter contols unit coversions.

Examples

>> ts = getyearlyrange(con,'/GCL','01-Jan-2001','31-Dec-2010')
Time Series Collection Object: /GCL

Time vector characteristics

      Start date            01-Jan-2001 00:00:00
      End date              01-Jan-2010 00:00:00

Member Time Series Objects:

      Open
      High
      Low
      Close
      Volume
      OpenInterest
 
>> ts = getyearlyrange(con,'/GCL','01-Jan-2001','31-Dec-2010',con.CalendarDays(5))
>> ts = getyearlyrange(con,'/GCL','01-Jan-2001','31-Dec-2010',con.QuotedDays(5))
>> ts = getyearlyrange(con,'/GCL','01-Jan-2001','31-Dec-2010',[],'EUR')
>> ts = getyearlyrange(con,'/GCL','01-Jan-2001','31-Dec-2010',[],'EUR','USF')
>>  ts = getyearlyrange(con,'/GCL','01-Jan-2001','31-Dec-2010',[],[],[],con.Barrels);
>>  ts = getyearlyrange(con,'/GCL','01-Jan-2001','31-Dec-2010',[],[],[],con.Liters);
>>  ts = getyearlyrange(con,'/GCL','01-Jan-2001','31-Dec-2010',[],[],[],con.Kiloliters);
>>  ts = getyearlyrange(con,'/GCL','01-Jan-2001','31-Dec-2010',[],[],[],con.CubicMeters);
>>  ts = getyearlyrange(con,'/GCL','01-Jan-2001','31-Dec-2010',[],[],[],con.Gallons);
>>  ts = getyearlyrange(con,'/GCL','01-Jan-2001','31-Dec-2010',[],[],[],con.ThouStdCubicFt);
>>  ts = getyearlyrange(con,'/GCL','01-Jan-2001','31-Dec-2010',[],[],[],con.MetricTons);
>>  ts = getyearlyrange(con,'/GCL','01-Jan-2001','31-Dec-2010',[],[],[],con.ShortTons);
>>  ts = getyearlyrange(con,'/GCL','01-Jan-2001','31-Dec-2010',[],[],[],con.MMBTUs);
>>  ts = getyearlyrange(con,'/GCL','01-Jan-2001','31-Dec-2010',[],[],[],con.Therms);
>>  ts = getyearlyrange(con,'/GCL','01-Jan-2001','31-Dec-2010',[],[],[],con.Gigajoules);
>>  ts = getyearlyrange(con,'/GCL','01-Jan-2001','31-Dec-2010',[],[],[],con.GigawattHours);
>>  ts = getyearlyrange(con,'/GCL','01-Jan-2001','31-Dec-2010',[],[],[],con.KilowattHours);
>>  ts = getyearlyrange(con,'/GCL','01-Jan-2001','31-Dec-2010',[],[],[],con.MegawattHours);