Add portfolio analysis script and update dependencies

- Created a new Python script for portfolio analysis using historical stock data.
- Implemented functions for normality testing of prices and returns.
- Added histogram plots for prices and returns.
- Included logic for random portfolio allocation and efficient frontier calculation.
- Updated `pyproject.toml` to include `pandas-stubs` for type hinting support.
- Modified `uv.lock` to reflect the addition of `pandas-stubs` and its dependencies.
This commit is contained in:
2025-10-08 11:08:26 +02:00
parent 38d60dfa3e
commit 61c560fda2
4 changed files with 8778 additions and 2 deletions

24
uv.lock generated
View File

@@ -1005,6 +1005,19 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/ab/5f/b38085618b950b79d2d9164a711c52b10aefc0ae6833b96f626b7021b2ed/pandas-2.2.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:ad5b65698ab28ed8d7f18790a0dc58005c7629f227be9ecc1072aa74c0c1d43a", size = 13098436, upload-time = "2024-09-20T13:09:48.112Z" },
]
[[package]]
name = "pandas-stubs"
version = "2.3.2.250926"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "numpy" },
{ name = "types-pytz" },
]
sdist = { url = "https://files.pythonhosted.org/packages/1b/3b/32be58a125db39d0b5f62cc93795f32b5bb2915bd5c4a46f0e35171985e2/pandas_stubs-2.3.2.250926.tar.gz", hash = "sha256:c64b9932760ceefb96a3222b953e6a251321a9832a28548be6506df473a66406", size = 102147, upload-time = "2025-09-26T19:50:39.522Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/40/96/1e4a035eaf4dce9610aac6e43026d0c6baa05773daf6d21e635a4fe19e21/pandas_stubs-2.3.2.250926-py3-none-any.whl", hash = "sha256:81121818453dcfe00f45c852f4dceee043640b813830f6e7bd084a4ef7ff7270", size = 159995, upload-time = "2025-09-26T19:50:38.241Z" },
]
[[package]]
name = "parso"
version = "0.8.4"
@@ -1512,6 +1525,7 @@ dependencies = [
{ name = "numpy" },
{ name = "opencv-python" },
{ name = "pandas" },
{ name = "pandas-stubs" },
{ name = "plotly" },
{ name = "scikit-learn" },
{ name = "scipy" },
@@ -1535,6 +1549,7 @@ requires-dist = [
{ name = "numpy", specifier = ">=2.2.5" },
{ name = "opencv-python", specifier = ">=4.11.0.86" },
{ name = "pandas", specifier = ">=2.2.3" },
{ name = "pandas-stubs", specifier = ">=2.3.2.250926" },
{ name = "plotly", specifier = ">=6.3.0" },
{ name = "scikit-learn", specifier = ">=1.6.1" },
{ name = "scipy", specifier = ">=1.15.2" },
@@ -1662,6 +1677,15 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/00/c0/8f5d070730d7836adc9c9b6408dec68c6ced86b304a9b26a14df072a6e8c/traitlets-5.14.3-py3-none-any.whl", hash = "sha256:b74e89e397b1ed28cc831db7aea759ba6640cb3de13090ca145426688ff1ac4f", size = 85359, upload-time = "2024-04-19T11:11:46.763Z" },
]
[[package]]
name = "types-pytz"
version = "2025.2.0.20250809"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/07/e2/c774f754de26848f53f05defff5bb21dd9375a059d1ba5b5ea943cf8206e/types_pytz-2025.2.0.20250809.tar.gz", hash = "sha256:222e32e6a29bb28871f8834e8785e3801f2dc4441c715cd2082b271eecbe21e5", size = 10876, upload-time = "2025-08-09T03:14:17.453Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/db/d0/91c24fe54e565f2344d7a6821e6c6bb099841ef09007ea6321a0bac0f808/types_pytz-2025.2.0.20250809-py3-none-any.whl", hash = "sha256:4f55ed1b43e925cf851a756fe1707e0f5deeb1976e15bf844bcaa025e8fbd0db", size = 10095, upload-time = "2025-08-09T03:14:16.674Z" },
]
[[package]]
name = "typing-extensions"
version = "4.15.0"