#finance-trading #forecasting #trading #strategies

nyxs_owl

A comprehensive Rust library for trading, forecasting, and financial analysis

8 releases (5 breaking)

0.7.2 Jun 16, 2025
0.7.1 Jun 16, 2025
0.5.0 Jun 2, 2025
0.4.0 Jun 2, 2025
0.1.0 May 19, 2025

#390 in Finance

Download history

439 downloads per month

MIT/Apache

1MB
17K SLoC

NyxsOwl

crates.io Documentation MIT/Apache-2.0 licensed

A comprehensive Rust library for trading, forecasting, and financial analysis.

Features

  • Technical Indicators - Complete suite of trading indicators (SMA, EMA, RSI, MACD, Bollinger Bands, etc.)
  • Trading Math - Core mathematical functions for financial analysis
  • Forecasting - Time series forecasting with OxiDiviner integration
  • Strategy Library - Advanced trading strategies for multiple timeframes

Installation

Add this to your Cargo.toml:

[dependencies]
nyxs_owl = { version = "0.2.0", features = ["trading-math"] }

Quick Start

use nyxs_owl::trade_math::{
    moving_averages::SimpleMovingAverage,
    volatility::BollingerBands,
    oscillators::RelativeStrengthIndex,
};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Create indicators
    let mut sma = SimpleMovingAverage::new(20)?;
    let mut bb = BollingerBands::new(20, 2.0)?;
    let mut rsi = RelativeStrengthIndex::new(14)?;

    // Sample price data
    let prices = vec![100.0, 102.0, 101.5, 103.0, 104.5];

    for price in prices {
        sma.update(price)?;
        bb.update(price)?;
        rsi.update(price)?;

        if let Ok(sma_val) = sma.value() {
            println!("SMA: {:.2}", sma_val);
        }
    }

    Ok(())
}

Examples

Run the working examples:

# Technical indicators demo
cargo run --example trade_math_demo --features="trading-math"

# Comprehensive trading analysis
cargo run --example comprehensive_trading_analysis --features="trading-math"

License

Licensed under either of:

at your option.

Dependencies

~64–99MB
~2M SLoC