Page 1 of 1

Recognizing "date"-series in text-import

Posted: Tue Sep 28, 2010 6:41 am
by dagfinnrime
Hi,
I need to import a lot of text-files with the following structure:

%%% START (NOT PART of file)
@ http://www.chronos-st.org/NYSE_Observed ... esent.html @
@ http://www.insider-monitor.com/market-holidays.html@

@ 1371 @

18880102
18880222
18880401
18880530
18880704
%%%%END (NOT Part of file)

I have to program this so that it recognizes the date-structure.

I have tried with the following:
wfopen(type=text,wf=nyse_holiday) test.txt skip=4 nonames names=(date) scan=all

I have also added "@date(date)" without luck.

Thanks in advance,

DAgfinn

Re: Recognizing "date"-series in text-import

Posted: Tue Sep 28, 2010 8:04 am
by EViews Gareth
Where are the dates?

Re: Recognizing "date"-series in text-import

Posted: Tue Sep 28, 2010 1:00 pm
by dagfinnrime
Hi,

the dates are holidays at the NYSE.

Jan 2. 1888 = 18880102
Feb 22 1888 = 18880222

If I do this manually and tell Eviews that the series is a date-series everything works fine.

A friend of mine suggested:
alpha date=@datestr(@dateval(@str(dateraw), "YYYYMMDD"))
pagestruct @date(date)

It works, but I was hoping for something in the wfopen step (just minimize lines ...)

Dagfinn

Re: Recognizing "date"-series in text-import

Posted: Tue Sep 28, 2010 1:37 pm
by EViews Gareth

Code: Select all

wfopen(type=text,wf=nyse_holiday) testdates.txt skip=4 nonames names=(date) scan=all @genr mydates = @dateval(@str(date), "YYYYMMDD")

Re: Recognizing "date"-series in text-import

Posted: Mon Jan 26, 2015 8:41 am
by puf
Hi, I have two files. First file is vixvx.csv file like this:

Date,Time,Open,High,Low,Close,Volume,Tick Count
2012/07/02,07:01,19.00,19.00,18.90,18.90,242,7
2012/07/02,07:02,18.85,18.90,18.85,18.85,54,11
2012/07/02,07:03,18.90,18.90,18.90,18.90,279,13

I simple use wfopen vixvx.csv and everything works perfectly.

Second file is February.csv:
SYMBOL,DATE,TIME,PRICE
VXX,20120201,4:02:32,26.6
VXX,20120201,7:19:10,26.48
VXX,20120201,7:19:10,26.48
VXX,20120201,7:19:10,26.48

I do not how to import or open this file in such a way that date and time are recognized properly (in the same way as for the previous file). Could you please help me?

Re: Recognizing "date"-series in text-import

Posted: Mon Jan 26, 2015 9:18 am
by EViews Gareth
What happens if you just wfopen it?

If it comes in ok, but without recognising the dates, could you post the workfile?

Re: Recognizing "date"-series in text-import

Posted: Mon Jan 26, 2015 9:25 am
by puf
here is original file + workfile after wfopen

Re: Recognizing "date"-series in text-import

Posted: Mon Jan 26, 2015 9:56 am
by EViews Gareth
You have multiple observations with the same date/time. Since you cannot have duplicates in the date/time structure of a workfile, EViews refuses to use your date/time series as the workfile structure.