joshuaulrich / TTR

Technical analysis and other functions to construct technical trading rules with R
GNU General Public License v2.0
330 stars 103 forks source link

OBV calculation when there's no price change #11

Closed joshuaulrich closed 9 years ago

joshuaulrich commented 9 years ago

The OBV function currently treats the no-price-change condition (Close[t] == Close[t-1]) the same as if the price change were negative. This is not the same as several references:

The calculations in the above references are the same as these references in ?OBV:

Note that the Linnsoft reference in ?OBV is consistent with the current implementation, and that the StockCharts link in ?OBV is dead.

Thanks to Anıl Çalışkan for the report.