head	1.6;
access;
symbols
	pkgsrc-2026Q1:1.6.0.10
	pkgsrc-2026Q1-base:1.6
	pkgsrc-2025Q4:1.6.0.8
	pkgsrc-2025Q4-base:1.6
	pkgsrc-2025Q3:1.6.0.6
	pkgsrc-2025Q3-base:1.6
	pkgsrc-2025Q2:1.6.0.4
	pkgsrc-2025Q2-base:1.6
	pkgsrc-2025Q1:1.6.0.2
	pkgsrc-2025Q1-base:1.6
	pkgsrc-2024Q4:1.5.0.22
	pkgsrc-2024Q4-base:1.5
	pkgsrc-2024Q3:1.5.0.20
	pkgsrc-2024Q3-base:1.5
	pkgsrc-2024Q2:1.5.0.18
	pkgsrc-2024Q2-base:1.5
	pkgsrc-2024Q1:1.5.0.16
	pkgsrc-2024Q1-base:1.5
	pkgsrc-2023Q4:1.5.0.14
	pkgsrc-2023Q4-base:1.5
	pkgsrc-2023Q3:1.5.0.12
	pkgsrc-2023Q3-base:1.5
	pkgsrc-2023Q2:1.5.0.10
	pkgsrc-2023Q2-base:1.5
	pkgsrc-2023Q1:1.5.0.8
	pkgsrc-2023Q1-base:1.5
	pkgsrc-2022Q4:1.5.0.6
	pkgsrc-2022Q4-base:1.5
	pkgsrc-2022Q3:1.5.0.4
	pkgsrc-2022Q3-base:1.5
	pkgsrc-2022Q2:1.5.0.2
	pkgsrc-2022Q2-base:1.5
	pkgsrc-2022Q1:1.4.0.22
	pkgsrc-2022Q1-base:1.4
	pkgsrc-2021Q4:1.4.0.20
	pkgsrc-2021Q4-base:1.4
	pkgsrc-2021Q3:1.4.0.18
	pkgsrc-2021Q3-base:1.4
	pkgsrc-2021Q2:1.4.0.16
	pkgsrc-2021Q2-base:1.4
	pkgsrc-2021Q1:1.4.0.14
	pkgsrc-2021Q1-base:1.4
	pkgsrc-2020Q4:1.4.0.12
	pkgsrc-2020Q4-base:1.4
	pkgsrc-2020Q3:1.4.0.10
	pkgsrc-2020Q3-base:1.4
	pkgsrc-2020Q2:1.4.0.8
	pkgsrc-2020Q2-base:1.4
	pkgsrc-2020Q1:1.4.0.4
	pkgsrc-2020Q1-base:1.4
	pkgsrc-2019Q4:1.4.0.6
	pkgsrc-2019Q4-base:1.4
	pkgsrc-2019Q3:1.4.0.2
	pkgsrc-2019Q3-base:1.4
	pkgsrc-2019Q2:1.2.0.8
	pkgsrc-2019Q2-base:1.2
	pkgsrc-2019Q1:1.2.0.6
	pkgsrc-2019Q1-base:1.2
	pkgsrc-2018Q4:1.2.0.4
	pkgsrc-2018Q4-base:1.2
	pkgsrc-2018Q3:1.2.0.2
	pkgsrc-2018Q3-base:1.2
	pkgsrc-2018Q2:1.1.0.4
	pkgsrc-2018Q2-base:1.1
	pkgsrc-2018Q1:1.1.0.2
	pkgsrc-2018Q1-base:1.1;
locks; strict;
comment	@# @;


1.6
date	2025.01.04.13.49.52;	author mef;	state Exp;
branches;
next	1.5;
commitid	ZaQBJ9OUSDdmLaEF;

1.5
date	2022.05.29.00.46.45;	author wen;	state Exp;
branches;
next	1.4;
commitid	cV3a3KZ8ILXNZSFD;

1.4
date	2019.08.08.19.53.41;	author brook;	state Exp;
branches;
next	1.3;
commitid	K2VPfA0XCw7xfgyB;

