rangekeeper 0.8.4__tar.gz → 0.8.6__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.8.4 → rangekeeper-0.8.6}/PKG-INFO +1 -1
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/Rangekeeper.egg-info/PKG-INFO +1 -1
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/pyproject.toml +1 -1
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/rangekeeper/flux.py +15 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/rangekeeper/formula/financial.py +14 -8
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/README.md +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/Rangekeeper.egg-info/SOURCES.txt +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/Rangekeeper.egg-info/dependency_links.txt +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/Rangekeeper.egg-info/requires.txt +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/Rangekeeper.egg-info/top_level.txt +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/rangekeeper/__init__.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/rangekeeper/api.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/rangekeeper/distribution.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/rangekeeper/duration.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/rangekeeper/dynamics/__init__.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/rangekeeper/dynamics/black_swan.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/rangekeeper/dynamics/cyclicality.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/rangekeeper/dynamics/market.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/rangekeeper/dynamics/noise.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/rangekeeper/dynamics/trend.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/rangekeeper/dynamics/volatility.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/rangekeeper/extrapolation.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/rangekeeper/format.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/rangekeeper/formula/__init__.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/rangekeeper/graph.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/rangekeeper/measure.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/rangekeeper/policy.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/rangekeeper/projection.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/rangekeeper/segmentation.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/rangekeeper/space.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/setup.cfg +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/tests/test_api.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/tests/test_dynamics.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/tests/test_formulas.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/tests/test_graph.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/tests/test_measures.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/tests/test_models.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/tests/test_modules.py +0 -0
- {rangekeeper-0.8.4 → rangekeeper-0.8.6}/tests/test_projections.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Rangekeeper
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.6
|
|
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,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Rangekeeper
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.6
|
|
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,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "Rangekeeper"
|
|
3
|
-
version = "0.8.
|
|
3
|
+
version = "0.8.6"
|
|
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 = [
|
|
6
6
|
{ name = "Daniel Fink", email = "danfink@mit.edu" }
|
|
@@ -448,6 +448,21 @@ class Flow:
|
|
|
448
448
|
frequency=frequency,
|
|
449
449
|
)
|
|
450
450
|
|
|
451
|
+
def clean(self, clean_zeroes: bool = True) -> Flow:
|
|
452
|
+
"""
|
|
453
|
+
Returns a Flow with movements cleaned of NaN and zero values
|
|
454
|
+
"""
|
|
455
|
+
movements = self.movements.copy(deep=True)
|
|
456
|
+
if clean_zeroes:
|
|
457
|
+
movements = movements[(movements != 0) & (movements != -0.0)]
|
|
458
|
+
movements = movements[~movements.isna()]
|
|
459
|
+
|
|
460
|
+
return self.__class__(
|
|
461
|
+
movements=movements,
|
|
462
|
+
units=self.units,
|
|
463
|
+
name=self.name,
|
|
464
|
+
)
|
|
465
|
+
|
|
451
466
|
|
|
452
467
|
class Stream:
|
|
453
468
|
name: str
|
|
@@ -131,7 +131,7 @@ class Account:
|
|
|
131
131
|
|
|
132
132
|
self.name = f"{name}Account"
|
|
133
133
|
|
|
134
|
-
|
|
134
|
+
startings = rk.flux.Flow(
|
|
135
135
|
movements=pd.Series(
|
|
136
136
|
startings,
|
|
137
137
|
index=transactions.movements.index,
|
|
@@ -139,7 +139,9 @@ class Account:
|
|
|
139
139
|
units=transactions.units,
|
|
140
140
|
name=f"{name}Start Balance",
|
|
141
141
|
)
|
|
142
|
-
self.
|
|
142
|
+
self.startings = startings.clean()
|
|
143
|
+
|
|
144
|
+
endings = rk.flux.Flow(
|
|
143
145
|
movements=pd.Series(
|
|
144
146
|
endings,
|
|
145
147
|
index=transactions.movements.index,
|
|
@@ -147,7 +149,9 @@ class Account:
|
|
|
147
149
|
units=transactions.units,
|
|
148
150
|
name=f"{name}End Balance",
|
|
149
151
|
)
|
|
150
|
-
self.
|
|
152
|
+
self.endings = endings.clean()
|
|
153
|
+
|
|
154
|
+
overdraft = rk.flux.Flow(
|
|
151
155
|
movements=pd.Series(
|
|
152
156
|
overdraft,
|
|
153
157
|
index=transactions.movements.index,
|
|
@@ -155,7 +159,9 @@ class Account:
|
|
|
155
159
|
units=transactions.units,
|
|
156
160
|
name=f"{name}Overdraft",
|
|
157
161
|
)
|
|
158
|
-
self.
|
|
162
|
+
self.overdraft = overdraft.clean()
|
|
163
|
+
|
|
164
|
+
interest = rk.flux.Flow(
|
|
159
165
|
movements=pd.Series(
|
|
160
166
|
interest,
|
|
161
167
|
index=transactions.movements.index,
|
|
@@ -163,19 +169,19 @@ class Account:
|
|
|
163
169
|
units=transactions.units,
|
|
164
170
|
name=f"{name}Interest Amounts",
|
|
165
171
|
)
|
|
172
|
+
self.interest = interest.clean()
|
|
166
173
|
|
|
167
174
|
def diff(self, name: str = None) -> rk.flux.Flow:
|
|
168
175
|
"""
|
|
169
176
|
Calculate the difference between the start and end balances.
|
|
170
177
|
"""
|
|
171
178
|
name = self.name if name is None else name
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
return rk.flux.Flow(
|
|
175
|
-
movements=movements.where(movements != 0, np.nan),
|
|
179
|
+
result = rk.flux.Flow(
|
|
180
|
+
movements=self.endings.movements - self.startings.movements,
|
|
176
181
|
units=self.startings.units,
|
|
177
182
|
name=f"{self.startings.name} (diff)",
|
|
178
183
|
)
|
|
184
|
+
return result.clean()
|
|
179
185
|
|
|
180
186
|
|
|
181
187
|
# class Balance:
|
|
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
|
|
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
|