[R-SIG-Finance] economagic Import - error message

Diethelm Wuertz wuertz at itp.phys.ethz.ch
Thu Apr 17 10:03:50 CEST 2008


Yohan Chalabi wrote:


Some additional information

Note, that economagicImport() requires also the input of the frequency
of the data. The default is "quarterly", alternatively you can use "monthly"
and "daily" frequency formats.

FED FUNDS data are available as monthly and weekly (in daily format)
data sets from economagic.com. Therefore you should specify
explicitely the frequency data in the argument list. Here the examples:

# I used R 2.6.2 with latest package updates
require(fImport)

# For weekly data (with daily date formats) use:
x = economagicImport(query = "fedstl/day-ff", frequency = "daily")
head(x at data) # gives you the series as a data.frame
head(as.timeSeries(x at data)) # converts it in a timeSeries object

# For monthly data use:
y = economagicImport(query = "fedstl/fedfunds+2", frequency = "monthly")
head(y at data) # gives you the series as a data.frame
head(as.timeSeries(y at data)) # converts it in a timeSeries object


Some more note: FED FUND data are also available from the St.
Louis FED data base, from where economagic.com has copied his
data. Since the FED uses ISO 8601 date records, and data are
earlier available I would recommend to download the data with
the function fredImport().


Diethelm Wuertz





>>>>> "S" == "stephen" <mail at xesoftware.com.au>
>>>>> on Thu, 17 Apr 2008 11:41:40 +1000
>>>>>           
>
>    S> > # save a download to a data file
>    S> > file = 'fedfunds.csv'
>    S> > source = 'http://www.economagic.com/em-cgi/data.exe/'
>    S> > query = 'fedst1/fedfunds+2'
>    S> > # download
>    S> > economagicImport(file, source, query)
>    S> Error in download.file(url = url, destfile = file, method =
>    S> method) :
>    S> unsupported URL scheme
>    S> [1] "No Internet Access"
>
> there is a typo in your query. It should be
> query = 'fedstl/fedfunds+2'
>
> and your arguemnts in economagicImport are not in the correct order...
> ?economagicImport
>
> regards,
> Yohan 
>
>   


-- 

PD Dr. Diethelm Wuertz
Institute for Theoretical Physics
Swiss Federal Institute of Technology

www.itp.phys.ethz.ch
www.rmetrics.org

NOTE:
Rmetrics Workshop: http://www.rmetrics.org/meielisalp.htm
June 29th - July 3rd Meielisalp, Lake Thune, Switzerland



More information about the R-SIG-Finance mailing list