[−][src]Module yata::methods
Commonly used methods for manipulating timeseries.
Every method implements Method
trait.
To create a method instance use Method::new
.
To get new output value over the input value use Method::next
.
// creating Weighted Moving Average of length 5 use yata::prelude::*; use yata::methods::WMA; let mut wma = WMA::new(5, 20.0); let input_value = 34.51; let output_value = wma.next(input_value);
Examples
use yata::prelude::*; use yata::methods::SMA; let mut sma = SMA::new(3, 5.0); sma.next(5.0); sma.next(4.0); assert_eq!(sma.next(6.0), 5.0); assert_eq!(sma.next(2.0), 4.0); assert_eq!(sma.next(-2.0), 2.0);
Structs
ADI | Accumulation Distribution Index of specified |
Conv | Convolution Moving Average with specified |
Cross | Searches for two timeseries lines of type |
CrossAbove | Searches for |
CrossUnder | Searches for |
DEMA | Double Exponential Moving Average of specified |
DMA | |
Derivative | Derivative of specified window |
EMA | Exponential Moving Average of specified |
HMA | Hull Moving Average for last |
Highest | Returns highest value over the last |
HighestLowestDelta | Calculates absolute difference between highest and lowest values over the last |
Integral | Integrates (summarizes) |
LinReg | Linear regression moving average for last |
LinearVolatility | Calculate moving linear volatility for last |
Lowest | Returns lowest value over the last |
Momentum | Momentum calculates difference between current
value and n-th value back, where n = |
Past | Moves timeseries by |
PivotHighSignal | Searches for high Pivot Points over last |
PivotLowSignal | Searches for low Pivot Points over last |
PivotSignal | Searches for Pivot Points over last |
RMA | Running Moving Average of specified |
RateOfChange | Rate of change calculates relative difference between current
value and n-th value back, where n = |
SMA | Simple Moving Average of specified |
SMM | Simle Moving Median of specified |
SWMA | Symmetrically Weighted Moving Average of specified |
StDev | Moving Standart Deviation over the window of size |
TEMA | Triple Exponential Moving Average of specified |
TMA | Simple shortcut for EMA over EMA over EMA (or EMA over DMA, or DMA over EMA) |
TRIMA | Triangular Moving Average of specified |
VWMA | Volume Weighed Moving Average of specified |
WMA | Weighed Moving Average of specified |
Type Definitions
Change | Just an alias for Momentum method |
Differential | Just an alias for Derivative |
MMA | Just an alias for RMA |
MTM | Just an alias for Momentum method |
ROC | Just an alias for RateOfChange method |
SMMA | Just an alias for RMA |
Sum | Just an alias for Integral |