测试一个EMA的索引添加过程出错,请教!


(189) #1

基础还是EMA函数,因为EMA函数里面有个参数a,这个a值,我已经计算好了,在DATEFRAME里面的最后几列里,也就是说,一个close对应一个a,列名就是a_10,a_20,a_30等,我要计算ema_10,ema_20,ema_30并加入 DATEFRAMELI里成为新的3列因子。我的设想是做一个循环【10,20,30】,然后循环内部定义DEF get_EMA, 接着a值索引外部的DATEFRAME,apply(get_ema,a参数);处理过程出错,
简单测试代码如下:

from pandas import DataFrame, Series
df = DataFrame(np.random.random(16).reshape((4,4)), index=[0,1,2,3],columns=[‘a_10’,‘a_20’,‘a_30’,‘close’])
for j in [10,20,30]:
def get_EMA(df,a):
for i in range(len(df)):
if i==0:
df.ix[i,‘ema_’+str(j)]=df.ix[i,‘close’]
if i>0:
df.ix[i,‘ema_’+str(j)]=(1-a)df.ix[i-1,‘ema_’+str(j)]+adf.ix[i,‘close’]
return df
df=df.apply(get_EMA,df[‘a_’+str[j]])
df

错误信息:

TypeError Traceback (most recent call last)
in ()
9 df.ix[i,‘ema_’+str(j)]=(1-a)df.ix[i-1,‘ema_’+str(j)]+adf.ix[i,‘close’]
10 return df
—> 11 df=df.apply(get_EMA,df[‘a_’+str[j]])
12 df

TypeError: ‘type’ object is not subscriptable


(iQuant) #2
克隆策略

先看单只股票的情形

In [22]:
df = D.history_data(['000002.SZA'],'2017-02-02','2017-10-02',['close'])
In [23]:
def get_EMA(df,weight=2):
    df.index = range(len(df))
    for i in range(len(df)):
        for j in [10,20,30]:
            length = j
            a = weight/length
            if i==0:
                df.ix[i,'ema_'+str(j)]=df.ix[i,'close']
            if i>0:
                df.ix[i,'ema_'+str(j)]=(1-a)*df.ix[i-1,'ema_'+str(j)]+a*df.ix[i,'close']
    return df
In [25]:
T.plot(get_EMA(df)[['close','ema_10','ema_20','ema_30']],title='单只股票指数移动平均线')

我们再来看看多只股票的情形

