Releases: joshuaulrich/TTR
CRAN release 0.24.4
Changes in 0.24.4
- Added Ethan B. Smith (@ethanbsmith) as a contributor. Thanks Ethan!
NEW FEATURES
- Added a
TR()
function to calculate the true high, true low, and true range. RefactoredATR()
to use theTR()
function. Thanks to @openbmsjsc and Steve Bronder for the reports, and Ethan B. Smith for the PR. (#18, #114, #124)
BUG FIXES
- Fix
stockSymbols()
for ticker "NA".read.table()
converts the string "NA" to a missing value (NA) becausena.strings = "NA"
by default. This causes an issue because there's actually a company with "NA" for the ticker. (#128)
-
CTI()
did not pad its result with leading NA when the input was not coerced to an xts object. This was different from other TTR functions (e.g.SMA()
,RSI()
,ROC()
). (#127) -
Removed the
VMA()
function, which was never correct because the results made no sense. -
Check that the
wma()
C function has enough non-NA values and throw an error if it doesn't. This could cause theWMA()
function to crash the user's R session. (#126) -
runMean(..., cumulative = TRUE)
didn't account for leading NA in the denominator. (#122) -
runSD(x, cumulative = TRUE)
returned all NA whenx
had any leading NA. Thanks to Ethan B. Smith for the report. (#121) -
The
TRIX()
signal line did not usenSig
unlessmaType
was provided. Thanks to @SatoshiReport for the... report. (#120)
MISCELLANEOUS
- Use symbols for native routine entry points to make them explicit and unable to be found accidentally. (#123)
CRAN release 0.24.3
v0.24.3 CRAN Release 0.24.3
CRAN release 0.24.2
Check for 'ratio > 0' before calculating 'n' zlin ema() C code. The prior code could result in division by 0, which was flagged by clang-UBSAN. Thanks to Prof Brian Ripley for the report. (#100)
CRAN release 0.24.1
This is a bug fix release, mainly to correct CRAN check errors.
The CRAN check errors were caused by (1) leading NA accounting in wma() C had invalid reads, and (2) the ema() C function had possible division by zero when 'ratio = 0' and 'n' was calculated.
There are also a handful of user-facing bug fixes:
ALMA() output length is now equal to the input's length when the input can not be converted to xts. This was caused by the difference between rollapply.default() and rollapply.xts().
In very rare cases, stoch() could return fastK = Inf. I could only reproduce when the Close is > High and High and Low are equal (though that is a data error). I fixed anyway because there may be other cases I don't anticipate.
Fixed MFI() when money flow is always zero or positive. The denominator of the money ratio will be zero if there is no negative money flow for 'n' consecutive observations (e.g. during a strong up-trend), which causes the money flow index to be Inf. The money flow index is set to 100 in this case. And the money ratio will be NaN if there's no money flow for 'n' consecutive observations (e.g. if there are no trades), which causes the money flow index to be NaN. The money flow index is set to 50 in this case.
See the CHANGES file for details.
CRAN release 0.24.0
This release contains user-facing changes that include new features and several bug fixes.
stockSymbols() now uses the NASDAQ FTP site instead of downloading the CSV from the NASDAQ stock screener page. runPercentRank(x, n, cumulative = TRUE) now sets observations in the initialization period to NA, in order to be consistent with the other running/rolling functions. Added Ehler's Correlation Trend Indicator.
Fixed runMAD() when 'cumulative = TRUE' and the input contained leading NA. This also affected runMedian(). Fixed ZLEMA() so it wouldn't crash when 'ratio = 0.0' and 'n' was not specified. WMA() now returns an xts object when passed an xts object for 'x' that had leading NA, with the default 'wts = 1:n'. Fixed stoch() when 'bounded = FALSE'. Fixed HMA() so it does not error when 'n' is an odd number.
See the CHANGES file for details.
CRAN release 0.23-6
This is a maintenance release with no user-facing changes.
This expanded the license to GPL v2 or greater, fixed a URL in the documentation, and prepared for a new default coming to gcc 10.
CRAN release 0.23-5
The main change in this release was moving all Fortran code to C.
We also added some warnings to the documentation for DPO and ZigZag to note that they shouldn't be used to predict prices, because they depend on future price data.
There was a fix to many functions that use EMA
. Now the user-supplied value for wilder
will be used if maType = "EMA"
is the default and not explicitly provided by the user.
CRAN release 0.23-4
Updated the DEMA()
function to avoid multiple calls to EMA()
. This required multiple changes to the EMA()
code, both in R and C. This also required us to add try.xts()
and reclass()
to DEMA()
, since EMA()
had been handling it.We also added other checks from EMA()
(the value of n
and the number of input columns).
Moved NA handling (leading and non-leading) from R to C. This makes it easier to call the ema()
C function from other C functions. That avoids the overhead in R function calls. Also moved the n
and ratio
calculations from R to C. This also makes it easier to call the ema()
C function.
Changed how xts' naCheck()
C function was called. Now it's consistent with how xts calls the zoo_lag()
and zoo_coredata()
C functions.
This release also includes some minor housekeeping for CRAN: Updated some URLs to use https to avoid redirects. And examples that need internet connections are only run in interactive sessions, in order to avoid long R CMD check
times.