rangekeeper 0.7.1__tar.gz → 0.7.2__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.1 → rangekeeper-0.7.2}/PKG-INFO +1 -1
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/pyproject.toml +1 -1
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/rangekeeper/flux.py +35 -0
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/README.md +0 -0
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/rangekeeper/__init__.py +0 -0
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/rangekeeper/api.py +0 -0
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/rangekeeper/conftest.py +0 -0
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/rangekeeper/distribution.py +0 -0
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/rangekeeper/duration.py +0 -0
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/rangekeeper/dynamics/__init__.py +0 -0
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/rangekeeper/dynamics/black_swan.py +0 -0
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/rangekeeper/dynamics/cyclicality.py +0 -0
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/rangekeeper/dynamics/market.py +0 -0
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/rangekeeper/dynamics/noise.py +0 -0
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/rangekeeper/dynamics/trend.py +0 -0
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/rangekeeper/dynamics/volatility.py +0 -0
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/rangekeeper/extrapolation.py +0 -0
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/rangekeeper/format.py +0 -0
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/rangekeeper/formula.py +0 -0
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/rangekeeper/graph.py +0 -0
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/rangekeeper/measure.py +0 -0
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/rangekeeper/policy.py +0 -0
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/rangekeeper/projection.py +0 -0
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/rangekeeper/segmentation.py +0 -0
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/rangekeeper/space.py +0 -0
- {rangekeeper-0.7.1 → rangekeeper-0.7.2}/rangekeeper/span.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: Rangekeeper
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.2
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "Rangekeeper"
|
|
3
|
-
version = "0.7.
|
|
3
|
+
version = "0.7.2"
|
|
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"
|
|
@@ -458,6 +458,9 @@ class Stream:
|
|
|
458
458
|
flows=flows,
|
|
459
459
|
frequency=self.frequency)
|
|
460
460
|
|
|
461
|
+
def is_homogeneous(self) -> bool:
|
|
462
|
+
return len(list(set(list(self.units.values())))) == 1
|
|
463
|
+
|
|
461
464
|
def duplicate(self) -> Stream:
|
|
462
465
|
return self.__class__(
|
|
463
466
|
name=self.name,
|
|
@@ -670,6 +673,38 @@ class Stream:
|
|
|
670
673
|
data=self.frame.prod(axis=1).to_list(),
|
|
671
674
|
units=reduced_units)
|
|
672
675
|
|
|
676
|
+
def min(
|
|
677
|
+
self,
|
|
678
|
+
name):
|
|
679
|
+
"""
|
|
680
|
+
Returns a Flow whose movements are the minimum of the Stream's flows by period
|
|
681
|
+
"""
|
|
682
|
+
if not self.is_homogeneous():
|
|
683
|
+
raise ValueError("Error: minimum requires all flows' units to be the same. Units: {0}".format(
|
|
684
|
+
json.dumps(
|
|
685
|
+
{flow.name: flow.units.__str__() for flow in self.flows}, indent=4)))
|
|
686
|
+
else:
|
|
687
|
+
return Flow(
|
|
688
|
+
movements=self.frame.min(axis=1),
|
|
689
|
+
units=next(iter(self.units.values())),
|
|
690
|
+
name=name)
|
|
691
|
+
|
|
692
|
+
def max(
|
|
693
|
+
self,
|
|
694
|
+
name):
|
|
695
|
+
"""
|
|
696
|
+
Returns a Flow whose movements are the maximum of the Stream's flows by period
|
|
697
|
+
"""
|
|
698
|
+
if not self.is_homogeneous():
|
|
699
|
+
raise ValueError("Error: maximum requires all flows' units to be the same. Units: {0}".format(
|
|
700
|
+
json.dumps(
|
|
701
|
+
{flow.name: flow.units.__str__() for flow in self.flows}, indent=4)))
|
|
702
|
+
else:
|
|
703
|
+
return Flow(
|
|
704
|
+
movements=self.frame.max(axis=1),
|
|
705
|
+
units=next(iter(self.units.values())),
|
|
706
|
+
name=name)
|
|
707
|
+
|
|
673
708
|
def collapse(self) -> Stream:
|
|
674
709
|
"""
|
|
675
710
|
Returns an Stream with Flows' movements collapsed (summed) to the Stream's final period
|
|
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
|