In [15]:
df = D.history_data(D.instruments()[:10],'2017-02-02','2017-10-02',['close']) # 以前10只股票举例
In [18]:
df.groupby('instrument').apply(get_EMA)
Out[18]:
date instrument close ema_10 ema_20 ema_30
instrument
000001.SZA 0 2017-02-03 000001.SZA 970.061401 970.061401 970.061401 970.061401
1 2017-02-06 000001.SZA 975.299316 972.680359 971.370850 970.934387
2 2017-02-07 000001.SZA 974.251770 973.466064 972.091064 971.487305
3 2017-02-08 000001.SZA 974.251770 973.858887 972.631226 971.948059
4 2017-02-09 000001.SZA 975.299316 974.579102 973.298218 972.506592
5 2017-02-10 000001.SZA 977.394470 975.986816 974.322266 973.321228
6 2017-02-13 000001.SZA 985.775146 980.880981 977.185486 975.396851
7 2017-02-14 000001.SZA 984.727600 982.804321 979.071045 976.951965
8 2017-02-15 000001.SZA 989.965515 986.384888 981.794678 979.120911
9 2017-02-16 000001.SZA 991.013062 988.698975 984.099243 981.102905
10 2017-02-17 000001.SZA 983.679993 986.189453 983.994446 981.532410
11 2017-02-20 000001.SZA 1001.488892 993.839172 988.368042 984.858521
12 2017-02-21 000001.SZA 1002.536499 998.187866 991.910156 987.804871
13 2017-02-22 000001.SZA 1002.536499 1000.362183 994.566772 990.260132
14 2017-02-23 000001.SZA 996.250977 998.306580 994.987793 991.258606
15 2017-02-24 000001.SZA 995.203430 996.755005 995.041687 991.916077
16 2017-02-27 000001.SZA 987.870300 992.312622 993.248840 991.241760
17 2017-02-28 000001.SZA 993.108215 992.710449 993.213684 991.552856
18 2017-03-01 000001.SZA 994.155823 993.433105 993.449219 991.986694
19 2017-03-02 000001.SZA 987.870300 990.651733 992.054504 991.300659
20 2017-03-03 000001.SZA 984.727600 987.689697 990.222778 990.205139
21 2017-03-06 000001.SZA 989.965515 988.827637 990.158447 990.165222
22 2017-03-07 000001.SZA 989.965515 989.396606 990.110229 990.131958
23 2017-03-08 000001.SZA 986.822754 988.109680 989.288330 989.580444
24 2017-03-09 000001.SZA 982.632385 985.371033 987.624329 988.422424
25 2017-03-10 000001.SZA 984.727600 985.049316 986.900146 987.806641
26 2017-03-13 000001.SZA 988.917908 986.983643 987.404602 987.991821
27 2017-03-14 000001.SZA 988.917908 987.950806 987.782959 988.146179
28 2017-03-15 000001.SZA 993.108215 990.529541 989.114258 988.973206
29 2017-03-16 000001.SZA 997.298584 993.914062 991.160339 990.360779
... ... ... ... ... ... ... ...
000011.SZA 136 2017-08-21 000011.SZA 64.563461 64.279732 63.862949 63.833305
137 2017-08-22 000011.SZA 65.244873 64.762299 64.208427 64.068565
138 2017-08-23 000011.SZA 64.120552 64.441422 64.186462 64.077232
139 2017-08-24 000011.SZA 63.507282 63.974350 64.016670 63.982239
140 2017-08-25 000011.SZA 64.154617 64.064484 64.051155 64.010971
141 2017-08-28 000011.SZA 65.142662 64.603577 64.324036 64.199585
142 2017-08-29 000011.SZA 66.266983 65.435280 64.809769 64.544151
143 2017-08-30 000011.SZA 69.094833 67.265060 65.881035 65.302597
144 2017-08-31 000011.SZA 67.732018 67.498535 66.343781 65.707504
145 2017-09-01 000011.SZA 66.914322 67.206429 66.486420 65.908638
146 2017-09-04 000011.SZA 67.936440 67.571434 66.848923 66.246605
147 2017-09-05 000011.SZA 67.220955 67.396194 66.941933 66.408997
148 2017-09-06 000011.SZA 67.220955 67.308578 67.011688 66.544327
149 2017-09-07 000011.SZA 67.561661 67.435120 67.149185 66.713882
150 2017-09-08 000011.SZA 74.307610 70.871368 68.938789 67.979507
151 2017-09-11 000011.SZA 72.808510 71.839935 69.906219 68.784340
152 2017-09-12 000011.SZA 71.888611 71.864273 70.401817 69.301720
153 2017-09-13 000011.SZA 70.662071 71.263168 70.466881 69.528442
154 2017-09-14 000011.SZA 71.343483 71.303329 70.686035 69.830948
155 2017-09-15 000011.SZA 70.355438 70.829384 70.603386 69.918365
156 2017-09-18 000011.SZA 71.547905 71.188644 70.839516 70.189957
157 2017-09-19 000011.SZA 73.251427 72.220032 71.442490 70.700203
158 2017-09-20 000011.SZA 71.411621 71.815826 71.434769 70.818771
159 2017-09-21 000011.SZA 69.571815 70.693817 70.969032 70.610947
160 2017-09-22 000011.SZA 67.766083 69.229950 70.168297 70.136803
161 2017-09-25 000011.SZA 65.006378 67.118164 68.877815 69.281731
162 2017-09-26 000011.SZA 65.687790 66.402977 68.080307 68.682739
163 2017-09-27 000011.SZA 66.164772 66.283875 67.601425 68.263077
164 2017-09-28 000011.SZA 65.176735 65.730301 66.995255 67.748688
165 2017-09-29 000011.SZA 66.096634 65.913467 66.770599 67.473343

1660 rows × 6 columns


(hugo) #3

谢谢,学习了


(189) #4

的意思是a=2/J(j=10,20,30等周期数),但是我想表达的是:这个a我已经计算出来了,是a_10/a_20/a_30,是DF的其中3列;
这时我的难题是get_EMA内部引用这个DF的某列某行的a_10/20/30数据,还是在get_EMA外部引用这个DF的某列某行的a_10/20/30数据,这两个引用,我都在apply之前,但结果运行错误


求一个针对dateframe的函数定义及调用范例!
(iQuant) #5
克隆策略
In [22]:
def get_EMA(df,para_df=para_df):
    df.index = range(len(df))
    for i in range(len(df)):
        for j in [10,20,30]:
            a = para_df.ix[i]['a_%s'%str(j)]
            if i==0:
                df.ix[i,'ema_'+str(j)]=df.ix[i,'close']
            if i>0:
                df.ix[i,'ema_'+str(j)]=(1-a)*df.ix[i-1,'ema_'+str(j)]+a*df.ix[i,'close']
    return df
In [24]:
df = D.history_data(['000002.SZA'],'2017-01-01','2017-06-01',['close'])
para_df = DataFrame(np.random.random(len(df)*4).reshape((len(df),4)), index=range(len(df)),columns=['a_10','a_20','a_30','close'])
In [25]:
get_EMA(df)
Out[25]:
date instrument close ema_10 ema_20 ema_30
0 2017-01-03 000002.SZA 2752.580566 2752.580566 2752.580566 2752.580566
1 2017-01-04 000002.SZA 2768.514404 2768.509277 2763.646973 2759.060791
2 2017-01-05 000002.SZA 2779.137207 2776.313965 2768.542480 2770.801025
3 2017-01-06 000002.SZA 2740.630127 2772.614258 2747.407227 2745.282471
4 2017-01-09 000002.SZA 2743.285889 2749.782471 2746.999023 2744.293701
5 2017-01-10 000002.SZA 2732.663330 2736.960693 2739.418457 2740.695068
6 2017-01-11 000002.SZA 2708.762451 2709.071045 2724.154297 2722.080322
7 2017-01-12 000002.SZA 2708.762451 2709.047119 2717.729248 2711.955322
8 2017-01-13 000002.SZA 2895.985596 2786.913574 2796.813965 2743.712158
9 2017-01-16 000002.SZA 2788.431885 2788.263184 2789.439941 2744.896729
10 2017-01-17 000002.SZA 2761.875488 2785.975586 2772.893066 2749.322998
11 2017-01-18 000002.SZA 2777.809326 2780.987061 2775.655518 2764.606689
12 2017-01-19 000002.SZA 2735.318848 2770.652588 2774.740723 2742.078125
13 2017-01-20 000002.SZA 2745.941406 2749.628662 2771.336914 2745.520508
14 2017-01-23 000002.SZA 2753.908447 2750.602051 2770.234131 2746.091797
15 2017-01-24 000002.SZA 2747.269287 2749.215088 2751.125977 2746.784668
16 2017-01-25 000002.SZA 2736.646729 2740.857666 2739.387207 2739.848145
17 2017-01-26 000002.SZA 2745.941406 2741.174561 2744.460449 2743.134033
18 2017-02-03 000002.SZA 2745.941406 2743.349609 2744.916260 2743.283691
19 2017-02-06 000002.SZA 2749.925049 2749.467041 2745.104980 2748.601074
20 2017-02-07 000002.SZA 2740.630127 2749.348633 2741.950195 2744.687500
21 2017-02-08 000002.SZA 2747.269287 2748.506592 2746.150635 2745.041748
22 2017-02-09 000002.SZA 2761.875488 2758.990723 2755.205811 2750.182617
23 2017-02-10 000002.SZA 2743.285889 2746.630859 2753.788574 2749.381104
24 2017-02-13 000002.SZA 2757.891846 2757.328613 2756.125244 2749.597412
25 2017-02-14 000002.SZA 2776.481445 2767.879883 2759.638428 2760.207764
26 2017-02-15 000002.SZA 2744.613770 2766.210693 2757.062988 2745.550781
27 2017-02-16 000002.SZA 2745.941406 2748.758545 2751.471924 2745.670410
28 2017-02-17 000002.SZA 2727.352051 2736.751465 2731.340332 2732.043701
29 2017-02-20 000002.SZA 2736.646729 2736.696045 2731.711182 2734.361084
... ... ... ... ... ... ...
68 2017-04-18 000002.SZA 2718.057129 2719.166992 2730.476318 2731.001953
69 2017-04-19 000002.SZA 2726.024170 2719.988037 2729.817627 2728.622559
70 2017-04-20 000002.SZA 2739.302490 2722.302002 2736.879883 2736.155273
71 2017-04-21 000002.SZA 2745.941406 2740.257080 2738.086426 2737.980225
72 2017-04-24 000002.SZA 2712.745850 2718.660400 2734.692139 2727.214600
73 2017-04-25 000002.SZA 2728.679688 2728.395996 2728.959473 2728.599609
74 2017-04-26 000002.SZA 2703.451172 2716.670410 2713.961426 2726.704834
75 2017-04-27 000002.SZA 2623.781738 2681.747070 2686.290771 2641.987793
76 2017-04-28 000002.SZA 2589.258301 2665.141602 2681.440918 2600.162598
77 2017-05-02 000002.SZA 2549.423340 2604.601318 2666.559082 2565.838379
78 2017-05-03 000002.SZA 2504.277344 2534.165039 2665.093750 2508.884277
79 2017-05-04 000002.SZA 2525.522705 2531.607910 2639.072510 2520.240967
80 2017-05-05 000002.SZA 2508.260986 2522.259521 2606.609619 2509.569824
81 2017-05-08 000002.SZA 2452.492188 2483.463867 2484.018311 2507.291748
82 2017-05-09 000002.SZA 2472.409668 2480.307617 2473.690674 2477.955566
83 2017-05-10 000002.SZA 2479.048828 2479.309570 2478.230957 2478.517334
84 2017-05-11 000002.SZA 2554.734863 2544.785645 2517.838379 2503.309570
85 2017-05-12 000002.SZA 2575.979980 2573.903564 2542.690674 2527.286377
86 2017-05-15 000002.SZA 2568.012939 2571.767822 2556.446045 2543.385254
87 2017-05-16 000002.SZA 2553.406982 2554.932861 2553.683838 2549.167236
88 2017-05-17 000002.SZA 2541.456543 2543.764404 2550.828613 2541.528564
89 2017-05-18 000002.SZA 2528.178223 2531.155273 2546.327637 2534.900391
90 2017-05-19 000002.SZA 2545.439941 2544.964844 2545.808838 2537.986328
91 2017-05-22 000002.SZA 2532.161621 2533.328125 2538.378174 2532.327393
92 2017-05-23 000002.SZA 2553.406982 2542.899170 2547.956055 2532.712402
93 2017-05-24 000002.SZA 2548.095703 2546.377686 2548.087158 2537.844482
94 2017-05-25 000002.SZA 2722.040771 2583.452881 2598.729248 2562.339600
95 2017-05-26 000002.SZA 2728.679688 2717.039062 2692.397217 2616.158691
96 2017-05-31 000002.SZA 2822.955322 2790.148682 2771.208252 2709.711670
97 2017-06-01 000002.SZA 2800.382324 2794.281982 2771.332520 2726.204346

98 rows × 6 columns


(189) #6

df = D.history_data([‘000002.SZA’],‘2017-02-02’,‘2017-10-02’,[‘close’])
df1=pd.DataFrame(np.random.random(len(df)),columns=[‘a_10’])
df2=pd.DataFrame(np.random.random(len(df)),columns=[‘a_20’])
df3=pd.DataFrame(np.random.random(len(df)),columns=[‘a_30’])
df= pd.concat([df1, df2,df3,df], axis=1, join=‘outer’)
para_df=df
def get_EMA(df,para_df=para_df):
df.index = range(len(df))
for i in range(len(df)):
for j in [10,20,30]:
a = para_df.ix[i][‘a_%s’%str(j)]
if i==0:
df.ix[i,‘ema_’+str(j)]=df.ix[i,‘close’]
if i>0:
df.ix[i,‘ema_’+str(j)]=(1-a)df.ix[i-1,‘ema_’+str(j)]+adf.ix[i,‘close’]
return df
get_EMA(df)


(189) #7

我修改了一下,出了结果;但是数据量大了以后,就只有一行结果,真是……………………你看这最后一段

para_df=m_df
def get_EMA(df,para_df=para_df):
df.index = range(len(df))
for i in range(len(df)):
for j in [10,20,30,60]:
a = para_df.ix[i][‘cs_%s’%str(j)]
if i==0:
df.ix[i,‘ema_’+str(j)]=df.ix[i,‘rc’]
if i>0:
df.ix[i,‘ema_’+str(j)]=(1-a)df.ix[i-1,‘ema_’+str(j)]+adf.ix[i,‘rc’]
return df
m_df=m_df.groupby(‘instrument_y’).apply(get_EMA)
m_df

[/details]

[/details]


(189) #8
克隆策略
In [41]:
#import copy 
df = D.history_data(['000002.SZA'],'2017-02-02','2017-10-02',['close'])
df1=pd.DataFrame(np.random.random(len(df)),columns=['a_10'])
df2=pd.DataFrame(np.random.random(len(df)),columns=['a_20'])
df3=pd.DataFrame(np.random.random(len(df)),columns=['a_30'])
df= pd.concat([df1, df2,df3,df], axis=1, join='outer')
para_df=df
def get_EMA(df,para_df=para_df):
    df.index = range(len(df))
    for i in range(len(df)):
        for j in [10,20,30]:
            a = para_df.ix[i]['a_%s'%str(j)]
            if i==0:
                df.ix[i,'ema_'+str(j)]=df.ix[i,'close']
            if i>0:
                df.ix[i,'ema_'+str(j)]=(1-a)*df.ix[i-1,'ema_'+str(j)]+a*df.ix[i,'close']
    return df
get_EMA(df)
Out[41]:
a_10 a_20 a_30 date instrument close ema_10 ema_20 ema_30
0 0.429264 0.890835 0.442475 2017-02-03 000002.SZA 2745.941406 2745.941406 2745.941406 2745.941406
1 0.124911 0.078460 0.761676 2017-02-06 000002.SZA 2749.925049 2746.438965 2746.253906 2748.975586
2 0.306922 0.612752 0.441048 2017-02-07 000002.SZA 2740.630127 2744.656006 2742.807861 2745.294922
3 0.347868 0.051572 0.422385 2017-02-08 000002.SZA 2747.269287 2745.565186 2743.037842 2746.128906
4 0.130945 0.584392 0.707450 2017-02-09 000002.SZA 2761.875488 2747.700928 2754.046387 2757.268799
5 0.985342 0.699153 0.662932 2017-02-10 000002.SZA 2743.285889 2743.350586 2746.523193 2747.999023
6 0.660446 0.683777 0.172912 2017-02-13 000002.SZA 2757.891846 2752.954346 2754.296875 2749.709717
7 0.539159 0.109043 0.690038 2017-02-14 000002.SZA 2776.481445 2765.639160 2756.715820 2768.183350
8 0.374644 0.507041 0.935914 2017-02-15 000002.SZA 2744.613770 2757.762207 2750.579590 2746.124268
9 0.849396 0.531770 0.274091 2017-02-16 000002.SZA 2745.941406 2747.721680 2748.113037 2746.074219
10 0.563550 0.429186 0.449967 2017-02-17 000002.SZA 2727.352051 2736.242432 2739.202637 2737.649902
11 0.096676 0.425543 0.996368 2017-02-20 000002.SZA 2736.646729 2736.281494 2738.114990 2736.650391
12 0.623734 0.807917 0.186283 2017-02-21 000002.SZA 2785.776123 2767.153076 2776.621094 2745.801758
13 0.021752 0.051441 0.416927 2017-02-22 000002.SZA 2775.153564 2767.327148 2776.545654 2758.039307
14 0.138890 0.081332 0.735397 2017-02-23 000002.SZA 2760.547607 2766.385498 2775.244385 2759.883789
15 0.873383 0.846824 0.228583 2017-02-24 000002.SZA 2751.252686 2753.168701 2754.927734 2757.910889
16 0.765565 0.726467 0.994527 2017-02-27 000002.SZA 2724.696289 2731.371338 2732.965576 2724.878174
17 0.354794 0.713171 0.191157 2017-02-28 000002.SZA 2726.024170 2729.474121 2728.015137 2725.097168
18 0.227420 0.539457 0.134751 2017-03-01 000002.SZA 2722.040771 2727.783691 2724.792236 2724.685303
19 0.155573 0.273257 0.745177 2017-03-02 000002.SZA 2700.795410 2723.584961 2718.234863 2706.883057
20 0.286974 0.685906 0.798153 2017-03-03 000002.SZA 2682.205811 2711.710205 2693.522217 2687.186768
21 0.185709 0.789119 0.310309 2017-03-06 000002.SZA 2684.861572 2706.724121 2686.687988 2686.465332
22 0.082355 0.363166 0.113386 2017-03-07 000002.SZA 2690.172852 2705.361084 2687.953613 2686.885742
23 0.143224 0.446868 0.679294 2017-03-08 000002.SZA 2751.252686 2711.933838 2716.239990 2730.609863
24 0.574118 0.494604 0.047899 2017-03-09 000002.SZA 2723.368408 2718.498535 2719.765625 2730.262939
25 0.514899 0.721179 0.792657 2017-03-10 000002.SZA 2735.318848 2727.159180 2730.982178 2734.270508
26 0.236072 0.802206 0.556469 2017-03-13 000002.SZA 2749.925049 2732.533691 2746.178223 2742.981689
27 0.729079 0.559329 0.215520 2017-03-14 000002.SZA 2864.117920 2828.468994 2812.145264 2769.089111
28 0.312538 0.155777 0.642177 2017-03-15 000002.SZA 2826.938721 2827.990723 2814.449707 2806.238770
29 0.971473 0.155466 0.269883 2017-03-16 000002.SZA 2824.283203 2824.388916 2815.978516 2811.108643
... ... ... ... ... ... ... ... ... ...
136 0.458451 0.450164 0.395550 2017-08-21 000002.SZA 3003.539551 2982.523926 2991.907715 2960.268066
137 0.010266 0.480387 0.723464 2017-08-22 000002.SZA 3081.881104 2983.543945 3035.129883 3048.250732
138 0.982455 0.562324 0.029080 2017-08-23 000002.SZA 3085.864746 3084.069580 3063.659424 3049.344482
139 0.953619 0.688013 0.664324 2017-08-24 000002.SZA 3065.947266 3066.787842 3065.233398 3060.374023
140 0.846339 0.849804 0.481566 2017-08-25 000002.SZA 3080.553223 3078.437988 3078.252197 3070.091553
141 0.640821 0.462776 0.471943 2017-08-28 000002.SZA 3188.107178 3148.716309 3129.090332 3125.788086
142 0.449616 0.747737 0.522932 2017-08-29 000002.SZA 3207.329102 3175.069580 3187.592285 3168.428467
143 0.570004 0.075895 0.392412 2017-08-30 000002.SZA 3190.853027 3184.066162 3187.839844 3177.228027
144 0.954638 0.695416 0.507848 2017-08-31 000002.SZA 3189.480225 3189.234619 3188.980713 3183.450195
145 0.612865 0.923689 0.687287 2017-09-01 000002.SZA 3141.425049 3159.933838 3145.053955 3154.566895
146 0.135759 0.657684 0.946435 2017-09-04 000002.SZA 3152.409180 3158.912354 3149.891357 3152.524658
147 0.179960 0.155195 0.951595 2017-09-05 000002.SZA 3262.249268 3177.508789 3167.328857 3256.937988
148 0.622103 0.316680 0.413675 2017-09-06 000002.SZA 3267.741211 3233.642578 3199.127441 3261.406982
149 0.285249 0.930288 0.456800 2017-09-07 000002.SZA 3565.682373 3328.356689 3540.128906 3400.400146
150 0.504958 0.476626 0.950891 2017-09-08 000002.SZA 3540.968262 3435.716553 3540.529053 3534.064941
151 0.210036 0.123588 0.868388 2017-09-11 000002.SZA 3470.945312 3443.115967 3531.929443 3479.252686
152 0.525175 0.674389 0.038882 2017-09-12 000002.SZA 3468.199219 3456.289062 3488.950439 3478.822998
153 0.422909 0.999902 0.491837 2017-09-13 000002.SZA 3536.849365 3490.358643 3536.844727 3507.362549
154 0.400434 0.247792 0.340633 2017-09-14 000002.SZA 3783.989258 3607.938477 3598.085205 3601.590576
155 0.975498 0.883574 0.025056 2017-09-15 000002.SZA 4022.891357 4012.723877 3973.432861 3612.146729
156 0.875698 0.583909 0.443264 2017-09-18 000002.SZA 3849.893311 3870.133545 3901.296875 3717.531250
157 0.329712 0.647521 0.971373 2017-09-19 000002.SZA 3950.122314 3896.506836 3932.912354 3943.463867
158 0.405539 0.464619 0.273726 2017-09-20 000002.SZA 3944.630371 3916.022949 3938.356689 3943.783203
159 0.912331 0.557552 0.944091 2017-09-21 000002.SZA 3899.321289 3900.785400 3916.592529 3901.807129
160 0.085974 0.372833 0.498780 2017-09-22 000002.SZA 3818.314453 3893.695068 3879.951172 3860.162598
161 0.742241 0.169878 0.166132 2017-09-25 000002.SZA 3586.277344 3665.517090 3830.062500 3814.661621
162 0.716094 0.302629 0.239118 2017-09-26 000002.SZA 3674.149414 3671.698730 3782.878662 3781.062744
163 0.068896 0.384868 0.776170 2017-09-27 000002.SZA 3685.133301 3672.624268 3745.259766 3706.605225
164 0.343502 0.640053 0.502300 2017-09-28 000002.SZA 3626.094238 3656.641113 3668.987549 3666.164551
165 0.002509 0.237247 0.387793 2017-09-29 000002.SZA 3604.126221 3656.509277 3653.599365 3642.106445

166 rows × 9 columns