Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
Y

yata

> 编程语言
Open source

Yet Another Technical Analysis library [for Rust]

397 stars0 likes1 views
WebsiteGitHub

About

Yet Another Technical Analysis library [for Rust]

YATA

Yet Another Technical Analysis library

YaTa implements most common technical analysis methods and indicators.

It also provides you an interface to create your own indicators.

toml
[dependencies]
yata = "0.6"

Available moving averages:

  • Simple moving average (SMA);
  • Weighted moving average (WMA);
  • Exponential moving average family: EMA, DMA, TMA, DEMA, TEMA;
  • Simple moving median (SMM);
  • Linear regression moving average (LSMA);
  • Volume weighted moving average (VWMA);
  • Symmetrically weighted moving average (SWMA);
  • Hull moving average (HMA);
  • Running Moving Average (RMA);
  • Triangular Moving Average (TRIMA);
  • Wilder’s Smoothing Average (WSMA);
  • Kaufman Adaptive Moving Average (KAMA);
  • Convolution Moving Average;
  • Variable Index Dynamic Average (Vidya);

See all

Timeseries conversion

  • Timeframe Collapsing;
  • Heikin Ashi;
  • Renko;

Some commonly used methods:

  • Accumulation-distribution index;
  • Commodity channel index;
  • Cross / CrossAbove / CrossUnder;
  • Derivative (differential);
  • Highest / Lowest / Highest-Lowest Delta;
  • Highest Index / Lowest Index;
  • Integral (sum);
  • Mean absolute deviation;
  • Median absolute deviation;
  • Momentum;
  • Past;
  • Rate Of Change (ROC);
  • Reversal points;
  • Standard Deviation;
  • True Range;
  • True Strength Index;
  • Volatility;

See all

Some commonly used indicators:

  • Average Directional Index;
  • Awesome Oscillator;
  • Bollinger Bands;
  • Commodity Channel Index;
  • Detrended Price Oscillator;
  • Ease Of Movement;
  • Elders Force Index;
  • Envelopes;
  • Fisher Transform;
  • Ichimoku Cloud;
  • Keltner Channels;
  • Moving Average Convergence Divergence (MACD);
  • Money Flow Index;
  • Price Channel Strategy;
  • Relative Strength Index (RSI);
  • Stochastic Oscillator;
  • Trix;
  • Woodies CCI;

And many others. See all

Method usage example

rust
use yata::prelude::*;
use yata::methods::EMA;

// EMA of length=3
let mut ema = EMA::new(3, &3.0).unwrap();

ema.next(&3.0);
ema.next(&6.0);

assert_eq!(ema.next(&9.0), 6.75);
assert_eq!(ema.next(&12.0), 9.375);

Indicator usage example

rust
use yata::helpers::{RandomCandles, MA};
use yata::indicators::MACD;
use yata::prelude::*;

let mut candles = RandomCandles::new();
let mut macd = MACD::default();

macd.method1 = "sma-4".parse().unwrap(); // one way of defining methods inside indicators

macd.signal = MA::TEMA(5); // another way of defining methods inside indicators

let mut macd = macd.init(&candles.first()).unwrap();

for candle in candles.take(10) {
	let result = macd.next(&candle);

	println!("{:?}", result);
}

Benchmarks

Methods

  • _w10 - method with window length=10
  • _w100 - method with window length=100
…

Indicators

…

Current unsafe status

By default, there is no unsafe code in the crate. But you can optionally enable unsafe_performance feature throw you Cargo.toml or by --feature flag in your CLI.

unsafe_performance enables some unsafe code blocks, most of them are unsafe access to a vector's elements. For some methods it may increase performance by ~5-10%.

Features

  • serde - enables serde crate support;
  • period_type_u16 - sets PeriodType to u16;
  • period_type_u32 - sets PeriodType to u32;
  • period_type_u64 - sets PeriodType to u64;
  • value_type_f32 - sets ValueType to f32;
  • unsafe_performance - enables optional unsafe code blocks, which may increase performance;

Rust version

YaTa library supports Rust stable except that you can't run benchmarks with it.

Suggestions

You are welcome to give any suggestions about implementing new indicators and methods.

Say thanks

If you like this library, and you want to say thanks, you can do it also by donating to bitcoin address 1P3gTnaTK9LKSYx2nETrKe2zjP4HMkdhvK

Issues· 9 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustindicatorsmoving-averagetechnical-analysistrading

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言