TTR

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

https://github.com/joshuaulrich/ttr

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.8%) to scientific vocabulary

Keywords

algorithmic-trading finance r technical-analysis
Last synced: 6 months ago · JSON representation

Repository

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

Basic Info
  • Host: GitHub
  • Owner: joshuaulrich
  • License: gpl-2.0
  • Language: R
  • Default Branch: master
  • Homepage:
  • Size: 1.82 MB
Statistics
  • Stars: 342
  • Watchers: 46
  • Forks: 102
  • Open Issues: 28
  • Releases: 8
Topics
algorithmic-trading finance r technical-analysis
Created about 11 years ago · Last pushed 9 months ago
Metadata Files
Readme Changelog Funding License Security

README.md

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.

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:

r install.packages("TTR")

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

```r

lightweight

remotes::install_github("joshuaulrich/TTR")

or

devtools::install_github("joshuaulrich/TTR") ```

You will need tools to compile C/C++ 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:

```r

"TTR Composite" (simulated data)

data(ttrc) hlc <- ttrc[, c("High", "Low", "Close")]

Bollinger Bands

bbands <- BBands(hlc)

Directional Movement Index

adx <- ADX(hlc)

Moving Averages

ema <- EMA(ttrc[, "Close"], n = 20) sma <- SMA(ttrc[, "Close"], n = 20)

MACD

macd <- MACD(ttrc[,"Close"])

RSI

rsi <- RSI(ttrc[,"Close"])

Stochastics

stochOsc <- stoch(hlc) ```

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.

```r library(quantmod) data(ttrc)

create an xts object

x <- as.xts(ttrc)

chartSeries(x, subset = "2006-09/", theme = "white") addBBands() addRSI() ```

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

Owner

  • Name: Joshua Ulrich
  • Login: joshuaulrich
  • Kind: user
  • Location: Saint Louis, Missouri, USA

GitHub Events

Total
  • Issues event: 4
  • Watch event: 11
  • Issue comment event: 3
  • Push event: 2
  • Fork event: 2
Last Year
  • Issues event: 4
  • Watch event: 11
  • Issue comment event: 3
  • Push event: 2
  • Fork event: 2

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 358
  • Total Committers: 10
  • Avg Commits per committer: 35.8
  • Development Distribution Score (DDS): 0.05
Past Year
  • Commits: 6
  • Committers: 1
  • Avg Commits per committer: 6.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Joshua Ulrich j****h@g****m 340
Brian G. Peterson b****n@b****m 5
Jeffrey A. Ryan j****n@g****m 4
Ethan Smith 2****h 2
Blaine Bublitz b****e@t****m 2
harvey131 2****1 1
Serkan Korkmaz 7****1 1
Luis Damiano d****s@g****m 1
James Toll j****s@j****m 1
pcc p****l@w****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 101
  • Total pull requests: 11
  • Average time to close issues: 9 months
  • Average time to close pull requests: 6 months
  • Total issue authors: 62
  • Total pull request authors: 8
  • Average comments per issue: 2.39
  • Average comments per pull request: 2.82
  • Merged pull requests: 6
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: 15 days
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 1.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • joshuaulrich (21)
  • ethanbsmith (10)
  • amirmazmi (3)
  • siims-biz (2)
  • evelynmitchell (2)
  • ghost (2)
  • yogat3ch (2)
  • AndreMikulec (2)
  • Shicheng-Guo (2)
  • Javdat (2)
  • FrancisHChen (2)
  • LiberTang0 (1)
  • dcmg21 (1)
  • SatoshiReport (1)
  • vaclavcepelak (1)
Pull Request Authors
  • ethanbsmith (3)
  • phated (2)
  • serkor1 (2)
  • Chuluujav (1)
  • jgehw (1)
  • davft (1)
  • harvey131 (1)
  • nateaff (1)
Top Labels
Issue Labels
bug (33) duplicate (10) feature request (6) enhancement (5) question (4) chore (2)
Pull Request Labels
bug (1)

Packages

  • Total packages: 4
  • Total downloads:
    • cran 222,799 last-month
  • Total docker downloads: 33,625,347
  • Total dependent packages: 27
    (may contain duplicates)
  • Total dependent repositories: 150
    (may contain duplicates)
  • Total versions: 40
  • Total maintainers: 1
cran.r-project.org: TTR

Technical Trading Rules

  • Versions: 22
  • Dependent Packages: 23
  • Dependent Repositories: 128
  • Downloads: 222,799 Last month
  • Docker Downloads: 33,625,347
Rankings
Forks count: 0.6%
Downloads: 0.8%
Stargazers count: 1.2%
Dependent repos count: 1.8%
Dependent packages count: 3.2%
Average: 4.1%
Docker downloads count: 17.3%
Maintainers (1)
Last synced: 6 months ago
proxy.golang.org: github.com/joshuaulrich/ttr
  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.5%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
proxy.golang.org: github.com/joshuaulrich/TTR
  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.5%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
conda-forge.org: r-ttr
  • Versions: 8
  • Dependent Packages: 4
  • Dependent Repositories: 22
Rankings
Dependent repos count: 7.6%
Dependent packages count: 12.5%
Average: 15.0%
Forks count: 17.7%
Stargazers count: 22.2%
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • quantmod * enhances
  • curl * imports
  • xts >= 0.10 imports
  • zoo * imports
  • RUnit * suggests