Skip to content

Commit ebdf882

Browse files
author
rob
committed
roll calendar zar
1 parent 72dd475 commit ebdf882

File tree

2 files changed

+104
-1
lines changed

2 files changed

+104
-1
lines changed
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
DATE_TIME,current_contract,next_contract,carry_contract
2+
1997-06-09 23:00:00,19970600,19970900,19970900
3+
1997-09-08 23:00:00,19970900,19971200,19971200
4+
1997-12-08 23:00:00,19971200,19980300,19980300
5+
1998-03-09 23:00:00,19980300,19980600,19980600
6+
1998-06-08 23:00:00,19980600,19980900,19980900
7+
1998-09-08 23:00:00,19980900,19981200,19981200
8+
1998-12-08 23:00:00,19981200,19990300,19990300
9+
1999-03-09 23:00:00,19990300,19990600,19990600
10+
1999-06-08 23:00:00,19990600,19990900,19990900
11+
1999-09-08 23:00:00,19990900,19991200,19991200
12+
1999-12-08 23:00:00,19991200,20000300,20000300
13+
2000-03-08 23:00:00,20000300,20000600,20000600
14+
2000-06-08 23:00:00,20000600,20000900,20000900
15+
2000-09-08 23:00:00,20000900,20001200,20001200
16+
2000-12-07 23:00:00,20001200,20010300,20010300
17+
2001-02-28 23:00:00,20010300,20010600,20010600
18+
2001-06-08 23:00:00,20010600,20010900,20010900
19+
2001-09-07 23:00:00,20010900,20011200,20011200
20+
2001-12-07 23:00:00,20011200,20020300,20020300
21+
2002-03-08 23:00:00,20020300,20020600,20020600
22+
2002-06-07 23:00:00,20020600,20020900,20020900
23+
2002-09-09 23:00:00,20020900,20021200,20021200
24+
2002-12-09 23:00:00,20021200,20030300,20030300
25+
2003-03-07 23:00:00,20030300,20030600,20030600
26+
2003-06-09 23:00:00,20030600,20030900,20030900
27+
2003-09-08 23:00:00,20030900,20031200,20031200
28+
2003-12-08 23:00:00,20031200,20040300,20040300
29+
2004-03-08 23:00:00,20040300,20040600,20040600
30+
2004-06-08 23:00:00,20040600,20040900,20040900
31+
2004-09-08 23:00:00,20040900,20041200,20041200
32+
2004-12-08 23:00:00,20041200,20050300,20050300
33+
2005-03-08 23:00:00,20050300,20050600,20050600
34+
2005-06-08 23:00:00,20050600,20050900,20050900
35+
2005-09-08 23:00:00,20050900,20051200,20051200
36+
2005-12-08 23:00:00,20051200,20060300,20060300
37+
2006-03-08 23:00:00,20060300,20060600,20060600
38+
2006-06-08 23:00:00,20060600,20060900,20060900
39+
2006-09-08 23:00:00,20060900,20061200,20061200
40+
2006-12-08 23:00:00,20061200,20070300,20070300
41+
2007-03-08 23:00:00,20070300,20070600,20070600
42+
2007-06-08 23:00:00,20070600,20070900,20070900
43+
2007-09-07 23:00:00,20070900,20071200,20071200
44+
2007-12-07 23:00:00,20071200,20080300,20080300
45+
2008-03-07 23:00:00,20080300,20080600,20080600
46+
2008-06-09 23:00:00,20080600,20080900,20080900
47+
2008-09-08 23:00:00,20080900,20081200,20081200
48+
2008-12-08 23:00:00,20081200,20090300,20090300
49+
2009-03-09 23:00:00,20090300,20090600,20090600
50+
2009-06-08 23:00:00,20090600,20090900,20090900
51+
2009-09-08 23:00:00,20090900,20091200,20091200
52+
2009-12-08 23:00:00,20091200,20100300,20100300
53+
2010-03-08 23:00:00,20100300,20100600,20100600
54+
2010-06-08 23:00:00,20100600,20100900,20100900
55+
2010-09-08 23:00:00,20100900,20101200,20101200
56+
2010-12-08 23:00:00,20101200,20110300,20110300
57+
2011-03-08 23:00:00,20110300,20110600,20110600
58+
2011-06-08 23:00:00,20110600,20110900,20110900
59+
2011-09-08 23:00:00,20110900,20111200,20111200
60+
2011-12-08 23:00:00,20111200,20120300,20120300
61+
2012-03-08 23:00:00,20120300,20120600,20120600
62+
2012-06-08 23:00:00,20120600,20120900,20120900
63+
2012-09-07 23:00:00,20120900,20121200,20121200
64+
2012-12-07 23:00:00,20121200,20130300,20130300
65+
2013-03-08 23:00:00,20130300,20130600,20130600
66+
2013-06-07 23:00:00,20130600,20130900,20130900
67+
2013-09-09 23:00:00,20130900,20131200,20131200
68+
2013-12-16 23:00:00,20131200,20140300,20140300
69+
2014-03-07 16:00:00,20140300,20140600,20140600
70+
2014-06-09 12:00:00,20140600,20140900,20140900
71+
2014-09-08 07:00:00,20140900,20141200,20141200
72+
2014-12-08 08:00:00,20141200,20150300,20150300
73+
2015-03-09 14:00:00,20150300,20150600,20150600
74+
2015-06-08 04:00:00,20150600,20150900,20150900
75+
2015-09-08 07:00:00,20150900,20151200,20151200
76+
2015-12-08 08:00:00,20151200,20160300,20160300
77+
2016-03-08 08:00:00,20160300,20160600,20160600
78+
2016-06-08 07:00:00,20160600,20160900,20160900
79+
2016-09-08 11:00:00,20160900,20161200,20161200
80+
2016-12-08 07:00:00,20161200,20170300,20170300
81+
2017-03-08 07:00:00,20170300,20170600,20170600
82+
2017-06-08 07:00:00,20170600,20170900,20170900
83+
2017-09-08 09:00:00,20170900,20171200,20171200
84+
2017-12-08 08:00:00,20171200,20180300,20180300
85+
2018-03-08 10:00:00,20180300,20180600,20180600
86+
2018-06-08 07:00:00,20180600,20180900,20180900
87+
2018-09-07 04:00:00,20180900,20181200,20181200
88+
2018-12-07 08:00:00,20181200,20190300,20190300
89+
2019-03-08 07:00:00,20190300,20190600,20190600
90+
2019-06-07 07:00:00,20190600,20190900,20190900
91+
2019-09-09 08:00:00,20190900,20191200,20191200
92+
2019-12-08 23:00:00,20191200,20200300,20200300
93+
2020-03-09 01:00:00,20200300,20200600,20200600
94+
2020-06-08 07:00:00,20200600,20200900,20200900
95+
2020-09-08 10:00:00,20200900,20201200,20201200
96+
2020-12-08 08:00:00,20201200,20210300,20210300
97+
2021-03-08 02:00:00,20210300,20210600,20210600
98+
2021-06-08 08:00:00,20210600,20210900,20210900
99+
2021-09-08 07:00:00,20210900,20211200,20211200
100+
2021-12-08 01:00:00,20211200,20220300,20220300
101+
2022-03-08 02:00:00,20220300,20220600,20220600
102+
2022-06-08 07:00:00,20220600,20220900,20220900
103+
2022-09-08 02:00:00,20220900,20221200,20221200

systems/rawdata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def get_daily_percentage_volatility(self, instrument_code: str) -> pd.Series:
229229
"""
230230
denom_price = self.daily_denominator_price(instrument_code)
231231
return_vol = self.daily_returns_volatility(instrument_code)
232-
(denom_price, return_vol) = denom_price.align(return_vol, join="right")
232+
(denom_price, return_vol) = denom_price.align(return_vol, join="right").abs()
233233
perc_vol = 100.0 * (return_vol / denom_price.ffill())
234234

235235
return perc_vol

0 commit comments

Comments
 (0)