sigmaquant 0.1.0__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.
@@ -0,0 +1,77 @@
1
+ Metadata-Version: 2.4
2
+ Name: sigmaquant
3
+ Version: 0.1.0
4
+ Summary: Python library providing performance, risk, and distribution metrics for quantitative finance workflows
5
+ Author: Lorenzo Santarsieri
6
+ License-Expression: MIT
7
+ Requires-Python: >=3.11
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: numpy<3,>=2.2
10
+ Requires-Dist: scipy<2,>=1.15
11
+ Requires-Dist: pandas<3,>=2.2
12
+ Requires-Dist: statsmodels<1,>=0.14
13
+
14
+
15
+ <p align="center">
16
+ <img src="https://img.shields.io/badge/Python-3776AB?style=for-the-badge&logo=python&logoColor=white" alt="Python">
17
+ <img src="https://img.shields.io/badge/NumPy-013243?style=for-the-badge&logo=numpy&logoColor=white" alt="NumPy">
18
+ <img src="https://img.shields.io/badge/Pandas-150458?style=for-the-badge&logo=pandas&logoColor=white" alt="Pandas">
19
+ <img src="https://img.shields.io/badge/Quantitative%20Finance-2E8B57?style=for-the-badge" alt="Quant Finance">
20
+ <img src="https://img.shields.io/badge/Research%20Grade-6A0DAD?style=for-the-badge" alt="Research Grade">
21
+ </p>
22
+
23
+ <p align="center">
24
+ <b>Research-Grade Performance & Risk Metrics</b><br>
25
+ <i>Statistically consistent analytics for quantitative finance</i>
26
+ </p>
27
+
28
+
29
+ sigma-quant is a lightweight Python library providing performance,
30
+ risk, and distribution metrics for quantitative finance workflows.
31
+
32
+
33
+ ### 📦 Installation (PyPI Package)
34
+ ------------
35
+ Install the package from **PyPI**:
36
+
37
+ ```bash
38
+ pip install sigma-quant
39
+ ```
40
+
41
+ ### 📘Documentation
42
+ -------------
43
+ This README is intentionally high-level.
44
+
45
+ For the complete API reference, mathematical definitions, statistical
46
+ conventions, and usage examples, please refer to the official
47
+ documentation:
48
+
49
+ https://sigma-quant.readthedocs.io/en/latest/index.html
50
+
51
+
52
+ ### ASCII Report
53
+
54
+ Generate a fast portfolio performance report using `ascii_report`.
55
+ If the input series represents **PnL**, set `kind="pnl"` and optionally
56
+ specify the currency.
57
+
58
+ ```python
59
+ import sigmaquant
60
+
61
+ report = sigmaquant.ascii_report(
62
+ returns=portfolio_returns,
63
+ frequency="D",
64
+ strategy_name="My Portfolio",
65
+ kind="simple",
66
+ )
67
+
68
+ print(report)
69
+
70
+ # Optional exports
71
+ df = report.to_dataframe()
72
+ data = report.to_dict()
73
+ ```
74
+
75
+ ### 🪪 License
76
+ ------------
77
+ MIT © 2025 — Developed with ❤️ by Lorenzo Santarsieri & Tommaso Grandi
@@ -0,0 +1,64 @@
1
+
2
+ <p align="center">
3
+ <img src="https://img.shields.io/badge/Python-3776AB?style=for-the-badge&logo=python&logoColor=white" alt="Python">
4
+ <img src="https://img.shields.io/badge/NumPy-013243?style=for-the-badge&logo=numpy&logoColor=white" alt="NumPy">
5
+ <img src="https://img.shields.io/badge/Pandas-150458?style=for-the-badge&logo=pandas&logoColor=white" alt="Pandas">
6
+ <img src="https://img.shields.io/badge/Quantitative%20Finance-2E8B57?style=for-the-badge" alt="Quant Finance">
7
+ <img src="https://img.shields.io/badge/Research%20Grade-6A0DAD?style=for-the-badge" alt="Research Grade">
8
+ </p>
9
+
10
+ <p align="center">
11
+ <b>Research-Grade Performance & Risk Metrics</b><br>
12
+ <i>Statistically consistent analytics for quantitative finance</i>
13
+ </p>
14
+
15
+
16
+ sigma-quant is a lightweight Python library providing performance,
17
+ risk, and distribution metrics for quantitative finance workflows.
18
+
19
+
20
+ ### 📦 Installation (PyPI Package)
21
+ ------------
22
+ Install the package from **PyPI**:
23
+
24
+ ```bash
25
+ pip install sigma-quant
26
+ ```
27
+
28
+ ### 📘Documentation
29
+ -------------
30
+ This README is intentionally high-level.
31
+
32
+ For the complete API reference, mathematical definitions, statistical
33
+ conventions, and usage examples, please refer to the official
34
+ documentation:
35
+
36
+ https://sigma-quant.readthedocs.io/en/latest/index.html
37
+
38
+
39
+ ### ASCII Report
40
+
41
+ Generate a fast portfolio performance report using `ascii_report`.
42
+ If the input series represents **PnL**, set `kind="pnl"` and optionally
43
+ specify the currency.
44
+
45
+ ```python
46
+ import sigmaquant
47
+
48
+ report = sigmaquant.ascii_report(
49
+ returns=portfolio_returns,
50
+ frequency="D",
51
+ strategy_name="My Portfolio",
52
+ kind="simple",
53
+ )
54
+
55
+ print(report)
56
+
57
+ # Optional exports
58
+ df = report.to_dataframe()
59
+ data = report.to_dict()
60
+ ```
61
+
62
+ ### 🪪 License
63
+ ------------
64
+ MIT © 2025 — Developed with ❤️ by Lorenzo Santarsieri & Tommaso Grandi
@@ -0,0 +1,18 @@
1
+ [project]
2
+ name = "sigmaquant"
3
+ version = "0.1.0"
4
+ description = "Python library providing performance, risk, and distribution metrics for quantitative finance workflows"
5
+ readme = "README.md"
6
+ license = "MIT"
7
+ authors = [{ name = "Lorenzo Santarsieri" }]
8
+ requires-python = ">=3.11"
9
+ dependencies = [
10
+ "numpy>=2.2,<3",
11
+ "scipy>=1.15,<2",
12
+ "pandas>=2.2,<3",
13
+ "statsmodels>=0.14,<1"
14
+ ]
15
+
16
+ [build-system]
17
+ requires = ["setuptools>=61.0"]
18
+ build-backend = "setuptools.build_meta"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,34 @@
1
+ from .custom_typing import Frequency
2
+
3
+ from .performance.returns import (
4
+ cum_returns,
5
+ annual_return,
6
+ aggregate_returns,
7
+ )
8
+
9
+ from .performance.risk import (
10
+ drawdown,
11
+ max_drawdown,
12
+ annual_vola,
13
+ downside_risk,
14
+ upside_risk,
15
+ time_underwater,
16
+ drawdown_stats,
17
+ tail_ratio,
18
+ )
19
+
20
+ from .performance.metrics import (
21
+ sharpe_ratio,
22
+ sortino_ratio,
23
+ calmar_ratio,
24
+ omega_ratio,
25
+ hit_rate,
26
+ period_hit_rate,
27
+ skew,
28
+ excess_kurtosis,
29
+ tracking_error,
30
+ information_ratio,
31
+ )
32
+
33
+ from .performance.rolling import rolling_metric
34
+ from .performance.report import ascii_report
@@ -0,0 +1,13 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Literal, Iterable, Union
4
+ import pandas as pd
5
+ import numpy as np
6
+
7
+ Frequency = Literal["D", "W", "M", "Y"]
8
+
9
+ ArrayLike = Union[
10
+ Iterable[float],
11
+ np.ndarray,
12
+ pd.Series,
13
+ ]
@@ -0,0 +1,32 @@
1
+ from .returns import (
2
+ cum_returns,
3
+ annual_return,
4
+ aggregate_returns,
5
+ )
6
+
7
+ from .risk import (
8
+ drawdown,
9
+ max_drawdown,
10
+ annual_vola,
11
+ downside_risk,
12
+ upside_risk,
13
+ time_underwater,
14
+ drawdown_stats,
15
+ tail_ratio,
16
+ )
17
+
18
+ from .metrics import (
19
+ sharpe_ratio,
20
+ sortino_ratio,
21
+ calmar_ratio,
22
+ omega_ratio,
23
+ hit_rate,
24
+ period_hit_rate,
25
+ skew,
26
+ excess_kurtosis,
27
+ tracking_error,
28
+ information_ratio,
29
+ )
30
+
31
+ from .rolling import rolling_metric
32
+ from .report import ascii_report