A few things about Database
Posted: Thu Apr 15, 2010 12:40 pm
Hi Guys,
As you should have discovered, I have been working a lot on the Eviews database functions lately. I was just reading the manual, trying to find a way to automate economic data gathered from various sources (Fred via database function, stock indices via the new add-in for instance) and store them into a different database (where my workfiles will eventually link to for data). I wrote a couple of lines and then I have no idea what to do next:
The question marks are intentional and it represents the core of my question. As you can see, I am trying to get 4 econ variables from Fred database but I can't really use fetch since it means that I will first need to create a separate workfile for each of these variables while not knowing the date begin and date ending of them. What I am looking for is a way to skip the workfile stage completely, so that I could just collect the requested variables from Fred and throw them directly into the final database.
I know I could use the import function, just like how the add-in is done; in fact, since Fred's txt file URLs are much simpler, it may be even easier than what's done for the stock download add-in. The problem with that is with the multi-line headers in all of Fred's files. I tried and failed to have any success in removing headers like this for csv/txt files. So, if you have any workarounds/new ideas about how this could be done, please let me know. Thanks.
Tchaithonov
As you should have discovered, I have been working a lot on the Eviews database functions lately. I was just reading the manual, trying to find a way to automate economic data gathered from various sources (Fred via database function, stock indices via the new add-in for instance) and store them into a different database (where my workfiles will eventually link to for data). I wrote a couple of lines and then I have no idea what to do next:
Code: Select all
dbopen(type=fred) fred
for %data FEDFUNDS GDP DSPI PMSAVE
' ??????
next
I know I could use the import function, just like how the add-in is done; in fact, since Fred's txt file URLs are much simpler, it may be even easier than what's done for the stock download add-in. The problem with that is with the multi-line headers in all of Fred's files. I tried and failed to have any success in removing headers like this for csv/txt files. So, if you have any workarounds/new ideas about how this could be done, please let me know. Thanks.
Tchaithonov