quantstats-pro 0.4.4__tar.gz → 0.4.5__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.
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/CHANGELOG.md +9 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/PKG-INFO +1 -1
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/_compat.py +35 -1
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/montecarlo/plotting.py +2 -2
- quantstats_pro-0.4.5/quantstats/version.py +1 -0
- quantstats_pro-0.4.4/quantstats/version.py +0 -1
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/.gitignore +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/LICENSE.txt +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/README.md +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/pyproject.toml +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/__init__.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/_montecarlo.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/_numpy_compat.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/_plotting/__init__.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/_plotting/core.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/_plotting/wrappers.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/_reporting/__init__.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/_reporting/engine.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/_reporting/sections.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/alphadecay/__init__.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/alphadecay/core.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/alphadecay/plotting.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/montecarlo/__init__.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/montecarlo/analytics.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/montecarlo/base.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/montecarlo/core.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/montecarlo/models/__init__.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/montecarlo/models/bayesian.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/montecarlo/models/block_bootstrap.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/montecarlo/models/bootstrap.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/montecarlo/models/garch.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/montecarlo/models/gbm.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/montecarlo/models/heston.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/montecarlo/models/jump_diffusion.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/montecarlo/models/shuffle.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/montecarlo/models/trimmed.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/montecarlo/registry.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/plots.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/py.typed +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/report.html +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/report_alpha_decay.html +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/report_montecarlo.html +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/report_simple.html +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/reports.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/stats.py +0 -0
- {quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/utils.py +0 -0
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
===========
|
|
3
3
|
|
|
4
|
+
0.4.5
|
|
5
|
+
-----
|
|
6
|
+
|
|
7
|
+
**Bug Fixes**
|
|
8
|
+
|
|
9
|
+
- Fixed ``html_montecarlo`` Max Drawdown boxplot crashing on matplotlib 3.7–3.9
|
|
10
|
+
(``TypeError`` from ``orientation=`` / ``tick_labels=``). Uses a signature-based
|
|
11
|
+
compatibility shim so the plot works from matplotlib 3.7 through 3.11+.
|
|
12
|
+
|
|
4
13
|
0.4.4
|
|
5
14
|
-----
|
|
6
15
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: quantstats-pro
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.5
|
|
4
4
|
Summary: Drop-in replacement for QuantStats — advanced risk engines, institutional HTML tearsheets, and actionable portfolio analytics for quants
|
|
5
5
|
Project-URL: Homepage, https://github.com/diegoalvarezmgl/quantstats-pro
|
|
6
6
|
Project-URL: Documentation, https://github.com/diegoalvarezmgl/quantstats-pro
|
|
@@ -8,8 +8,10 @@ and numpy, ensuring that quantstats functions work consistently across various
|
|
|
8
8
|
dependency versions. It handles deprecated functionality and version-specific changes.
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
|
+
import inspect
|
|
11
12
|
import warnings
|
|
12
|
-
from collections.abc import Callable
|
|
13
|
+
from collections.abc import Callable, Mapping
|
|
14
|
+
from typing import Any
|
|
13
15
|
|
|
14
16
|
import numpy as np
|
|
15
17
|
import pandas as pd
|
|
@@ -429,3 +431,35 @@ def safe_yfinance_download(tickers: str | list[str],
|
|
|
429
431
|
return pd.DataFrame(columns=['Open', 'High', 'Low', 'Close', 'Volume', 'Adj Close'])
|
|
430
432
|
|
|
431
433
|
return result
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
def boxplot_compat_kwargs(
|
|
437
|
+
labels: list[str],
|
|
438
|
+
*,
|
|
439
|
+
horizontal: bool = True,
|
|
440
|
+
params: Mapping[str, Any] | None = None,
|
|
441
|
+
) -> dict[str, Any]:
|
|
442
|
+
"""
|
|
443
|
+
Build Axes.boxplot kwargs compatible across matplotlib 3.7–3.11+.
|
|
444
|
+
|
|
445
|
+
Matplotlib renamed ``labels`` → ``tick_labels`` in 3.9 (``labels`` removed
|
|
446
|
+
in 3.11) and replaced ``vert=False`` with ``orientation='horizontal'`` in
|
|
447
|
+
3.10 (``vert`` deprecated in 3.11). Our declared floor is matplotlib>=3.7,
|
|
448
|
+
so callers must not hard-code the newest names.
|
|
449
|
+
"""
|
|
450
|
+
if params is None:
|
|
451
|
+
from matplotlib.axes import Axes
|
|
452
|
+
|
|
453
|
+
params = inspect.signature(Axes.boxplot).parameters
|
|
454
|
+
|
|
455
|
+
kwargs: dict[str, Any] = {}
|
|
456
|
+
if horizontal:
|
|
457
|
+
if "orientation" in params:
|
|
458
|
+
kwargs["orientation"] = "horizontal"
|
|
459
|
+
else:
|
|
460
|
+
kwargs["vert"] = False
|
|
461
|
+
if "tick_labels" in params:
|
|
462
|
+
kwargs["tick_labels"] = labels
|
|
463
|
+
else:
|
|
464
|
+
kwargs["labels"] = labels
|
|
465
|
+
return kwargs
|
|
@@ -14,6 +14,7 @@ matplotlib.use("Agg", force=False)
|
|
|
14
14
|
import matplotlib.pyplot as plt
|
|
15
15
|
import numpy as np
|
|
16
16
|
|
|
17
|
+
from .._compat import boxplot_compat_kwargs
|
|
17
18
|
from . import analytics
|
|
18
19
|
|
|
19
20
|
_PRIMARY = "#348dc1"
|
|
@@ -247,11 +248,10 @@ def maxdd_distribution_figure(
|
|
|
247
248
|
|
|
248
249
|
bp = ax.boxplot(
|
|
249
250
|
data,
|
|
250
|
-
orientation="horizontal",
|
|
251
|
-
tick_labels=labels,
|
|
252
251
|
patch_artist=True,
|
|
253
252
|
showfliers=False,
|
|
254
253
|
medianprops={"color": _MEDIAN, "linewidth": 1.5},
|
|
254
|
+
**boxplot_compat_kwargs(labels, horizontal=True),
|
|
255
255
|
)
|
|
256
256
|
for i, patch in enumerate(bp["boxes"]):
|
|
257
257
|
if i < n_hist:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
version = "0.4.5"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
version = "0.4.4"
|
|
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
|
{quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/montecarlo/models/block_bootstrap.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{quantstats_pro-0.4.4 → quantstats_pro-0.4.5}/quantstats/montecarlo/models/jump_diffusion.py
RENAMED
|
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
|