inditech

Crates.ioinditech
lib.rsinditech
version0.1.0
sourcesrc
created_at2021-08-26 07:50:42.771628
updated_at2021-08-26 07:50:42.771628
descriptionA set of technical indicators for time series analysis
homepagehttps://github.com/stjepangolemac/inditech
repositoryhttps://github.com/stjepangolemac/inditech
max_upload_size
id442480
size18,591
Stjepan Golemac (stjepangolemac)

documentation

https://docs.rs/inditech

README

inditech

License

A set of technical indicators that can be used for time series analysis. There's only a few of them for now but new ones might be added soon.

Usage

use inditech::{Frame, Identity, EMA, ROC, RSI, SMA};

fn main() {
    let mut frame = Frame::new();
    frame.add(Box::new(Identity::new()));
    frame.add(Box::new(SMA::new(8)));
    frame.add(Box::new(EMA::new(8)));
    frame.add(Box::new(RSI::new(8)));
    frame.add(Box::new(ROC::new(8)));

    let data: Vec<f32> = generate_data();
    data.iter().for_each(|item| frame.push(item));

    dbg!(frame.last());
    // Vec[<data>, <sma8>, <ema8>, <rsi8>, <roc8>]
}
Commit count: 2

cargo fmt