-
Notifications
You must be signed in to change notification settings - Fork 0
/
SubperiodsDates.py
72 lines (58 loc) · 1.97 KB
/
SubperiodsDates.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import pandas as pd
def subperiod1_start():
global startdate1
startdate1 = pd.to_datetime('2011-1-1')
return startdate1
def subperiod1_end():
global enddate1
enddate1 = pd.to_datetime('2015-8-12')
return enddate1
def subperiod2_start():
global startdate2
startdate2 = pd.to_datetime('2016-1-1')
return startdate2
def subperiod2_end():
global enddate2
enddate2 = pd.to_datetime('2017-8-5')
return enddate2
def subperiod3_start():
global startdate3
startdate3 = pd.to_datetime('2017-8-13')
return startdate3
def subperiod3_end():
global enddate3
enddate3 = pd.to_datetime('2019-12-31')
return enddate3
def subperiod4_start():
global startdate4
startdate4 = pd.to_datetime('2016-01-01')
return startdate4
def subperiod4_end():
global enddate4
enddate4 = pd.to_datetime('2019-12-31')
return enddate4
def subperiod5_start():
global startdate5
startdate5 = pd.to_datetime('2011-1-1')
return startdate5
def subperiod5_end():
global enddate5
enddate5 = pd.to_datetime('2019-12-31')
return enddate5
def SubperiodsDatesDict():
global SubperiodsDict
SubperiodsDict = {'Subperiod 1': [subperiod1_start(), subperiod1_end()], 'Subperiod 2': [subperiod2_start(), subperiod2_end()],
'Subperiod 3': [subperiod3_start(), subperiod3_end()], 'Subperiod 4': [subperiod4_start(),
subperiod4_end()],'Subperiod 5': [subperiod5_start(), subperiod5_end()]}
return SubperiodsDict
#lists
def SubperiodsList():
global SubperiodsList
SubperiodsList = [subperiod1_start(), subperiod1_end(), subperiod2_start(), subperiod2_end(),
subperiod3_start(), subperiod3_end(), subperiod4_start(), subperiod4_end(), subperiod5_start(), subperiod5_end()]
return SubperiodsList
def SubperiodsNames():
global SubperiodsNames
SubperiodsNames = ['Subperiod 1', 'Subperiod 2', 'Subperiod 3', 'Subperiod 4', 'Subperiod 5']
return SubperiodsNames
print(SubperiodsNames())