#struct #proc #derived #generate #proc-macro #function #indicato-rs

macro indicato_rs_proc

Proc macro for generating indicato_rs struct derived functions

1 unstable release

0.1.0 Mar 8, 2024

#18 in #derived

Download history 108/week @ 2024-03-04 31/week @ 2024-03-11 22/week @ 2024-04-01

62 downloads per month
Used in indicato_rs

MIT license

3KB

DISCLAIMER

This is a personal project I am doing for fun, it is not recommended that you use these in any project where reliable statistical analysis is required. For limitations and license see LICENSE.md in the top level of this repo.

Indicato-rs

This is a library built to calculate common statistical signals used in Technical Analysis (TA) of markets.

Signals Currently Implemented:

Signal Code Tests Bench
Exponential Moving Average (EMA)
Maximum in Period
Minimum in Period
Moving Average Convergence Divergence (MACD)
Relative Strength Index (RSI)
Simple Moving Average (SMA)
Stochastic Momentum Oscillator
Wilders Smoothing

Design Philosophy

The library is designed to make it easy to use a combination of signal primitives to get the desired outcome. You'll notice that typically only the signal itself is implemented, any additional calculations must be added. A good example of this is MACD, typically MACD will have the MACD line, a EMA signal line, and the divergence. This library will only return the MACD line, for the signal line you will need an additional EMA primitive and it is the responsibility of the consumer to make comparisons.

Existing Work

Theres a great crate called ta, this crate was partially inspired by it. I mainly started this because I wanted lower level primitives to work with, I also wanted an easy way to peek at the result of a prospective input without cloning the whole struct by using an evaluate and apply mode.

Where possible I have used Investopedia's definition of formulas.

Dependencies

~1.5MB
~33K SLoC