quantmod 0.1.2__tar.gz → 0.1.4__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.
Files changed (80) hide show
  1. quantmod-0.1.4/.github/workflows/ci.yml +27 -0
  2. quantmod-0.1.4/.github/workflows/publish.yml +25 -0
  3. quantmod-0.1.4/.gitignore +64 -0
  4. {quantmod-0.1.2 → quantmod-0.1.4}/PKG-INFO +19 -27
  5. quantmod-0.1.4/pyproject.toml +56 -0
  6. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/__init__.py +7 -9
  7. quantmod-0.1.4/quantmod/db/__init__.py +23 -0
  8. quantmod-0.1.4/quantmod/db/database.py +514 -0
  9. quantmod-0.1.4/quantmod/docs/about.md +3 -0
  10. quantmod-0.1.4/quantmod/docs/changelog.md +109 -0
  11. quantmod-0.1.4/quantmod/docs/charts.md +32 -0
  12. quantmod-0.1.4/quantmod/docs/datasets.md +2 -0
  13. quantmod-0.1.4/quantmod/docs/db.md +2 -0
  14. quantmod-0.1.4/quantmod/docs/derivatives.md +1 -0
  15. quantmod-0.1.4/quantmod/docs/index.md +76 -0
  16. quantmod-0.1.4/quantmod/docs/indicators.md +2 -0
  17. quantmod-0.1.4/quantmod/docs/license.md +3 -0
  18. quantmod-0.1.4/quantmod/docs/markets.md +2 -0
  19. quantmod-0.1.4/quantmod/docs/models.md +2 -0
  20. quantmod-0.1.4/quantmod/docs/risk.md +2 -0
  21. quantmod-0.1.4/quantmod/docs/timeseries.md +2 -0
  22. quantmod-0.1.4/quantmod/docs/user-guide/examples/database.md +96 -0
  23. quantmod-0.1.4/quantmod/docs/user-guide/examples/datasets.md +13 -0
  24. quantmod-0.1.4/quantmod/docs/user-guide/examples/nseoption.md +43 -0
  25. quantmod-0.1.4/quantmod/docs/user-guide/examples/optionpricing.md +234 -0
  26. quantmod-0.1.4/quantmod/docs/user-guide/examples/performance.md +34 -0
  27. quantmod-0.1.4/quantmod/docs/user-guide/examples/risk.md +75 -0
  28. quantmod-0.1.4/quantmod/docs/user-guide/examples/stockprice.md +25 -0
  29. quantmod-0.1.4/quantmod/docs/user-guide/examples/technicals.md +30 -0
  30. quantmod-0.1.4/quantmod/docs/user-guide/examples/timeseries.md +25 -0
  31. quantmod-0.1.4/quantmod/docs/user-guide/examples/visualisation.md +107 -0
  32. quantmod-0.1.4/quantmod/docs/user-guide/installation.md +21 -0
  33. quantmod-0.1.4/quantmod/markets/yahoo.py +96 -0
  34. quantmod-0.1.4/quantmod/mkdocs.yml +144 -0
  35. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/models/__init__.py +29 -6
  36. quantmod-0.1.4/quantmod/models/blackscholes.py +65 -0
  37. quantmod-0.1.4/quantmod/models/gbs.py +723 -0
  38. quantmod-0.1.4/quantmod/models/montecarlo.py +565 -0
  39. quantmod-0.1.4/quantmod/models/optioninputs.py +104 -0
  40. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/risk/varinputs.py +16 -24
  41. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/timeseries/performance.py +44 -51
  42. quantmod-0.1.4/uv.lock +3146 -0
  43. quantmod-0.1.2/quantmod/_version.py +0 -683
  44. quantmod-0.1.2/quantmod/markets/yahoo.py +0 -159
  45. quantmod-0.1.2/quantmod/models/blackscholes.py +0 -393
  46. quantmod-0.1.2/quantmod/models/montecarlo.py +0 -136
  47. quantmod-0.1.2/quantmod/models/optioninputs.py +0 -62
  48. quantmod-0.1.2/quantmod/version.py +0 -1
  49. quantmod-0.1.2/quantmod.egg-info/PKG-INFO +0 -115
  50. quantmod-0.1.2/quantmod.egg-info/SOURCES.txt +0 -42
  51. quantmod-0.1.2/quantmod.egg-info/dependency_links.txt +0 -1
  52. quantmod-0.1.2/quantmod.egg-info/entry_points.txt +0 -2
  53. quantmod-0.1.2/quantmod.egg-info/not-zip-safe +0 -1
  54. quantmod-0.1.2/quantmod.egg-info/requires.txt +0 -12
  55. quantmod-0.1.2/quantmod.egg-info/top_level.txt +0 -1
  56. quantmod-0.1.2/setup.cfg +0 -7
  57. quantmod-0.1.2/setup.py +0 -58
  58. {quantmod-0.1.2 → quantmod-0.1.4}/LICENSE.txt +0 -0
  59. {quantmod-0.1.2 → quantmod-0.1.4}/README.md +0 -0
  60. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/charts/__init__.py +0 -0
  61. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/charts/plotting.py +0 -0
  62. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/charts/themes.py +0 -0
  63. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/datasets/__init__.py +0 -0
  64. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/datasets/data/nifty50.csv +0 -0
  65. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/datasets/data/spx.csv +0 -0
  66. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/datasets/dataloader.py +0 -0
  67. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/derivatives/__init__.py +0 -0
  68. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/derivatives/nse.py +0 -0
  69. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/indicators/__init__.py +0 -0
  70. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/indicators/indicators.py +0 -0
  71. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/main.py +0 -0
  72. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/markets/__init__.py +0 -0
  73. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/markets/bb.py +0 -0
  74. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/models/binomial.py +0 -0
  75. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/risk/__init__.py +0 -0
  76. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/risk/var.py +0 -0
  77. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/risk/varbacktest.py +0 -0
  78. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/timeseries/__init__.py +0 -0
  79. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/timeseries/timeseries.py +0 -0
  80. {quantmod-0.1.2 → quantmod-0.1.4}/quantmod/utils.py +0 -0
