wbfdm 1.55.3__py2.py3-none-any.whl → 1.55.5__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.

@@ -32,7 +32,11 @@ class DatastreamFXRatesDataloader(FXRateProtocol, Dataloader):
32
32
  .join(fx_code)
33
33
  .on(fx_rate.ExRateIntCode == fx_code.ExRateIntCode)
34
34
  .where((fx_rate.ExRateDate >= from_date) & (fx_rate.ExRateDate <= to_date + timedelta(days=1)))
35
- .where((fx_code.ToCurrCode == target_currency) & fx_code.FromCurrCode.isin(currencies))
35
+ .where(
36
+ (fx_code.ToCurrCode == target_currency)
37
+ & (fx_code.FromCurrCode.isin(currencies))
38
+ & (fx_code.RateTypeCode == "SPOT")
39
+ )
36
40
  .orderby(fx_rate.ExRateDate, order=Order.desc)
37
41
  .select(
38
42
  fn.Cast(fx_rate.ExRateDate, SqlTypes.DATE).as_("fx_date"),
@@ -170,7 +170,10 @@ class DatastreamMarketDataDataloader(MarketDataProtocol, Dataloader):
170
170
  row["outstanding_shares"] = (row["market_capitalization"] / row["close"]) if row["close"] else None
171
171
  if target_currency:
172
172
  try:
173
- fx_rate = fx_rates[f'{row["currency"]}{target_currency}'][row["valuation_date"]] or 1.0
173
+ if target_currency == row["currency"]:
174
+ fx_rate = 1.0
175
+ else:
176
+ fx_rate = fx_rates[f'{row["currency"]}{target_currency}'][row["valuation_date"]] or 1.0
174
177
  if apply_fx_rate:
175
178
  for e in MarketData:
176
179
  if e != MarketData.SHARES_OUTSTANDING and e.value in row and row[e.value]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wbfdm
3
- Version: 1.55.3
3
+ Version: 1.55.5
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.*
@@ -100,8 +100,8 @@ wbfdm/contrib/qa/dataloaders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
100
100
  wbfdm/contrib/qa/dataloaders/adjustments.py,sha256=DQEexOLA7WyBB1dZJHQd-6zbzyEIURgSSgS7bJRvXzQ,2980
101
101
  wbfdm/contrib/qa/dataloaders/corporate_actions.py,sha256=lWT6klrTXKqxiko2HGrxHH8E2C00FJS-AOX3IhglRrI,2912
102
102
  wbfdm/contrib/qa/dataloaders/financials.py,sha256=xUHpvhUkvmdPL_RyWCrs7XgChgTklX5qemmaXMedgkY,3475
103
- wbfdm/contrib/qa/dataloaders/fx_rates.py,sha256=d4zvIWZuCbLtDE1TaAbBmvySc6uUD0OCzpOO8Iz7pfM,1886
104
- wbfdm/contrib/qa/dataloaders/market_data.py,sha256=lEekvs7dcTa46C-2yGbpLw03PtrSjuZYYRDBQUr1SG4,7863
103
+ wbfdm/contrib/qa/dataloaders/fx_rates.py,sha256=IYkUV8_8Vmvm4_K9xJpz7VaTgjQUz0y4pb3KyaoiqCM,1985
104
+ wbfdm/contrib/qa/dataloaders/market_data.py,sha256=-HvEcJr-D37uWomnCegrhjDAsyxJsEKUayUAIlqjm24,8002
105
105
  wbfdm/contrib/qa/dataloaders/officers.py,sha256=vytlQJJxmn4Y5HfNh5mHJAvuIrrsQSkNO-sONyhxftY,2940
106
106
  wbfdm/contrib/qa/dataloaders/reporting_dates.py,sha256=q25ccB0pbGfLJLV1A1_AY1XYWJ_Fa10egY09L1J-C5A,2628
107
107
  wbfdm/contrib/qa/dataloaders/statements.py,sha256=6k8dDwJPLY6XE3G5ZA03_4wRvT7XduRsro4lzuAWCvM,10337
@@ -362,6 +362,6 @@ wbfdm/viewsets/statements/__init__.py,sha256=odxtFYUDICPmz8WCE3nx93EvKZLSPBEI4d7
362
362
  wbfdm/viewsets/statements/statements.py,sha256=gA6RCI8-B__JwjEb6OZxpn8Y-9aF-YQ3HIQ7e1vfJMw,4304
363
363
  wbfdm/viewsets/technical_analysis/__init__.py,sha256=qtCIBg0uSiZeJq_1tEQFilnorMBkMe6uCMfqar6-cLE,77
364
364
  wbfdm/viewsets/technical_analysis/monthly_performances.py,sha256=O1j8CGfOranL74LqVvcf7jERaDIboEJZiBf_AbbVDQ8,3974
365
- wbfdm-1.55.3.dist-info/METADATA,sha256=sKPjJCGm_R5FKQxuIyr_0tg1YDGGncg4eo6kpCUvJF4,768
366
- wbfdm-1.55.3.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
367
- wbfdm-1.55.3.dist-info/RECORD,,
365
+ wbfdm-1.55.5.dist-info/METADATA,sha256=eiRCemxe43h8H6U7eMbN_WF4jL5xJc8Wl-VzFxabwI0,768
366
+ wbfdm-1.55.5.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
367
+ wbfdm-1.55.5.dist-info/RECORD,,
File without changes