Rangekeeper 0.8.27__py3-none-any.whl → 0.8.29__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rangekeeper/duration.py +10 -10
- {rangekeeper-0.8.27.dist-info → rangekeeper-0.8.29.dist-info}/METADATA +1 -1
- {rangekeeper-0.8.27.dist-info → rangekeeper-0.8.29.dist-info}/RECORD +5 -5
- {rangekeeper-0.8.27.dist-info → rangekeeper-0.8.29.dist-info}/WHEEL +0 -0
- {rangekeeper-0.8.27.dist-info → rangekeeper-0.8.29.dist-info}/top_level.txt +0 -0
rangekeeper/duration.py
CHANGED
@@ -18,7 +18,7 @@ class Type(enum.Enum):
|
|
18
18
|
SEMIYEAR = "6M"
|
19
19
|
QUARTER = "Q"
|
20
20
|
MONTH = "M"
|
21
|
-
|
21
|
+
BIWEEK = "2W"
|
22
22
|
WEEK = "W"
|
23
23
|
DAY = "D"
|
24
24
|
|
@@ -39,7 +39,7 @@ class Type(enum.Enum):
|
|
39
39
|
if value == "M":
|
40
40
|
return Type.MONTH
|
41
41
|
if value in ("2W", "2W-SUN"):
|
42
|
-
return Type.
|
42
|
+
return Type.BIWEEK
|
43
43
|
if value in ("W-SUN", "W"):
|
44
44
|
return Type.WEEK
|
45
45
|
if value == "D":
|
@@ -63,7 +63,7 @@ class Type(enum.Enum):
|
|
63
63
|
return "Q"
|
64
64
|
if type == Type.MONTH:
|
65
65
|
return "M"
|
66
|
-
if type == Type.
|
66
|
+
if type == Type.BIWEEK:
|
67
67
|
return "2W"
|
68
68
|
if type == Type.WEEK:
|
69
69
|
return "W"
|
@@ -88,10 +88,10 @@ class Type(enum.Enum):
|
|
88
88
|
return "QE"
|
89
89
|
if type == Type.MONTH:
|
90
90
|
return "ME"
|
91
|
-
if type == Type.
|
92
|
-
return "2W"
|
91
|
+
if type == Type.BIWEEK:
|
92
|
+
return "2W-SUN"
|
93
93
|
if type == Type.WEEK:
|
94
|
-
return "W"
|
94
|
+
return "W-SUN"
|
95
95
|
if type == Type.DAY:
|
96
96
|
return "D"
|
97
97
|
else:
|
@@ -129,7 +129,7 @@ def measure(
|
|
129
129
|
result = (delta.years * 4) + math.floor(delta.months / 3)
|
130
130
|
elif duration.value == Type.MONTH.value:
|
131
131
|
result = (delta.years * 12) + delta.months
|
132
|
-
elif duration.value == Type.
|
132
|
+
elif duration.value == Type.BIWEEK.value:
|
133
133
|
result = math.floor((calc_end_date - start_date).days / 14)
|
134
134
|
elif duration.value == Type.WEEK.value:
|
135
135
|
result = math.floor((calc_end_date - start_date).days / 7)
|
@@ -177,7 +177,7 @@ def offset(
|
|
177
177
|
result = date + pd.offsets.MonthEnd(3 * amount)
|
178
178
|
elif duration.value == Type.MONTH.value:
|
179
179
|
result = date + pd.offsets.MonthEnd(amount)
|
180
|
-
elif duration.value == Type.
|
180
|
+
elif duration.value == Type.BIWEEK.value:
|
181
181
|
result = date + pd.DateOffset(weeks=2 * amount)
|
182
182
|
elif duration.value == Type.WEEK.value:
|
183
183
|
result = date + pd.DateOffset(weeks=amount)
|
@@ -200,7 +200,7 @@ def offset(
|
|
200
200
|
result = date + pd.DateOffset(months=3 * amount)
|
201
201
|
elif duration.value == Type.MONTH.value:
|
202
202
|
result = date + pd.DateOffset(months=amount)
|
203
|
-
elif duration.value == Type.
|
203
|
+
elif duration.value == Type.BIWEEK.value:
|
204
204
|
result = date + pd.DateOffset(weeks=2 * amount)
|
205
205
|
elif duration.value == Type.WEEK.value:
|
206
206
|
result = date + pd.DateOffset(weeks=amount)
|
@@ -245,7 +245,7 @@ class Period:
|
|
245
245
|
Type.SEMIYEAR: 2,
|
246
246
|
Type.QUARTER: 4,
|
247
247
|
Type.MONTH: 12,
|
248
|
-
Type.
|
248
|
+
Type.BIWEEK: 26,
|
249
249
|
Type.WEEK: 52,
|
250
250
|
Type.DAY: 365,
|
251
251
|
}.get(duration, None)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: Rangekeeper
|
3
|
-
Version: 0.8.
|
3
|
+
Version: 0.8.29
|
4
4
|
Summary: A Python library assisting financial modelling in real estate asset & development planning, decision-making, cashflow forecasting, and scenario analysis.
|
5
5
|
Author-email: Daniel Fink <danfink@mit.edu>
|
6
6
|
License-Expression: MPL-2.0
|
@@ -1,7 +1,7 @@
|
|
1
1
|
rangekeeper/__init__.py,sha256=8q0KF90SLgIfptpFGuI66FOCqe3K9UgIzTHFL1pwP4Y,1731
|
2
2
|
rangekeeper/api.py,sha256=3nuG7C2IQjpumcn79MvYDTa7ADWPAos7VfVM-3pL4n4,4798
|
3
3
|
rangekeeper/distribution.py,sha256=2C3jhi1rLJUs0seBztdQb196hNhc00sKJEGMkFiDpYs,8961
|
4
|
-
rangekeeper/duration.py,sha256=
|
4
|
+
rangekeeper/duration.py,sha256=c0roYG0zzIfr3B19_NxahlaBoAt1DuKSjeqyVGOhn0Y,20425
|
5
5
|
rangekeeper/extrapolation.py,sha256=Zfsz2KwkImxEMMCNZaF8RpiQxlIgemS1dQkSnjliYU4,2814
|
6
6
|
rangekeeper/flux.py,sha256=25-jSnBrO9QGDXpuNahaVFUiJrHAWaiTda1uplUXFck,32043
|
7
7
|
rangekeeper/format.py,sha256=DOfF4-LCXqWyCtE1OomwE80sJLe6LjL4gqEOAP454LQ,10796
|
@@ -20,7 +20,7 @@ rangekeeper/dynamics/trend.py,sha256=-WqrRvmmTj2mE24Pz-Dl5lXEpLXnDUMngafU__em_ac
|
|
20
20
|
rangekeeper/dynamics/volatility.py,sha256=MGDLzrI1uP_C6HL-pigJwWikHg1KNbfB_0m0Akh-L2A,5162
|
21
21
|
rangekeeper/formula/__init__.py,sha256=4OXzdJAYDBxQeOMzLR5MZvIjxxIfFOTE9aNu9zFryAE,36
|
22
22
|
rangekeeper/formula/financial.py,sha256=oNFdhygbtdEUFjpxYFuuDnpC_P8nOO538b21FzaMtTU,14045
|
23
|
-
rangekeeper-0.8.
|
24
|
-
rangekeeper-0.8.
|
25
|
-
rangekeeper-0.8.
|
26
|
-
rangekeeper-0.8.
|
23
|
+
rangekeeper-0.8.29.dist-info/METADATA,sha256=d6pMSrTHDrBQt4S_eIypA9BNaW5Vy7Mds8mkLb5f7Vk,2212
|
24
|
+
rangekeeper-0.8.29.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
25
|
+
rangekeeper-0.8.29.dist-info/top_level.txt,sha256=7ov6d70lppmzKc088MAmRWnCtCRGA2cd43G28QBSv-c,12
|
26
|
+
rangekeeper-0.8.29.dist-info/RECORD,,
|
File without changes
|
File without changes
|