From 142de2baebd9ca6d69a513b556d80095b27bb533 Mon Sep 17 00:00:00 2001 From: "Joshua M. Ulrich" Date: Tue, 30 Aug 2011 03:08:12 +0000 Subject: [PATCH] - updated CHANGES, DESCRIPTION, and man/TTR.Rd - updated copyright to include 2011 git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/ttr/pkg@116 edb9625f-4e0d-4859-8d74-9fd3b1da38cb --- CHANGES | 37 +++++++++++++++++++------------------ DESCRIPTION | 6 +++--- NAMESPACE | 1 + R/ADX.R | 2 +- R/ATR.R | 2 +- R/CCI.R | 2 +- R/CLV.R | 2 +- R/CMF.R | 2 +- R/CMO.R | 2 +- R/DPO.R | 2 +- R/DVI.R | 19 +++++++++++++++++++ R/DonchianChannel.R | 2 +- R/EMV.R | 2 +- R/GMMA.R | 2 +- R/KST.R | 2 +- R/MACD.R | 2 +- R/MFI.R | 2 +- R/MovingAverages.R | 2 +- R/OBV.R | 2 +- R/RSI.R | 2 +- R/SAR.R | 2 +- R/TDI.R | 2 +- R/TRIX.R | 2 +- R/TTRtools.R | 2 +- R/VHF.R | 2 +- R/WPR.R | 2 +- R/WebData.R | 2 +- R/ZigZag.R | 2 +- R/adjRatios.R | 2 +- R/aroon.R | 2 +- R/bollingerBands.R | 2 +- R/chaikinAD.R | 2 +- R/chaikinVolatility.R | 2 +- R/changes.R | 2 +- R/pivots.R | 2 +- R/priceBands.R | 2 +- R/runFun.R | 2 +- R/stochastics.R | 2 +- R/volatility.R | 2 +- R/williamsAD.R | 2 +- man/TTR.Rd | 4 ++-- 41 files changed, 80 insertions(+), 59 deletions(-) diff --git a/CHANGES b/CHANGES index 4400511..7027abf 100755 --- a/CHANGES +++ b/CHANGES @@ -1,36 +1,37 @@ -TTR version 0.20-2 - Changes from version 0.20-1 - +TTR version 0.21-0 + Changes from version 0.20-2 NEW FEATURES: -- Added VWAP and VWMA (thanks to Brian Peterson) +- Added variable moving average function, VMA. -- Added v-factor generalization to DEMA (thanks to John Gavin) +- Added Brian Peterson's price bands function, PBands. +- Added David Varadi's DVI indicator, DVI. -CHANGES: -- Updated volatility() to handle univariate case of calc='close' - (thanks to Cedrick Johnson) +CHANGES: -- Moved EMA, SAR, and wilderSum from .Fortran to .Call and used - xts:::naCheck in lieu of TTR's NA check mechanism +- Added wilder and ratio arguments to DEMA. Thanks to Matthew Fornari for the + suggestion. -- RSI up/down momentum now faster with xts (thanks to Jeff Ryan) +- Changed wilderSum to seed initial value with raw sum. This matches Wilder's + original calculations. Thanks to Mahesh Bp for the report. -- If 'ratio' is specified in EMA but 'n' is missing, the traditional - value of 'n' is approximated and returned as the first non-NA value +- The BBands sd calculation now uses the population instead of sample + statistic. This is consistent with Bollinger Band literature. Thanks to + Jeff Ryan for the patch. BUG FIXES: -- Fix to stoch() when maType is a list and 'n' is not set in the list's - 3rd element (thanks to Wind Me) +- Fixed stockSymbols for nasdaq.com changes. -- Fixed fastK in stoch() when smooth != 1 +- Fixed ZLEMA default ratio by changing it from 2/(n-1) to 2/(n+1). This + makes it consistent with EMA. Thanks to Dirk Eddelbuettel. -- Fixed segfault caused by EMA when n < NROW(x) (thanks to Douglas Hobbs) +- Corrected close-to-close volatility. Thanks to James Toll for the report. -- test.EMA.wilder failed under R-devel (thanks to Prof Brian Ripley) +- adjRatios failed (spectacularly) if there were missing close prices. Thanks + to Garrett See for the report. diff --git a/DESCRIPTION b/DESCRIPTION index bfe0bbe..471e0d7 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,9 +1,9 @@ Package: TTR Type: Package Title: Technical Trading Rules -Version: 0.20-3 -Revision: 99 -Date: 2011-01-12 +Version: 0.21-0 +Revision: 116 +Date: 2011-08-30 Author: Joshua Ulrich Maintainer: Joshua Ulrich Depends: xts (>= 0.6.4) diff --git a/NAMESPACE b/NAMESPACE index 61d5fe0..551573e 100755 --- a/NAMESPACE +++ b/NAMESPACE @@ -30,6 +30,7 @@ export(momentum) export(MFI) export(OBV) export(PBands) +#export(pivots) export(ROC) export(RSI) export(runCor) diff --git a/R/ADX.R b/R/ADX.R index 3e8872b..e9b7927 100755 --- a/R/ADX.R +++ b/R/ADX.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/ATR.R b/R/ATR.R index 54db1d8..8f13155 100755 --- a/R/ATR.R +++ b/R/ATR.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/CCI.R b/R/CCI.R index 57c5a55..d784784 100755 --- a/R/CCI.R +++ b/R/CCI.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/CLV.R b/R/CLV.R index 14ec6c1..7a1e5e5 100755 --- a/R/CLV.R +++ b/R/CLV.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/CMF.R b/R/CMF.R index f478359..41be88a 100755 --- a/R/CMF.R +++ b/R/CMF.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/CMO.R b/R/CMO.R index 05a1ef5..7077603 100755 --- a/R/CMO.R +++ b/R/CMO.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/DPO.R b/R/DPO.R index 2436fdd..77f32d6 100755 --- a/R/DPO.R +++ b/R/DPO.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/DVI.R b/R/DVI.R index 1a690b3..23261a9 100644 --- a/R/DVI.R +++ b/R/DVI.R @@ -1,3 +1,22 @@ +# +# TTR: Technical Trading Rules +# +# Copyright (C) 2007-2011 Joshua M. Ulrich +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + DVI <- function(price, n=252, wts=c(0.8,0.2), smooth=3, magnitude=c(5,100,5), stretch=c(10,100,2)) { diff --git a/R/DonchianChannel.R b/R/DonchianChannel.R index 2dcfd42..38f7588 100644 --- a/R/DonchianChannel.R +++ b/R/DonchianChannel.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/EMV.R b/R/EMV.R index 8630cac..b567068 100755 --- a/R/EMV.R +++ b/R/EMV.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/GMMA.R b/R/GMMA.R index a7509c0..5e223db 100644 --- a/R/GMMA.R +++ b/R/GMMA.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/KST.R b/R/KST.R index 16acfe4..43cac31 100755 --- a/R/KST.R +++ b/R/KST.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/MACD.R b/R/MACD.R index b5d9f78..e434ed6 100755 --- a/R/MACD.R +++ b/R/MACD.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/MFI.R b/R/MFI.R index 445b382..6cd375b 100755 --- a/R/MFI.R +++ b/R/MFI.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/MovingAverages.R b/R/MovingAverages.R index d3d4c3c..4966dee 100755 --- a/R/MovingAverages.R +++ b/R/MovingAverages.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/OBV.R b/R/OBV.R index 97bfafc..d48516f 100755 --- a/R/OBV.R +++ b/R/OBV.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/RSI.R b/R/RSI.R index caeab87..3a1bd11 100755 --- a/R/RSI.R +++ b/R/RSI.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/SAR.R b/R/SAR.R index a44da9f..0b6792e 100755 --- a/R/SAR.R +++ b/R/SAR.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/TDI.R b/R/TDI.R index 73bf515..16ef5b5 100755 --- a/R/TDI.R +++ b/R/TDI.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/TRIX.R b/R/TRIX.R index 1569bc6..69e9e77 100755 --- a/R/TRIX.R +++ b/R/TRIX.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/TTRtools.R b/R/TTRtools.R index 0904d31..4e90631 100755 --- a/R/TTRtools.R +++ b/R/TTRtools.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/VHF.R b/R/VHF.R index 24a2cf0..41ba3ee 100755 --- a/R/VHF.R +++ b/R/VHF.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/WPR.R b/R/WPR.R index d9c2727..c45de2c 100755 --- a/R/WPR.R +++ b/R/WPR.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/WebData.R b/R/WebData.R index c8d96be..9be85f7 100755 --- a/R/WebData.R +++ b/R/WebData.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/ZigZag.R b/R/ZigZag.R index 3dfe5c8..07dc728 100755 --- a/R/ZigZag.R +++ b/R/ZigZag.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/adjRatios.R b/R/adjRatios.R index 614448f..fdf2b48 100644 --- a/R/adjRatios.R +++ b/R/adjRatios.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/aroon.R b/R/aroon.R index 84b1674..28f36a0 100755 --- a/R/aroon.R +++ b/R/aroon.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/bollingerBands.R b/R/bollingerBands.R index dff23a1..c1bb1b1 100755 --- a/R/bollingerBands.R +++ b/R/bollingerBands.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/chaikinAD.R b/R/chaikinAD.R index 44298fc..b4a93ca 100755 --- a/R/chaikinAD.R +++ b/R/chaikinAD.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/chaikinVolatility.R b/R/chaikinVolatility.R index 5d14eca..6c5cddd 100755 --- a/R/chaikinVolatility.R +++ b/R/chaikinVolatility.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/changes.R b/R/changes.R index fd0c4c4..8f9b64f 100755 --- a/R/changes.R +++ b/R/changes.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/pivots.R b/R/pivots.R index 5ed6261..2e45023 100644 --- a/R/pivots.R +++ b/R/pivots.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/priceBands.R b/R/priceBands.R index 6926cd6..12677bb 100644 --- a/R/priceBands.R +++ b/R/priceBands.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/runFun.R b/R/runFun.R index 885faa4..b5edff5 100755 --- a/R/runFun.R +++ b/R/runFun.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/stochastics.R b/R/stochastics.R index 4a92d85..096f109 100755 --- a/R/stochastics.R +++ b/R/stochastics.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/volatility.R b/R/volatility.R index a5fe830..f17458b 100644 --- a/R/volatility.R +++ b/R/volatility.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/R/williamsAD.R b/R/williamsAD.R index 35f2860..aa1e389 100755 --- a/R/williamsAD.R +++ b/R/williamsAD.R @@ -1,7 +1,7 @@ # # TTR: Technical Trading Rules # -# Copyright (C) 2007-2010 Joshua M. Ulrich +# Copyright (C) 2007-2011 Joshua M. Ulrich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/man/TTR.Rd b/man/TTR.Rd index 7b75a6e..d0a202d 100755 --- a/man/TTR.Rd +++ b/man/TTR.Rd @@ -12,8 +12,8 @@ \tabular{ll}{ Package: \tab TTR\cr Type: \tab Package\cr - Version: \tab 0.20-3\cr - Date: \tab 2011-01-12\cr + Version: \tab 0.21-0\cr + Date: \tab 2011-08-30\cr License: \tab GPL Version 3 or later.\cr }