quantmod: market data, charts and indicators in one R workflow
Quantitative Financial Modelling Framework
At a glance
- What is it?
- The quantmod R package wraps data import, charting and indicator overlay into a small set of calls, sits on top of TTR and xts, and is distributed under GPL-3.0.
- Who is it for?
- quantmod suits R users who want a working chart and indicator overlay in a few lines and who already rely on TTR and xts, and it is a poor fit for a team that cannot accept GPL-3.0 in its dependency chain or that needs data sourcing outside the providers the package ships with.
- Can I use it commercially?
- Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
- Is it still maintained?
- Yes. The repository last received commits 112 days ago.
- What is it written in?
- Mainly R, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.
Editorial analysis
The repetitive part of a quant workflow is data handling
quantmod is an R package for quantitative financial modelling and trading, and its pitch is about workflow rather than about a new algorithm. The project page describes it as a rapid prototyping environment that removes the repetitive workflow issues around data management and visualisation. That framing tells you who it is for: an analyst or quant in R who wants to move from a symbol name to a plotted price series without hand-assembling the object model that time series work in R normally requires. The package is authored by Jeffrey Ryan and Joshua Ulrich, and it is built on companion packages rather than standing alone, TTR for technical trading rules and xts, which is itself an extensible time series layer on zoo. So the value proposition is a thin, well-trodden path through those pieces, not a new modelling approach. If your team already writes R against xts directly, quantmod is a convenience layer on top of your own stack rather than a foundation.
getSymbols() is the single entry point for market data
One function covers the import step, and the project page shows it taking a symbol and a source. The first example pulls an equity from Yahoo Finance, the second pulls a foreign exchange series from FRED:
> getSymbols("AAPL", src = "yahoo") # from yahoo finance
[1] "AAPL"
> getSymbols("DEXJPUS", src = "FRED") # FX rates from FRED
[1] "DEXJPUS"The return value is the symbol name, and the imported object is then available under that name in the session, which is what the second example in the project page relies on. Note the two sources in the same pair: an equity ticker and a FRED series identifier. That tells you the interface is not limited to exchange traded equities, and that source selection is a parameter of the call rather than a separate loader function. What the documentation does not state is what happens when a source is unreachable, whether calls are rate limited, whether adjusted prices are requested by default, or how history depth is chosen. Any of those behaviours would matter for a production data pipeline, so they need checking against the source you plan to use rather than being assumed.
chartSeries() takes the plotting work off the analyst's desk
Once data is in the session, visualisation is the next documented step, and the layering of indicators happens on top of the chart object rather than on the raw data. The example sequence is three calls:
> getSymbols("AAPL")
[1] "AAPL"
> chartSeries(AAPL)
> addMACD()
> addBBands()The two add-on calls come from TTR, and the project page points at TTR explicitly for technical trading rules. The pattern matters more than the individual indicators: the chart object carries the series and the indicator calls modify the current plot, so a technical study is two words rather than a manual merge of two data frames. Bollinger bands and MACD are examples, and the wider indicator set lives in TTR, which is separately installable. What the example does not show is anything about a non-interactive workflow. There is no snippet for producing a saved chart file, no headless rendering path, and no mention of scaling, so an automated report that depends on these functions has to be worked out separately.
Installing from CRAN, and the toolchain the package may need
The current release is on CRAN and installs with the standard call:
install.packages("quantmod")For the development version the project page says to clone the repository and build from source, or to use one of two helpers:
# lightweight
remotes::install_github("joshuaulrich/quantmod")
# or
devtools::install_github("joshuaulrich/quantmod")The distinction between the two is that the lightweight path is labelled as such, meaning it pulls fewer dependencies than the devtools route, which typically brings in a larger toolchain for building and checking packages. Either route may need tools to compile C, C++ or Fortran code, and the project page links the relevant appendix of the R Installation and Administration manual for Windows, MacOS and Unix-alike systems. That is the first practical hurdle for a new user, and it is a per-platform one: a container image that has R but not a compiler will fail at the build step rather than at the library call, so the toolchain has to be in the image before the package goes in.
The Makefile shows how the package is actually built and checked
The repository root carries a Makefile that is worth reading before you patch anything, because it encodes the maintainer workflow. Package name and version are not hardcoded: they are extracted from DESCRIPTION with sed, and the tarball name is built from those two values. The build step shells out to R CMD build with vignette building turned off, and the install target writes into the first entry of .libPaths(). The declared phony targets give the shape of the workflow:
.PHONY: docs build install check tests test cleanThe test suite is tinytest, with the runner at tests/tinytest.R and the individual cases under inst/tinytest/test-*.R, and a benchmark script sits at inst/benchmarks/benchmark.subset.R. A contributor working from a clone can therefore run the same checks the maintainers do rather than guessing. The root also holds release-checklist.md, NEWS.md, CRAN_comments.md and a WISHLIST file, which is the shape you would expect from a package that has been on CRAN for a long time.
Where quantmod stops and TTR and xts take over
The project page lists TTR and xts under See Also, and that boundary is the practical alternative to adopting quantmod. xts, an extensible time series based on zoo, is where the object model lives, and TTR is where the technical trading rules live. A team that already works in xts and TTR can skip quantmod entirely and lose very little: the price and indicator results are the same libraries underneath, and the only thing quantmod adds is the convenience of the getSymbols() and chartSeries() path plus the charting helpers. A team that wants the charting and indicator overlay as a single step, and who does not want to assemble an xts object by hand for every new symbol, gets real value from the package. A team with a strict licensing review or a non-R stack gets less: the whole workflow is expressed as R package calls with no exposed service or wire format.
Licence, release cadence and the gaps in the documentation
quantmod is released under the GNU General Public License version 3, which is what the LICENSE file at the repository root records. For a package that many commercial teams pull in as a dependency, that is the item to check early, since GPL-3.0 obligations attach to distribution of the work rather than to private use, and the point of the check is only that a licence review should happen before, not after, the dependency is in a pipeline. The releases listed for the project are CRAN releases 0.4.27 on 2025-04-07, 0.4.28 on 2025-08-04 and 0.4.29 on 2026-06-28, and the last push to the repository was on 2026-07-03. There is no GitHub release and no tag scheme beyond the CRAN versions, so pinning means pinning a CRAN version. Support is also commercialised: the project page advertises quantmod as part of the Tidelift Subscription, which is a paid support arrangement for the maintainers rather than a change in the licence.
Editorial conclusion
quantmod suits R users who want a working chart and indicator overlay in a few lines and who already rely on TTR and xts, and it is a poor fit for a team that cannot accept GPL-3.0 in its dependency chain or that needs data sourcing outside the providers the package ships with. Verify three things before adopting it: the CRAN version you would pin, since the current release is 0.4.29 and the project is snapshot-free, the compilation toolchain on your platform because the package can need C, C++ or Fortran tools, and the behaviour of getSymbols() against the source you intend to use, since the project does not describe provider rate limits or data quality guarantees.
Frequently asked questions
How do I install quantmod in R?
The current release is on CRAN and installs with install.packages("quantmod"). The development version can be fetched from the GitHub repository with remotes::install_github("joshuaulrich/quantmod") or the devtools equivalent, and either route may need C, C++ or Fortran tools on your system.
Which data sources can quantmod import from?
The documented examples cover Yahoo Finance for an equity ticker and FRED for a foreign exchange series, both through the same getSymbols() call with a src argument.
What is the relationship between quantmod and TTR?
The technical indicators such as MACD and Bollinger bands come from TTR, which the project lists under See Also, and quantmod wires them into the chartSeries() workflow.
What licence does quantmod use?
It is distributed under the GNU General Public License version 3, as recorded in the LICENSE file at the repository root.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/joshuaulrich-quantmod)Was this useful?