Klinger Volume Oscillator

get_kvo(quotes, fast_periods=34, slow_periods=55, signal_periods=13)

Parameters

name type notes
quotes Iterable[Quote] Iterable of the Quote class or its sub-class.
See here for usage with pandas.DataFrame
fast_periods int, default 34 Number of lookback periods (F) for the short-term EMA. Must be greater than 2.
slow_periods int, default 55 Number of lookback periods (L) for the long-term EMA. Must be greater than F.
signal_periods int, default 13 Number of lookback periods for the signal line. Must be greater than 0.

Historical quotes requirements

You must have at least L+100 periods of quotes to cover the warmup periods. Since this uses a smoothing technique, we recommend you use at least L+150 data points prior to the intended usage date for better precision.

quotes is an Iterable[Quote] collection of historical price quotes. It should have a consistent frequency (day, hour, minute, etc). See the Guide for more information.

Return

KVOResults[KVOResult]

Convergence warning: The first L+150 periods will have decreasing magnitude, convergence-related precision errors that can be as high as ~5% deviation in indicator values for earlier periods.

KVOResult

name type notes
date datetime Date
oscillator float, Optional Klinger Oscillator
signal float, Optional EMA of Klinger Oscillator (signal line)

Utilities

See Utilities and Helpers for more information.

Example

from stock_indicators import indicators

# This method is NOT a part of the library.
quotes = get_history_from_feed("SPY")

# Calculate Klinger(34,55,13)
results = indicators.get_kvo(quotes, 34, 55, 13)

About Klinger Volume Oscillator

Created by Stephen Klinger, the Klinger Volume Oscillator depicts volume-based trend reversal and divergence between short and long-term money flow. [Discuss] 💬

image

Sources