Skip to content
Go to file

Latest commit

Update to bionic (18.04). Set the R version to 4.0.

Git stats


Failed to load latest commit information.
Latest commit message
Commit time


quantmod is an R package that provides a framework for quantitative financial modeling and trading. It provides a rapid prototyping environment that makes modeling easier by removing the repetitive workflow issues surrounding data management and visualization.

quantmod for enterprise

Available as part of the Tidelift Subscription.

The maintainers of quantmod and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.

Supporting quantmod through Patreon

If you are interested in supporting this project, please consider becoming a patron.


The current release is available on CRAN, which you can install via:


To install the development version, you need to clone the repository and build from source, or run one of:

# lightweight
# or

You may need tools to compile C, C++, or Fortran code. See the relevant appendix in the R Installation and Administration manual for your operating system:

Getting Started

It is possible to import data from a variety of sources with one quantmod function: getSymbols(). For example:

> getSymbols("AAPL", src = "yahoo")    # from yahoo finance
[1] "AAPL"
> getSymbols("DEXJPUS", src = "FRED")  # FX rates from FRED

Once you've imported the data, you can use chartSeries() to visualize it and even add technical indicators from the TTR package:

> getSymbols("AAPL")
[1] "AAPL"
> chartSeries(AAPL)
> addMACD()
> addBBands()
Have a question?

Ask your question on Stack Overflow or the R-SIG-Finance mailing list (you must subscribe to post).


Please see the contributing guide.

See Also

  • TTR: functions for technical trading rules
  • xts: eXtensible Time Series based on zoo


Jeffrey Ryan, Joshua Ulrich

You can’t perform that action at this time.