luxorasap 0.1.25__tar.gz → 0.1.26__tar.gz
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-0.1.25 → luxorasap-0.1.26}/PKG-INFO +1 -1
- {luxorasap-0.1.25 → luxorasap-0.1.26}/pyproject.toml +2 -2
- {luxorasap-0.1.25 → luxorasap-0.1.26}/src/luxorasap/__init__.py +1 -1
- {luxorasap-0.1.25 → luxorasap-0.1.26}/src/luxorasap/datareader/core.py +3 -7
- {luxorasap-0.1.25 → luxorasap-0.1.26}/src/luxorasap.egg-info/PKG-INFO +1 -1
- {luxorasap-0.1.25 → luxorasap-0.1.26}/README.md +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/setup.cfg +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/src/luxorasap/btgapi/__init__.py +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/src/luxorasap/btgapi/auth.py +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/src/luxorasap/btgapi/reports.py +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/src/luxorasap/btgapi/trades.py +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/src/luxorasap/datareader/__init__.py +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/src/luxorasap/ingest/__init__.py +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/src/luxorasap/ingest/cloud/__init__.py +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/src/luxorasap/ingest/legacy_local/dataloader.py +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/src/luxorasap/utils/__init__.py +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/src/luxorasap/utils/dataframe/__init__.py +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/src/luxorasap/utils/dataframe/reader.py +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/src/luxorasap/utils/dataframe/transforms.py +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/src/luxorasap/utils/storage/__init__.py +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/src/luxorasap/utils/storage/blob.py +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/src/luxorasap.egg-info/SOURCES.txt +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/src/luxorasap.egg-info/dependency_links.txt +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/src/luxorasap.egg-info/entry_points.txt +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/src/luxorasap.egg-info/requires.txt +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/src/luxorasap.egg-info/top_level.txt +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/tests/test_btgapi_auth.py +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/tests/test_btgapi_reports.py +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/tests/test_btgapi_trades.py +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/tests/test_datareader.py +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/tests/test_ingest_cloud.py +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/tests/test_ingest_legacy_local.py +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/tests/test_utils_dataframe.py +0 -0
- {luxorasap-0.1.25 → luxorasap-0.1.26}/tests/test_utils_storage.py +0 -0
|
@@ -10,7 +10,7 @@ build-backend = "setuptools.build_meta"
|
|
|
10
10
|
#############################
|
|
11
11
|
[project]
|
|
12
12
|
name = "luxorasap"
|
|
13
|
-
version = "0.1.
|
|
13
|
+
version = "0.1.26"
|
|
14
14
|
description = "Toolbox da Luxor para ingestão, análise e automação de dados financeiros."
|
|
15
15
|
readme = "README.md"
|
|
16
16
|
requires-python = ">=3.9"
|
|
@@ -78,7 +78,7 @@ exclude = ["tests*"]
|
|
|
78
78
|
# bumpver (sem-ver)
|
|
79
79
|
#############################
|
|
80
80
|
[tool.bumpver]
|
|
81
|
-
current_version = "0.1.
|
|
81
|
+
current_version = "0.1.26"
|
|
82
82
|
version_pattern = "MAJOR.MINOR.PATCH"
|
|
83
83
|
|
|
84
84
|
# regex explícito – obrigatório no bumpver 2024+
|
|
@@ -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.26"
|
|
17
17
|
|
|
18
18
|
# ─── Lazy loader ─────────────────────────────────────────────────
|
|
19
19
|
def __getattr__(name: str) -> ModuleType:
|
|
@@ -289,8 +289,8 @@ class LuxorQuery:
|
|
|
289
289
|
"Price" : "Last_Price"
|
|
290
290
|
})[["Date","Asset","Last_Price"]]
|
|
291
291
|
)
|
|
292
|
+
|
|
292
293
|
if table_key == 'hist_vc_px_last':
|
|
293
|
-
|
|
294
294
|
last_prices = table.groupby("Asset")["Last_Price"].last()
|
|
295
295
|
last_date_df = pd.DataFrame({"Date": [dt.datetime.now()] * len(last_prices)})
|
|
296
296
|
last_date_df["Asset"] = last_prices.index
|
|
@@ -299,8 +299,8 @@ class LuxorQuery:
|
|
|
299
299
|
table = (pd.concat([table, last_date_df]).sort_values(by="Date")
|
|
300
300
|
.set_index("Date").groupby("Asset")
|
|
301
301
|
.apply(lambda g: g[~g.index.duplicated(keep="first")].resample("D").ffill(),
|
|
302
|
-
include_groups=False).reset_index(
|
|
303
|
-
|
|
302
|
+
include_groups=False).reset_index()
|
|
303
|
+
)
|
|
304
304
|
|
|
305
305
|
self.price_tables_loaded[table_key] = table
|
|
306
306
|
|
|
@@ -2038,8 +2038,6 @@ class LuxorQuery:
|
|
|
2038
2038
|
# Juntando dfs novamente
|
|
2039
2039
|
df = pd.concat([df, df_op_fix])
|
|
2040
2040
|
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
2041
|
# Precisamos consertar o open_price do FX. (Deve ser convertido pelo spot de fechamento sempre)
|
|
2044
2042
|
|
|
2045
2043
|
# Podemos puxar o caixa aqui e concatenar para as proximas operacoes
|
|
@@ -2192,7 +2190,6 @@ class LuxorQuery:
|
|
|
2192
2190
|
|
|
2193
2191
|
df = pd.concat([df, df_fees])
|
|
2194
2192
|
|
|
2195
|
-
|
|
2196
2193
|
df["Daily_Pnl"] = df["Pnl_Unchanged"] + df["Pnl_Bought"] + df["Pnl_Sold"] + df["Dividends"]
|
|
2197
2194
|
|
|
2198
2195
|
# Calculando PL Inicial Ajustado
|
|
@@ -2208,7 +2205,6 @@ class LuxorQuery:
|
|
|
2208
2205
|
|
|
2209
2206
|
df["Daily_Attribution"] = np.where(df["Open_AUM_Adjusted"] == 0,0, df["Daily_Pnl"] / df["Open_AUM_Adjusted"])
|
|
2210
2207
|
df["Daily_Return"] = df.reset_index().groupby("Today")["Daily_Attribution"].sum()
|
|
2211
|
-
|
|
2212
2208
|
|
|
2213
2209
|
# ao retornar, filtrar port Daily_Pnl != 0 e not Daily_Pnl.isna()
|
|
2214
2210
|
if ignore_small_pnl:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|