quantlite 1.0.1__tar.gz → 1.0.2__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.
- {quantlite-1.0.1/src/quantlite.egg-info → quantlite-1.0.2}/PKG-INFO +1 -1
- {quantlite-1.0.1 → quantlite-1.0.2}/pyproject.toml +1 -1
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/__init__.py +1 -1
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/data/cache.py +5 -2
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/pipeline.py +17 -4
- {quantlite-1.0.1 → quantlite-1.0.2/src/quantlite.egg-info}/PKG-INFO +1 -1
- {quantlite-1.0.1 → quantlite-1.0.2}/LICENSE +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/README.md +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/setup.cfg +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/antifragile/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/backtesting/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/backtesting/analysis.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/backtesting/engine.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/backtesting/legacy.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/backtesting/signals.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/contagion/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/core/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/core/types.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/crypto/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/crypto/exchange.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/crypto/onchain.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/crypto/stablecoin.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/data/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/data/base.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/data/crypto.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/data/fred.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/data/local.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/data/registry.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/data/yahoo.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/data_generation.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/dependency/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/dependency/clustering.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/dependency/copulas.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/dependency/correlation.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/distributions/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/distributions/fat_tails.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/diversification/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/ergodicity/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/factors/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/factors/classical.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/factors/custom.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/factors/tail_risk.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/forensics/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/instruments/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/instruments/bond_pricing.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/instruments/exotic_options.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/instruments/option_pricing.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/metrics.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/monte_carlo.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/network/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/overfit/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/portfolio/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/portfolio/optimisation.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/portfolio/rebalancing.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/regime_integration/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/regime_integration/portfolio.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/regime_integration/reporting.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/regime_integration/risk.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/regimes/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/regimes/changepoint.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/regimes/conditional.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/regimes/hmm.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/report/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/report/html_renderer.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/report/pdf_renderer.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/report/sections.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/report/tearsheet.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/resample/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/risk/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/risk/evt.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/risk/metrics.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/scenarios/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/simulation/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/simulation/copula_mc.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/simulation/evt_simulation.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/simulation/regime_mc.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/visualisation.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/viz/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/viz/dependency.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/viz/plotly_backend/__init__.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/viz/plotly_backend/dependency.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/viz/plotly_backend/portfolio.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/viz/plotly_backend/regimes.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/viz/plotly_backend/risk.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/viz/plotly_backend/theme.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/viz/portfolio.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/viz/regimes.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/viz/risk.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite/viz/theme.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite.egg-info/SOURCES.txt +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite.egg-info/dependency_links.txt +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite.egg-info/requires.txt +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/src/quantlite.egg-info/top_level.txt +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_analysis.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_antifragile.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_backtesting.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_changepoint.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_clustering.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_conditional.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_contagion.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_copulas.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_correlation.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_crypto_exchange.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_crypto_onchain.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_crypto_stablecoin.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_data_connectors.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_data_generation.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_diversification.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_engine.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_ergodicity.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_evt.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_factors_classical.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_factors_custom.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_factors_tail_risk.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_fat_tails.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_forensics.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_hmm.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_instruments.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_metrics.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_monte_carlo.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_network.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_optimisation.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_overfit.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_pipeline.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_plotly_viz.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_rebalancing.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_regime_integration.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_report.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_resample.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_risk_metrics.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_scenarios.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_signals.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_sim_copula.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_sim_evt.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_sim_regime.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_visualisation.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_viz.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_viz_dependency.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_viz_portfolio.py +0 -0
- {quantlite-1.0.1 → quantlite-1.0.2}/tests/test_viz_regimes.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: quantlite
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: A fat-tail-native quantitative finance toolkit: EVT, risk metrics, and honest modelling for markets that bite.
|
|
5
5
|
Author-email: Prasant Sudhakaran <code@prasant.net>
|
|
6
6
|
License: MIT License
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "quantlite"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.2"
|
|
8
8
|
description = "A fat-tail-native quantitative finance toolkit: EVT, risk metrics, and honest modelling for markets that bite."
|
|
9
9
|
requires-python = ">=3.9"
|
|
10
10
|
license = { file = "LICENSE" }
|
|
@@ -126,10 +126,13 @@ def cache_put(
|
|
|
126
126
|
key = _cache_key(source, symbol, params)
|
|
127
127
|
ext = _cache_ext()
|
|
128
128
|
path = cache_dir / f"{key}{ext}"
|
|
129
|
+
# Strip non-serialisable attrs (e.g. DataMetadata) before caching
|
|
130
|
+
clean_df = df.copy()
|
|
131
|
+
clean_df.attrs = {}
|
|
129
132
|
if ext == ".parquet":
|
|
130
|
-
|
|
133
|
+
clean_df.to_parquet(path)
|
|
131
134
|
else:
|
|
132
|
-
|
|
135
|
+
clean_df.to_csv(path)
|
|
133
136
|
return path
|
|
134
137
|
|
|
135
138
|
|
|
@@ -68,12 +68,25 @@ def fetch(
|
|
|
68
68
|
close_frames = {}
|
|
69
69
|
for ticker, df in result.items():
|
|
70
70
|
if "close" in df.columns:
|
|
71
|
-
|
|
71
|
+
series = df["close"]
|
|
72
72
|
elif "Close" in df.columns:
|
|
73
|
-
|
|
73
|
+
series = df["Close"]
|
|
74
74
|
else:
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
series = df.iloc[:, -1]
|
|
76
|
+
|
|
77
|
+
# Normalise index to timezone-naive dates for cross-asset alignment.
|
|
78
|
+
# Equities come back in America/New_York, crypto in UTC, etc.
|
|
79
|
+
# Without this, the join produces all-NaN rows and dropna() wipes everything.
|
|
80
|
+
idx = series.index
|
|
81
|
+
if isinstance(idx, pd.DatetimeIndex) and idx.tz is not None:
|
|
82
|
+
series = series.copy()
|
|
83
|
+
series.index = idx.tz_convert("UTC").normalize().tz_localize(None)
|
|
84
|
+
elif not isinstance(idx, pd.DatetimeIndex):
|
|
85
|
+
# Cache corruption: index degraded to strings on round-trip
|
|
86
|
+
series = series.copy()
|
|
87
|
+
series.index = pd.to_datetime(idx, utc=True).normalize().tz_localize(None)
|
|
88
|
+
|
|
89
|
+
close_frames[ticker] = series
|
|
77
90
|
|
|
78
91
|
prices = pd.DataFrame(close_frames)
|
|
79
92
|
returns = prices.pct_change().dropna()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: quantlite
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: A fat-tail-native quantitative finance toolkit: EVT, risk metrics, and honest modelling for markets that bite.
|
|
5
5
|
Author-email: Prasant Sudhakaran <code@prasant.net>
|
|
6
6
|
License: MIT License
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|