@@ -0,0 +1,27 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ name: Run tests
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - name: Set up uv
18
+ uses: astral-sh/setup-uv@v3
19
+
20
+ - name: Install dependencies
21
+ run: uv sync
22
+
23
+ - name: Install pytest
24
+ run: uv pip install pytest
25
+
26
+ - name: Run tests
27
+ run: uv run pytest tests/ -v
@@ -0,0 +1,25 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ publish:
10
+ name: Build and publish
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - name: Set up uv
17
+ uses: astral-sh/setup-uv@v3
18
+
19
+ - name: Build package
20
+ run: uv build
21
+
22
+ - name: Publish to PyPI
23
+ run: uv publish
24
+ env:
25
+ UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
@@ -0,0 +1,64 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.pyo
5
+ *.pyd
6
+ *.so
7
+
8
+ # Distribution / packaging
9
+ dist/
10
+ build/
11
+ *.egg-info/
12
+ *.egg
13
+ MANIFEST
14
+
15
+ # Virtual environments
16
+ .venv/
17
+ venv/
18
+ env/
19
+
20
+ # uv
21
+ .python-version
22
+
23
+ # MkDocs build output
24
+ site/
25
+ quantmod/site/
26
+
27
+ # Environment variables / secrets
28
+ .env
29
+ .env.*
30
+ *.env
31
+
32
+ # macOS
33
+ .DS_Store
34
+ .AppleDouble
35
+ .LSOverride
36
+
37
+ # Claude Code
38
+ .claude/
39
+
40
+ # Editors
41
+ .vscode/
42
+ .idea/
43
+ *.swp
44
+ *.swo
45
+ *~
46
+
47
+ # Jupyter
48
+ .ipynb_checkpoints/
49
+ *.ipynb
50
+
51
+ # Local scratch / examples
52
+ myexamples.py
53
+
54
+ # Testing / coverage
55
+ .pytest_cache/
56
+ .coverage
57
+ htmlcov/
58
+ .tox/
59
+
60
+ # Ruff / linting caches
61
+ .ruff_cache/
62
+
63
+ # Datasets submodule data (large CSVs tracked separately)
64
+ # quantmod/datasets/data/
@@ -1,24 +1,26 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: quantmod
3
- Version: 0.1.2
4
- Summary: Quantmod Python Package
5
- Home-page: https://kannansingaravelu.com/
6
- Author: Kannan Singaravelu
7
- Author-email: inquant@outlook.com
8
- License: Apache License 2.0
9
- Keywords: python,quant,quantmod,quantmod-python
10
- Platform: any
3
+ Version: 0.1.4
4
+ Summary: Quantitative finance toolkit for Python — markets, options, risk, and time series
5
+ Project-URL: Homepage, https://kannansingaravelu.com/quantmod/
6
+ Project-URL: Repository, https://github.com/kannansingaravelu/quantmod
7
+ Project-URL: Documentation, https://kannansingaravelu.com/quantmod/
8
+ Author-email: Kannan Singaravelu <inquant@outlook.com>
9
+ License: Apache-2.0
10
+ License-File: LICENSE.txt
11
+ Keywords: finance,options,quant,quantmod,risk,timeseries
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Financial and Insurance Industry
11
14
  Classifier: License :: OSI Approved :: Apache Software License
12
- Classifier: Programming Language :: Python :: 3.10
13
15
  Classifier: Operating System :: OS Independent
14
- Classifier: Intended Audience :: Developers
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
15
20
  Classifier: Topic :: Office/Business :: Financial
16
21
  Classifier: Topic :: Office/Business :: Financial :: Investment
17
- Classifier: Topic :: Software Development :: Libraries
18
22
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
23
  Requires-Python: >=3.10
20
- Description-Content-Type: text/markdown
21
- License-File: LICENSE.txt
22
24
  Requires-Dist: joblib
23
25
  Requires-Dist: matplotlib
24
26
  Requires-Dist: nbformat>=5.10.4
