timeseries
SIX Financial Informationintraday tick data
Syntax
D = timeseries(c,s,t)
D = timeseries(c,s,{startdate,enddate})
D = timeseries(c,s,t,5)
Description
D = timeseries(c,s,t)
returns the raw tick data for theSIX Financial Informationconnection objectc
, the securitys
, and the datet
. Every trade, best, and ask tick is returned for the given date or date range.
D = timeseries(c,s,{startdate,enddate})
returns the raw tick data for the securitys
, for the date range defined bystartdate
andenddate
.
D = timeseries(c,s,t,5)
returns the tick data for the securitys
, for the datet
in intervals of 5 minutes, for the fieldf
. Intraday tick data requested is returned in 5-minute intervals, with the columns representing:
First
High
Low
Last
Volume weighted average
Moving average
Examples
检索SIX Financial Informationintraday tick data for the past 2 days:
c = tlkrs('US12345','userapid01','userapid10') d = timeseries(c,{'1758999,149,134'}, ... {floor(now)-.25,floor(now)})
Display the returned data:
d = XRF: [1x1 struct] IL: [1x1 struct] I: [1x1 struct] TSL: [1x1 struct] TS: [1x1 struct] P: [1x1 struct]
d.I
contains the instrument IDs,d.TS
contains the date and time data, andd.P
contains the pricing data.
Display the tick times:
d.TS.t(1:10) ans = '013500' '013505' '013510' '013520' '013530' '013540' '013550' '013600' '013610' '013620'
Display the field IDs:
d.P.k(1:10) ans = '3,4' '3,2' '3,3' '3,4' '3,2' '3,3' '3,4' '3,2' '3,3' '3,4'
Convert these IDs to field names (Mid
,Bid
,Ask
) withtkidtofield
:
d.P.k = tkidtofield(c,d.P.k,'history')
Load the file@tlkrs/tkfields.mat
字段名称的清单和相关系数esponding IDs.
Display the corresponding tick values:
d.P.v(1:10) ans = '45.325' '45.32' '45.33' '45.325' '45.32' '45.33' '45.325' '45.32' '45.33' '45.325'