This example shows how to transform the daily data by using the diff transformation and the same Quandl code as in Example 43.4 and Example 43.5, GOOG/TYO_1551, to retrieve the price and yield performance of the JASDAQ-TOP20 Exchange Traded Fund (ETF) in Japan. Specify a range by using START='2014-01-01' and END='2014-03-26', a transformation function by using TRANS=DIFF, and a collapse frequency by using COLLAPSE=WEEKLY. The output is shown on Output 43.6.1.
options validvarname=any; title 'JASDAQ-TOP20 ETF, TRANS=DIFF Option'; libname _all_ clear; libname mylib "U:\quan950\doc\"; libname myTOP20 sasequan "%sysget(QUANDL)" apikey='XXXXXXXXXXXXXXXXXXXX' idlist='GOOG/TYO_1551' format=XML outXml=jasdaqX automap=replace mapref=MyMap xmlmap="%sysget(QUANDL)jasdaqX.map" start='2014-01-01' end='2014-03-26' collapse=weekly trans=diff ; data mylib.jasdaqX; set myTOP20.jasdaqX; run;
proc contents data=mylib.jasdaqX; run; proc print data=mylib.jasdaqX; run;
Output 43.6.1: JASDAQ-TOP20 ETF, Weekly Data with TRANS=DIFF
JASDAQ-TOP20 ETF, TRANS=DIFF Option |
Obs | date | Open | High | Low | Close | Volume |
---|---|---|---|---|---|---|
1 | 2014-01-05 | -180 | -60 | 70 | 120 | -22850 |
2 | 2014-01-12 | 60 | -20 | 80 | -90 | -20780 |
3 | 2014-01-19 | -240 | -180 | -210 | -100 | -5850 |
4 | 2014-01-26 | -90 | 40 | -150 | -80 | 15120 |
5 | 2014-02-02 | -40 | -230 | -150 | -300 | -14810 |
6 | 2014-02-09 | -110 | -120 | 0 | -30 | -370 |
7 | 2014-02-16 | -10 | 0 | -70 | -70 | -1080 |
8 | 2014-02-23 | 40 | 70 | 160 | 120 | 1560 |
9 | 2014-03-02 | 130 | 60 | 10 | 30 | -4130 |
10 | 2014-03-09 | 40 | 60 | 200 | 180 | -680 |
11 | 2014-03-16 | -320 | -270 | -430 | -380 | 5290 |
12 | 2014-03-23 | -250 | -280 | -290 | -330 | -4250 |
13 | 2014-03-30 | -395 | -270 | -225 | -80 | 1140 |