Skip to content

Quantitative Financial Modelling Framework

License

Notifications You must be signed in to change notification settings

joshuaulrich/quantmod

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9f9b7b2 · May 19, 2023
Apr 8, 2020
May 19, 2023
Nov 10, 2008
Apr 16, 2023
Dec 8, 2020
Mar 27, 2023
Oct 16, 2021
Jul 20, 2020
Apr 6, 2023
Apr 16, 2023
Feb 3, 2019
Mar 28, 2023
Mar 20, 2023
Apr 5, 2023
Dec 20, 2020
Feb 22, 2017
Dec 10, 2020

Repository files navigation

About

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 development

If you are interested in supporting the ongoing development and maintenance of quantmod, please consider becoming a sponsor.

Installation

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

install.packages("quantmod")

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

# lightweight
remotes::install_github("joshuaulrich/quantmod")
# or
devtools::install_github("joshuaulrich/quantmod")

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
[1] "DEXJPUS"

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).

Contributing

Please see the contributing guide.

See Also

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

Author

Jeffrey Ryan, Joshua Ulrich