@@ -28,21 +30,11 @@ Requires-Dist: plotly>=6.1.2
28
30
  Requires-Dist: pydantic>=2.8.2
29
31
  Requires-Dist: scipy>=1.13.1
30
32
  Requires-Dist: sqlalchemy>=2.0.38
33
+ Requires-Dist: supabase>=2.27.2
31
34
  Requires-Dist: tabulate>=0.9.0
32
35
  Requires-Dist: urllib3==1.26.15
33
- Requires-Dist: yfinance==0.2.58
34
- Dynamic: author
35
- Dynamic: author-email
36
- Dynamic: classifier
37
- Dynamic: description
38
- Dynamic: description-content-type
39
- Dynamic: home-page
40
- Dynamic: keywords
41
- Dynamic: license
42
- Dynamic: platform
43
- Dynamic: requires-dist
44
- Dynamic: requires-python
45
- Dynamic: summary
36
+ Requires-Dist: yfinance>=1.0
37
+ Description-Content-Type: text/markdown
46
38
 
47
39
 
48
40
  The quantmod package is inspired by the popular R package of the same name but reimagined for the modern Python data stack. It’s designed to support data scientists, analysts, and AI researchers with tools for fast, flexible data exploration and visualization. Whether you're working with time series, building machine learning pipelines, or prototyping data-driven ideas, quantmod offers a clean, intuitive interface that helps you move quickly from data to insight.
@@ -0,0 +1,56 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "quantmod"
7
+ version = "0.1.4"
8
+ description = "Quantitative finance toolkit for Python — markets, options, risk, and time series"
9
+ readme = "README.md"
10
+ license = { text = "Apache-2.0" }
11
+ authors = [{ name = "Kannan Singaravelu", email = "inquant@outlook.com" }]
12
+ requires-python = ">=3.10"
13
+ keywords = ["quant", "quantmod", "finance", "options", "risk", "timeseries"]
14
+ classifiers = [
15
+ "License :: OSI Approved :: Apache Software License",
16
+ "Programming Language :: Python :: 3.10",
17
+ "Programming Language :: Python :: 3.11",
18
+ "Programming Language :: Python :: 3.12",
19
+ "Programming Language :: Python :: 3.13",
20
+ "Operating System :: OS Independent",
21
+ "Intended Audience :: Developers",
22
+ "Intended Audience :: Financial and Insurance Industry",
23
+ "Topic :: Office/Business :: Financial",
24
+ "Topic :: Office/Business :: Financial :: Investment",
25
+ "Topic :: Software Development :: Libraries :: Python Modules",
26
+ ]
27
+ dependencies = [
28
+ "joblib",
29
+ "matplotlib",
30
+ "nbformat>=5.10.4",
31
+ "numpy>=2.0.2",
32
+ "pandas>=2.2.2",
33
+ "plotly>=6.1.2",
34
+ "pydantic>=2.8.2",
35
+ "scipy>=1.13.1",
36
+ "sqlalchemy>=2.0.38",
37
+ "supabase>=2.27.2",
38
+ "tabulate>=0.9.0",
39
+ "urllib3==1.26.15",
40
+ "yfinance>=1.0",
41
+ ]
42
+
43
+ [project.urls]
44
+ Homepage = "https://kannansingaravelu.com/quantmod/"
45
+ Repository = "https://github.com/kannansingaravelu/quantmod"
46
+ Documentation = "https://kannansingaravelu.com/quantmod/"
47
+
48
+ [project.scripts]
49
+ inquant = "quantmod:hello"
50
+
51
+ [tool.hatch.build.targets.wheel]
52
+ packages = ["quantmod"]
53
+
54
+
55
+ [tool.hatch.build.targets.sdist]
56
+ exclude = ["tests/", ".venv/", "site/", "quantmod/site/", ".ruff_cache/"]
@@ -15,16 +15,17 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
 
18
- # updated by Kannan Singaravelu on 2024-08-26
19
-
20
- # from . import _version
21
- # __version__ = _version.get_versions()['version']
22
-
23
- from . import version
18
+ from importlib.metadata import PackageNotFoundError, version
24
19
  from .main import hello
25
20
 
26
21
  from quantmod import derivatives, indicators, markets, models, timeseries, datasets
27
22
 
23
+ try:
24
+ __version__ = version("quantmod")
25
+ except PackageNotFoundError:
26
+ __version__ = "unknown"
27
+
28
+ __author__ = "Kannan Singaravelu"
28
29
 
29
30
  __all__ = [
30
31
  "hello",
@@ -36,6 +37,3 @@ __all__ = [
36
37
  "timeseries",
37
38
  "datasets",
38
39
  ]
39
-
40
- __version__ = version.version
41
- __author__ = "Kannan Singaravelu"
@@ -0,0 +1,23 @@
1
+ # Quantmod Python Package
2
+ # https://kannansingaravelu.com/
3
+
4
+ # Copyright 2024 Kannan Singaravelu
5
+
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ from .database import QuantmodDB
20
+
21
+ __all__ = [
22
+ "QuantmodDB",
23
+ ]