# Oryon Rust library for feature and target engineering in quantitative trading. Python API via PyO3/maturin. Version 0.2.x. ## What it does Oryon builds ML datasets from financial time series (OHLCV bars). Three types of streaming transforms (all implement StreamingTransform, run live + research): - Features: stateful indicators with internal rolling state. - Scalers: normalization transforms, rolling or pre-fitted. - Operators: stateless math combining or transforming feature outputs. Plus batch labels for research: - Targets: forward-looking labels. Require future bars, research-only. Every StreamingTransform runs identically in live trading and backtesting. No separate research implementation. ## Features (v0.2) - Trend: Sma, Ema, Kama - Returns: SimpleReturn, LogReturn - Statistics: Adf, Skewness, Kurtosis, LinearSlope, Mma, ShannonEntropy, Correlation, AutoCorrelation - Volatility: ParkinsonVolatility, RogersSatchellVolatility ## Scalers (v0.2) - RollingZScore: rolling (x - mean) / std over a sliding window. Live-compatible. - FixedZScore: (x - mean) / std with pre-fitted parameters. Use with fit_standard_scaler. ## Operators (v0.2) - Add: A + B. Returns None if either input is None. - Subtract: A - B. Returns None if either input is None. - Multiply: A * B. Returns None if either input is None. - Divide: A / B. Returns None if either input is None or B is 0. - Reciprocal: 1/x. Returns None if x is None or 0. - Log: ln(x). Returns None if x <= 0 or None. - NegLog: -ln(x). Returns None if x <= 0 or None. - Logit: ln(x/(1-x)). Returns None if x outside (0, 1) or None. ## Fitting (v0.2) - fit_standard_scaler(data): computes mean and std from a column. Returns (mean, std). Skips None values. Use the result to construct FixedZScore. ## Targets (v0.2) - FutureReturn - FutureCTCVolatility - FutureLinearSlope ## Pipelines - FeaturePipeline: runs a DAG of StreamingTransforms (features, scalers, operators) on a dataset or one bar at a time. Dependencies resolved automatically by output/input names. - TargetPipeline: runs a list of targets on a full dataset (research only). ## Key conventions - Missing values are Option in Rust, NaN in Python. Never sentinel floats. - warm_up_period: number of NaN bars at the start of a StreamingTransform output. - forward_period: number of NaN bars at the end of a target output. - reset() clears internal state. Call between walk-forward folds. - Operators have warm_up_period = 0 and no internal state. - FixedZScore has warm_up_period = 0 (params are pre-fitted). ## Datasets - load_sample_bars(): ~14 000 OHLCV bars (time, open, high, low, close, volume), embedded in the package. ## Install pip install oryon ## Links - Docs: https://oryonlib.dev - Source: https://github.com/lucasinglese/oryon - PyPI: https://pypi.org/project/oryon