2019年12月17日火曜日

EPS 2019DEC17



> eps_year_xts["2019::"]
             [,1]
2019-01-01 134.39
2019-04-01 135.27
2019-07-01 133.95
2019-10-01 142.58
2020-01-01 146.27
2020-04-01 152.08
2020-07-01 159.78
2020-10-01 165.15

$tac eps.txt 
6/30/2019 2941.76 $40.14 $34.93 19.04 21.75 $154.54 $135.27
9/30/2019 (Prlim.) 2976.74 $39.82 $33.99 20.71 23.84 $152.98 $132.90
12/31/2019 $40.42 $36.51 20.01 22.56 $158.37 $140.45
3/31/2020 $40.60 $36.97 19.68 22.25 $160.98 $142.40
6/30/2020 $43.65 $39.88 19.26 21.50 $164.49 $147.35
9/30/2020 $45.92 $42.64 18.57 20.31 $170.59 $156.01
12/31/2020 $46.35 $42.37 17.95 19.58 $176.52 $161.87

When entries started with "6/30/2019", I have to put NR+1 in order to adjust sequence number.

$tac eps.txt | awk '{gsub("\\$","",$NF);print "eps_year_xts[\"2019::\"]["NR+1"] <- "$NF}'
eps_year_xts["2019::"][2] <- 135.27
eps_year_xts["2019::"][3] <- 132.90
eps_year_xts["2019::"][4] <- 140.45
eps_year_xts["2019::"][5] <- 142.40
eps_year_xts["2019::"][6] <- 147.35
eps_year_xts["2019::"][7] <- 156.01
eps_year_xts["2019::"][8] <- 161.87

0 件のコメント: