000001.XSHE 000002.XSHE 000004.XSHE 000005.XSHE 000006.XSHE \
date
2017-06-08 6.8977 11.0313 74.6204 53.0669 14.3318
2017-06-09 NaN 11.0313 74.6204 53.2679 14.7690
2017-06-12 NaN 11.4700 74.6204 51.6598 14.4775
2017-06-13 NaN 11.6286 74.6204 52.8659 14.5423
2017-06-14 NaN 11.2850 74.6204 52.3634 14.4127
2017-06-15 NaN 11.1211 67.1584 53.2679 14.4775
2017-06-16 NaN 11.0683 60.4425 53.5694 14.1536
2017-06-19 NaN 11.0894 55.9653 54.7755 14.3318
2017-06-20 NaN 11.1159 56.0275 54.7755 14.3642
2017-06-21 NaN 11.1211 55.0740 54.0720 14.1860
2017-06-22 NaN 11.5651 53.9961 53.5694 13.7650
2017-06-23 NaN 12.7227 52.6903 52.9664 13.9107
2017-06-26 NaN 13.9966 54.1620 53.3684 14.0889
2017-06-27 NaN 13.4997 53.8511 53.0669 14.1212
2017-06-28 NaN 13.2143 53.7889 52.5644 14.1051
2017-06-29 NaN 13.2989 52.9598 52.7654 14.3642
2017-06-30 NaN 11.9982 66.1924 -153.7430 12.8424
000007.XSHE 000008.XSHE 000009.XSHE 000010.XSHE 000011.XSHE \
date
2017-06-08 77.8426 39.1940 68.7342 92.1288 18.3552
2017-06-09 77.8426 39.4643 68.9158 92.8254 19.4547
2017-06-12 77.8426 39.2481 67.2814 89.3423 18.7368
2017-06-13 77.8426 39.4643 69.5514 90.7356 18.6732
2017-06-14 77.8426 39.6806 70.8225 90.2131 18.0553
2017-06-15 77.8426 39.7346 70.7317 91.7805 18.1825
2017-06-16 77.8426 39.7346 70.8225 91.6063 18.1007
2017-06-19 77.8426 40.0590 71.0949 91.2580 19.0639
2017-06-20 77.8426 39.9509 71.9121 91.6063 19.4092
2017-06-21 77.8426 39.8427 71.3673 91.0839 19.1457
2017-06-22 77.8426 39.1399 70.0961 89.1681 18.3824
2017-06-23 77.8426 38.8696 71.2765 88.1232 18.5914
2017-06-26 77.8426 39.9509 74.4545 89.3423 18.7641
2017-06-27 77.8426 39.6265 73.0925 89.3423 19.0457
2017-06-28 77.8426 39.3021 73.0017 88.1232 18.7731
2017-06-29 77.8426 39.1940 73.0017 88.6457 18.3370
2017-06-30 62.2812 38.1776 72.1653 -129.3607 16.4530
... 603987.XSHG 603988.XSHG 603989.XSHG 603990.XSHG \
date ...
2017-06-08 ... 51.6006 233.7065 38.8069 70.4559
2017-06-09 ... 49.5705 233.9646 39.4571 68.9226
2017-06-12 ... 47.6616 232.2318 39.5725 66.5863
2017-06-13 ... 49.1160 234.0015 40.5794 67.7909
2017-06-14 ... 48.5706 234.8863 40.0969 68.1377
2017-06-15 ... 49.6311 239.0155 40.2647 69.7805
2017-06-16 ... 49.0857 238.4994 40.2438 70.3281
2017-06-19 ... 48.9948 238.8681 40.2018 70.1273
2017-06-20 ... 48.9948 239.3105 39.9291 70.5654
2017-06-21 ... 48.8433 238.2413 40.9884 75.2627
2017-06-22 ... 47.5707 234.0752 39.6459 73.5455
2017-06-23 ... 47.0253 231.5682 40.2333 71.9021
2017-06-26 ... 47.4192 231.3838 41.3660 72.1606
2017-06-27 ... 47.7828 231.3838 41.4709 71.9390
2017-06-28 ... 46.8435 230.0197 41.8275 71.7544
2017-06-29 ... 46.6011 229.9091 41.9114 71.3112
2017-06-30 ... 44.7973 214.8588 41.2032 64.6018
603991.XSHG 603993.XSHG 603996.XSHG 603997.XSHG 603998.XSHG \
date
2017-06-08 79.0908 48.4260 42.9950 37.7319 84.2009
2017-06-09 79.6351 48.7744 42.7216 36.2035 83.1152
2017-06-12 75.8059 49.0066 42.2494 35.1288 82.6327
2017-06-13 80.5098 52.2582 42.9453 35.0333 83.1755
2017-06-14 82.3757 52.8389 42.8956 34.6512 83.5374
2017-06-15 84.3972 53.6518 42.1997 34.7706 82.9343
2017-06-16 81.1123 58.5292 42.4482 34.1020 82.5724
2017-06-19 80.9763 57.4841 42.4731 34.2452 82.9343
2017-06-20 83.6392 57.7163 42.3488 34.8661 87.7595
2017-06-21 83.3671 57.8325 41.9512 34.8184 86.0104
2017-06-22 76.9721 56.4389 41.4293 34.7467 84.4422
2017-06-23 76.1363 56.0905 40.3109 34.7229 84.6231
2017-06-26 76.1363 56.5550 41.6032 34.6512 84.0199
2017-06-27 80.0044 57.1357 41.6281 34.6035 84.5628
2017-06-28 79.0519 56.2066 42.1749 34.6512 83.4168
2017-06-29 77.0499 57.7163 43.1441 34.6512 83.0549
2017-06-30 80.3493 64.6718 42.1228 33.4757 76.6954
603999.XSHG
date
2017-06-08 67.4683
2017-06-09 66.9036
2017-06-12 64.7111
2017-06-13 66.7375
2017-06-14 68.5646
2017-06-15 75.4078
2017-06-16 72.5177
2017-06-19 73.1821
2017-06-20 73.0160
2017-06-21 72.0526
2017-06-22 70.8567
2017-06-23 71.1889
2017-06-26 71.7536
2017-06-27 73.6471
2017-06-28 72.5177
2017-06-29 73.7136
2017-06-30 73.6309
[17 rows x 3279 columns]
DatetimeIndex(['2017-06-08', '2017-06-09', '2017-06-12', '2017-06-13',
'2017-06-14', '2017-06-15', '2017-06-16', '2017-06-19',
'2017-06-20', '2017-06-21', '2017-06-22', '2017-06-23',
'2017-06-26', '2017-06-27', '2017-06-28', '2017-06-29',
'2017-06-30'],
dtype='datetime64[ns]', name='date', freq=None)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-6-e48eb4e6b075> in <module>()
95 print(fValue.index)
96 from rqalpha.mod.rqalpha_mod_alphaStar_factors.factor_data import FactorData
---> 97 FactorData(fname="testFactor",path=conf.factor_data_path,defaultInitDate = conf.factor_data_init_date).append(fValue)
98
D:\Program Files\Anaconda3\envs\rqalpha\lib\site-packages\rqalpha-3.0.9-py3.5.egg\rqalpha\mod\rqalpha_mod_alphaStar_factors\factor_data.py in append(self, datas)
88 # print(idxs, years)
89 for i in range(len(years)):
---> 90 self._appendAyear(years[i],datas.iloc[idxs[i]:idxs[i + 1]])
91
92 def _appendAyear(self, year, datas=pd.DataFrame()):
D:\Program Files\Anaconda3\envs\rqalpha\lib\site-packages\rqalpha-3.0.9-py3.5.egg\rqalpha\mod\rqalpha_mod_alphaStar_factors\factor_data.py in _appendAyear(self, year, datas)
96 if os.path.exists(_file):
97 df = pd.read_hdf(_file)
---> 98 df = df.append(datas, verify_integrity=True)
99 df.to_hdf(_file,key="root", mode='w')
100 else:
D:\Program Files\Anaconda3\envs\rqalpha\lib\site-packages\pandas\core\frame.py in append(self, other, ignore_index, verify_integrity)
5192 to_concat = [self, other]
5193 return concat(to_concat, ignore_index=ignore_index,
-> 5194 verify_integrity=verify_integrity)
5195
5196 def join(self, other, on=None, how='left', lsuffix='', rsuffix='',
D:\Program Files\Anaconda3\envs\rqalpha\lib\site-packages\pandas\core\reshape\concat.py in concat(objs, axis, join, join_axes, ignore_index, keys, levels, names, verify_integrity, copy)
210 keys=keys, levels=levels, names=names,
211 verify_integrity=verify_integrity,
--> 212 copy=copy)
213 return op.get_result()
214
D:\Program Files\Anaconda3\envs\rqalpha\lib\site-packages\pandas\core\reshape\concat.py in __init__(self, objs, axis, join, join_axes, keys, levels, names, ignore_index, verify_integrity, copy)
361 self.copy = copy
362
--> 363 self.new_axes = self._get_new_axes()
364
365 def get_result(self):
D:\Program Files\Anaconda3\envs\rqalpha\lib\site-packages\pandas\core\reshape\concat.py in _get_new_axes(self)
441 new_axes[i] = ax
442
--> 443 new_axes[self.axis] = self._get_concat_axis()
444 return new_axes
445
D:\Program Files\Anaconda3\envs\rqalpha\lib\site-packages\pandas\core\reshape\concat.py in _get_concat_axis(self)
498 self.levels, self.names)
499
--> 500 self._maybe_check_integrity(concat_axis)
501
502 return concat_axis
D:\Program Files\Anaconda3\envs\rqalpha\lib\site-packages\pandas\core\reshape\concat.py in _maybe_check_integrity(self, concat_index)
507 overlap = concat_index.get_duplicates()
508 raise ValueError('Indexes have overlapping values: '
--> 509 '{overlap!s}'.format(overlap=overlap))
510
511
ValueError: Indexes have overlapping values: DatetimeIndex(['2017-06-08', '2017-06-09', '2017-06-12', '2017-06-13',
'2017-06-14', '2017-06-15', '2017-06-16', '2017-06-19',
'2017-06-20', '2017-06-21', '2017-06-22', '2017-06-23',
'2017-06-26', '2017-06-27', '2017-06-28', '2017-06-29',
'2017-06-30'],
dtype='datetime64[ns]', freq=None)