Need help with TTR?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

joshuaulrich
258 Stars 95 Forks GNU General Public License v2.0 312 Commits 27 Opened issues

Description

Technical analysis and other functions to construct technical trading rules with R

Services available

!
?

Need anything else?

Contributors list

# 105,415
R
algorit...
chartin...
hugo
293 commits
# 238,030
R
chartin...
Shell
literat...
5 commits
# 87,538
R
algorit...
chartin...
C
4 commits
# 4,271
Storybo...
gulp-pl...
watch-f...
lodash
2 commits
# 544,354
R
algorit...
C
technic...
1 commit
# 614,601
HTML
R
algorit...
technic...
1 commit
# 628,410
C++
Postgre...
R
algorit...
1 commit
# 374,630
R
chartin...
C
technic...
1 commit

About

TTR is an R package that provides the most popular technical analysis functions for financial market data. Many of these functions are used as components of systematic trading strategies and financial charts.

TTR for enterprise

Available as part of the Tidelift Subscription.

The maintainers of

TTR
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 TTR development

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

Installation

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

install.packages("TTR")

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

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

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

Getting Started

Here are a few examples of some of the more well-known indicators:

# "TTR Composite" (simulated data)
data(ttrc)

Bollinger Bands

bbands

TTR works with the

chartSeries()
function in quantmod. Here's an example that uses
chartSeries()
and adds TTR-calculated indicators and overlays to the chart.
# "TTR Composite" (simulated data)
data(ttrc)

Use quantmod's OHLCV extractor function to help create an xts object

xttrc

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

  • quantmod: quantitative financial modeling framework
  • xts: eXtensible Time Series based on zoo

Author

Joshua Ulrich

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.