1.3
date	2019.07.31.15.46.40;	author brook;	state Exp;
branches;
next	1.2;
commitid	CyrXJPgQC2FfbdxB;

1.2
date	2018.07.28.14.40.43;	author brook;	state Exp;
branches;
next	1.1;
commitid	hIRYb3oU4xMfBULA;

1.1
date	2018.02.04.23.40.02;	author minskim;	state Exp;
branches;
next	;
commitid	LyW8zb3KgFUKdBpA;


desc
@@


1.6
log
@(finance/R-TTR) Updated 0.24.3 to 0.24.4, make test passed

# Changes in 0.24.4

* Added Ethan B. Smith as a contributor. Thanks Ethan!

### NEW FEATURES

- Added a `TR()` function to calculate the true high, true low, and true
  range. Refactored `ATR()` to use the `TR()` 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) because `na.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 the `WMA()` 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 when `x` had any leading
  NA. Thanks to Ethan B. Smith for the report. (#121)

- The `TRIX()` signal line did not use `nSig` unless `maType` 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)
@
text
@# $NetBSD: Makefile,v 1.5 2022/05/29 00:46:45 wen Exp $

R_PKGNAME=	TTR
R_PKGVER=	0.24.4
CATEGORIES=	finance

MAINTAINER=	minskim@@NetBSD.org
COMMENT=	Technical trading rules
LICENSE=	gnu-gpl-v2

DEPENDS+=	R-zoo>=1.8.6:../../math/R-zoo
DEPENDS+=	R-curl>=4.0:../../www/R-curl

TEST_DEPENDS+=	R-RUnit-[0-9]*:../../devel/R-RUnit
TEST_DEPENDS+=	R-quantmod-[0-9]*:../../finance/R-quantmod

TEST_DEPENDS+=	tex-ec-[0-9]*:../../fonts/tex-ec
TEST_DEPENDS+=	tex-inconsolata-[0-9]*:../../fonts/tex-inconsolata
TEST_DEPENDS+=	tex-latex-bin-[0-9]*:../../print/tex-latex-bin
TEST_DEPENDS+=	tex-url-[0-9]*:../../print/tex-url
TEST_DEPENDS+=	tex-xkeyval-[0-9]*:../../print/tex-xkeyval

USE_LANGUAGES=	c fortran

.include "../../math/R/Makefile.extension"
.include "../../math/R-xts/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
@


1.5
log
@Update to 0.24.3

Upstream changes:
#-#-#-#-#-#-#-#-#-#    Changes in TTR version 0.24.2    #-#-#-#-#-#-#-#-#-#


BUG FIXES

  - Check for 'ratio > 0' before calculating 'n' in zlema() 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)


#-#-#-#-#-#-#-#-#-#    Changes in TTR version 0.24.1    #-#-#-#-#-#-#-#-#-#


BUG FIXES

  - Fix leading NA accounting in wma() C code. The prior code caused invalid
    reads under valgrind. Thanks to Prof Brian Ripley for the report. (#99)

  - Check for 'ratio > 0' before calculating 'n' in ema() C code. The prior
    code could result in division by 0, which was flagged by UBSAN. Thanks to
    Prof Brian Ripley for the report. (#100)

  - Make ALMA() output length equal input length when the input can not be
    converted to xts. This was caused by the difference between
    rollapply.default() and rollapply.xts(). Thanks to GitHub user
    marksimmonds for the report. (#29)

  - Fix stoch() in very rare cases where fastK is Inf. I could only reproduce
    this if the Close is > High and High and Low are equal, but that is a data
    error. I fixed anyway because there may be other cases I don't anticipate.
    Thanks to GitHub user cjuncosa for the report. (#52)

  - Fix 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. Set the money flow index 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. Set the money flow index to 50 in this case.

    Thanks to GitHub user jgehw for the report, reproducible example, and
    suggested patch. (#81)


#-#-#-#-#-#-#-#-#-#    Changes in TTR version 0.24.0    #-#-#-#-#-#-#-#-#-#


SIGNIFICANT USER-VISIBLE CHANGES

  - Updated stockSymbols() to use the NASDAQ FTP site instead of downloading
    the CSV from the NASDAQ stock screener page. Some columns are no longer
    populated because they are not provided in the FTP file:
      LastSale ,MarketCap, IPOyear, Sector, Industry
    These columns will be removed in a future version. (#98, #5, #97)

  - runPercentRank(x, n, cumulative = TRUE) now sets observations in the
    initialization period to NA. This is consistent with the other
    running/rolling functions in TTR. If you want the previous behavior,
    you should use runPercentRank(x, n = 1, cumulative = TRUE). Thanks to
    GitHub user httassadar for the report. (#73)


NEW FEATURES

  - Add Ehler's Correlation Trend Indicator. Thanks to Evelyn Mitchell for
    the suggestion, and for Ethan Smith for the initial implementation. (#92)


BUG FIXES

  - runMAD() returned incorrect values when 'cumulative = TRUE' and the input
    contained leading NA. Thanks to GitHub user stellathecat for the report.
    This also affected runMedian() also. (#93)

  - ZLEMA() would crash when 'ratio = 0.0' and 'n' was not specified. Thanks
    to GitHub user yogat3ch for the report! (#95)

  - WMA() did not return an xts object when passed an xts object for 'x' that
    had leading NA, with the default 'wts = 1:n'. Thanks to Cory Fletcher for
    reporting this issue via email. (#96)

  - stoch() was wrong when 'bounded = FALSE'. Thanks to GitHub user rfinfun
    for the report and patch. (#74)

  - HMA() threw an error when 'n' was an odd number. This was because the
    first call to WMA() used 'n = n / 2' which caused 'n' to not be an
    integer. Thanks to GitHub user dragie for the report. (#76)
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.4 2019/08/08 19:53:41 brook Exp $
d4 1
a4 1
R_PKGVER=	0.24.3
d14 9
@


1.4
log
@Update all R packages to canonical form.

The canonical form [1] of an R package Makefile includes the
following:

- The first stanza includes R_PKGNAME, R_PKGVER, PKGREVISION (as
  needed), and CATEGORIES.

- HOMEPAGE is not present but defined in math/R/Makefile.extension to
  refer to the CRAN web page describing the package.  Other relevant
  web pages are often linked from there via the URL field.

This updates all current R packages to this form, which will make
regular updates _much_ easier, especially using pkgtools/R2pkg.

[1] http://mail-index.netbsd.org/tech-pkg/2019/08/02/msg021711.html
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.3 2019/07/31 15:46:40 brook Exp $
d4 1
a4 1
R_PKGVER=	0.23-4
@


1.3
log
@R-TTR: update to version 0.23.4.

Update to the canonical form of an R package.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.2 2018/07/28 14:40:43 brook Exp $
d3 3
a5 1
CATEGORIES=	finance R
a7 1
HOMEPAGE=	https://github.com/joshuaulrich/TTR
a10 3
R_PKGNAME=	TTR
R_PKGVER=	0.23-4

@


1.2
log
@Remove MASTER_SITES= from individual R package Makefiles.

Each R package should include ../../math/R/Makefile.extension, which also
defines MASTER_SITES.  Consequently, it is redundant for the individual
packages to do the same.  Package-specific definitions also prevent
redefining MASTER_SITES in a single common place.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.1 2018/02/04 23:40:02 minskim Exp $
d3 1
a3 1
CATEGORIES=	finance
d10 2
a11 2
DEPENDS+=	R-curl-[0-9]*:../../www/R-curl
DEPENDS+=	R-zoo-[0-9]*:../../math/R-zoo
d13 2
a14 2
R_PKGNAME=	TTR
R_PKGVER=	0.23-3
d18 1
a19 1
.include "../../math/R/Makefile.extension"
@


1.1
log
@finance/R-TTR: Import version 0.23.3

Functions and data to construct technical trading rules with R.
@
text
@d1 1
a1 1
# $NetBSD$
a3 1
MASTER_SITES=	${MASTER_SITE_R_CRAN:=contrib/}
@

