luxorasap 0.1.11__py3-none-any.whl → 0.1.12__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 +1 -1
- luxorasap/datareader/core.py +4 -4
- {luxorasap-0.1.11.dist-info → luxorasap-0.1.12.dist-info}/METADATA +1 -1
- {luxorasap-0.1.11.dist-info → luxorasap-0.1.12.dist-info}/RECORD +7 -7
- {luxorasap-0.1.11.dist-info → luxorasap-0.1.12.dist-info}/WHEEL +0 -0
- {luxorasap-0.1.11.dist-info → luxorasap-0.1.12.dist-info}/entry_points.txt +0 -0
- {luxorasap-0.1.11.dist-info → luxorasap-0.1.12.dist-info}/top_level.txt +0 -0
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.
|
|
16
|
+
__version__ = "0.1.12"
|
|
17
17
|
|
|
18
18
|
# ─── Lazy loader ─────────────────────────────────────────────────
|
|
19
19
|
def __getattr__(name: str) -> ModuleType:
|
luxorasap/datareader/core.py
CHANGED
|
@@ -662,7 +662,7 @@ class LuxorQuery:
|
|
|
662
662
|
assets["Ticker"] = assets["Ticker"].apply(lambda x: ticker_map[x]["Ticker_BBG"] if x in ticker_map.keys() else x)
|
|
663
663
|
|
|
664
664
|
prices = pd.merge(assets[["Ticker", "Location"]], prices, left_on="Ticker", right_on="Asset")[["Date", "Asset", "Last_Price", "Location"]]
|
|
665
|
-
currency_map = {"bz":"brl", "us":"usd", "cn":"cad", "eur":"eur"}
|
|
665
|
+
currency_map = {"bz":"brl","br":"brl", "us":"usd", "cn":"cad", "eur":"eur"}
|
|
666
666
|
prices["Location"] = prices["Location"].apply(lambda x: currency_map.get(x, 'not found'))
|
|
667
667
|
|
|
668
668
|
prices_by_location = []
|
|
@@ -1832,14 +1832,14 @@ class LuxorQuery:
|
|
|
1832
1832
|
# Para saber a moeda do caixa retornado, precisamos saber a moeda do fundo
|
|
1833
1833
|
fund_key = fund.replace('_', ' ')
|
|
1834
1834
|
fund_location = self.get_table("funds").query("Short_Name == @fund_key")["Country"].squeeze()
|
|
1835
|
-
currency_location = "us" if currency == "usd" else "
|
|
1835
|
+
currency_location = "us" if currency == "usd" else "br"
|
|
1836
1836
|
if fund_location != currency_location:
|
|
1837
1837
|
usdbrl = self.get_prices(usdbrl_ticker, previous_date=cash["Date"].min(), recent_date=cash["Date"].max(),)
|
|
1838
1838
|
usdbrl = self.usdbrl_clean_coupon_fix(usdbrl)
|
|
1839
1839
|
usdbrl["Date"] = usdbrl["Date"].dt.date
|
|
1840
1840
|
usdbrl = usdbrl.rename(columns={"Last_Price":"usdbrl"})
|
|
1841
1841
|
cash = cash.merge(usdbrl[["Date", "usdbrl"]], on="Date", how="left")
|
|
1842
|
-
if fund_location == "
|
|
1842
|
+
if fund_location == "br":
|
|
1843
1843
|
cash["Market_Value"] = cash["Market_Value"] / cash["usdbrl"]
|
|
1844
1844
|
else:
|
|
1845
1845
|
cash["Market_Value"] = cash["Market_Value"] * cash["usdbrl"]
|
|
@@ -1880,7 +1880,7 @@ class LuxorQuery:
|
|
|
1880
1880
|
)
|
|
1881
1881
|
cash["Location"] = 'us'
|
|
1882
1882
|
cash["Location"] = np.where(cash["Group"] == "caixa_us",
|
|
1883
|
-
'us', '
|
|
1883
|
+
'us', 'br'
|
|
1884
1884
|
)
|
|
1885
1885
|
cash["Close_Price"] = np.where((cash["Market_Value"] < 0) & (cash["Group"] == "caixa_us") ,
|
|
1886
1886
|
cash["us_margin_cost"], cash["Close_Price"]
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
luxorasap/__init__.py,sha256=
|
|
1
|
+
luxorasap/__init__.py,sha256=HqY6WHxG-HvACjBWynexVvEuzXWJyTNL7yVS5EDInc8,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=
|
|
7
|
+
luxorasap/datareader/core.py,sha256=bH15JxaWyHKgutWPmJRMgCaaOQ-RtlMTuKDXOuG4saU,154657
|
|
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.
|
|
18
|
-
luxorasap-0.1.
|
|
19
|
-
luxorasap-0.1.
|
|
20
|
-
luxorasap-0.1.
|
|
21
|
-
luxorasap-0.1.
|
|
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,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|