{"id":13741446,"url":"https://github.com/joshuaulrich/TTR","last_synced_at":"2025-05-08T21:33:50.558Z","repository":{"id":24590186,"uuid":"27998376","full_name":"joshuaulrich/TTR","owner":"joshuaulrich","description":"Technical analysis and other functions to construct technical trading rules with R","archived":false,"fork":false,"pushed_at":"2024-02-13T23:10:20.000Z","size":1994,"stargazers_count":331,"open_issues_count":28,"forks_count":102,"subscribers_count":46,"default_branch":"master","last_synced_at":"2024-11-06T16:05:34.311Z","etag":null,"topics":["algorithmic-trading","finance","r","technical-analysis"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joshuaulrich.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["joshuaulrich"],"tidelift":"cran/TTR"}},"created_at":"2014-12-14T15:26:19.000Z","updated_at":"2024-10-28T19:25:50.000Z","dependencies_parsed_at":"2022-08-07T11:01:10.363Z","dependency_job_id":"e04fd3f3-e6a6-4a37-a1cb-7cf26edcc641","html_url":"https://github.com/joshuaulrich/TTR","commit_stats":{"total_commits":342,"total_committers":9,"mean_commits":38.0,"dds":"0.049707602339181256","last_synced_commit":"50b213303099ce76cc2a61475009e28dd9e473ea"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshuaulrich%2FTTR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshuaulrich%2FTTR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshuaulrich%2FTTR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshuaulrich%2FTTR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joshuaulrich","download_url":"https://codeload.github.com/joshuaulrich/TTR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224467998,"owners_count":17316289,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithmic-trading","finance","r","technical-analysis"],"created_at":"2024-08-03T04:00:59.264Z","updated_at":"2024-11-15T11:31:17.546Z","avatar_url":"https://github.com/joshuaulrich.png","language":"R","funding_links":["https://github.com/sponsors/joshuaulrich","https://tidelift.com/funding/github/cran/TTR","https://tidelift.com/subscription/pkg/cran-ttr?utm_source=cran-ttr\u0026utm_medium=referral\u0026utm_campaign=enterprise\u0026utm_term=repo"],"categories":["R","Uncategorized"],"sub_categories":["Trading","Uncategorized"],"readme":"### About\n\nTTR is an [R](https://www.r-project.org) package that provides the most popular\ntechnical analysis functions for financial market data. Many of these functions\nare used as components of systematic trading strategies and financial charts.\n\n### TTR for enterprise\n\nAvailable as part of the Tidelift Subscription.\n\nThe 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.](https://tidelift.com/subscription/pkg/cran-ttr?utm_source=cran-ttr\u0026utm_medium=referral\u0026utm_campaign=enterprise\u0026utm_term=repo)\n\n### Supporting TTR development\n\nIf you are interested in supporting the ongoing development and maintenance of TTR, please consider [becoming a sponsor](https://github.com/sponsors/joshuaulrich).\n\n### Installation\n\nThe current release is available on [CRAN](https://CRAN.R-project.org/package=TTR),\nwhich you can install via:\n\n```r\ninstall.packages(\"TTR\")\n```\n\nTo install the development version, you need to clone the repository and build\nfrom source, or run one of:\n\n```r\n# lightweight\nremotes::install_github(\"joshuaulrich/TTR\")\n# or\ndevtools::install_github(\"joshuaulrich/TTR\")\n```\n\nYou will need tools to compile C/C++ code. See the relevant\nappendix in the [R Installation and Administration manual](https://cran.r-project.org/doc/manuals/r-release/R-admin.html)\nfor your operating system:\n\n- [Windows](https://cran.r-project.org/doc/manuals/r-release/R-admin.html#The-Windows-toolset)\n- [MacOS](https://cran.r-project.org/doc/manuals/r-release/R-admin.html#macOS) (the [R for Mac OS X Developer's Page](https://mac.R-project.org/) might also be helpful)\n- [Unix-alike](https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Essential-and-useful-other-programs-under-a-Unix_002dalike)\n\n### Getting Started\n\nHere are a few examples of some of the more well-known indicators:\n\n```r\n# \"TTR Composite\" (simulated data)\ndata(ttrc)\n\n# Bollinger Bands\nbbands \u003c- BBands( ttrc[,c(\"High\",\"Low\",\"Close\")] )\n\n# Directional Movement Index\nadx \u003c- ADX(ttrc[,c(\"High\",\"Low\",\"Close\")])\n\n# Moving Averages\nema \u003c- EMA(ttrc[,\"Close\"], n=20)\nsma \u003c- SMA(ttrc[,\"Close\"], n=20)\n\n# MACD\nmacd \u003c- MACD( ttrc[,\"Close\"] )\n\n# RSI\nrsi \u003c- RSI(ttrc[,\"Close\"])\n\n# Stochastics\nstochOsc \u003c- stoch(ttrc[,c(\"High\",\"Low\",\"Close\")])\n```\n\nTTR works with the `chartSeries()` function in [quantmod](https://github.com/joshuaulrich/quantmod). Here's an example that uses `chartSeries()` and adds TTR-calculated indicators and overlays to the chart.\n\n```r\n# \"TTR Composite\" (simulated data)\ndata(ttrc)\n\n# Use quantmod's OHLCV extractor function to help create an xts object\nxttrc \u003c- xts(OHLCV(ttrc), ttrc[[\"Date\"]])\n\nchartSeries(xttrc, subset = \"2006-09/\", theme = \"white\")\naddBBands()\naddRSI()\n```\n\n![](https://drive.google.com/uc?export=view\u0026id=1TrgoZujgcI9GCMEWHlDgzkQQvBItyLwq)\n\n###### Have a question?\n\nAsk your question on [Stack Overflow](https://stackoverflow.com/questions/tagged/r)\nor the [R-SIG-Finance](https://stat.ethz.ch/mailman/listinfo/r-sig-finance)\nmailing list (you must subscribe to post).\n\n### Contributing\n\nPlease see the [Contributing Guide](https://github.com/joshuaulrich/TTR/wiki/Contributing-Guide).\n\n### See Also\n\n- [quantmod](https://CRAN.R-project.org/package=quantmod): quantitative financial modeling framework\n- [xts](https://CRAN.R-project.org/package=xts): eXtensible Time Series based\non [zoo](https://CRAN.R-project.org/package=zoo)\n\n### Author\n\n[Joshua Ulrich](https://about.me/joshuaulrich)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshuaulrich%2FTTR","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoshuaulrich%2FTTR","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshuaulrich%2FTTR/lists"}