wbfdm 1.43.1__py2.py3-none-any.whl → 1.43.2__py2.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.
Potentially problematic release.
This version of wbfdm might be problematic. Click here for more details.
|
@@ -136,7 +136,7 @@ class InstrumentPMSMixin:
|
|
|
136
136
|
self, start: Optional[date] = None, end: Optional[date] = None, **kwargs
|
|
137
137
|
) -> pd.DataFrame:
|
|
138
138
|
if not (prices := self.get_prices_df_with_calculated(from_date=start, to_date=end, **kwargs)).empty:
|
|
139
|
-
calculated_mask = prices[["calculated"]].copy().
|
|
139
|
+
calculated_mask = prices[["calculated"]].copy().groupby([prices.index.year, prices.index.month]).tail(1)
|
|
140
140
|
calculated_mask["year"] = calculated_mask.index.year
|
|
141
141
|
calculated_mask["month"] = calculated_mask.index.month
|
|
142
142
|
calculated_mask = (
|
|
@@ -88,7 +88,7 @@ class TestInstrumentModel:
|
|
|
88
88
|
|
|
89
89
|
def test_get_monthly_return_summary(self, instrument, instrument_price_factory):
|
|
90
90
|
instrument_price_factory.create_batch(10, instrument=instrument)
|
|
91
|
-
res,
|
|
91
|
+
res, calculated_mask = instrument.get_monthly_return_summary()
|
|
92
92
|
assert "performance" in res.columns
|
|
93
93
|
assert "month" in res.columns
|
|
94
94
|
assert "year" in res.columns
|
|
@@ -100,6 +100,8 @@ class TestInstrumentModel:
|
|
|
100
100
|
for month in res[year].keys():
|
|
101
101
|
assert month in calendar.month_abbr or month == "annual"
|
|
102
102
|
assert "performance" in res[year][month]
|
|
103
|
+
if month == "annual":
|
|
104
|
+
assert res[year][month]["performance"] is not None
|
|
103
105
|
|
|
104
106
|
def test_get_prices_df(self, instrument, instrument_price_factory):
|
|
105
107
|
price = instrument_price_factory.create(instrument=instrument)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wbfdm
|
|
3
|
-
Version: 1.43.
|
|
3
|
+
Version: 1.43.2
|
|
4
4
|
Summary: The workbench module ensures rapid access to diverse financial data (market, fundamental, forecasts, ESG), with features for storing instruments, classifying them, and conducting financial analysis.
|
|
5
5
|
Author-email: Christopher Wittlinger <c.wittlinger@stainly.com>
|
|
6
6
|
Requires-Dist: roman==4.*
|
|
@@ -237,7 +237,7 @@ wbfdm/models/instruments/llm/create_instrument_news_relationships.py,sha256=J7zt
|
|
|
237
237
|
wbfdm/models/instruments/mixin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
238
238
|
wbfdm/models/instruments/mixin/financials_computed.py,sha256=L5wjXDsR0maiwfOKP6KyWNJNH4nGOoAjSc_hDM7fsj0,35105
|
|
239
239
|
wbfdm/models/instruments/mixin/financials_serializer_fields.py,sha256=Au3P9LqByh5LGyv8w_miJamtHiEerOGZQhM1NzrfECM,68768
|
|
240
|
-
wbfdm/models/instruments/mixin/instruments.py,sha256=
|
|
240
|
+
wbfdm/models/instruments/mixin/instruments.py,sha256=PHsBBZq7csn5vzYA-ZAmQGSvaMI6YhQBm8QnuhzL7Z0,15100
|
|
241
241
|
wbfdm/serializers/__init__.py,sha256=AXb03RKHo6B0ts_IQOvx89n9wKG8pxiumYv9cr4EhvA,197
|
|
242
242
|
wbfdm/serializers/esg.py,sha256=kd8ZBJfub2orpVJWBbV3naq3V0BordKwdxM9H3IMn7w,1085
|
|
243
243
|
wbfdm/serializers/exchanges.py,sha256=9--9WWlDjSyjSVoPkofHmCgtSp38pn2rTqcQ-RWDrS4,1174
|
|
@@ -269,7 +269,7 @@ wbfdm/tests/models/test_classifications.py,sha256=BYD1bzcDqR64b1YfTSZoSCQLnx-Vui
|
|
|
269
269
|
wbfdm/tests/models/test_exchanges.py,sha256=KwK278MpA3FkpVgjW2l2PIHL7e8uDur7dOzIaTQEwyw,138
|
|
270
270
|
wbfdm/tests/models/test_instrument_list.py,sha256=zFOUbAa_MjvSMDElaBHo0Oh96unsuQy-qzT48-I0LT0,4898
|
|
271
271
|
wbfdm/tests/models/test_instrument_prices.py,sha256=vgwy_YVAG1QibvsT8IOaBhNQz0DBBaYB3zMi_mKqC9o,16632
|
|
272
|
-
wbfdm/tests/models/test_instruments.py,sha256=
|
|
272
|
+
wbfdm/tests/models/test_instruments.py,sha256=1diqlKrxHW4JL0H30JV8jg831iq1i4mJb96p9q6TJfc,9451
|
|
273
273
|
wbfdm/tests/models/test_merge.py,sha256=gwQgCzW39apnLmDmoDE5Am5LC8ldOCoFu1xcKlKkYx8,4555
|
|
274
274
|
wbfdm/tests/models/test_options.py,sha256=kCRvTVlAZZcyFrmXVwVHo3U-792mE8MOSu96nKq-kzc,2268
|
|
275
275
|
wbfdm/viewsets/__init__.py,sha256=ZM29X0-5AkSH2rzF_gKUI4FoaEWCcMTXPjruJ4Gi_x8,383
|
|
@@ -346,6 +346,6 @@ wbfdm/viewsets/statements/__init__.py,sha256=odxtFYUDICPmz8WCE3nx93EvKZLSPBEI4d7
|
|
|
346
346
|
wbfdm/viewsets/statements/statements.py,sha256=AVU5A7p63uWITEcMDl95iKyN-fBO5RwJlbxHrJZvz7o,4083
|
|
347
347
|
wbfdm/viewsets/technical_analysis/__init__.py,sha256=qtCIBg0uSiZeJq_1tEQFilnorMBkMe6uCMfqar6-cLE,77
|
|
348
348
|
wbfdm/viewsets/technical_analysis/monthly_performances.py,sha256=8VgafjW4efEJKTfBqUvAu-EG2eNawl2Cmh9QFt4sN8w,3973
|
|
349
|
-
wbfdm-1.43.
|
|
350
|
-
wbfdm-1.43.
|
|
351
|
-
wbfdm-1.43.
|
|
349
|
+
wbfdm-1.43.2.dist-info/METADATA,sha256=LQQVT_3y0lG7hMTdxqXD4aL-hrdA7MfYnWJKblwE3pg,668
|
|
350
|
+
wbfdm-1.43.2.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
|
|
351
|
+
wbfdm-1.43.2.dist-info/RECORD,,
|
|
File without changes
|