rangekeeper 0.7.2.post2__tar.gz → 0.7.2.post4__tar.gz
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-0.7.2.post2 → rangekeeper-0.7.2.post4}/PKG-INFO +2 -2
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/pyproject.toml +2 -2
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/rangekeeper/duration.py +23 -19
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/rangekeeper/flux.py +1 -1
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/rangekeeper/projection.py +2 -2
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/README.md +0 -0
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/rangekeeper/__init__.py +0 -0
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/rangekeeper/api.py +0 -0
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/rangekeeper/conftest.py +0 -0
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/rangekeeper/distribution.py +0 -0
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/rangekeeper/dynamics/__init__.py +0 -0
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/rangekeeper/dynamics/black_swan.py +0 -0
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/rangekeeper/dynamics/cyclicality.py +0 -0
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/rangekeeper/dynamics/market.py +0 -0
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/rangekeeper/dynamics/noise.py +0 -0
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/rangekeeper/dynamics/trend.py +0 -0
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/rangekeeper/dynamics/volatility.py +0 -0
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/rangekeeper/extrapolation.py +0 -0
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/rangekeeper/format.py +0 -0
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/rangekeeper/formula.py +0 -0
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/rangekeeper/graph.py +0 -0
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/rangekeeper/measure.py +0 -0
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/rangekeeper/policy.py +0 -0
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/rangekeeper/segmentation.py +0 -0
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/rangekeeper/space.py +0 -0
- {rangekeeper-0.7.2.post2 → rangekeeper-0.7.2.post4}/rangekeeper/span.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: Rangekeeper
|
|
3
|
-
Version: 0.7.2.
|
|
3
|
+
Version: 0.7.2.post4
|
|
4
4
|
Summary: A Python library assisting financial modelling in real estate asset & development planning, decision-making, cashflow forecasting, and scenario analysis.
|
|
5
5
|
License: MPL-2.0
|
|
6
6
|
Author: Daniel Fink
|
|
@@ -18,7 +18,7 @@ Requires-Dist: multiprocess (>=0.70,<0.71)
|
|
|
18
18
|
Requires-Dist: networkx (>=3.3,<4.0)
|
|
19
19
|
Requires-Dist: numba (>=0.60,<0.61)
|
|
20
20
|
Requires-Dist: numpy-financial (>=1.0,<2.0)
|
|
21
|
-
Requires-Dist: pandas (>=2
|
|
21
|
+
Requires-Dist: pandas (>=2,<3)
|
|
22
22
|
Requires-Dist: pint (>=0.24,<0.25)
|
|
23
23
|
Requires-Dist: plotly (>=5.22,<6.0)
|
|
24
24
|
Requires-Dist: py-moneyed (>=3.0,<4.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "Rangekeeper"
|
|
3
|
-
version = "0.7.2-
|
|
3
|
+
version = "0.7.2-4"
|
|
4
4
|
description = "A Python library assisting financial modelling in real estate asset & development planning, decision-making, cashflow forecasting, and scenario analysis."
|
|
5
5
|
authors = ["Daniel Fink <danfink@mit.edu>"]
|
|
6
6
|
license = "MPL-2.0"
|
|
@@ -9,7 +9,7 @@ readme = "README.md"
|
|
|
9
9
|
[tool.poetry.dependencies]
|
|
10
10
|
python = ">=3.10, <3.13"
|
|
11
11
|
matplotlib = "^3.9"
|
|
12
|
-
pandas = "^2
|
|
12
|
+
pandas = "^2"
|
|
13
13
|
pint = "^0.24"
|
|
14
14
|
pyxirr = "^0.10"
|
|
15
15
|
scipy = "^1.13"
|
|
@@ -11,41 +11,43 @@ import pandas as pd
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class Type(enum.Enum):
|
|
14
|
-
DECADE = '
|
|
15
|
-
SEMIDECADE = '
|
|
16
|
-
BIENNIUM = '
|
|
17
|
-
YEAR = '
|
|
18
|
-
SEMIYEAR = '
|
|
19
|
-
QUARTER = '
|
|
20
|
-
MONTH = '
|
|
21
|
-
SEMIMONTH = '
|
|
14
|
+
DECADE = '10Y'
|
|
15
|
+
SEMIDECADE = '5Y'
|
|
16
|
+
BIENNIUM = '2Y'
|
|
17
|
+
YEAR = 'Y'
|
|
18
|
+
SEMIYEAR = '6M'
|
|
19
|
+
QUARTER = 'Q'
|
|
20
|
+
MONTH = 'M'
|
|
21
|
+
SEMIMONTH = 'SM'
|
|
22
22
|
WEEK = 'W'
|
|
23
23
|
DAY = 'D'
|
|
24
24
|
|
|
25
|
-
@staticmethod
|
|
25
|
+
@staticmethod # Possibly dealing with pandas > 2.2 changes
|
|
26
26
|
def from_value(value: str):
|
|
27
|
-
if value == '
|
|
27
|
+
if value == '10Y':
|
|
28
28
|
return Type.DECADE
|
|
29
|
-
if value == '
|
|
29
|
+
if value == '5Y':
|
|
30
30
|
return Type.SEMIDECADE
|
|
31
|
-
if value == '
|
|
31
|
+
if value == '2Y':
|
|
32
32
|
return Type.BIENNIUM
|
|
33
|
-
if value == '
|
|
33
|
+
if value == 'Y' or value == 'Y-DEC' or value == 'A-DEC':
|
|
34
34
|
return Type.YEAR
|
|
35
|
-
if value == '
|
|
35
|
+
if value == '6M':
|
|
36
36
|
return Type.SEMIYEAR
|
|
37
|
-
if value == '
|
|
37
|
+
if value == 'Q':
|
|
38
38
|
return Type.QUARTER
|
|
39
|
-
if value == '
|
|
39
|
+
if value == 'M':
|
|
40
40
|
return Type.MONTH
|
|
41
|
-
if value == '
|
|
41
|
+
if value == 'SM':
|
|
42
42
|
return Type.SEMIMONTH
|
|
43
|
-
if value == 'W':
|
|
43
|
+
if value == 'W-SUN' or value == 'W':
|
|
44
44
|
return Type.WEEK
|
|
45
45
|
if value == 'D':
|
|
46
46
|
return Type.DAY
|
|
47
|
+
else:
|
|
48
|
+
raise ValueError('Unsupported period type: {0}'.format(value))
|
|
47
49
|
|
|
48
|
-
@staticmethod
|
|
50
|
+
@staticmethod # Possibly dealing with pandas > 2.2 changes
|
|
49
51
|
def period(type: Type):
|
|
50
52
|
if type == Type.DECADE:
|
|
51
53
|
return '10Y'
|
|
@@ -67,6 +69,8 @@ class Type(enum.Enum):
|
|
|
67
69
|
return 'W'
|
|
68
70
|
if type == Type.DAY:
|
|
69
71
|
return 'D'
|
|
72
|
+
else:
|
|
73
|
+
raise ValueError('Unsupported period type: {0}'.format(type))
|
|
70
74
|
|
|
71
75
|
|
|
72
76
|
def measure(
|
|
@@ -296,7 +296,7 @@ class Flow:
|
|
|
296
296
|
Returns a Flow with movements summed to specified frequency of dates
|
|
297
297
|
"""
|
|
298
298
|
return rk.flux.Flow(
|
|
299
|
-
movements=self.movements.copy(deep=True).resample(rule=frequency
|
|
299
|
+
movements=self.movements.copy(deep=True).resample(rule=rk.duration.Type.period(frequency)).sum(),
|
|
300
300
|
units=self.units,
|
|
301
301
|
name=self.name)
|
|
302
302
|
|
|
@@ -99,7 +99,7 @@ class Extrapolation(Projection):
|
|
|
99
99
|
|
|
100
100
|
sequence = rk.duration.Sequence.from_bounds(
|
|
101
101
|
include_start=self.bounds[0].to_timestamp(),
|
|
102
|
-
frequency=rk.duration.Type.from_value(self.sequence.
|
|
102
|
+
frequency=rk.duration.Type.from_value(self.sequence.freqstr),
|
|
103
103
|
bound=self.bounds[1].to_timestamp())
|
|
104
104
|
|
|
105
105
|
index = rk.duration.Sequence.to_datestamps(sequence=sequence)
|
|
@@ -162,7 +162,7 @@ class Distribution(Projection):
|
|
|
162
162
|
index=rk.duration.Sequence.to_datestamps(
|
|
163
163
|
rk.duration.Sequence.from_bounds(
|
|
164
164
|
include_start=self.bounds[0].to_timestamp(),
|
|
165
|
-
frequency=rk.duration.Type.from_value(self.sequence.
|
|
165
|
+
frequency=rk.duration.Type.from_value(self.sequence.freqstr),
|
|
166
166
|
bound=self.bounds[1].to_timestamp())))
|
|
167
167
|
|
|
168
168
|
def cumulative_density(self) -> [float]:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|