An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20080417/6c25bb71/attachment.pl
economagic Import - error message
4 messages · stephenc, Yohan Chalabi, Diethelm Wuertz +1 more
"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
The 2nd International R/Rmetrics User and Developer Workshop ... [http://www.rmetrics.org]
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
As Diethelm pointed out - the St. Louis Fed has most of the economagic series. In addition to the Rmetrics interface there is one in quantmod. A list of all FRED series (19000+) is accessible from here: http://research.stlouisfed.org/fred2/ library(quantmod)
getSymbols("FEDFUNDS",src='FRED') # monthly
[1] "FEDFUNDS"
head(FEDFUNDS)
FEDFUNDS 1954-07-01 0.80 1954-08-01 1.22 1954-09-01 1.06 1954-10-01 0.85 1954-11-01 0.83 1954-12-01 1.28
getSymbols("FF",src='FRED') # weekly
[1] "FF"
head(FF)
FF 1954-07-07 1.00 1954-07-14 1.21 1954-07-21 0.57 1954-07-28 0.63 1954-08-04 0.27 1954-08-11 1.30 On Thu, Apr 17, 2008 at 3:03 AM, Diethelm Wuertz
<wuertz at itp.phys.ethz.ch> wrote:
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
_______________________________________________ R-SIG-Finance at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. -- If you want to post, subscribe first.
There's a way to do it better - find it. Thomas A. Edison