forked from joshuaulrich/TTR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGES
419 lines (229 loc) · 12 KB
/
CHANGES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
#-#-#-#-#-#-#-#-#-# Changes in TTR version 0.23-0 #-#-#-#-#-#-#-#-#-#
SIGNIFICANT USER-VISIBLE CHANGES
- Update DVI to use runPercentRank. Thanks to Ivan Popivanov for the patch.
- getYahooData now returns an xts object with Date index (not POSIXct).
- MA function colnames no longer based on input colnames.
NEW FEATURES
- Add HMA and ALMA functions/docs. Thanks to Ivan Popivanov.
- Add Ultimate Oscillator function/docs/tests. Thanks to Ivan Popivanov.
BUG FIXES
- runFuns now throw error if there are not enough non-NA values.
- Change all instances of lag() to lag.xts() in case 'x' is a matrix.
Thanks to Ivan Popivanov for the report.
- Correct output column names in ATR docs.
- CLV now sets NaN and Inf values to 0, instead of only NaN values.
- Fix OBV so OBV[t] = OBV[t-1] when Close[t] == Close[t-1].
- Fix dead links in documentation.
#-#-#-#-#-#-#-#-#-# Changes in TTR version 0.22-0 #-#-#-#-#-#-#-#-#-#
SIGNIFICANT USER-VISIBLE CHANGES
- CCI now returns an object with colnames ("cci").
- All moving average functions now attempt to set colnames.
- Added clarification on the displaced nature of DPO.
- SAR now sets the initial gap based on the standard deviation of the
high-low range instead of hard-coding it at 0.01.
NEW FEATURES
- Added rollSFM function that calculates alpha, beta, and R-squared for a
single-factor model, thanks to James Toll for the prototype.
- Added runPercentRank function, thanks to Charlie Friedemann.
- Moved slowest portion of aroon() to C.
- DonchianChannel gains an 'include.lag=FALSE' argument, which includes the
current period's data in the calculation. Setting it to TRUE replicates
the original calculation. Thanks to Garrett See and John Bollinger.
- The Stochastic Oscillator and Williams' %R now return 0.5 (instead of NaN)
when a securities' price doesn't change over a sufficient period.
- All moving average functions gain '...'.
- Users can now change alpha in Yang Zhang volatility calculation.
BUG FIXES
- Fixed MACD when maType is a list. Now mavg.slow=maType[[2]] and
mavg.fast=maType[[1]], as users expected based on the order of the nFast
and nSlow arguments. Thanks to Phani Nukala and Jonathan Roy.
- Fixed bug in lags function, thanks to Michael Weylandt.
- Corrected error in Yang Zhang volatility calculation, thanks to several
people for identifying this error.
- Correction to SAR extreme point calculations, thanks to Vamsi Galigutta.
- adjRatios now ensures all inputs are univariate, thanks to Garrett See.
- EMA and EVWMA now ensure n < number of non-NA values, thanks to Roger Bos.
- Fix to BBands docs, thanks to Evelyn Mitchell.
#-#-#-#-#-#-#-#-#-# Changes in TTR version 0.21-1 #-#-#-#-#-#-#-#-#-#
BUG FIXES
- Fixed stockSymbols for nasdaq.com changes (again), and attempted to make
stockSymbols more robust to nasdaq.com changes.
- Corrected final calculation in Yang-Zhang volatility, thanks to Shal Patel.
- Corrected k in Yang-Zhang volatility, thanks to Ian Rayner.
- Corrected s2o and s2c in Yang-Zhang volatility, thanks to Ian Rayner.
- Corrected KST when input is xts (res is now * 100), thanks to Yuanwei.
#-#-#-#-#-#-#-#-#-# Changes in TTR version 0.21-0 #-#-#-#-#-#-#-#-#-#
NEW FEATURES
- Added variable moving average function, VMA.
- Added Brian Peterson's price bands function, PBands.
- Added David Varadi's DVI indicator, DVI.
- Added wilder and ratio arguments to DEMA. Thanks to Matthew Fornari for
the suggestion.
BUG FIXES
- Changed wilderSum to seed initial value with raw sum. This matches
Wilder's original calculations. Thanks to Mahesh Bp for the report.
- 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.
- Fixed stockSymbols for nasdaq.com changes.
- 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.
- Corrected close-to-close volatility. Thanks to James Toll for the report.
- adjRatios failed (spectacularly) if there were missing close prices.
Thanks to Garrett See for the report.
#-#-#-#-#-#-#-#-#-# Changes in TTR version 0.20-2 #-#-#-#-#-#-#-#-#-#
NEW FEATURES
- Added VWAP and VWMA, thanks to Brian Peterson.
- Added v-factor generalization to DEMA, thanks to John Gavin.
- Updated volatility() to handle univariate case of calc='close', thanks
to Cedrick Johnson.
- Moved EMA, SAR, and wilderSum from .Fortran to .Call and used
xts:::naCheck in lieu of TTR's NA check mechanism.
- RSI up/down momentum now faster with xts, thanks to Jeff Ryan.
- 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.
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 fastK in stoch() when smooth != 1.
- Fixed segfault caused by EMA when n < NROW(x), thanks to Douglas Hobbs.
- test.EMA.wilder failed under R-devel, thanks to Prof Brian Ripley.
#-#-#-#-#-#-#-#-#-# Changes in TTR version 0.20-1 #-#-#-#-#-#-#-#-#-#
NEW FEATURES
- Updated CMO, DPO, DonchianChannel, RSI, and TDI to *explicitly*
use xts internally.
BUG FIXES
- Fixed bug in WMA, EVWMA, ZLEMA, and GMMA; results were not being
reclassed back to their original class.
- Set colnames after cbind call in the following functions: ADX, aroon,
ATR, BBands, DonchianChannel, EMV, KST, MACD, stoch, SMI, TDI, TRIX.
- Fixed bug in VHF; missing abs() calculation in the denominator.
Thanks to Jürgen Wurzer for the report!
#-#-#-#-#-#-#-#-#-# Changes in TTR version 0.20-0 #-#-#-#-#-#-#-#-#-#
NEW FEATURES
- adjRatios() creates split and/or dividend adjustment ratio series via
C code.
- GMMA() calculates the Guppy Multiple Moving Average.
- volatility() now has Yang Zhang, and Garman-Klass (Yang Zhang)
calculations.
- The functions below now have cumulative argument. This allows the
calculation of "from inception" running series.
- runSum, runMin, runMax
- runMean, runMedian
- runCov, runCor, runVar, runSD, runMAD
- Added internal smoothing to FastK in stoch() via 'smooth' argument,
thanks to Stanley Neo.
- getYahooData() now uses adjRatios(), which yields significant speed
improvements for larger data sets.
BUG FIXES
- Fixed version number; 0.20-0 is now > 0.14-0 (rookie mistake).
- Fixed bug when maType was a list and 'n' was not specified in maType.
This affected: stoch(), SMI(), RSI(), KST(), MACD(), TRIX().
#-#-#-#-#-#-#-#-#-# Changes in TTR version 0.2-0 #-#-#-#-#-#-#-#-#-#
SIGNIFICANT USER-VISIBLE CHANGES
- getYahooData() now returns an xts object.
- Added colnames to output for ADX, EMV, and CLV (for xts).
- momentum() in CMO() no longer sets na=100.
- Replaced 'na' argument in momentum() and ROC() with 'na.pad'.
- Moved maType argument 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
NEW FEATURES
- 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 'bounded' arg to stoch() and SMI(), which includes the current
period in the calculation.
- 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().
- Added 'multiple' argument to TDI(), allowing more user control.
- Added naCheck() and implemented it in the moving average functions.
BUG FIXES
- Corrected NaN replacement in CLV().
- Corrected williamsAD(): AD=0 if C(t)=C(t-1).
- Corrected runMedian() and runMAD(). 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 period n+1, instead of n.
- Added NA to first element of closeLag of ATR().
- Corrected BBands() and CCI() for rowMeans use on xts objects.
- Made changes to Rd files to pass R CMD check on R-devel (2.9.0).
#-#-#-#-#-#-#-#-#-# Changes in TTR version 0.14-0 #-#-#-#-#-#-#-#-#-#
SIGNIFICANT USER-VISIBLE CHANGES
- Changed default 'type' of 'ROC' to 'continuous'.
- Changed 'BBands' %B output value from 'pct.b' to 'pctB'.
- Changed 'WPR' output value from 'pct.R' to 'pctR'.
- Changed 'WPR' MA output value from 'ma.emv' to 'emvMA'.
- Changed 'aroon' output values from 'aroon.xx' to 'aroonXx'.
- Renamed:
'chaikinMF' to 'CMF'
'stochastic' to 'stoch'
'bollingerBands' to 'BBands'
- Set 'na=NA' for 'momentum' and 'ROC' functions in files KST.R,
RSI.R, and TDI.R, and changed 'ROC' to use 'type="discrete"'
in 'chaikinVolatility.R'
- Made the following changes to the 'ZLEMA' function:
- Add ratio argument with default = NULL
- Non-integer lags are a weighted mean of the two nearest
observations, based on thier proximity to the lag value
- Change 'lag = ratio^(-1)' to fully support 'ratio' argument
- Changed the 'BBands' function's 'sd' argument from a list
that allows other dispersion functions to simply indicate the
number of standard deviations to use
NEW FEATURES
- Changed MA-type args and updated documentation for: RSIm ADX, ATR,
CCI, DPO, EMV, RSI, BBands, chaikinVolatility, stoch, SMI, TRIX,
MACD, and KST.
- Added Stochastic Momentum Index (SMI) and williamsAD functions
and documentation.
- Added Fortran implementations of SMA, EMA, WMA, EVWMA, ZLEMA, PSAR.
- Added NA checking/handling for many functions.
- Added 'ratio' argument to EMA with default=NULL.
- Changed all usage of 'rollFun' to their respective Fortran
implementations and removed the 'rollFun' function. Added Fortran
based functions are: runSum, wilderSum, runMin, runMax, runMean,
runCov, runCor, runVar, runSD, runMedian, runMAD.
- Changed 'CCI' to use 'runMAD' internally.
DEPRECATED & DEFUNCT
- Removed 'oscillator' function and transferred functionality
to 'MACD' function.
- Removed chaikinOscillator, since it can be created via
MACD(chaikinAD(...)).
BUG FIXES
- match.arg(type) in ROC changed to simple subsetting of type.
- Changed trailing zeros to trailing NAs in DPO.
- Fixed 'WMA' bug that allowed 'x' and 'wts' vectors to have different
length if either series had leading NAs (similar to EVWMA function).
- Fixed 'runCov' bug that allowed 'x' and 'y' vectors to have different
length if either series had leading NAs (similar to EVWMA function).
- Corrected EVWMA to start at period 'n' instead of 'n-1'.
- Removed 'message' function from CCI.R, VHF.R, WPR.R, aroon.R
bollingerBands.R, and stochastics.R.
#-#-#-#-#-#-#-#-#-# Changes in TTR version 0.13-2 #-#-#-#-#-#-#-#-#-#
SIGNIFICANT USER-VISIBLE CHANGES
- Changed order of oscillator() arguments from 'ma.slow, ma.fast, ma.sig' to
the traditional 'ma.fast, ma.slow, ma.sig'. Thanks to Jeff Ryan.
- The arguments to the chaikinOscillator function were changed as above.
- Changed EVWMA so period n contains the value for periods (i-n+1):n and
so periods 1:(n-2) will be NA.
- Changed EMA so periods 1:n will be NA.
#-#-#-#-#-#-#-#-#-# Changes in TTR version 0.13-1 #-#-#-#-#-#-#-#-#-#
SIGNIFICANT USER-VISIBLE CHANGES
- Changed 'bbands()' to 'bollingerBands()'
- Changed 'DX()' to 'ADX()'
- Changed 'stoch()' to 'stochastic()'
BUG FIXES
- Corrected mis-spellings in documentation.
#-#-#-#-#-#-#-#-#-#
SIGNIFICANT USER-VISIBLE CHANGES
NEW FEATURES
DEPRECATED & DEFUNCT
BUG FIXES