wbfdm 1.50.13__py2.py3-none-any.whl → 1.50.14__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.
- wbfdm/contrib/metric/backends/statistics.py +44 -10
- wbfdm/models/instruments/instrument_prices.py +5 -0
- wbfdm/models/instruments/llm/create_instrument_news_relationships.py +1 -1
- {wbfdm-1.50.13.dist-info → wbfdm-1.50.14.dist-info}/METADATA +1 -1
- {wbfdm-1.50.13.dist-info → wbfdm-1.50.14.dist-info}/RECORD +6 -6
- {wbfdm-1.50.13.dist-info → wbfdm-1.50.14.dist-info}/WHEEL +0 -0
|
@@ -3,7 +3,7 @@ from datetime import date
|
|
|
3
3
|
from typing import Generator
|
|
4
4
|
|
|
5
5
|
import pandas as pd
|
|
6
|
-
from django.db.models import
|
|
6
|
+
from django.db.models import Sum
|
|
7
7
|
from wbcore.serializers.fields.number import DisplayMode
|
|
8
8
|
|
|
9
9
|
from wbfdm.enums import Financial, PeriodType, SeriesType
|
|
@@ -21,7 +21,6 @@ STATISTICS_METRIC = MetricKey(
|
|
|
21
21
|
MetricField(
|
|
22
22
|
key="revenue_y_1",
|
|
23
23
|
label="Revenue Y-1",
|
|
24
|
-
aggregate=Sum,
|
|
25
24
|
list_display_kwargs={"show": "open"},
|
|
26
25
|
decorators=[{"position": "left", "value": "{{currency_symbol}}"}],
|
|
27
26
|
serializer_kwargs={"display_mode": DisplayMode.SHORTENED},
|
|
@@ -29,14 +28,12 @@ STATISTICS_METRIC = MetricKey(
|
|
|
29
28
|
MetricField(
|
|
30
29
|
key="revenue_y0",
|
|
31
30
|
label="Revenue Y0",
|
|
32
|
-
aggregate=Sum,
|
|
33
31
|
decorators=[{"position": "left", "value": "{{currency_symbol}}"}],
|
|
34
32
|
serializer_kwargs={"display_mode": DisplayMode.SHORTENED},
|
|
35
33
|
),
|
|
36
34
|
MetricField(
|
|
37
35
|
key="revenue_y1",
|
|
38
36
|
label="Revenue Y1",
|
|
39
|
-
aggregate=Sum,
|
|
40
37
|
list_display_kwargs={"show": "open"},
|
|
41
38
|
decorators=[{"position": "left", "value": "{{currency_symbol}}"}],
|
|
42
39
|
serializer_kwargs={"display_mode": DisplayMode.SHORTENED},
|
|
@@ -44,20 +41,17 @@ STATISTICS_METRIC = MetricKey(
|
|
|
44
41
|
MetricField(
|
|
45
42
|
key="market_capitalization",
|
|
46
43
|
label="Market Capitalization",
|
|
47
|
-
aggregate=Sum,
|
|
48
44
|
decorators=[{"position": "left", "value": "{{currency_symbol}}"}],
|
|
49
45
|
serializer_kwargs={"display_mode": DisplayMode.SHORTENED},
|
|
50
46
|
),
|
|
51
47
|
MetricField(
|
|
52
48
|
key="price",
|
|
53
49
|
label="Price",
|
|
54
|
-
aggregate=Avg,
|
|
55
50
|
decorators=[{"position": "left", "value": "{{currency_symbol}}"}],
|
|
56
51
|
),
|
|
57
52
|
MetricField(
|
|
58
53
|
key="volume_50d",
|
|
59
54
|
label="Volume 50D",
|
|
60
|
-
aggregate=Avg,
|
|
61
55
|
serializer_kwargs={"display_mode": DisplayMode.SHORTENED},
|
|
62
56
|
),
|
|
63
57
|
],
|
|
@@ -65,9 +59,49 @@ STATISTICS_METRIC = MetricKey(
|
|
|
65
59
|
|
|
66
60
|
STATISTICS_METRIC_USD = MetricKey(
|
|
67
61
|
key="statistic_usd",
|
|
68
|
-
label=
|
|
69
|
-
subfields=
|
|
70
|
-
|
|
62
|
+
label="Statistic (USD)",
|
|
63
|
+
subfields=[
|
|
64
|
+
MetricField(
|
|
65
|
+
key="revenue_y_1",
|
|
66
|
+
label="Revenue Y-1",
|
|
67
|
+
aggregate=Sum,
|
|
68
|
+
list_display_kwargs={"show": "open"},
|
|
69
|
+
decorators=[{"position": "left", "value": "$"}],
|
|
70
|
+
serializer_kwargs={"display_mode": DisplayMode.SHORTENED},
|
|
71
|
+
),
|
|
72
|
+
MetricField(
|
|
73
|
+
key="revenue_y0",
|
|
74
|
+
label="Revenue Y0",
|
|
75
|
+
aggregate=Sum,
|
|
76
|
+
decorators=[{"position": "left", "value": "$"}],
|
|
77
|
+
serializer_kwargs={"display_mode": DisplayMode.SHORTENED},
|
|
78
|
+
),
|
|
79
|
+
MetricField(
|
|
80
|
+
key="revenue_y1",
|
|
81
|
+
label="Revenue Y1",
|
|
82
|
+
aggregate=Sum,
|
|
83
|
+
list_display_kwargs={"show": "open"},
|
|
84
|
+
decorators=[{"position": "left", "value": "$"}],
|
|
85
|
+
serializer_kwargs={"display_mode": DisplayMode.SHORTENED},
|
|
86
|
+
),
|
|
87
|
+
MetricField(
|
|
88
|
+
key="market_capitalization",
|
|
89
|
+
label="Market Capitalization",
|
|
90
|
+
aggregate=Sum,
|
|
91
|
+
decorators=[{"position": "left", "value": "$"}],
|
|
92
|
+
serializer_kwargs={"display_mode": DisplayMode.SHORTENED},
|
|
93
|
+
),
|
|
94
|
+
MetricField(
|
|
95
|
+
key="price",
|
|
96
|
+
label="Price",
|
|
97
|
+
decorators=[{"position": "left", "value": "{{currency_symbol}}"}],
|
|
98
|
+
),
|
|
99
|
+
MetricField(
|
|
100
|
+
key="volume_50d",
|
|
101
|
+
label="Volume 50D",
|
|
102
|
+
serializer_kwargs={"display_mode": DisplayMode.SHORTENED},
|
|
103
|
+
),
|
|
104
|
+
],
|
|
71
105
|
)
|
|
72
106
|
|
|
73
107
|
|
|
@@ -340,6 +340,11 @@ class InstrumentPrice(
|
|
|
340
340
|
|
|
341
341
|
if self.market_capitalization_consolidated is None:
|
|
342
342
|
self.market_capitalization_consolidated = self.market_capitalization
|
|
343
|
+
|
|
344
|
+
# if the instrument is of type cash, we enforce the net value to 1
|
|
345
|
+
if self.instrument.is_cash or self.instrument.is_cash_equivalent:
|
|
346
|
+
self.net_value = Decimal("1")
|
|
347
|
+
self.gross_value = Decimal("1")
|
|
343
348
|
super().save(*args, **kwargs)
|
|
344
349
|
|
|
345
350
|
def __str__(self):
|
|
@@ -61,7 +61,7 @@ def run_company_extraction_llm(title: str, description: str, *args) -> list[dict
|
|
|
61
61
|
],
|
|
62
62
|
output_model=CompaniesModel,
|
|
63
63
|
query={"title": title, "description": description},
|
|
64
|
-
)
|
|
64
|
+
)[0]
|
|
65
65
|
if isinstance(res, CompaniesModel):
|
|
66
66
|
instrument_ct = ContentType.objects.get_for_model(Instrument)
|
|
67
67
|
for company in res.companies:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wbfdm
|
|
3
|
-
Version: 1.50.
|
|
3
|
+
Version: 1.50.14
|
|
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.*
|
|
@@ -61,7 +61,7 @@ wbfdm/contrib/metric/admin/metrics.py,sha256=SJU-5ona3npgRjTgDoHvo9aCztq-VMnIVvv
|
|
|
61
61
|
wbfdm/contrib/metric/backends/__init__.py,sha256=Bl7bGEYVx38uiN2BS-0pr2WpIkbhUl7yPCEwt1W4tUg,128
|
|
62
62
|
wbfdm/contrib/metric/backends/base.py,sha256=TTTcNHjuzGCnzoDBqYZOb-nT7fnuYjjp0D6ACqR5yXk,6765
|
|
63
63
|
wbfdm/contrib/metric/backends/performances.py,sha256=yt9E7A_OEWQBQabf9bqt4Rc3S6oUXbSeM6NR1nYidtg,11642
|
|
64
|
-
wbfdm/contrib/metric/backends/statistics.py,sha256=
|
|
64
|
+
wbfdm/contrib/metric/backends/statistics.py,sha256=GeU4QOVGcz_Iri_18ku7PqhDDfPEpZpQJssBtCL6RsE,7903
|
|
65
65
|
wbfdm/contrib/metric/backends/utils.py,sha256=xpsDmoL2Jv9-KTuo-ay65D4m9Kf35jGc9cbeejhFLQU,131
|
|
66
66
|
wbfdm/contrib/metric/migrations/0001_initial.py,sha256=EwXRJrG7zQYT1bD6jjaf1gZNfpd8f2gzta09GYqukiM,3403
|
|
67
67
|
wbfdm/contrib/metric/migrations/0002_remove_instrumentmetric_unique_instrument_metric_and_more.py,sha256=xp6MACDohMSs4YfFbprCLa5G7zEuBhfZgpVXyMsZPWI,808
|
|
@@ -227,7 +227,7 @@ wbfdm/models/exchanges/exchanges.py,sha256=FSxjEh3k2KLDJyJfzZg7iGUFZIxzQt__FYaDy
|
|
|
227
227
|
wbfdm/models/instruments/__init__.py,sha256=OvEkECJaCubBQC7B9yUrx15V982labvegeGXyEASVno,636
|
|
228
228
|
wbfdm/models/instruments/classifications.py,sha256=EeZ_P8f1F1NfjUmLf9fDMF0iPM73qxQoArUfvjuCwHg,10906
|
|
229
229
|
wbfdm/models/instruments/instrument_lists.py,sha256=GxfFyfYxEcJS36LAarHja49TOM8ffhIivpZX2-tPtZg,4234
|
|
230
|
-
wbfdm/models/instruments/instrument_prices.py,sha256=
|
|
230
|
+
wbfdm/models/instruments/instrument_prices.py,sha256=4xDZ2ulwQ1grVuznchz3m3920LTmHkxWfiSLy-c2u0g,22306
|
|
231
231
|
wbfdm/models/instruments/instrument_relationships.py,sha256=zpCZCnt5CqIg5bd6le_6TyirsSwGV2NaqTVKw3bd5vM,10660
|
|
232
232
|
wbfdm/models/instruments/instrument_requests.py,sha256=XbpofRS8WHadHlTFjvXJyd0o7K9r2pzJtnpjVQZOLdI,7832
|
|
233
233
|
wbfdm/models/instruments/instruments.py,sha256=Heyk5cBJJ7ZkoDuZnTuWxB7LMmp_BZb2feW_exs1oIA,40276
|
|
@@ -236,7 +236,7 @@ wbfdm/models/instruments/private_equities.py,sha256=uzwZi8IkmCKAHVTxnuFya9tehx7k
|
|
|
236
236
|
wbfdm/models/instruments/querysets.py,sha256=c9fbHVvIRyaFU7jm_CM90lfIVzB8beOD8YII9-FqdT4,7191
|
|
237
237
|
wbfdm/models/instruments/utils.py,sha256=88jnWINSSC0OwH-mCEOPLZXuhBCtEsxBpSaZ38GteaE,1365
|
|
238
238
|
wbfdm/models/instruments/llm/__init__.py,sha256=dSmxRmEWb0A4O_lUoWuRKt2mBtUuLCTPVVJqGyi_n40,52
|
|
239
|
-
wbfdm/models/instruments/llm/create_instrument_news_relationships.py,sha256=
|
|
239
|
+
wbfdm/models/instruments/llm/create_instrument_news_relationships.py,sha256=f9MT-8cWYlexUfCkaOJa9erI9RaUNI-nqCEyf2tDkbA,3809
|
|
240
240
|
wbfdm/models/instruments/mixin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
241
241
|
wbfdm/models/instruments/mixin/financials_computed.py,sha256=L5wjXDsR0maiwfOKP6KyWNJNH4nGOoAjSc_hDM7fsj0,35105
|
|
242
242
|
wbfdm/models/instruments/mixin/financials_serializer_fields.py,sha256=-OkpcUt1rZmB3nUcO2vckpJdVm8IxRqkPDEgcPqqoRU,68886
|
|
@@ -351,6 +351,6 @@ wbfdm/viewsets/statements/__init__.py,sha256=odxtFYUDICPmz8WCE3nx93EvKZLSPBEI4d7
|
|
|
351
351
|
wbfdm/viewsets/statements/statements.py,sha256=kmtM0uZ3f7eJJe5gVmd-iVra9dHwTB9x12p7f5qTEx8,4084
|
|
352
352
|
wbfdm/viewsets/technical_analysis/__init__.py,sha256=qtCIBg0uSiZeJq_1tEQFilnorMBkMe6uCMfqar6-cLE,77
|
|
353
353
|
wbfdm/viewsets/technical_analysis/monthly_performances.py,sha256=O1j8CGfOranL74LqVvcf7jERaDIboEJZiBf_AbbVDQ8,3974
|
|
354
|
-
wbfdm-1.50.
|
|
355
|
-
wbfdm-1.50.
|
|
356
|
-
wbfdm-1.50.
|
|
354
|
+
wbfdm-1.50.14.dist-info/METADATA,sha256=iWHCoUnuFNL9eIQx8eH3shYE3IxxVUlULgXNL-I1nts,738
|
|
355
|
+
wbfdm-1.50.14.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
|
|
356
|
+
wbfdm-1.50.14.dist-info/RECORD,,
|
|
File without changes
|