TTR/ 0000755 0001762 0000144 00000000000 14531274225 010730 5 ustar ligges users TTR/NAMESPACE 0000644 0001762 0000144 00000002465 14531142730 012151 0 ustar ligges users export(ADX)
export(ALMA)
export(ATR)
export(BBands)
export(CCI)
export(CLV)
export(CMF)
export(CMO)
export(CTI)
export(DEMA)
export(DPO)
export(DVI)
export(DonchianChannel)
export(EMA)
export(EMV)
export(EVWMA)
export(GMMA)
export(HMA)
export(KST)
export(MACD)
export(MFI)
export(OBV)
export(PBands)
export(ROC)
export(RSI)
export(SAR)
export(SMA)
export(SMI)
export(SNR)
export(TDI)
export(TR)
export(TRIX)
export(VHF)
export(VWAP)
export(VWMA)
export(WMA)
export(WPR)
export(ZLEMA)
export(ZigZag)
export(adjRatios)
export(aroon)
export(chaikinAD)
export(chaikinVolatility)
export(getYahooData)
export(growth)
export(keltnerChannels)
export(lags)
export(momentum)
export(naCheck)
export(rollSFM)
export(runCor)
export(runCov)
export(runMAD)
export(runMax)
export(runMean)
export(runMedian)
export(runMin)
export(runPercentRank)
export(runSD)
export(runSum)
export(runVar)
export(stoch)
export(stockSymbols)
export(ultimateOscillator)
export(volatility)
export(wilderSum)
export(williamsAD)
import(xts)
import(zoo)
importFrom(curl,curl_download)
importFrom(curl,new_handle)
importFrom(stats,approx)
importFrom(stats,embed)
importFrom(stats,na.omit)
importFrom(stats,sd)
importFrom(stats,cor)
importFrom(utils,flush.console)
importFrom(utils,read.csv)
importFrom(utils,read.table)
useDynLib(TTR, .registration = TRUE, .fixes = "C_")
TTR/THANKS 0000644 0001762 0000144 00000000530 14450607776 011654 0 ustar ligges users In no particular order:
- I can't thank Jeff Ryan enough for all his help with TTR via:
motivation to submit TTR to CRAN, helpful comments, testing, and
providing an example Fortran implementation of 'EMA' (from which
all other included Fortran functions are based).
- Many thanks to Ion Georgiadis for helpful suggestions and testing.
TTR/README.md 0000644 0001762 0000144 00000007150 14531225347 012213 0 ustar ligges users ### About
TTR is an [R](https://www.r-project.org) 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.](https://tidelift.com/subscription/pkg/cran-ttr?utm_source=cran-ttr&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
### Supporting TTR development
If you are interested in supporting the ongoing development and maintenance of TTR, please consider [becoming a sponsor](https://github.com/sponsors/joshuaulrich).
### Installation
The current release is available on [CRAN](https://CRAN.R-project.org/package=TTR),
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++, and Fortran code. See the relevant
appendix in the [R Installation and Administration manual](https://cran.r-project.org/doc/manuals/r-release/R-admin.html)
for your operating system:
- [Windows](https://cran.r-project.org/doc/manuals/r-release/R-admin.html#The-Windows-toolset)
- [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)
- [Unix-alike](https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Essential-and-useful-other-programs-under-a-Unix_002dalike)
### Getting Started
Here are a few examples of some of the more well-known indicators:
```r
# "TTR Composite" (simulated data)
data(ttrc)
# Bollinger Bands
bbands <- BBands( ttrc[,c("High","Low","Close")] )
# Directional Movement Index
adx <- ADX(ttrc[,c("High","Low","Close")])
# 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(ttrc[,c("High","Low","Close")])
```
TTR 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.
```r
# "TTR Composite" (simulated data)
data(ttrc)
# Use quantmod's OHLCV extractor function to help create an xts object
xttrc <- xts(OHLCV(ttrc), ttrc[["Date"]])
chartSeries(xttrc, subset = "2006-09/", theme = "white")
addBBands()
addRSI()
```

###### Have a question?
Ask your question on [Stack Overflow](https://stackoverflow.com/questions/tagged/r)
or the [R-SIG-Finance](https://stat.ethz.ch/mailman/listinfo/r-sig-finance)
mailing list (you must subscribe to post).
### Contributing
Please see the [Contributing Guide](https://github.com/joshuaulrich/TTR/wiki/Contributing-Guide).
### See Also
- [quantmod](https://CRAN.R-project.org/package=quantmod): quantitative financial modeling framework
- [xts](https://CRAN.R-project.org/package=xts): eXtensible Time Series based
on [zoo](https://CRAN.R-project.org/package=zoo)
### Author
[Joshua Ulrich](https://about.me/joshuaulrich)
TTR/data/ 0000755 0001762 0000144 00000000000 14450607776 011654 5 ustar ligges users TTR/data/ttrc.rda 0000644 0001762 0000144 00000243632 14450607776 013332 0 ustar ligges users yU&ittw֘uoj0(626 "(2A By H@dU9ʩ_?<{^?onᆗw^ҫƗ\w[_vy?nw\q|
wmtõo'4`?}#9gB~ 7_~W_;_3o`%M7~og
w~ogVdm1;`석3vllvl.(dOO?,_؟c+/ľ2vW_co/a7ga]MUnKؗ7ɾ2&-m]={W)4{=˾}-:Q1qI<^`]v!{=b}}ٿʾd?e?쇳~7ُe'o`6,>ǟ~*K1>,Y{L?|c{,=>ٯ`1=Zc{~#Kt.c:|tb1=Cvc{Llc{\
۲tg1=t7Y:|Kw;+,>tc{Lw=c{쟰߿dʮ媥wg߃;WdNcg!v=da Ktw@wKtw@wاX:<;x}oޟ >>(Y;gُctx@wtwxx@twxxx@wxx@w@xxx@wxx@wtw8x@tw@wxxtx@wtwϳtx@wtwxx@tw@wxxtxY;<<;<<z//p.///././/././c./p//p/././/g//./¹Ă////.///2//.///././///.//y/.K,p/.p/qna[YzOx9{w>ރOe|WzvKXzv+gqwvg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