1.时间有的地方对不上,回购区间的起始、截止日期和交易日期存在不对应的现象,导致merge的时候会出现无数据现象。
2.怎么生成区间内为1的数据不会。
请教stata版的各位老师和同学了。
日期区间数据如下:
----------------------- copy starting from the next line -----------------------
- * Example generated by -dataex-. To install: ssc install dataex
- clear
- input long 证券代码 str6 区间 float day str9 day1
- 1 "起始" . "."
- 1 "截止" . "."
- 2 "起始" 20331 "2015Aug31"
- 2 "截止" 20453 "2015Dec31"
- 4 "起始" . "."
- 4 "截止" . "."
- 5 "起始" 21535 "2018Dec17"
- 5 "截止" 21900 "2019Dec17"
- 6 "起始" . "."
- 6 "截止" . "."
- 7 "起始" . "."
- 7 "截止" . "."
- 8 "起始" 21560 "2019Jan11"
- 8 "截止" 21925 "2020Jan11"
- 9 "起始" . "."
- end
- format %tdCCYY-NN-DD day
------------------ copy up to and including the previous line ------------------
日交易数据如下:
----------------------- copy starting from the next line -----------------------
- * Example generated by -dataex-. To install: ssc install dataex
- clear
- input long 证券代码 float day str9 day1 float t double(corr corr1) float(delay1 delay2 delay11 delay12)
- 2 20437 "2015Dec15" 232 -.07508226257066927 -.08043626495856418 .3188188 .3514094 .5621222 .56202435
- 2 20438 "2015Dec16" 233 -.07500052337700876 -.08036211379223249 .331554 .3635435 .5677243 .5676353
- 2 20439 "2015Dec17" 234 -.07617545729621655 -.08135266559652377 .3205806 .3524321 .5549797 .55489945
- 2 20440 "2015Dec18" 235 -.03903360826112616 -.04438077739938677 .29350755 .3258618 .55843353 .55833656
- 2 20639 "2016Jul04" 236 -.03964094429258676 -.04480733944474694 .3323508 .3622379 .5787528 .5786645
- 2 20640 "2016Jul05" 237 -.04574902273836179 -.05072177762190707 .3585479 .3863775 .5926044 .59250176
- 2 20641 "2016Jul06" 238 -.05903973917319677 -.06391235223340842 .3838527 .411895 .59452945 .5944338
- 2 20642 "2016Jul07" 239 -.05335531942103895 -.05818547485504246 .3558825 .3839779 .5912086 .59109885
- 2 20643 "2016Jul08" 240 -.02964617958757832 -.03469075517088436 .3380436 .3681585 .5833706 .5832436
- 2 20646 "2016Jul11" 241 -.023232142864489432 -.028431066826210914 .3460991 .3758401 .5838488 .583713
- 2 20647 "2016Jul12" 242 -.02525021146639929 -.030396555657224714 .3417679 .3713076 .57906204 .5789259
- end
- format %tdCCYY-NN-DD day
------------------ copy up to and including the previous line ------------------
这里展示的时代码000002的数据,它的截止日期就不存在对应的交易日,导致merge的时候数据为空。


雷达卡








京公网安备 11010802022788号







