Rangekeeper 0.8.31__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 -4
- {rangekeeper-0.8.31.dist-info → rangekeeper-0.8.32.dist-info}/METADATA +1 -1
- {rangekeeper-0.8.31.dist-info → rangekeeper-0.8.32.dist-info}/RECORD +5 -5
- {rangekeeper-0.8.31.dist-info → rangekeeper-0.8.32.dist-info}/WHEEL +0 -0
- {rangekeeper-0.8.31.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,7 +394,7 @@ class Flow:
|
|
393
394
|
.resample(
|
394
395
|
rule=rk.duration.Type.offset(frequency),
|
395
396
|
label="right",
|
396
|
-
origin=
|
397
|
+
origin=origin,
|
397
398
|
)
|
398
399
|
.sum(),
|
399
400
|
units=self.units,
|
@@ -403,13 +404,20 @@ class Flow:
|
|
403
404
|
def to_periods(
|
404
405
|
self,
|
405
406
|
frequency: rk.duration.Type,
|
407
|
+
origin: Optional[Union[str, pd.Timestamp]] = "end_day",
|
406
408
|
) -> pd.Series:
|
407
409
|
"""
|
408
410
|
Returns a pd.Series (of index pd.PeriodIndex) with movements summed to specified frequency
|
409
411
|
"""
|
410
412
|
return (
|
411
|
-
self.resample(
|
412
|
-
|
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
|
+
)
|
413
421
|
.rename_axis("period")
|
414
422
|
.groupby(level="period")
|
415
423
|
.sum()
|
@@ -543,7 +551,11 @@ class Stream:
|
|
543
551
|
"""The latest date of the Stream's constituent Flows' movements."""
|
544
552
|
|
545
553
|
self._resampled_flows = [
|
546
|
-
flow.to_periods(
|
554
|
+
flow.to_periods(
|
555
|
+
frequency=self.frequency,
|
556
|
+
origin=self.start_date,
|
557
|
+
)
|
558
|
+
for flow in self.flows
|
547
559
|
]
|
548
560
|
self.frame = (
|
549
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
|