Resources

Weekly JASDAQ-TOP20 Exchange Traded Fund (ETF)

/*----------------------------------------------------------------

                   SAS SAMPLE LIBRARY

       Name: quanex05.sas
Description: Example program from SAS/ETS User's Guide,
             The SASEQUAN Interface Engine
      Title: Weekly JASDAQ-TOP20 Exchange Traded Fund (ETF)
    Product: SAS/ETS Software
       Keys: Quandl data extraction
      Procs: SASEQUAN
      Notes: Read this before you run this sample.
             The sample data provided resides in the ets/sasmisc folder.
             If you are using automap=READONLY, then you must copy the
             map of your incoming XML data to a writeable folder before
             using it. So, define a Windows system environment variable
             ,QUANDL, to the path of your  writeable folder containing
             the QUANEX01.MAP file and QUANEX01.xml.
             To assign a fileref to the external file to be processed,
             use the following form of the libname statement:

           libname quan sasequan "%sysget(QUANDL)"
              FORMAT=XML
              OUTXML=quanex05
              AUTOMAP=replace
              MAPREF=MyMap
              XMLMAP="%sysget(Quandl)quanex05.map"
              APIKEY='<your Quandl apikey>'
              IDLIST='<your list of Quandl codes>'
              START='<trim_start>'
              END='<trim-end>'
              COLLAPSE=weekly
              ;
 ----------------------------------------------------------------*/


options validvarname=any;

title 'JASDAQ-TOP20 ETF, COLLAPSE=WEEKLY Option';
libname _all_ clear;
libname mylib "U:\quan950\doc\";

libname myTOP20 sasequan "%sysget(QUANDL)"
   apikey='XXXXXXXXXXXXXXXXXXXX'
   idlist='GOOG/TYO_1551'
   format=XML
   outXml=jasdaqW
   automap=replace
   mapref=MyMap
   xmlmap="%sysget(QUANDL)jasdaqw.map"
   start='2014-01-01'
   end='2014-03-26'
   collapse=weekly
   ;

data mylib.jasdaqW;
   set myTOP20.jasdaqW;
run;

proc contents data=mylib.jasdaqW; run;
proc print data=mylib.jasdaqW; run;