quantmod 0.1.3__tar.gz → 0.1.5__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 (82) hide show
  1. quantmod-0.1.5/.github/workflows/ci.yml +27 -0
  2. quantmod-0.1.5/.github/workflows/publish.yml +25 -0
  3. quantmod-0.1.5/.gitignore +66 -0
  4. quantmod-0.1.5/PKG-INFO +124 -0
  5. quantmod-0.1.5/README.md +86 -0
  6. quantmod-0.1.5/pyproject.toml +56 -0
  7. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/__init__.py +7 -9
  8. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/db/database.py +1 -1
  9. quantmod-0.1.5/quantmod/docs/about.md +3 -0
  10. quantmod-0.1.5/quantmod/docs/changelog.md +119 -0
  11. quantmod-0.1.5/quantmod/docs/charts.md +32 -0
  12. quantmod-0.1.5/quantmod/docs/datasets.md +2 -0
  13. quantmod-0.1.5/quantmod/docs/db.md +2 -0
  14. quantmod-0.1.5/quantmod/docs/derivatives.md +1 -0
  15. quantmod-0.1.5/quantmod/docs/index.md +73 -0
  16. quantmod-0.1.5/quantmod/docs/indicators.md +2 -0
  17. quantmod-0.1.5/quantmod/docs/license.md +3 -0
  18. quantmod-0.1.5/quantmod/docs/markets.md +2 -0
  19. quantmod-0.1.5/quantmod/docs/models.md +2 -0
  20. quantmod-0.1.5/quantmod/docs/risk.md +2 -0
  21. quantmod-0.1.5/quantmod/docs/timeseries.md +2 -0
  22. quantmod-0.1.5/quantmod/docs/user-guide/examples/database.md +96 -0
  23. quantmod-0.1.5/quantmod/docs/user-guide/examples/datasets.md +13 -0
  24. quantmod-0.1.5/quantmod/docs/user-guide/examples/nseoption.md +43 -0
  25. quantmod-0.1.5/quantmod/docs/user-guide/examples/optionpricing.md +252 -0
  26. quantmod-0.1.5/quantmod/docs/user-guide/examples/performance.md +34 -0
  27. quantmod-0.1.5/quantmod/docs/user-guide/examples/risk.md +75 -0
  28. quantmod-0.1.5/quantmod/docs/user-guide/examples/stockprice.md +25 -0
  29. quantmod-0.1.5/quantmod/docs/user-guide/examples/technicals.md +30 -0
  30. quantmod-0.1.5/quantmod/docs/user-guide/examples/timeseries.md +25 -0
  31. quantmod-0.1.5/quantmod/docs/user-guide/examples/visualisation.md +107 -0
  32. quantmod-0.1.5/quantmod/docs/user-guide/installation.md +14 -0
  33. quantmod-0.1.5/quantmod/markets/yahoo.py +96 -0
  34. quantmod-0.1.5/quantmod/mkdocs.yml +149 -0
  35. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/models/__init__.py +29 -6
  36. quantmod-0.1.5/quantmod/models/blackscholes.py +65 -0
  37. quantmod-0.1.5/quantmod/models/gbs.py +723 -0
  38. quantmod-0.1.5/quantmod/models/montecarlo.py +573 -0
  39. quantmod-0.1.5/quantmod/models/optioninputs.py +104 -0
  40. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/risk/varinputs.py +16 -24
  41. quantmod-0.1.5/uv.lock +3146 -0
  42. quantmod-0.1.3/PKG-INFO +0 -116
  43. quantmod-0.1.3/README.md +0 -69
  44. quantmod-0.1.3/quantmod/_version.py +0 -683
  45. quantmod-0.1.3/quantmod/markets/yahoo.py +0 -164
  46. quantmod-0.1.3/quantmod/models/blackscholes.py +0 -393
  47. quantmod-0.1.3/quantmod/models/montecarlo.py +0 -136
  48. quantmod-0.1.3/quantmod/models/optioninputs.py +0 -105
  49. quantmod-0.1.3/quantmod/version.py +0 -1
  50. quantmod-0.1.3/quantmod.egg-info/PKG-INFO +0 -116
  51. quantmod-0.1.3/quantmod.egg-info/SOURCES.txt +0 -44
  52. quantmod-0.1.3/quantmod.egg-info/dependency_links.txt +0 -1
  53. quantmod-0.1.3/quantmod.egg-info/entry_points.txt +0 -2
  54. quantmod-0.1.3/quantmod.egg-info/not-zip-safe +0 -1
  55. quantmod-0.1.3/quantmod.egg-info/requires.txt +0 -13
  56. quantmod-0.1.3/quantmod.egg-info/top_level.txt +0 -1
  57. quantmod-0.1.3/setup.cfg +0 -7
  58. quantmod-0.1.3/setup.py +0 -58
  59. {quantmod-0.1.3 → quantmod-0.1.5}/LICENSE.txt +0 -0
  60. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/charts/__init__.py +0 -0
  61. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/charts/plotting.py +0 -0
  62. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/charts/themes.py +0 -0
  63. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/datasets/__init__.py +0 -0
  64. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/datasets/data/nifty50.csv +0 -0
  65. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/datasets/data/spx.csv +0 -0
  66. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/datasets/dataloader.py +0 -0
  67. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/db/__init__.py +0 -0
  68. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/derivatives/__init__.py +0 -0
  69. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/derivatives/nse.py +0 -0
  70. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/indicators/__init__.py +0 -0
  71. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/indicators/indicators.py +0 -0
  72. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/main.py +0 -0
  73. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/markets/__init__.py +0 -0
  74. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/markets/bb.py +0 -0
  75. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/models/binomial.py +0 -0
  76. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/risk/__init__.py +0 -0
  77. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/risk/var.py +0 -0
  78. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/risk/varbacktest.py +0 -0
  79. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/timeseries/__init__.py +0 -0
  80. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/timeseries/performance.py +0 -0
  81. {quantmod-0.1.3 → quantmod-0.1.5}/quantmod/timeseries/timeseries.py +0 -0
  82. {quantmod-0.1.3 → quantmod-0.1.5}/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,66 @@
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
+ SOP-publish-and-deploy.md
54
+ SOP-publish-and-deploy.pdf
55
+
56
+ # Testing / coverage
57
+ .pytest_cache/
58
+ .coverage
59
+ htmlcov/
60
+ .tox/
61
+
62
+ # Ruff / linting caches
63
+ .ruff_cache/
64
+
65
+ # Datasets submodule data (large CSVs tracked separately)
66
+ # quantmod/datasets/data/
@@ -0,0 +1,124 @@
1
+ Metadata-Version: 2.4
2
+ Name: quantmod
3
+ Version: 0.1.5
4
+ Summary: Quantitative finance toolkit for Python — markets, options, risk, and time series
5
+ Project-URL: Homepage, https://docs.kannansingaravelu.com
6
+ Project-URL: Repository, https://github.com/kannansingaravelu/quantmod
7
+ Project-URL: Documentation, https://docs.kannansingaravelu.com
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
14
+ Classifier: License :: OSI Approved :: Apache Software License
15
+ Classifier: Operating System :: OS Independent
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
20
+ Classifier: Topic :: Office/Business :: Financial
21
+ Classifier: Topic :: Office/Business :: Financial :: Investment
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Requires-Python: >=3.10
24
+ Requires-Dist: joblib
25
+ Requires-Dist: matplotlib
26
+ Requires-Dist: nbformat>=5.10.4
27
+ Requires-Dist: numpy>=2.0.2
28
+ Requires-Dist: pandas>=2.2.2
29
+ Requires-Dist: plotly>=6.1.2
30
+ Requires-Dist: pydantic>=2.8.2
31
+ Requires-Dist: scipy>=1.13.1
32
+ Requires-Dist: sqlalchemy>=2.0.38
33
+ Requires-Dist: supabase>=2.27.2
34
+ Requires-Dist: tabulate>=0.9.0
35
+ Requires-Dist: urllib3==1.26.15
36
+ Requires-Dist: yfinance>=1.0
37
+ Description-Content-Type: text/markdown
38
+
39
+ quantmod is a Python library for market data access, quantitative analysis, and financial modeling. It provides a unified framework to move seamlessly from data ingestion to derivatives analytics, pricing, risk analysis, and visualization.
40
+
41
+ ## Installation
42
+
43
+ Install quantmod using pip:
44
+
45
+ ```bash
46
+ pip install quantmod
47
+ ```
48
+
49
+ Or, using uv:
50
+
51
+ ```bash
52
+ uv add quantmod
53
+ ```
54
+
55
+ ## Modules
56
+
57
+ ### Data & Markets
58
+
59
+ - [datasets](https://docs.kannansingaravelu.com/datasets/)
60
+ - [database](https://docs.kannansingaravelu.com/db/)
61
+ - [markets](https://docs.kannansingaravelu.com/markets/)
62
+ - [derivatives](https://docs.kannansingaravelu.com/derivatives/)
63
+
64
+ ### Quant & Analytics
65
+
66
+ - [charts](https://docs.kannansingaravelu.com/charts/)
67
+ - [models](https://docs.kannansingaravelu.com/models/)
68
+ - [risk](https://docs.kannansingaravelu.com/risk/)
69
+ - [indicators](https://docs.kannansingaravelu.com/indicators/)
70
+ - [timeseries](https://docs.kannansingaravelu.com/timeseries/)
71
+
72
+ ## Quickstart
73
+
74
+ ```py
75
+ # Market data
76
+ from quantmod.markets import getData, getTicker
77
+
78
+ # Visualization
79
+ import quantmod.charts
80
+
81
+ # Option pricing models
82
+ from quantmod.models import (
83
+ OptionInputs,
84
+ Black76,
85
+ BlackScholes,
86
+ MonteCarloOptionPricing
87
+ )
88
+
89
+ # Risk measures
90
+ from quantmod.risk import (
91
+ RiskInputs,
92
+ ValueAtRisk,
93
+ ConditionalVaR,
94
+ VarBacktester
95
+ )
96
+
97
+ # Time series utilities
98
+ from quantmod.timeseries import *
99
+
100
+ # Technical indicators
101
+ from quantmod.indicators import ATR
102
+
103
+ # Derivatives (option chain analytics)
104
+ from quantmod.derivatives import maxpain
105
+
106
+ # Datasets
107
+ from quantmod.datasets import fetch_historical_data
108
+ ```
109
+
110
+ <br>
111
+ Note: quantmod is currently under active development, and anticipate ongoing enhancements and additions. The aim is to continually improve the package and expand its capabilities to meet the evolving needs of the community.
112
+
113
+ ## Examples
114
+
115
+ Refer to the [examples](https://docs.kannansingaravelu.com/examples/) section for detailed use cases and workflows.
116
+
117
+ ## Changelog
118
+
119
+ See the full list of changes [here](https://docs.kannansingaravelu.com/changelog/)
120
+
121
+ ## Legal
122
+
123
+ `quantmod` is distributed under the **Apache Software License**.
124
+ See the [LICENSE](https://www.apache.org/licenses/LICENSE-2.0.txt) for details.
@@ -0,0 +1,86 @@
1
+ quantmod is a Python library for market data access, quantitative analysis, and financial modeling. It provides a unified framework to move seamlessly from data ingestion to derivatives analytics, pricing, risk analysis, and visualization.
2
+
3
+ ## Installation
4
+
5
+ Install quantmod using pip:
6
+
7
+ ```bash
8
+ pip install quantmod
9
+ ```
10
+
11
+ Or, using uv:
12
+
13
+ ```bash
14
+ uv add quantmod
15
+ ```
16
+
17
+ ## Modules
18
+
19
+ ### Data & Markets
20
+
21
+ - [datasets](https://docs.kannansingaravelu.com/datasets/)
22
+ - [database](https://docs.kannansingaravelu.com/db/)
23
+ - [markets](https://docs.kannansingaravelu.com/markets/)
24
+ - [derivatives](https://docs.kannansingaravelu.com/derivatives/)
25
+
26
+ ### Quant & Analytics
27
+
28
+ - [charts](https://docs.kannansingaravelu.com/charts/)
29
+ - [models](https://docs.kannansingaravelu.com/models/)
30
+ - [risk](https://docs.kannansingaravelu.com/risk/)
31
+ - [indicators](https://docs.kannansingaravelu.com/indicators/)
32
+ - [timeseries](https://docs.kannansingaravelu.com/timeseries/)
33
+
34
+ ## Quickstart
35
+
36
+ ```py
37
+ # Market data
38
+ from quantmod.markets import getData, getTicker
39
+
40
+ # Visualization
41
+ import quantmod.charts
42
+
43
+ # Option pricing models
44
+ from quantmod.models import (
45
+ OptionInputs,
46
+ Black76,
47
+ BlackScholes,
48
+ MonteCarloOptionPricing
49
+ )
50
+
51
+ # Risk measures
52
+ from quantmod.risk import (
53
+ RiskInputs,
54
+ ValueAtRisk,
55
+ ConditionalVaR,
56
+ VarBacktester
57
+ )
58
+
59
+ # Time series utilities
60
+ from quantmod.timeseries import *
61
+
62
+ # Technical indicators
63
+ from quantmod.indicators import ATR
64
+
65
+ # Derivatives (option chain analytics)
66
+ from quantmod.derivatives import maxpain
67
+
68
+ # Datasets
69
+ from quantmod.datasets import fetch_historical_data
70
+ ```
71
+
72
+ <br>
73
+ Note: quantmod is currently under active development, and anticipate ongoing enhancements and additions. The aim is to continually improve the package and expand its capabilities to meet the evolving needs of the community.
74
+
75
+ ## Examples
76
+
77
+ Refer to the [examples](https://docs.kannansingaravelu.com/examples/) section for detailed use cases and workflows.
78
+
79
+ ## Changelog
80
+
81
+ See the full list of changes [here](https://docs.kannansingaravelu.com/changelog/)
82
+
83
+ ## Legal
84
+
85
+ `quantmod` is distributed under the **Apache Software License**.
86
+ See the [LICENSE](https://www.apache.org/licenses/LICENSE-2.0.txt) for details.
@@ -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.5"
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://docs.kannansingaravelu.com"
45
+ Repository = "https://github.com/kannansingaravelu/quantmod"
46
+ Documentation = "https://docs.kannansingaravelu.com"
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"
@@ -36,7 +36,7 @@ class QuantmodDB:
36
36
  raise ValueError("Supabase URL or Key missing")
37
37
 
38
38
  self.supabase: Client = create_client(supabase_url, supabase_key)
39
- self._instrument_cache: Dict[str, int] = {}
39
+ self._instrument_cache: Dict[str, int] = {}
40
40
 
41
41
  # ------------------------------------------------------------------
42
42
  # Instrument Registration
@@ -0,0 +1,3 @@
1
+ # About
2
+
3
+ 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,119 @@
1
+ # Change Log
2
+
3
+ ## 0.1.5
4
+
5
+ - fixed Monte Carlo drift to honour cost of carry (`drift = r − q`)
6
+ - `MonteCarloOptionPricing` now applies `dividend_yield` (continuous yield or FX rate differential); previously hard-coded `drift = r`, which over-priced options on dividend-paying underlyings
7
+ - `dividend_yield` defaults to `0`, preserving prior behaviour for non-dividend cases
8
+ - refreshed README and documentation
9
+ - reorganized modules into "Data & Markets" and "Quant & Analytics" sections
10
+ - updated quickstart imports (`Black76`, `BlackScholes`) and added `uv` install instructions
11
+ - regrouped navigation and updated docs site URL
12
+
13
+ ## 0.1.4
14
+
15
+ - replaced `BlackScholesOptionPricing` with Generalized Black-Scholes (GBS) framework
16
+ - added `BlackScholes`, `Merton`, `Black76`, `GarmanKohlhagen` models
17
+ - added `price_option()` convenience factory
18
+ - added `OptionGreeks` dataclass with all prices and first-order Greeks
19
+ - `BlackScholesOptionPricing` retained as a deprecated backward-compatible shim
20
+ - upgraded Monte Carlo engine (`MonteCarloOptionPricing`)
21
+ - added Sobol quasi-random sampler (`sampler='sobol'`) for faster convergence
22
+ - added antithetic variates variance reduction for pseudo-random mode
23
+ - added all four barrier types: up-and-out, up-and-in, down-and-out, down-and-in
24
+ - added American option pricing via Longstaff-Schwartz regression
25
+ - added `MonteCarloResult` dataclass (price, std error, 95% CI, metadata)
26
+ - parameters renamed: `nsims` → `n_simulations`, `timestep` → `n_steps`
27
+
28
+ 0.1.3
29
+
30
+ ---
31
+
32
+ - added db module
33
+ - updated timeseries module for pandas 2.x
34
+
35
+ 0.1.2
36
+
37
+ ---
38
+
39
+ - updated derivatives module
40
+
41
+ 0.1.1
42
+
43
+ ---
44
+
45
+ - updated derivatives module
46
+ - updated chart module
47
+
48
+ 0.1.0
49
+
50
+ ---
51
+
52
+ - updated risk module
53
+ - updated derivatives module
54
+
55
+ 0.0.9
56
+
57
+ ---
58
+
59
+ - updated pie plots
60
+ - added surface plots
61
+
62
+ 0.0.8
63
+
64
+ ---
65
+
66
+ - updated README
67
+
68
+ 0.0.7
69
+
70
+ ---
71
+
72
+ - added interactive charting module
73
+ - added indicator examples
74
+ - bug fixes
75
+
76
+ 0.0.6
77
+
78
+ ---
79
+
80
+ - updated Monte Carlo methods
81
+ - updated NSE option data module
82
+
83
+ 0.0.5
84
+
85
+ ---
86
+
87
+ - added option chain analysis for India
88
+ - added binomial option pricing model
89
+ - updated VaR calculation and backtester
90
+ - bug fixes
91
+
92
+ 0.0.4
93
+
94
+ ---
95
+
96
+ - updated multi level index for data download
97
+ - updated column positioning for data download
98
+
99
+ 0.0.3
100
+
101
+ ---
102
+
103
+ - package data included
104
+ - bug fixes
105
+
106
+ 0.0.2
107
+
108
+ ---
109
+
110
+ - added technical indicators
111
+ - bug fixes and refactoring
112
+
113
+ 0.0.1
114
+
115
+ ---
116
+
117
+ - migration from quantmod-python to quantmod
118
+ - added historical data loader
119
+ - support for SPX & NIFTY in dataloader
@@ -0,0 +1,32 @@
1
+ # Charting with quantmod
2
+
3
+ The charting module is a lightweight wrapper that combines the power of Plotly with the flexibility of Pandas, making it easy to create clean, interactive plots with minimal code.
4
+
5
+ ## Usage
6
+
7
+ ```python
8
+ import pandas as pd
9
+ from quantmod import charts
10
+
11
+ df = pd.DataFrame({...})
12
+ df.iplot(kind="line")
13
+ ```
14
+
15
+ ## Available Chart Types
16
+
17
+ - line
18
+ - scatter
19
+ - ohlc
20
+ - candlestick
21
+ - subplots
22
+ - histogram
23
+ - bar
24
+ - heatmap
25
+ - box
26
+ - pie
27
+ - treemap
28
+ - overlay
29
+ - normalized
30
+ - surface
31
+
32
+ > **Note:** Importing `quantmod.charts` automatically adds `iplot()` to all pandas DataFrames and Series.
@@ -0,0 +1,2 @@
1
+
2
+ ::: datasets
@@ -0,0 +1,2 @@
1
+
2
+ ::: db
@@ -0,0 +1 @@
1
+ ::: derivatives
@@ -0,0 +1,73 @@
1
+ # Welcome!
2
+
3
+ quantmod is inspired by the popular R package of the same name, reimagined for the modern Python data stack.
4
+
5
+ It provides a lightweight, structured toolkit for financial time-series ingestion, storage, and analysis, designed for data scientists, analysts, and AI practitioners.
6
+
7
+ quantmod emphasizes ease of use, reproducibility, and rapid experimentation, making it well-suited for exploratory research, machine-learning pipelines, and data-driven prototyping. Its clean, Pythonic interface helps users move quickly from raw market data to structured analysis and insight.
8
+
9
+
10
+ [![PyPI Downloads](https://static.pepy.tech/badge/quantmod)](https://pepy.tech/projects/quantmod)
11
+
12
+ ## User installation
13
+ The easiest way to install quantmod is using pip:
14
+
15
+ ```bash
16
+ pip install quantmod
17
+ ```
18
+
19
+ ## Modules
20
+
21
+ * [charts](charts.md)
22
+ * [database](db.md)
23
+ * [datasets](datasets.md)
24
+ * [derivatives](derivatives.md)
25
+ * [indicators](indicators.md)
26
+ * [markets](markets.md)
27
+ * [models](models.md)
28
+ * [risk](risk.md)
29
+ * [timeseries](timeseries.md)
30
+
31
+ ## Quickstart
32
+
33
+ ```py
34
+ # Retrieves market data & ticker object
35
+ from quantmod.markets import getData, getTicker
36
+
37
+ # Database module
38
+ from quantmod.db import QuantmodDB
39
+
40
+ # Charting module
41
+ import quantmod.charts
42
+
43
+ # Option pricing — GBS models (Black-Scholes, Merton, Black-76, Garman-Kohlhagen)
44
+ from quantmod.models import OptionInputs, BlackScholes, price_option
45
+
46
+ # Monte Carlo pricing (European, Asian, Barrier, American)
47
+ from quantmod.models import MonteCarloOptionPricing, OptionType, ExerciseStyle, BarrierType
48
+
49
+ # Calculates price return of different time periods
50
+ from quantmod.timeseries import *
51
+
52
+ # Technical indicators
53
+ from quantmod.indicators import ATR
54
+
55
+ # Derivatives functions
56
+ from quantmod.derivatives import maxpain
57
+
58
+ # Datasets functions
59
+ from quantmod.datasets import fetch_historical_data
60
+ ```
61
+ <br>
62
+ Note: quantmod is currently under active development, and anticipate ongoing enhancements and additions. The aim is to continually improve the package and expand its capabilities to meet the evolving needs of the community.
63
+
64
+ ## Examples
65
+ Refer to the [examples](user-guide/examples/optionpricing.md) section for more details.
66
+
67
+ ## Changelog
68
+ The list of changes to quantmod between each release can be found [here](changelog.md)
69
+
70
+ ## Legal
71
+ `quatmod` is distributed under the **Apache Software License**. See the [LICENSE.txt](https://www.apache.org/licenses/LICENSE-2.0.txt) file in the release for details.
72
+
73
+ The package is developed and maintained by [Kannan Singaravelu](https://kannansingaravelu.com).
@@ -0,0 +1,2 @@
1
+
2
+ ::: indicators
@@ -0,0 +1,3 @@
1
+ # Legal
2
+
3
+ `quatmod-python` is distributed under the **Apache Software License**. See the [LICENSE.txt](https://www.apache.org/licenses/LICENSE-2.0.txt) file in the release for details.
@@ -0,0 +1,2 @@
1
+
2
+ ::: markets
@@ -0,0 +1,2 @@
1
+
2
+ ::: models
@@ -0,0 +1,2 @@
1
+
2
+ ::: risk
@@ -0,0 +1,2 @@
1
+
2
+ ::: timeseries