Economagic              package:fImport              R Documentation

_I_m_p_o_r_t _M_a_r_k_e_t _D_a_t_a _f_r_o_m _w_w_w._e_c_o_n_o_m_a_g_i_c._c_o_m

_D_e_s_c_r_i_p_t_i_o_n:

     Imports financial time series data from www.economagic.com.

_U_s_a_g_e:

     economagicSeries(symbols, from = NULL, to = Sys.timeDate(), 
         nDaysBack = 366, ...)
         
     economagicImport(query, file = "tempfile", source = NULL,
         frequency = c("auto", "quarterly", "monthly", "daily"),
         from = NULL, to = Sys.timeDate(), nDaysBack = NULL,
         save = FALSE, sep =";", try = TRUE)

_A_r_g_u_m_e_n_t_s:

    file: a character string with filename, usually having extension 
          ".csv", where to save the downloaded data. 

frequency: a character string, one of "auto", "quarterly", "monthly", 
          or "daily", defining the frequency of the data records. Note,
          the import function tries autodetect the frequency of the
          time series to be dowwnloaded. This may fail, in such case
          specify the frequency explicitely. 

    from: 

nDaysBack: the number of days back. 

   query: a character string, denoting the location of the data at the 
          web site. 

    save: a logical value, if set to TRUE the downloaded data file will
           be stored under the path and file name specified by the
          string 'file'. By default FALSE. 

     sep: a charcter value specifying the column separator. 

  source: a character string setting the URL of the source. If 'NULL',
          then the URL will be set automatically to its default value. 

 symbols: 

      to: 

     try: a logical value, if set to TRUE the Internet access will be
          checked. 

     ...: optional arguments to be passed. 

_D_e_t_a_i_l_s:

     *Import data from www.economagic.com* 

      Frequently requested data files from Economagic for the US
     economy include:

       '[query]'                    Description:
                                    
       'var/leading-ind-long'       Index of Leading Economic Indicators
       'beana/t102l01'              Real Gross Domestic Product
       'fedstl/trsp500'             SP 500 Total Return
       'fedstl/gnp'                 Gross National Product in Current Dollars
       'var/cpiu-long'              Consumer Price Index - All Urban Consumers
       'feddal/ru'                  Unemployment Rate
       'fedstl/indpro'              Total Industrial Production Index
       'fedstl/exjpus+2'            FX Rate: Japanese Yen to one US Dollar
       'fedstl/fedfunds+2'          Federal Funds Rate
       'fedstl/mdiscrt+2'           Discount Rate
       'fedbog/tcm30y+2'            30-Year Treasury Constant Maturity Rate
       'fedstl/mprime+2'            Bank Prime Loan Rate
       'fedstl/tb3ms+2'             3-Month Treasury Bills - Secondary Market
       'fedstl/tb6ms+2'             6-Month Treasury Bills - Secondary Market
       'fedbog/cm+2'                30 Year Federal Home Loan Mortgages
       'var/west-texas-crude-long'  Price of West Texas Intermediate Crude

_V_a_l_u_e:

     The function 'economagicImport' returns an S4 object of class 
     'fWEBDATA' with the following slots:

   @call: the function call.   

   @data: the data as downloaded formatted as a data.frame. 

  @param: a character vector whose elements contain the values of
          selected  parameters of the argument list. 

  @title: a character string with the name of the download. This can be
           overwritten specifying a user defined input argument. 

@description: a character string with an optional user defined
          description.  By default just the current date when the test
          was applied will be returned.


     The function 'economagicSeries' returns an S4 object of  class 
     'timeSeries'.

_N_o_t_e:

     *Internet Download Functions:*

     IMPORTANT NOTE: If the service provider changes the data file
     format  the download may fail and then it becomes necessary to
     modify and  update the functions.

_A_u_t_h_o_r(_s):

     Diethelm Wuertz for the Rmetrics R-port.

_E_x_a_m_p_l_e_s:

     ## Not run: 
     ## economagicSeries -
        
        # USDEUR Foreign Exchange Rate:
        economagicSeries("fedny/day-fxus2eu", frequency = "daily")
        
        # USFEDFUNDS US FedFunds Rate:
        economagicSeries("fedstl/fedfunds+2", frequency = "monthly")
     ## End(Not run)

