luxorasap 0.1.12__py3-none-any.whl → 0.1.14__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.
luxorasap/__init__.py CHANGED
@@ -13,7 +13,7 @@ from types import ModuleType
13
13
  try:
14
14
  __version__: str = metadata.version(__name__)
15
15
  except metadata.PackageNotFoundError: # editable install
16
- __version__ = "0.1.12"
16
+ __version__ = "0.1.14"
17
17
 
18
18
  # ─── Lazy loader ─────────────────────────────────────────────────
19
19
  def __getattr__(name: str) -> ModuleType:
@@ -1831,15 +1831,18 @@ class LuxorQuery:
1831
1831
  # cash estara com ambos os caixas em R$ ou U$.
1832
1832
  # Para saber a moeda do caixa retornado, precisamos saber a moeda do fundo
1833
1833
  fund_key = fund.replace('_', ' ')
1834
- fund_location = self.get_table("funds").query("Short_Name == @fund_key")["Country"].squeeze()
1835
- currency_location = "us" if currency == "usd" else "br"
1834
+ fund = self.get_table("funds")
1835
+ fund['Country'] = fund['Country'].replace('br', 'bz')
1836
+ fund_location = fund.query("Short_Name == @fund_key")["Country"].squeeze()
1837
+
1838
+ currency_location = "us" if currency == "usd" else "bz"
1836
1839
  if fund_location != currency_location:
1837
1840
  usdbrl = self.get_prices(usdbrl_ticker, previous_date=cash["Date"].min(), recent_date=cash["Date"].max(),)
1838
1841
  usdbrl = self.usdbrl_clean_coupon_fix(usdbrl)
1839
1842
  usdbrl["Date"] = usdbrl["Date"].dt.date
1840
1843
  usdbrl = usdbrl.rename(columns={"Last_Price":"usdbrl"})
1841
1844
  cash = cash.merge(usdbrl[["Date", "usdbrl"]], on="Date", how="left")
1842
- if fund_location == "br":
1845
+ if fund_location == "bz":
1843
1846
  cash["Market_Value"] = cash["Market_Value"] / cash["usdbrl"]
1844
1847
  else:
1845
1848
  cash["Market_Value"] = cash["Market_Value"] * cash["usdbrl"]
@@ -1880,7 +1883,7 @@ class LuxorQuery:
1880
1883
  )
1881
1884
  cash["Location"] = 'us'
1882
1885
  cash["Location"] = np.where(cash["Group"] == "caixa_us",
1883
- 'us', 'br'
1886
+ 'us', 'bz'
1884
1887
  )
1885
1888
  cash["Close_Price"] = np.where((cash["Market_Value"] < 0) & (cash["Group"] == "caixa_us") ,
1886
1889
  cash["us_margin_cost"], cash["Close_Price"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: luxorasap
3
- Version: 0.1.12
3
+ Version: 0.1.14
4
4
  Summary: Toolbox da Luxor para ingestão, análise e automação de dados financeiros.
5
5
  Author-email: Luxor Group <backoffice@luxor.com.br>
6
6
  License: Proprietary – All rights reserved
@@ -1,10 +1,10 @@
1
- luxorasap/__init__.py,sha256=HqY6WHxG-HvACjBWynexVvEuzXWJyTNL7yVS5EDInc8,1356
1
+ luxorasap/__init__.py,sha256=SMTPjcBpQFkhMUepkgPM2k32oPVPVK1pFMgv9WKC2gQ,1356
2
2
  luxorasap/btgapi/__init__.py,sha256=QUlfb5oiBY6K1Q5x4-a-x2wECe1At5wc2962I5odOJk,620
3
3
  luxorasap/btgapi/auth.py,sha256=PvyCtbEyBO2B1CIeAlNXWugKW1OgiKfPcVzS6K5FBnQ,1872
4
4
  luxorasap/btgapi/reports.py,sha256=ZVEMLoJPXc0r3XjPJPMsKQN0zZd1Npd7umNpAj1bncs,8040
5
5
  luxorasap/btgapi/trades.py,sha256=956HZ9BvN9C_VQvKTyBLN0x6ZygwVqBZN11F7OnNbDI,5985
6
6
  luxorasap/datareader/__init__.py,sha256=41RAvbrQ4R6oj67S32CrKqolx0CJ2W8cbOF6g5Cqm2g,120
7
- luxorasap/datareader/core.py,sha256=bH15JxaWyHKgutWPmJRMgCaaOQ-RtlMTuKDXOuG4saU,154657
7
+ luxorasap/datareader/core.py,sha256=bbkQXeZ8pDSCeax0ngBe0w_8nQyHS2QacUlLRFcXQK8,154740
8
8
  luxorasap/ingest/__init__.py,sha256=XhxDTN2ar-u6UCPhnxNU_to-nWiit-SpQ6cA_N9eMSs,795
9
9
  luxorasap/ingest/cloud/__init__.py,sha256=Hm-43YkjRhu3UiFVt1Zx7DmQuNJnK2GVWfCx1T3gKNc,2052
10
10
  luxorasap/ingest/legacy_local/dataloader.py,sha256=zKPhuiBSFwkuWN6d8g2s60KkbVk1R_1cGMCtQM9j-0c,11908
@@ -14,8 +14,8 @@ luxorasap/utils/dataframe/reader.py,sha256=Vzjdw-AeS1lnWEHQ8RZNh0kK93NWTp0NWVi_B
14
14
  luxorasap/utils/dataframe/transforms.py,sha256=Bm_cv9L9923QIXH82Fa_M4pM94f2AJRPu62Vv_i7tto,1684
15
15
  luxorasap/utils/storage/__init__.py,sha256=U3XRq94yzRp3kgBSUcRzs2tQgJ4o8h8a1ZzwiscA5XM,67
16
16
  luxorasap/utils/storage/blob.py,sha256=pcEixGxwXM9y5iPPpkX__ySWq0milghJGketYZlRL-0,3171
17
- luxorasap-0.1.12.dist-info/METADATA,sha256=Fe92fe65BAgsHiAE8g4l7Uq12PKf8FY1yCOgDuhhHa0,3804
18
- luxorasap-0.1.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
- luxorasap-0.1.12.dist-info/entry_points.txt,sha256=XFh-dOwUhlya9DmGvgookMI0ezyUJjcOvTIHDEYS44g,52
20
- luxorasap-0.1.12.dist-info/top_level.txt,sha256=9YOL6bUIpzY06XFBRkUW1e4rgB32Ds91fQPGwUEjxzU,10
21
- luxorasap-0.1.12.dist-info/RECORD,,
17
+ luxorasap-0.1.14.dist-info/METADATA,sha256=qxSTtAyED8ZtCaf7OvIM6V6TmsIEgRy2ZdnFrgroX8A,3804
18
+ luxorasap-0.1.14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
+ luxorasap-0.1.14.dist-info/entry_points.txt,sha256=XFh-dOwUhlya9DmGvgookMI0ezyUJjcOvTIHDEYS44g,52
20
+ luxorasap-0.1.14.dist-info/top_level.txt,sha256=9YOL6bUIpzY06XFBRkUW1e4rgB32Ds91fQPGwUEjxzU,10
21
+ luxorasap-0.1.14.dist-info/RECORD,,