Skip to content

Welcome!

quantmod is inspired by the popular R package of the same name, reimagined for the modern Python data stack.

It provides a lightweight, structured toolkit for financial time-series ingestion, storage, and analysis, designed for data scientists, analysts, and AI practitioners.

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.

PyPI Downloads

User installation

The easiest way to install quantmod is using pip:

pip install quantmod 

Modules

Quickstart

# Retrieves market data & ticker object  from quantmod.markets import getData, getTicker  # Database module from quantmod.db import QuantmodDB  # Charting module import quantmod.charts  # Option price from quantmod.models import OptionInputs, BlackScholesOptionPricing, MonteCarloOptionPricing  # Calculates price return of different time period. from quantmod.timeseries import *  # Technical indicators from quantmod.indicators import ATR  # Derivatives functions from quantmod.derivatives import maxpain  # Datasets functions from quantmod.datasets import fetch_historical_data 

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.

Examples

Refer to the examples section for more details.

Changelog

The list of changes to quantmod between each release can be found here

Community

Join the quantmod server to share feature requests, report bugs, and discuss the package.

quatmod is distributed under the Apache Software License. See the LICENSE.txt file in the release for details.

The package is developed and maintained by Kannan Singaravelu.