Signature Description Parameters
#include <DataFrame/DataFrameFinancialVisitors.h>

template<typename T, typename I = unsigned long>
struct FisherTransVisitor;

// -------------------------------------

template<typename T, typename I = unsigned long>
using ftrans_v = FisherTransVisitor<T, I>;
        
This is a “single action visitor”, meaning it is passed the whole data vector in one call and you must use the single_act_visit() interface.

This visitor calculates Fisher transform. The Fisher Transform is a technical indicator created by John F. Ehlers that converts prices into a Gaussian normal distribution. In this way, the indicator highlights when prices have moved to an extreme, based on recent prices. This may help in spotting turning points in the price of an asset. It also helps show the trend and isolate the price waves within a trend.
The result is a vector of values with same number of items as the given column. The first roll_count items, in the result, will be NAN.
    explicit
    FisherTransVisitor(std::size_t roll_count = 9);
        
T: Column data type
I: Index type
static void test_FisherTransVisitor()  {

    std::cout << "\nTesting FisherTransVisitor{  } ..." << std::endl;

    typedef StdDataFrame<std::string> StrDataFrame;

    StrDataFrame    df;

    try  {
        df.read("IBM.csv", io_format::csv2);

        FisherTransVisitor<double, std::string> ft_v;

        df.single_act_visit<double, double>("IBM_Low", "IBM_High", ft_v);

        assert(ft_v.get_result().size() == 5031);
        assert(std::isnan(ft_v.get_result()[0]));
        assert(std::isnan(ft_v.get_result()[7]));
        assert(ft_v.get_result()[8] == 0);
        assert(std::abs(ft_v.get_result()[29] - -1.47814) < 0.00001);
        assert(std::abs(ft_v.get_result()[34] - -2.12198) < 0.00001);
        assert(std::abs(ft_v.get_result()[5030] - -2.82683) < 0.00001);
        assert(std::abs(ft_v.get_result()[5026] - -2.12427) < 0.00001);
        assert(std::abs(ft_v.get_result()[5021] - -0.266774) < 0.000001);
    }
    catch (const DataFrameError &ex)  {
        std::cout << ex.what() << std::endl;
    }
}