0

I have financial data file (CSV) that contains seconds and milliseconds. When parsing that to Matlab (R2012A) I get only hours and minutes.

I can't understand from Matlab docs, how to format it to contain the full time.

This file:

20-Mar-13T10:10:11.111 457.42 199
21-Mar-13T12:49:00.222 457.5 100
22-Mar-13T23:50:00.333 457.5499 100

the matlab command and output

fts1 = ascii2fts('C:\MatlabTest.csv')

fts1 =

desc:  C:\MatlabTest.csv
freq:  Unknown (0)

'dates:  (3)'    'times:  (3)'    'series1:  (3)'    'series2:  (3)'
'20-Mar-2013'    '10:10'          [     457.4200]    [          199]
'21-Mar-2013'    '12:49'          [     457.5000]    [          100]
'22-Mar-2013'    '23:50'          [     457.5499]    [          100]
user1025852
  • 2,684
  • 11
  • 36
  • 58

1 Answers1

1

The ascii2fts creates a fints object. Matlab documentation for this indicates that its support for time information is limited to hh:mm - that is, hours and minutes.

I'm afraid it looks like if you want to have a temporal resolution with more precision than minutes (i.e.: seconds or milliseconds) you will have to abandon the existing Matlab toolbox code and write your own.

Alan
  • 3,307
  • 1
  • 19
  • 22
  • Thanks, I'm new at Matlab and it probably will take me much time. I'll have to find another way to populate this into Matlab or something...Wierd they don't suppot it in FINANCIAL time series :) anyway thanks. – user1025852 Apr 02 '13 at 21:37
  • Oh, they do support it, just not down to the second unfortunately. Matlab does however support csv, so if you have a quick search about that you should be able to load your file into a couple of matrices to work on it there. The basic `load` command might even do it for you. – Alan Apr 03 '13 at 09:23
  • I'll try, but I guess I won't be able to enjoy that particular financial toolbox with all its pre-defined technical indicators? – user1025852 Apr 03 '13 at 16:56