MATLAB > Time Series > Time Series |
hist = getweeklytail(connection, symbol, weeks, leadLag, currency, currencySource, unit)
hist = getweeklytail(connection, symbol, days, leadLag, currency, currencySource, unit) takes a connection created using a call to gvconnect, symbol and a number of weeks, plus other optional parameters and returns a standard Matlab tscollection object with last N weeks of history data.
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.
>> ts = getweeklytail(con,'/GCL',10)
Time Series Collection Object: /GCL
Time vector characteristics
Start date 26-Jun-2011 00:00:00
End date 28-Aug-2011 00:00:00
Member Time Series Objects:
Open
High
Low
Close
Volume
OpenInterest
>> ts = getweeklytail(con,'/GCL',10,con.CalendarDays(5))
>> ts = getweeklytail(con,'/GCL',10,con.QuotedDays(5))
>> ts = getweeklytail(con,'/GCL',10,[],'EUR')
>> ts = getweeklytail(con,'/GCL',10,[],'EUR','USF')
>> ts = getweeklytail(con,'/GCL',10,[],[],[],con.Barrels);
>> ts = getweeklytail(con,'/GCL',10,[],[],[],con.Liters);
>> ts = getweeklytail(con,'/GCL',10,[],[],[],con.Kiloliters);
>> ts = getweeklytail(con,'/GCL',10,[],[],[],con.CubicMeters);
>> ts = getweeklytail(con,'/GCL',10,[],[],[],con.Gallons);
>> ts = getweeklytail(con,'/GCL',10,[],[],[],con.ThouStdCubicFt);
>> ts = getweeklytail(con,'/GCL',10,[],[],[],con.MetricTons);
>> ts = getweeklytail(con,'/GCL',10,[],[],[],con.ShortTons);
>> ts = getweeklytail(con,'/GCL',10,[],[],[],con.MMBTUs);
>> ts = getweeklytail(con,'/GCL',10,[],[],[],con.Therms);
>> ts = getweeklytail(con,'/GCL',10,[],[],[],con.Gigajoules);
>> ts = getweeklytail(con,'/GCL',10,[],[],[],con.GigawattHours);
>> ts = getweeklytail(con,'/GCL',10,[],[],[],con.KilowattHours);
>> ts = getweeklytail(con,'/GCL',10,[],[],[],con.MegawattHours);