Introduction

FinAnalysis library provides object-oriented components for financial applications: a large number of Technical Indicators and number of special collections useful for algorithmic trading strategies implementation. 


Functionality

  • Great simplicity. Indicators' API specially designed to make simple operations in purely intuitive way:

     

    + -
    Code example
    Sma sma = new Sma(10);
    private void OnBarClose(Bar bar)
    {
    sma.Add(bar.Close);
    if (bar.Close > sma.Value)
    {
    // Open position.
    }
    }
    

     

  • All indicators use optimized algorithms and formulas that allow to perform fast recalculation in minimal time.
  • A high precision mode has been added to prevent the growth of a computation error during data processing.
  • Various options for technical indicators usage: point based sliding windows, time based sliding window, offline data processing.
  • All indicators support large amount of options: input validation, resampling factors, cloning and copying of its internal state, accessing history of previous values, stability indicator.
  • All indicators equipped with special attributes and interfaces making integration with any automated system as charting or pattern fetching frameworks fairly simple.
  • Base classes provide an easiest way to extend library with your own indicators, which will automatically support all indicators' library features.
  • Special collections make custom indicators implementation straightforward and intuitive. Custom collections maintain sliding windows and support statistics calculation.

     

    + -
    Code example
    using System;  
    using FinAnalysis.Base;  
    [IndicatorCategory(IndicatorCategory.MovingAverage)] 
    [Indicator("Simple Moving Average", "SMA", "SMA are used to smooth the data..")] 
    class MySma : BaseSimpleIndicator<Double>, IAverager 
    { 	
    private SimpleDataQueue valueQueue; 	
    [Constructor("Point Window")]	
    public MySma([Parameter("Period", 14)] Int32 period)	
    { 		
    unstableValuesCount = period; 		
    valueQueue = new SimpleDataQueue(period, true);
    }
    protected override Boolean Update(Double value, DateTime time, out Double result)
    {
    valueQueue.Put(value, time); 		
    result = valueQueue.ArithmeticMean; 		
    return true; 	
    }  
    }

     


Features

List of sliding window statistics:

  • Min
  • Max
  • Sum
  • Sum Of Squares
  • Sum Of Absolute Values
  • First Raw Moment
  • Second Raw Moment
  • Third Raw Moment
  • Fourth Raw Moment
  • Second Central Moment
  • Third Central Moment
  • Fourth Central Moment 
  • Arithmetic Mean
  • Harmonic Mean
  • Quadratic Mean
  • Geometric Mean
  • Range
  • Midrange
  • Expected Value
  • Skewness
  • Standard Deviation Population
  • Standard Deviation Sample
  • Median
  • Coefficient Of Variation
  • Quantile
  • Order Statistic
  • Cumulative Distribution
  • Variance Population
  • Variance Sample
  • Kurtosis

List of available indicators:

  • AD
  • ADF
  • ADXR
  • Aroon
  • ATR
  • Autocorrelation
  • Autocorrelogram
  • Bollinger
  • CCI
  • CMA
  • Correlation
  • Correlogram
  • DeMarker
  • EMA
  • Envelope
  • Force Index
  • KAMA
  • Keltner
  • KPSS
  • LSMA
  • LSMI
  • MACD
  • Mass Index
  • Maximum
  • MCC
  • MESA Sinewave
  • MFI
  • Minimum
  • MMA
  • Momentum
  • OBV
  • Parabolic SAR
  • PFE
  • Price Oscillator
  • PVI/NVI
  • PVT
  • R2
  • ROC
  • RSI
  • RWI
  • Slope
  • SMA
  • Stochastic
  • TR
  • Ultimate Osc.
  • Value Area
  • VWAP
  • William's AD
  • William's %R
  • ZScore