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