squarequant 0.2.1__tar.gz → 0.2.3__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.
- {squarequant-0.2.1/squarequant.egg-info → squarequant-0.2.3}/PKG-INFO +25 -27
- {squarequant-0.2.1 → squarequant-0.2.3}/README.md +20 -15
- squarequant-0.2.3/pyproject.toml +58 -0
- {squarequant-0.2.1 → squarequant-0.2.3}/setup.py +10 -4
- {squarequant-0.2.1 → squarequant-0.2.3}/squarequant/__init__.py +11 -3
- squarequant-0.2.3/squarequant/api.py +893 -0
- {squarequant-0.2.1 → squarequant-0.2.3}/squarequant/constants.py +9 -1
- {squarequant-0.2.1 → squarequant-0.2.3}/squarequant/core/base.py +38 -33
- squarequant-0.2.3/squarequant/core/metrics.py +1254 -0
- {squarequant-0.2.1 → squarequant-0.2.3}/squarequant/data/data.py +10 -2
- squarequant-0.2.3/squarequant/monte_carlo/__init__.py +6 -0
- squarequant-0.2.3/squarequant/monte_carlo/montecarlo.py +568 -0
- {squarequant-0.2.1 → squarequant-0.2.3}/squarequant/var/valueatrisk.py +75 -62
- {squarequant-0.2.1 → squarequant-0.2.3/squarequant.egg-info}/PKG-INFO +25 -27
- {squarequant-0.2.1 → squarequant-0.2.3}/squarequant.egg-info/SOURCES.txt +3 -1
- squarequant-0.2.1/squarequant/api.py +0 -554
- squarequant-0.2.1/squarequant/core/metrics.py +0 -1405
- squarequant-0.2.1/squarequant/var/tetstvar.py +0 -241
- {squarequant-0.2.1 → squarequant-0.2.3}/LICENSE +0 -0
- {squarequant-0.2.1 → squarequant-0.2.3}/setup.cfg +0 -0
- {squarequant-0.2.1 → squarequant-0.2.3}/squarequant/core/__init__.py +0 -0
- {squarequant-0.2.1 → squarequant-0.2.3}/squarequant/data/__init__.py +0 -0
- {squarequant-0.2.1 → squarequant-0.2.3}/squarequant/utils/__init__.py +0 -0
- {squarequant-0.2.1 → squarequant-0.2.3}/squarequant/utils/helpers.py +0 -0
- {squarequant-0.2.1 → squarequant-0.2.3}/squarequant/var/__init__.py +0 -0
- {squarequant-0.2.1 → squarequant-0.2.3}/squarequant.egg-info/dependency_links.txt +0 -0
- {squarequant-0.2.1 → squarequant-0.2.3}/squarequant.egg-info/requires.txt +0 -0
- {squarequant-0.2.1 → squarequant-0.2.3}/squarequant.egg-info/top_level.txt +0 -0
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: squarequant
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: A Python package for financial risk metrics and stock data analysis
|
|
5
5
|
Home-page: https://github.com/SquareQuant/squarequant-package
|
|
6
6
|
Author: Gabriel Bosch
|
|
7
|
-
Author-email: contact@squarequant.org
|
|
7
|
+
Author-email: Gabriel Bosch <contact@squarequant.org>
|
|
8
8
|
Project-URL: Documentation, https://www.squarequant.org
|
|
9
9
|
Project-URL: Bug Tracker, https://github.com/SquareQuant/squarequant-package/issues
|
|
10
|
-
|
|
10
|
+
Project-URL: Homepage, https://github.com/SquareQuant/squarequant-package
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.7
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.8
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.9
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
19
|
Classifier: License :: OSI Approved :: MIT License
|
|
18
20
|
Classifier: Operating System :: OS Independent
|
|
19
21
|
Classifier: Topic :: Office/Business :: Financial :: Investment
|
|
@@ -44,18 +46,9 @@ Requires-Dist: sphinx-autodoc-typehints>=1.22.0; extra == "dev"
|
|
|
44
46
|
Requires-Dist: myst-parser>=1.0.0; extra == "dev"
|
|
45
47
|
Requires-Dist: pytest-cov>=2.12.0; extra == "dev"
|
|
46
48
|
Dynamic: author
|
|
47
|
-
Dynamic: author-email
|
|
48
|
-
Dynamic: classifier
|
|
49
|
-
Dynamic: description
|
|
50
|
-
Dynamic: description-content-type
|
|
51
49
|
Dynamic: home-page
|
|
52
|
-
Dynamic: keywords
|
|
53
50
|
Dynamic: license-file
|
|
54
|
-
Dynamic: project-url
|
|
55
|
-
Dynamic: provides-extra
|
|
56
|
-
Dynamic: requires-dist
|
|
57
51
|
Dynamic: requires-python
|
|
58
|
-
Dynamic: summary
|
|
59
52
|
|
|
60
53
|
# SquareQuant
|
|
61
54
|
|
|
@@ -65,7 +58,7 @@ SquareQuant is a comprehensive Python package for financial risk metrics and sto
|
|
|
65
58
|
|
|
66
59
|
- **Financial Data Access**: Multiple data sources including YFinance and Theta Data
|
|
67
60
|
- **Extensive Risk Metrics**: Comprehensive set of traditional and advanced risk measures
|
|
68
|
-
- **Modular Design**:
|
|
61
|
+
- **Modular Design**: Organized into specialized modules (data, var, etc.)
|
|
69
62
|
- **Flexible API**: Consistent function-based and object-oriented interfaces
|
|
70
63
|
|
|
71
64
|
## Installation
|
|
@@ -92,12 +85,16 @@ config = sq.DownloadConfig(
|
|
|
92
85
|
|
|
93
86
|
# Download data
|
|
94
87
|
data = sq.download_tickers(['AAPL', 'MSFT', 'GOOGL'], config)
|
|
88
|
+
data = pd.DataFrame({
|
|
89
|
+
'AAPL': data['AAPL_Close'],
|
|
90
|
+
'MSFT': data['MSFT_Close']
|
|
91
|
+
})
|
|
95
92
|
|
|
96
93
|
# Calculate volatility
|
|
97
|
-
vol = sq.vol(data=data, assets=['AAPL', 'MSFT', 'GOOGL'], window=21)
|
|
94
|
+
vol = sq.vol(data=data, assets=['AAPL', 'MSFT', 'GOOGL'], use_returns=False, window=21)
|
|
98
95
|
|
|
99
96
|
# Calculate Sharpe ratio
|
|
100
|
-
sharpe = sq.sharpe(data=data, assets=['AAPL', 'MSFT', 'GOOGL'], window=252)
|
|
97
|
+
sharpe = sq.sharpe(data=data, assets=['AAPL', 'MSFT', 'GOOGL'], use_returns=False, window=252)
|
|
101
98
|
|
|
102
99
|
# Visualize results (using matplotlib directly)
|
|
103
100
|
plt.figure(figsize=(12, 6))
|
|
@@ -126,7 +123,6 @@ SquareQuant provides a comprehensive set of risk metrics, including:
|
|
|
126
123
|
| Entropic Risk Measure | `sq.erm()` | Risk measure based on information theory |
|
|
127
124
|
| Entropic Value at Risk | `sq.evar()` | VAR using entropy concepts |
|
|
128
125
|
| Conditional Drawdown at Risk | `sq.cdar()` | Expected drawdown beyond threshold |
|
|
129
|
-
| Entropic Drawdown at Risk | `sq.edar()` | Drawdown risk using entropy concepts |
|
|
130
126
|
|
|
131
127
|
## Data Sources
|
|
132
128
|
|
|
@@ -162,7 +158,6 @@ config = sq.DownloadConfig(
|
|
|
162
158
|
|
|
163
159
|
```python
|
|
164
160
|
import squarequant as sq
|
|
165
|
-
import pandas as pd
|
|
166
161
|
import matplotlib.pyplot as plt
|
|
167
162
|
|
|
168
163
|
# Download data
|
|
@@ -174,10 +169,10 @@ config = sq.DownloadConfig(
|
|
|
174
169
|
data = sq.download_tickers(['SPY', 'QQQ'], config)
|
|
175
170
|
|
|
176
171
|
# Calculate multiple risk metrics
|
|
177
|
-
vol = sq.vol(data=data, assets=['SPY', 'QQQ'], window=21)
|
|
178
|
-
mad = sq.mad(data=data, assets=['SPY', 'QQQ'], window=252)
|
|
179
|
-
mdd = sq.mdd(data=data, assets=['SPY', 'QQQ'], window=252)
|
|
180
|
-
ulcer = sq.ulcer(data=data, assets=['SPY', 'QQQ'], window=252)
|
|
172
|
+
vol = sq.vol(data=data, assets=['SPY', 'QQQ'], use_returns=False, window=21)
|
|
173
|
+
mad = sq.mad(data=data, assets=['SPY', 'QQQ'], use_returns=False, window=252)
|
|
174
|
+
mdd = sq.mdd(data=data, assets=['SPY', 'QQQ'], use_returns=False, window=252)
|
|
175
|
+
ulcer = sq.ulcer(data=data, assets=['SPY', 'QQQ'], use_returns=False, window=252)
|
|
181
176
|
|
|
182
177
|
# Visualize comparison (using matplotlib directly)
|
|
183
178
|
plt.figure(figsize=(12, 8))
|
|
@@ -213,6 +208,7 @@ data = sq.download_tickers(weights.index.tolist(), config)
|
|
|
213
208
|
# Calculate portfolio risk measures
|
|
214
209
|
portfolio_var = sq.var(
|
|
215
210
|
data=data,
|
|
211
|
+
use_returns = False,
|
|
216
212
|
assets=weights.index.tolist(),
|
|
217
213
|
confidence=0.95,
|
|
218
214
|
window=252,
|
|
@@ -233,13 +229,13 @@ config = sq.DownloadConfig(start_date="2018-01-01", end_date="2023-12-31")
|
|
|
233
229
|
data = sq.download_tickers(['SPY'], config)
|
|
234
230
|
|
|
235
231
|
# Calculate Entropic Risk Measure with different risk aversion parameters
|
|
236
|
-
erm1 = sq.erm(data=data, assets=['SPY'], z=0.5, confidence=0.95)
|
|
237
|
-
erm2 = sq.erm(data=data, assets=['SPY'], z=1.0, confidence=0.95)
|
|
238
|
-
erm3 = sq.erm(data=data, assets=['SPY'], z=2.0, confidence=0.95)
|
|
232
|
+
erm1 = sq.erm(data=data, use_returns=False, assets=['SPY'], z=0.5, confidence=0.95)
|
|
233
|
+
erm2 = sq.erm(data=data, use_returns=False, assets=['SPY'], z=1.0, confidence=0.95)
|
|
234
|
+
erm3 = sq.erm(data=data, use_returns=False, assets=['SPY'], z=2.0, confidence=0.95)
|
|
239
235
|
|
|
240
236
|
# Compare with traditional VaR and CVaR
|
|
241
|
-
var = sq.var(data=data, assets=['SPY'], confidence=0.95)
|
|
242
|
-
cvar = sq.cvar(data=data, assets=['SPY'], confidence=0.95)
|
|
237
|
+
var = sq.var(data=data, use_returns=False, assets=['SPY'], confidence=0.95)
|
|
238
|
+
cvar = sq.cvar(data=data, use_returns=False, assets=['SPY'], confidence=0.95)
|
|
243
239
|
|
|
244
240
|
print(f"Latest ERM (z=0.5): {erm1.iloc[-1, 0]:.4f}")
|
|
245
241
|
print(f"Latest ERM (z=1.0): {erm2.iloc[-1, 0]:.4f}")
|
|
@@ -253,8 +249,10 @@ print(f"Latest CVaR (95%): {cvar.iloc[-1, 0]:.4f}")
|
|
|
253
249
|
The package has been reorganized into specialized modules:
|
|
254
250
|
|
|
255
251
|
- `squarequant.data`: Data retrieval functionality (YFinance, Theta Data)
|
|
256
|
-
- `squarequant.var`: Value at Risk and related risk measures
|
|
257
252
|
- `squarequant.core`: Core risk metrics and calculations
|
|
253
|
+
- `squarequant.var`: Value at Risk and related risk measures
|
|
254
|
+
- `squarequant.monte_carlo`: Monte Carlo simulations (alpha version)
|
|
255
|
+
|
|
258
256
|
|
|
259
257
|
## Documentation
|
|
260
258
|
|
|
@@ -6,7 +6,7 @@ SquareQuant is a comprehensive Python package for financial risk metrics and sto
|
|
|
6
6
|
|
|
7
7
|
- **Financial Data Access**: Multiple data sources including YFinance and Theta Data
|
|
8
8
|
- **Extensive Risk Metrics**: Comprehensive set of traditional and advanced risk measures
|
|
9
|
-
- **Modular Design**:
|
|
9
|
+
- **Modular Design**: Organized into specialized modules (data, var, etc.)
|
|
10
10
|
- **Flexible API**: Consistent function-based and object-oriented interfaces
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
@@ -33,12 +33,16 @@ config = sq.DownloadConfig(
|
|
|
33
33
|
|
|
34
34
|
# Download data
|
|
35
35
|
data = sq.download_tickers(['AAPL', 'MSFT', 'GOOGL'], config)
|
|
36
|
+
data = pd.DataFrame({
|
|
37
|
+
'AAPL': data['AAPL_Close'],
|
|
38
|
+
'MSFT': data['MSFT_Close']
|
|
39
|
+
})
|
|
36
40
|
|
|
37
41
|
# Calculate volatility
|
|
38
|
-
vol = sq.vol(data=data, assets=['AAPL', 'MSFT', 'GOOGL'], window=21)
|
|
42
|
+
vol = sq.vol(data=data, assets=['AAPL', 'MSFT', 'GOOGL'], use_returns=False, window=21)
|
|
39
43
|
|
|
40
44
|
# Calculate Sharpe ratio
|
|
41
|
-
sharpe = sq.sharpe(data=data, assets=['AAPL', 'MSFT', 'GOOGL'], window=252)
|
|
45
|
+
sharpe = sq.sharpe(data=data, assets=['AAPL', 'MSFT', 'GOOGL'], use_returns=False, window=252)
|
|
42
46
|
|
|
43
47
|
# Visualize results (using matplotlib directly)
|
|
44
48
|
plt.figure(figsize=(12, 6))
|
|
@@ -67,7 +71,6 @@ SquareQuant provides a comprehensive set of risk metrics, including:
|
|
|
67
71
|
| Entropic Risk Measure | `sq.erm()` | Risk measure based on information theory |
|
|
68
72
|
| Entropic Value at Risk | `sq.evar()` | VAR using entropy concepts |
|
|
69
73
|
| Conditional Drawdown at Risk | `sq.cdar()` | Expected drawdown beyond threshold |
|
|
70
|
-
| Entropic Drawdown at Risk | `sq.edar()` | Drawdown risk using entropy concepts |
|
|
71
74
|
|
|
72
75
|
## Data Sources
|
|
73
76
|
|
|
@@ -103,7 +106,6 @@ config = sq.DownloadConfig(
|
|
|
103
106
|
|
|
104
107
|
```python
|
|
105
108
|
import squarequant as sq
|
|
106
|
-
import pandas as pd
|
|
107
109
|
import matplotlib.pyplot as plt
|
|
108
110
|
|
|
109
111
|
# Download data
|
|
@@ -115,10 +117,10 @@ config = sq.DownloadConfig(
|
|
|
115
117
|
data = sq.download_tickers(['SPY', 'QQQ'], config)
|
|
116
118
|
|
|
117
119
|
# Calculate multiple risk metrics
|
|
118
|
-
vol = sq.vol(data=data, assets=['SPY', 'QQQ'], window=21)
|
|
119
|
-
mad = sq.mad(data=data, assets=['SPY', 'QQQ'], window=252)
|
|
120
|
-
mdd = sq.mdd(data=data, assets=['SPY', 'QQQ'], window=252)
|
|
121
|
-
ulcer = sq.ulcer(data=data, assets=['SPY', 'QQQ'], window=252)
|
|
120
|
+
vol = sq.vol(data=data, assets=['SPY', 'QQQ'], use_returns=False, window=21)
|
|
121
|
+
mad = sq.mad(data=data, assets=['SPY', 'QQQ'], use_returns=False, window=252)
|
|
122
|
+
mdd = sq.mdd(data=data, assets=['SPY', 'QQQ'], use_returns=False, window=252)
|
|
123
|
+
ulcer = sq.ulcer(data=data, assets=['SPY', 'QQQ'], use_returns=False, window=252)
|
|
122
124
|
|
|
123
125
|
# Visualize comparison (using matplotlib directly)
|
|
124
126
|
plt.figure(figsize=(12, 8))
|
|
@@ -154,6 +156,7 @@ data = sq.download_tickers(weights.index.tolist(), config)
|
|
|
154
156
|
# Calculate portfolio risk measures
|
|
155
157
|
portfolio_var = sq.var(
|
|
156
158
|
data=data,
|
|
159
|
+
use_returns = False,
|
|
157
160
|
assets=weights.index.tolist(),
|
|
158
161
|
confidence=0.95,
|
|
159
162
|
window=252,
|
|
@@ -174,13 +177,13 @@ config = sq.DownloadConfig(start_date="2018-01-01", end_date="2023-12-31")
|
|
|
174
177
|
data = sq.download_tickers(['SPY'], config)
|
|
175
178
|
|
|
176
179
|
# Calculate Entropic Risk Measure with different risk aversion parameters
|
|
177
|
-
erm1 = sq.erm(data=data, assets=['SPY'], z=0.5, confidence=0.95)
|
|
178
|
-
erm2 = sq.erm(data=data, assets=['SPY'], z=1.0, confidence=0.95)
|
|
179
|
-
erm3 = sq.erm(data=data, assets=['SPY'], z=2.0, confidence=0.95)
|
|
180
|
+
erm1 = sq.erm(data=data, use_returns=False, assets=['SPY'], z=0.5, confidence=0.95)
|
|
181
|
+
erm2 = sq.erm(data=data, use_returns=False, assets=['SPY'], z=1.0, confidence=0.95)
|
|
182
|
+
erm3 = sq.erm(data=data, use_returns=False, assets=['SPY'], z=2.0, confidence=0.95)
|
|
180
183
|
|
|
181
184
|
# Compare with traditional VaR and CVaR
|
|
182
|
-
var = sq.var(data=data, assets=['SPY'], confidence=0.95)
|
|
183
|
-
cvar = sq.cvar(data=data, assets=['SPY'], confidence=0.95)
|
|
185
|
+
var = sq.var(data=data, use_returns=False, assets=['SPY'], confidence=0.95)
|
|
186
|
+
cvar = sq.cvar(data=data, use_returns=False, assets=['SPY'], confidence=0.95)
|
|
184
187
|
|
|
185
188
|
print(f"Latest ERM (z=0.5): {erm1.iloc[-1, 0]:.4f}")
|
|
186
189
|
print(f"Latest ERM (z=1.0): {erm2.iloc[-1, 0]:.4f}")
|
|
@@ -194,8 +197,10 @@ print(f"Latest CVaR (95%): {cvar.iloc[-1, 0]:.4f}")
|
|
|
194
197
|
The package has been reorganized into specialized modules:
|
|
195
198
|
|
|
196
199
|
- `squarequant.data`: Data retrieval functionality (YFinance, Theta Data)
|
|
197
|
-
- `squarequant.var`: Value at Risk and related risk measures
|
|
198
200
|
- `squarequant.core`: Core risk metrics and calculations
|
|
201
|
+
- `squarequant.var`: Value at Risk and related risk measures
|
|
202
|
+
- `squarequant.monte_carlo`: Monte Carlo simulations (alpha version)
|
|
203
|
+
|
|
199
204
|
|
|
200
205
|
## Documentation
|
|
201
206
|
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0.0", "wheel", "numpy"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "squarequant"
|
|
7
|
+
version = "0.2.3"
|
|
8
|
+
authors = [
|
|
9
|
+
{ name="Gabriel Bosch", email="contact@squarequant.org" },
|
|
10
|
+
]
|
|
11
|
+
description = "A Python package for financial risk metrics and stock data analysis"
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
requires-python = ">=3.7"
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"Programming Language :: Python :: 3.7",
|
|
17
|
+
"Programming Language :: Python :: 3.8",
|
|
18
|
+
"Programming Language :: Python :: 3.9",
|
|
19
|
+
"Programming Language :: Python :: 3.10",
|
|
20
|
+
"Programming Language :: Python :: 3.11",
|
|
21
|
+
"Programming Language :: Python :: 3.12",
|
|
22
|
+
"Programming Language :: Python :: 3.13",
|
|
23
|
+
"License :: OSI Approved :: MIT License",
|
|
24
|
+
"Operating System :: OS Independent",
|
|
25
|
+
"Topic :: Office/Business :: Financial :: Investment",
|
|
26
|
+
"Topic :: Scientific/Engineering :: Information Analysis",
|
|
27
|
+
"Intended Audience :: Financial and Insurance Industry",
|
|
28
|
+
"Intended Audience :: Science/Research",
|
|
29
|
+
"Development Status :: 4 - Beta",
|
|
30
|
+
]
|
|
31
|
+
dependencies = [
|
|
32
|
+
"pandas>=1.0.0",
|
|
33
|
+
"numpy>=1.18.0",
|
|
34
|
+
"yfinance>=0.1.63",
|
|
35
|
+
"scipy>=1.5.0",
|
|
36
|
+
"scikit-learn>=1.5.0",
|
|
37
|
+
"matplotlib>=3.3.0",
|
|
38
|
+
"statsmodels>=0.12.0",
|
|
39
|
+
"requests>=2.25.0",
|
|
40
|
+
]
|
|
41
|
+
|
|
42
|
+
[project.optional-dependencies]
|
|
43
|
+
optimization = ["cvxpy>=1.0.0"]
|
|
44
|
+
dev = [
|
|
45
|
+
"pytest>=6.0.0",
|
|
46
|
+
"black>=21.5b2",
|
|
47
|
+
"flake8>=3.9.0",
|
|
48
|
+
"sphinx>=4.0.0",
|
|
49
|
+
"sphinx-rtd-theme>=0.5.0",
|
|
50
|
+
"sphinx-autodoc-typehints>=1.22.0",
|
|
51
|
+
"myst-parser>=1.0.0",
|
|
52
|
+
"pytest-cov>=2.12.0",
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
[project.urls]
|
|
56
|
+
Documentation = "https://www.squarequant.org"
|
|
57
|
+
"Bug Tracker" = "https://github.com/SquareQuant/squarequant-package/issues"
|
|
58
|
+
Homepage = "https://github.com/SquareQuant/squarequant-package"
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
from setuptools import setup, find_packages
|
|
2
|
+
import numpy
|
|
2
3
|
|
|
3
4
|
with open("README.md", "r", encoding="utf-8") as fh:
|
|
4
5
|
long_description = fh.read()
|
|
5
6
|
|
|
7
|
+
|
|
6
8
|
setup(
|
|
7
9
|
name="squarequant",
|
|
8
|
-
version="0.2.
|
|
10
|
+
version="0.2.3",
|
|
9
11
|
author="Gabriel Bosch",
|
|
10
12
|
author_email="contact@squarequant.org",
|
|
11
13
|
description="A Python package for financial risk metrics and stock data analysis",
|
|
@@ -24,6 +26,8 @@ setup(
|
|
|
24
26
|
"Programming Language :: Python :: 3.9",
|
|
25
27
|
"Programming Language :: Python :: 3.10",
|
|
26
28
|
"Programming Language :: Python :: 3.11",
|
|
29
|
+
"Programming Language :: Python :: 3.12",
|
|
30
|
+
"Programming Language :: Python :: 3.13",
|
|
27
31
|
"License :: OSI Approved :: MIT License",
|
|
28
32
|
"Operating System :: OS Independent",
|
|
29
33
|
"Topic :: Office/Business :: Financial :: Investment",
|
|
@@ -41,7 +45,7 @@ setup(
|
|
|
41
45
|
"scikit-learn>=1.5.0",
|
|
42
46
|
"matplotlib>=3.3.0",
|
|
43
47
|
"statsmodels>=0.12.0",
|
|
44
|
-
"requests>=2.25.0",
|
|
48
|
+
"requests>=2.25.0",
|
|
45
49
|
],
|
|
46
50
|
extras_require={
|
|
47
51
|
"optimization": ["cvxpy>=1.0.0"],
|
|
@@ -56,5 +60,7 @@ setup(
|
|
|
56
60
|
"pytest-cov>=2.12.0",
|
|
57
61
|
],
|
|
58
62
|
},
|
|
59
|
-
|
|
60
|
-
)
|
|
63
|
+
setup_requires=["pandas", "numpy"],
|
|
64
|
+
include_dirs=[numpy.get_include()],
|
|
65
|
+
keywords="finance, risk, portfolio, investment, stocks, analysis, drawdown, var, cvar, entropic, ulcer index, theta data, quant, time series, monte carlo",
|
|
66
|
+
)
|
|
@@ -6,7 +6,7 @@ and data retrieval from multiple sources (YFinance and Theta Data).
|
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
8
|
# Version information
|
|
9
|
-
__version__ = "0.
|
|
9
|
+
__version__ = "0.3.0"
|
|
10
10
|
__author__ = "Gabriel Bosch"
|
|
11
11
|
__email__ = "contact@squarequant.org"
|
|
12
12
|
|
|
@@ -27,7 +27,11 @@ from .api import (
|
|
|
27
27
|
erm,
|
|
28
28
|
evar,
|
|
29
29
|
cdar,
|
|
30
|
-
|
|
30
|
+
simplemc,
|
|
31
|
+
brownian,
|
|
32
|
+
correlated_brownian,
|
|
33
|
+
gbm_paths,
|
|
34
|
+
gbm_correlated_paths,
|
|
31
35
|
)
|
|
32
36
|
|
|
33
37
|
# Define what's available when using "from squarequant import *"
|
|
@@ -48,5 +52,9 @@ __all__ = [
|
|
|
48
52
|
'erm',
|
|
49
53
|
'evar',
|
|
50
54
|
'cdar',
|
|
51
|
-
'
|
|
55
|
+
'simplemc',
|
|
56
|
+
'brownian',
|
|
57
|
+
'correlated_brownian',
|
|
58
|
+
'gbm_paths',
|
|
59
|
+
'gbm_correlated_paths'
|
|
52
60
|
]
|