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
Recognizing "date"-series in text-import
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
dagfinnrime
- Posts: 54
- Joined: Sat Oct 11, 2008 9:37 am
- Location: Oslo
- Contact:
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13585
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Recognizing "date"-series in text-import
Where are the dates?
-
dagfinnrime
- Posts: 54
- Joined: Sat Oct 11, 2008 9:37 am
- Location: Oslo
- Contact:
Re: Recognizing "date"-series in text-import
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
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
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13585
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Recognizing "date"-series in text-import
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
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?
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?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13585
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Recognizing "date"-series in text-import
What happens if you just wfopen it?
If it comes in ok, but without recognising the dates, could you post the workfile?
If it comes in ok, but without recognising the dates, could you post the workfile?
Re: Recognizing "date"-series in text-import
here is original file + workfile after wfopen
- Attachments
-
- sample.wf1
- after wfopen command
- (9.36 KiB) Downloaded 455 times
-
- sample.csv
- original file
- (799 Bytes) Downloaded 474 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13585
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Recognizing "date"-series in text-import
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.
Who is online
Users browsing this forum: No registered users and 2 guests
