Rangekeeper 0.8.30__py3-none-any.whl → 0.8.32__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/flux.py +16 -3
- {rangekeeper-0.8.30.dist-info → rangekeeper-0.8.32.dist-info}/METADATA +1 -1
- {rangekeeper-0.8.30.dist-info → rangekeeper-0.8.32.dist-info}/RECORD +5 -5
- {rangekeeper-0.8.30.dist-info → rangekeeper-0.8.32.dist-info}/WHEEL +0 -0
- {rangekeeper-0.8.30.dist-info → rangekeeper-0.8.32.dist-info}/top_level.txt +0 -0
rangekeeper/flux.py
CHANGED
@@ -384,6 +384,7 @@ class Flow:
|
|
384
384
|
def resample(
|
385
385
|
self,
|
386
386
|
frequency: rk.duration.Type,
|
387
|
+
origin: Optional[Union[str, pd.Timestamp]] = "end_day",
|
387
388
|
) -> Flow:
|
388
389
|
"""
|
389
390
|
Returns a Flow with movements summed to specified frequency of periods
|
@@ -393,6 +394,7 @@ class Flow:
|
|
393
394
|
.resample(
|
394
395
|
rule=rk.duration.Type.offset(frequency),
|
395
396
|
label="right",
|
397
|
+
origin=origin,
|
396
398
|
)
|
397
399
|
.sum(),
|
398
400
|
units=self.units,
|
@@ -402,13 +404,20 @@ class Flow:
|
|
402
404
|
def to_periods(
|
403
405
|
self,
|
404
406
|
frequency: rk.duration.Type,
|
407
|
+
origin: Optional[Union[str, pd.Timestamp]] = "end_day",
|
405
408
|
) -> pd.Series:
|
406
409
|
"""
|
407
410
|
Returns a pd.Series (of index pd.PeriodIndex) with movements summed to specified frequency
|
408
411
|
"""
|
409
412
|
return (
|
410
|
-
self.resample(
|
411
|
-
|
413
|
+
self.resample(
|
414
|
+
frequency=frequency,
|
415
|
+
origin=origin,
|
416
|
+
)
|
417
|
+
.movements.to_period(
|
418
|
+
freq=rk.duration.Type.period(frequency),
|
419
|
+
copy=True,
|
420
|
+
)
|
412
421
|
.rename_axis("period")
|
413
422
|
.groupby(level="period")
|
414
423
|
.sum()
|
@@ -542,7 +551,11 @@ class Stream:
|
|
542
551
|
"""The latest date of the Stream's constituent Flows' movements."""
|
543
552
|
|
544
553
|
self._resampled_flows = [
|
545
|
-
flow.to_periods(
|
554
|
+
flow.to_periods(
|
555
|
+
frequency=self.frequency,
|
556
|
+
origin=self.start_date,
|
557
|
+
)
|
558
|
+
for flow in self.flows
|
546
559
|
]
|
547
560
|
self.frame = (
|
548
561
|
pd.concat(
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: Rangekeeper
|
3
|
-
Version: 0.8.
|
3
|
+
Version: 0.8.32
|
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
|
@@ -3,7 +3,7 @@ rangekeeper/api.py,sha256=3nuG7C2IQjpumcn79MvYDTa7ADWPAos7VfVM-3pL4n4,4798
|
|
3
3
|
rangekeeper/distribution.py,sha256=2C3jhi1rLJUs0seBztdQb196hNhc00sKJEGMkFiDpYs,8961
|
4
4
|
rangekeeper/duration.py,sha256=c0roYG0zzIfr3B19_NxahlaBoAt1DuKSjeqyVGOhn0Y,20425
|
5
5
|
rangekeeper/extrapolation.py,sha256=Zfsz2KwkImxEMMCNZaF8RpiQxlIgemS1dQkSnjliYU4,2814
|
6
|
-
rangekeeper/flux.py,sha256=
|
6
|
+
rangekeeper/flux.py,sha256=CU7L1ca-xWwtnskr7rTMZW7tpytY3BKkPQivk8C5GL4,32418
|
7
7
|
rangekeeper/format.py,sha256=DOfF4-LCXqWyCtE1OomwE80sJLe6LjL4gqEOAP454LQ,10796
|
8
8
|
rangekeeper/graph.py,sha256=6oWRv-qzGsM5Z19UyJ1v3hwtWaQp_F4qQKxizvkQ_gg,28043
|
9
9
|
rangekeeper/measure.py,sha256=eCdoTAocq1loNZBnOp3nPiPV7yIi0QTwpVHvjba1hkY,4125
|
@@ -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.32.dist-info/METADATA,sha256=a1ECrhb4scdNPBD2mf2pJnjfoA9U4XrSgJ154T1jcSY,2212
|
24
|
+
rangekeeper-0.8.32.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
25
|
+
rangekeeper-0.8.32.dist-info/top_level.txt,sha256=7ov6d70lppmzKc088MAmRWnCtCRGA2cd43G28QBSv-c,12
|
26
|
+
rangekeeper-0.8.32.dist-info/RECORD,,
|
File without changes
|
File without changes
|