openseries 1.7.5__py3-none-any.whl → 1.7.6__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.
- openseries/_common_model.py +15 -2
- {openseries-1.7.5.dist-info → openseries-1.7.6.dist-info}/METADATA +2 -2
- {openseries-1.7.5.dist-info → openseries-1.7.6.dist-info}/RECORD +5 -5
- {openseries-1.7.5.dist-info → openseries-1.7.6.dist-info}/WHEEL +1 -1
- {openseries-1.7.5.dist-info → openseries-1.7.6.dist-info}/LICENSE.md +0 -0
openseries/_common_model.py
CHANGED
@@ -43,7 +43,11 @@ from ._risk import (
|
|
43
43
|
_cvar_down_calc,
|
44
44
|
_var_down_calc,
|
45
45
|
)
|
46
|
-
from .datefixer import
|
46
|
+
from .datefixer import (
|
47
|
+
_do_resample_to_business_period_ends,
|
48
|
+
date_offset_foll,
|
49
|
+
holiday_calendar,
|
50
|
+
)
|
47
51
|
from .load_plotly import load_plotly_dict
|
48
52
|
from .types import (
|
49
53
|
CountriesType,
|
@@ -52,6 +56,7 @@ from .types import (
|
|
52
56
|
LiteralJsonOutput,
|
53
57
|
LiteralLinePlotMode,
|
54
58
|
LiteralNanMethod,
|
59
|
+
LiteralPandasReindexMethod,
|
55
60
|
LiteralPlotlyJSlib,
|
56
61
|
LiteralPlotlyOutput,
|
57
62
|
LiteralQuantileInterp,
|
@@ -358,9 +363,17 @@ class _CommonModel(BaseModel):
|
|
358
363
|
Most negative month
|
359
364
|
|
360
365
|
"""
|
366
|
+
method: LiteralPandasReindexMethod = "nearest"
|
367
|
+
countries = "SE"
|
361
368
|
wmdf = self.tsdf.copy()
|
369
|
+
dates = _do_resample_to_business_period_ends(
|
370
|
+
data=wmdf,
|
371
|
+
freq="BME",
|
372
|
+
countries=countries,
|
373
|
+
)
|
374
|
+
wmdf = wmdf.reindex(index=[deyt.date() for deyt in dates], method=method)
|
362
375
|
wmdf.index = DatetimeIndex(wmdf.index)
|
363
|
-
result = wmdf.
|
376
|
+
result = wmdf.ffill().pct_change().min()
|
364
377
|
|
365
378
|
if self.tsdf.shape[1] == 1:
|
366
379
|
return float(result.iloc[0])
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: openseries
|
3
|
-
Version: 1.7.
|
3
|
+
Version: 1.7.6
|
4
4
|
Summary: Tools for analyzing financial timeseries.
|
5
5
|
Home-page: https://github.com/CaptorAB/openseries
|
6
6
|
License: BSD-3-Clause
|
@@ -24,7 +24,7 @@ Requires-Dist: numpy (>=1.23.2,<3.0.0)
|
|
24
24
|
Requires-Dist: openpyxl (>=3.1.2,<4.0.0)
|
25
25
|
Requires-Dist: pandas (>=2.1.2,<3.0.0)
|
26
26
|
Requires-Dist: plotly (>=5.18.0,<6.0.0)
|
27
|
-
Requires-Dist: pyarrow (>=14.0.2,<
|
27
|
+
Requires-Dist: pyarrow (>=14.0.2,<19.0.0)
|
28
28
|
Requires-Dist: pydantic (>=2.5.2,<3.0.0)
|
29
29
|
Requires-Dist: python-dateutil (>=2.8.2,<3.0.0)
|
30
30
|
Requires-Dist: requests (>=2.20.0,<3.0.0)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
openseries/__init__.py,sha256=gD2dMKRTJ9HMXLca_5sR67xGiU5sWExwaNUi-9N_RGQ,1032
|
2
|
-
openseries/_common_model.py,sha256=
|
2
|
+
openseries/_common_model.py,sha256=R9PhG5hrOk5pJjv3aox9fI1-Pv90wXYjbdbOU_YNlVA,73768
|
3
3
|
openseries/_risk.py,sha256=PReIfkzhInvIgJkzI4k1wYvhmLZ4cCurYKuQAvlHLlE,2082
|
4
4
|
openseries/datefixer.py,sha256=3E8Ddf3Ps9k5qUWqL13ONelyMECZsvtyrsFJg7r3bxE,12298
|
5
5
|
openseries/frame.py,sha256=bg9R0KDjSw29sPQClKJ4Cvyj7_O3eVtIGM-ISbD75xk,55360
|
@@ -10,7 +10,7 @@ openseries/portfoliotools.py,sha256=s8bQ1SfcXF-xY3GbpyOvMHfypPBXtEl6jDZwVRcrSY4,
|
|
10
10
|
openseries/series.py,sha256=i-zVf3lsk4u_4VlWCSFRQax51LAStMewKIVgiqlo7gQ,27654
|
11
11
|
openseries/simulation.py,sha256=Gc5h3KD3K5AySWqXzm1lbsn2_mwOEWjHr6EVNHb1R-w,13878
|
12
12
|
openseries/types.py,sha256=IbzW9iVuA3MEx3WtjyB6QYeSd3TkGjTOkFnnpSADKlY,7491
|
13
|
-
openseries-1.7.
|
14
|
-
openseries-1.7.
|
15
|
-
openseries-1.7.
|
16
|
-
openseries-1.7.
|
13
|
+
openseries-1.7.6.dist-info/LICENSE.md,sha256=IQ8_IMXgHxyv4M48G14fJsjcrkiSASdalASTXWCOsj4,1515
|
14
|
+
openseries-1.7.6.dist-info/METADATA,sha256=e6wq3V6hQOzCPnuZB0V-ogpETHWfcWp537EYBpYORkw,43981
|
15
|
+
openseries-1.7.6.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
16
|
+
openseries-1.7.6.dist-info/RECORD,,
|
File without changes
|