TTR_0.24.2 on CRAN

An updated version of TTR is on CRAN now. This is mainly a bug-fix release. There were several issues in the underlying C code that caused various issues. I’ll spare you the gory details. If you’re really interested, you can find them in the CHANGES file.

[This is another one of my long-overdue posts. I’m trying to get int the habit of posting and announcing each of my package releases. So I’m writing posts this morning for the most recent release of the most popular packages I maintain.]

I released an updated version of TTR to CRAN on 2020-09-01.

Now for the bug fixes you might actually notice.

  • ALMA() could return an object whose length didn’t match the length of the input when the input was not an xts object. This bug has been around for years. I’m sorry I just now got to it.

    The bug was caused by the differences in rollapply.default() in zoo and rollapply.xts(). The xts method pads with NA by default, whereas the default version does not. Thanks to GitHub user marksimmonds for the report! (#29)

  • MFI() has been fixed for the case where money flow is always > 0. The denominator of the money ratio is zero if there is no negative money flow for n consecutive observations (e.g. during a strong up-trend). This causes the money flow index to be Inf. Now the money flow index is set to 100 in this case.

    Also, the money ratio will be NaN if there’s no money flow for n consecutive observations (e.g. if there are no trades). This causes the money flow index to be NaN. Now the money flow index is to 50 in this case. Thanks to GitHub user jgehw for the report, reproducible example, and suggested patch! (#81)

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!

comments powered by Disqus