| Contents | Index |
D = history(c,s,f,fromdate,todate)
D = history(c,s,f,fromdate,todate) returns the historical data for the security list s, for the fields f, for the dates fromdate to todate.
Retrieve end of day SIX Telekurs data for the specified security for the past 5 days.
c = tlkrs('US12345','userapid01','userapid10')
ids = tkfieldtoid(c,{'Bid','Ask'},'history');
d = history(c,{'1758999,149,134'},ids,floor(now)-5,floor(now));
d =
XRF: [1x1 struct]
IL: [1x1 struct]
I: [1x1 struct]
HL: [1x1 struct]
HD: [1x1 struct]
P: [1x1 struct]
d.I contains the instrument IDs, d.HD contains the dates, and d.P contains the pricing data.
View the dates:
d.HD.d
ans =
'20110225'
'20110228'
'20110301'
View the pricing field IDs:
d.P.k
ans =
'3,2'
'3,3'
'3,2'
'3,3'
'3,2'
'3,3'
View the pricing data:
d.P.v
ans =
'45.32'
'45.33'
'45.26'
'45.27'
'44.94'
'44.95'
Convert the field identification strings in d.P.k to their corresponding field names like this:
d.P.k = tkidtofield(c,d.P.k,'history')
tlkrs | tlkrs.getdata | tlkrs.timeseries | tlkrs.tkfieldtoid | tlkrs.tkidtofield
View demos and recorded presentations led by industry experts.
Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |