TTR_0.2 on CRAN
I am happy to announce a long-overdue update to the TTR package (version 0.2) is now on CRAN.
This update represents a major milestone, as TTR useRs are no longer restricted to using matrix objects. TTR 0.2 uses xts internally, so all major time series classes are now supported.
NEW FEATURES:
- Added the zig zag indicator:
ZigZag() - Added volatility estimators/indicators:
volatility(), with the following calculations- Close-to-Close
- Garman Klass
- Parkinson
- Rogers Satchell
- Added Money Flow Index:
MFI() - Added Donchian channel:
DonchianChannel()
CHANGES:
- All functions now use xts internally, adding support for all major time series classes. If
try.xts()fails on the input object(s), they will be converted to a matrix and a matrix object will be returned. - Added
boundedarg tostoch()andSMI(), which includes the current period in the calculation. - Added
naCheck()and implemented it in the moving average functions. - Moved
maTypeargument default values from function formals to function body for the following functions:ADX(),ATR(),CCI(),DPO(),EMV(),KST(),MACD(),RSI(),TRIX(),BBands(),chaikinVolatility(),stoch(),SMI() momentum()inCMO()no longer setsna=100- Replaced
naargument inmomentum()andROC()withna.pad - Added
multipleargument toTDI(), allowing more user control getYahooData()now returns an xts object- Added colnames to output for
ADX(),EMV(), andCLV()(for xts) - Added unit tests using the RUnit package
- Used
checkEquals()on object attributes as well as values - Removed
.First.libfunction and added.onLoad()with package version.
BUG FIXES:
- Corrected NaN replacement in
CLV() - Corrected
williamsAD(): AD=0 if C(t)=C(t-1) - Corrected
runMedian()andrunMAD(). The argument controlling which type of median to calculate for even-numbered samples wasn’t being passed to the Fortran routine. aroon()calculation starts at periodn+1, instead ofn- Added
NAto first element ofcloseLagofATR() - Corrected
BBands()andCCI()forrowMeans()use on xts objects - Made changes to Rd files to pass
R CMD checkon R-devel (2.9.0)
Please do contact me with any questions, concerns, bug reports, etc.
I look forward to your questions and feedback! If you have a question, please ask on Stack Overflow and use the [r] and [ttr] tags. Or you can send an email to the R-SIG-Finance mailing list (you must subscribe to post). Open an issue on GitHub if you find a bug or want to request a feature. Please read the contributing guide first! It will help save time for both of us. ;-)
If you love using my open-source work (e.g. quantmod, TTR, xts, IBrokers, microbenchmark, blotter, quantstrat, etc.), you can give back by sponsoring me on GitHub. I truly appreciate anything you’re willing and able to give!