-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
201 lines (182 loc) · 4.69 KB
/
Copy pathpyproject.toml
File metadata and controls
201 lines (182 loc) · 4.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
[build-system]
requires = ["setuptools>=68", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"
[project]
name = "quantspt"
version = "0.1.0"
description = "The definitive Python library for Stochastic Portfolio Theory"
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.10"
authors = [
{ name = "Aheli Poddar", email = "ahelipoddar2003@gmail.com" },
]
keywords = [
"stochastic-portfolio-theory",
"portfolio-optimization",
"quantitative-finance",
"diversity-arbitrage",
"functionally-generated-portfolios",
"excess-growth-rate",
"atlas-model",
"mathematical-finance",
]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Science/Research",
"Intended Audience :: Financial and Insurance Industry",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Office/Business :: Financial :: Investment",
"Typing :: Typed",
]
dependencies = [
"numpy>=1.24",
"pandas>=2.0",
"scipy>=1.10",
]
[project.optional-dependencies]
viz = [
"matplotlib>=3.7",
"plotly>=5.15",
"seaborn>=0.12",
]
opt = [
"cvxpy>=1.3",
]
sim = [
"numba>=0.57",
]
gpu = [
"jax>=0.4",
"jaxlib>=0.4",
]
data = [
"pyarrow>=14.0",
"yfinance>=0.2",
"pydantic>=2.0",
]
ml = [
"torch>=2.0",
"optuna>=3.0",
"hmmlearn>=0.3",
"ruptures>=1.1",
]
causal = [
"pgmpy>=0.0.21",
"networkx>=3.1",
]
research = [
"quantspt[viz,opt,sim,data,ml,causal]",
]
dev = [
"pytest>=7.4",
"pytest-cov>=4.1",
"mypy>=1.5",
"pandas-stubs>=2.0",
"ruff>=0.1",
"pre-commit>=3.4",
"hypothesis>=6.80",
]
all = [
"quantspt[viz,opt,sim,gpu,data,dev,ml,causal]",
]
[project.urls]
Homepage = "https://github.com/XAheli/quantspt"
Documentation = "https://github.com/XAheli/quantspt/wiki"
Repository = "https://github.com/XAheli/quantspt"
Changelog = "https://github.com/XAheli/quantspt/blob/main/CHANGELOG.md"
"Bug Tracker" = "https://github.com/XAheli/quantspt/issues"
[project.entry-points."quantspt_data_provider"]
# Built-in providers are registered here as they are implemented.
# Third-party packages add their own entry points in their pyproject.toml.
[project.entry-points."quantspt_portfolio"]
[project.entry-points."quantspt_model"]
[tool.setuptools.packages.find]
include = ["quantspt*"]
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"cpu: runs on CPU only (default for most tests)",
"gpu: requires CUDA GPU (PyTorch, pgmpy torch backend, sklearn GPU tensors)",
"slow: takes more than 10 seconds (simulations, Monte Carlo, ergodic tests)",
"integration: end-to-end multi-module test (data → model → backtest)",
"property: property-based tests using Hypothesis",
"golden: golden regression tests against cached outputs",
]
filterwarnings = [
"error",
"ignore::DeprecationWarning:pkg_resources",
"ignore:The NumPy module was reloaded:UserWarning",
]
[tool.mypy]
python_version = "3.12"
strict = true
warn_return_any = false
warn_unused_configs = false
warn_unused_ignores = false
disallow_untyped_defs = true
[[tool.mypy.overrides]]
module = [
"scipy.*",
"cvxpy.*",
"numba.*",
"jax.*",
"matplotlib.*",
"plotly.*",
"seaborn.*",
"yfinance.*",
"pydantic.*",
"numpy.*",
"torch.*",
"optuna.*",
"hmmlearn.*",
"ruptures.*",
"pgmpy.*",
"networkx.*",
"sklearn.*",
]
ignore_missing_imports = true
[tool.ruff]
target-version = "py310"
line-length = 88
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"RUF", # ruff-specific
]
ignore = [
"E501", # line length handled by formatter
"RUF002", # allow Unicode math symbols in docstrings (γ, σ, π, τ, etc.)
"RUF003", # allow Unicode math symbols in comments
"SIM103", # allow explicit if/return patterns for clarity
"SIM108", # allow if/else over ternary for readability with numpy
]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["E402"]
[tool.ruff.lint.isort]
known-first-party = ["quantspt"]
[tool.coverage.run]
source = ["quantspt"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"if __name__ == .__main__.",
"@overload",
"\\.\\.\\.",
]
[tool.bandit]
exclude_dirs = ["tests", "docs", "examples"]
skips = ["B101"] # allow assert in tests