C++ neural networks applied to stock markets

stock market moves

I have quite an interest in random processes and exactly how we can go about looking for patterns in seemingly random phenomena. One interesting topic I wanted to bring up today was the use of neural networks to predict future stock market trends. What I will present is some free C++ code you can install and then try for yourselves whereby you can employ your own neural networks (NN) on real market data using some wrappers to ROOT (http://root.cern.ch/drupal/)! The strategy is based on buying a certain stock, in this case it is actually trading with a benchmark index known as the SNP500 (http://us.spindices.com/indices/equity/sp-500). The code is an extension to a wonderful package called Hudson written by Alberto Giannetti, he offers a GPL licensed end of day back testing framework using C++ stl, boost, ta-libs and gnu-gsl libraries ( original code base is here http://code.google.com/p/hudson/ ) where you can load in various formats of csv file (Yahoo, Google etc). This extension allows one to perform a multivariate analysis (MVA) which can decipher linear and non-linear trends between input variables of a given dataset and then test its performance. Please bear in mind that this was written during my PhD studies and was solely for fun one weekend. There are clear areas that can be improved in terms of the C++ I just don’t have the time right now, feel free to email me or leave a comment if you like for ways to aid the project. My extension can be obtained from the following location

# Download the repo
git co https://mattreid9956@bitbucket.org/mattreid9956/hudson-mva.git
cd hudson-mva
./build.sh
cd example/MVA_SNP500
# open the run.sh script and try executing the lines one by one to see if they all work, let me know if you have trouble.

This week there is an accompanying pdf file where you can find the detail of a study employed on SNP500 data obtained from Yahoo Finance.

TMVA-StockMarket.pdf

Anyway check out the pdf file if you find it remotely interesting give me a shout. It’s not “complete”, but close enough and I wanted to get it out there and see if anyone is interested in collaborating (I am trying to finish my PhD as well as several other things and don’t like leaving things on the back burner for too long, so here it is). Anyone up to date with particle physics techniques will immediately recognise the format here, anyone who is not will hopefully gain an insight into how some of these techniques can be applied in a toy model trading situation. A network such as this may not be valid indefinitely, its effectiveness would need continuous evaluation, since like I say in the paper, a market is not static and there will be periods of non-normal activity (government intervention for instance). What would be interesting is developing methods of when to turn on a trend following algorithm and when not to! Anyway, if you have any thoughts let me know!

5 comments on “C++ neural networks applied to stock markets

  1. Ivan Figueredo says:

    Hi I can’t compile the hudson-mva code on Mac OS X Mavericks. See below for errors:
    mm2:hudson-mva ivanfigueredo$ ./build.sh
    ++ basename ./build.sh
    + cd ./
    + mkdir -p build
    + cd build
    ++ grep ‘cpu cores’
    ++ cat /proc/cpuinfo
    ++ uniq
    ++ awk ‘{print $NF}’
    cat: /proc/cpuinfo: No such file or directory
    + n=
    + cmake -DCMAKE_BUILD_TYPE=DEBUG ..
    — The C compiler identification is AppleClang 6.0.0.6000051
    — The CXX compiler identification is AppleClang 6.0.0.6000051
    — Check for working C compiler: /usr/bin/cc
    — Check for working C compiler: /usr/bin/cc — works
    — Detecting C compiler ABI info
    — Detecting C compiler ABI info – done
    — Check for working CXX compiler: /usr/bin/c++
    — Check for working CXX compiler: /usr/bin/c++ — works
    — Detecting CXX compiler ABI info
    — Detecting CXX compiler ABI info – done
    — Boost version: 1.55.0
    GSL_DEFINITIONS=
    GSL_INCLUDE_DIRS=/usr/local/Cellar/gsl/1.16/include
    GSL_CFLAGS=-I/usr/local/Cellar/gsl/1.16/include
    — Using GSL from
    — FindGSL: Found both GSL headers and library
    — Looking for ta_lib…
    — Found ta_lib: /usr/local/lib/libta_lib.dylib
    — Looking for Root…
    — Looking for Root… – found /Users/ivanfigueredo/Downloads/root/bin/root
    — Looking for Root… – version 5.34/21
    — Found ROOT. We will compile against the Neural Network package :).
    — Include libraries are /usr/local/include;/Users/ivanfigueredo/Downloads/hudson-mva/Hudson
    — Configuring done
    CMake Warning (dev):
    Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run “cmake
    –help-policy CMP0042” for policy details. Use the cmake_policy command to
    set the policy and suppress this warning.

    MACOSX_RPATH is not specified for the following targets:

    AATrader
    AATraderMACD
    BOWTrader
    EOMTrader
    GoogleMVABacktester
    GoogleTrendReader
    Hudson
    JanTrader
    MVABacktester
    NN
    VIXTrader

    This warning is for project developers. Use -Wno-dev to suppress it.

    — Generating done
    — Build files have been written to: /Users/ivanfigueredo/Downloads/hudson-mva/build
    + make -j
    Scanning dependencies of target NN
    Scanning dependencies of target AATrader
    Scanning dependencies of target EOMTrader
    Scanning dependencies of target BOWTrader
    Scanning dependencies of target AATraderMACD
    Scanning dependencies of target VIXTrader
    Scanning dependencies of target JanTrader
    Scanning dependencies of target Hudson
    Scanning dependencies of target MVABacktester
    Scanning dependencies of target GoogleTrendReader
    Scanning dependencies of target GoogleMVABacktester
    [ 1%] Building CXX object examples/MakeGoogleTrendsTuple/CMakeFiles/GoogleTrendReader.dir/GoogleTrendReader.cpp.o
    [ 3%] Building CXX object examples/AATrader/CMakeFiles/AATrader.dir/AATrader.cpp.o
    [ 4%] [ 6%] [ 7%] [ 9%] Building CXX object examples/AATraderMACD/CMakeFiles/AATraderMACD.dir/AATraderMACD.cpp.o
    Building CXX object examples/EOMTrader/CMakeFiles/EOMTrader.dir/EOMTrader.cpp.o
    Building CXX object examples/VIXTrader/CMakeFiles/VIXTrader.dir/VIXTrader.cpp.o
    Building CXX object examples/BOWTrader/CMakeFiles/BOWTrader.dir/BOWTrader.cpp.o
    [ 11%] Building CXX object examples/JanTrader/CMakeFiles/JanTrader.dir/JanTrader.cpp.o
    [ 12%] [ 14%] Building CXX object NN/CMakeFiles/NN.dir/TMVAClassification.cpp.o
    [ 15%] Building CXX object examples/MVABacktester/CMakeFiles/MVABacktester.dir/MVABacktester.cpp.o
    Building CXX object NN/CMakeFiles/NN.dir/TreeWriter.cpp.o
    [ 17%] Building CXX object NN/CMakeFiles/NN.dir/TreeReader.cpp.o
    [ 19%] [ 20%] Building CXX object NN/CMakeFiles/NN.dir/TMVAReader.cpp.o
    Building CXX object NN/CMakeFiles/NN.dir/string_tools.cpp.o
    [ 22%] Building CXX object examples/GoogleMVABacktester/CMakeFiles/GoogleMVABacktester.dir/GoogleMVABacktester.cpp.o
    /Users/ivanfigueredo/Downloads/hudson-mva/NN/string_tools.cpp:125:26: warning: comparison of constant 128 with expression of type
    ‘const char’ is always true [-Wtautological-constant-out-of-range-compare]
    return !( c>= 0 && c first, Price(hedge_entry_it…
    ^
    Linking CXX shared library libGoogleTrendReader.dylib
    Undefined symbols for architecture x86_64:
    “IndicatorApp::initialise()”, referenced from:
    GoogleTrendReader::getListOfFiles(char const*, char const*, int const&) in GoogleTrendReader.cpp.o
    “IndicatorApp::add(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, double const&, double const&, double const&)”, referenced from:
    GoogleTrendReader::getListOfFiles(char const*, char const*, int const&) in GoogleTrendReader.cpp.o
    “IndicatorApp::next()”, referenced from:
    GoogleTrendReader::writeData() in GoogleTrendReader.cpp.o
    “IndicatorApp::evaluate(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)”, referenced from:
    GoogleTrendReader::writeData() in GoogleTrendReader.cpp.o
    “IndicatorApp::IndicatorApp(Series::EODSeries const&)”, referenced from:
    GoogleTrendReader::getListOfFiles(char const*, char const*, int const&) in GoogleTrendReader.cpp.o
    “IndicatorApp::~IndicatorApp()”, referenced from:
    GoogleTrendReader::~GoogleTrendReader() in GoogleTrendReader.cpp.o
    “string_tools::replaceAfter(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)”, referenced from:
    GoogleTrendReader::getListOfFiles(char const*, char const*, int const&) in GoogleTrendReader.cpp.o
    “TVersionCheck::TVersionCheck(int)”, referenced from:
    __GLOBAL__I_a in GoogleTrendReader.cpp.o
    “TSystemDirectory::TSystemDirectory(char const*, char const*)”, referenced from:
    GoogleTrendReader::getListOfFiles(char const*, char const*, int const&) in GoogleTrendReader.cpp.o
    “TSystemDirectory::~TSystemDirectory()”, referenced from:
    GoogleTrendReader::getListOfFiles(char const*, char const*, int const&) in GoogleTrendReader.cpp.o
    “NN::TreeWriter::add(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)”, referenced from:
    GoogleTrendReader::GoogleTrendReader(Series::EODSeries const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in GoogleTrendReader.cpp.o
    GoogleTrendReader::getListOfFiles(char const*, char const*, int const&) in GoogleTrendReader.cpp.o
    “NN::TreeWriter::write()”, referenced from:
    GoogleTrendReader::writeData() in GoogleTrendReader.cpp.o
    “NN::TreeWriter::column(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, float const&)”, referenced from:
    GoogleTrendReader::writeData() in GoogleTrendReader.cpp.o
    “NN::TreeWriter::TreeWriter(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)”, referenced from:
    GoogleTrendReader::GoogleTrendReader(Series::EODSeries const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in GoogleTrendReader.cpp.o
    “NN::TreeWriter::~TreeWriter()”, referenced from:
    GoogleTrendReader::GoogleTrendReader(Series::EODSeries const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in GoogleTrendReader.cpp.o
    GoogleTrendReader::~GoogleTrendReader() in GoogleTrendReader.cpp.o
    “Series::EODDB::load(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, Series::EODDB::DriverType, boost::gregorian::date const&, boost::gregorian::date const&)”, referenced from:
    GoogleTrendReader::getListOfFiles(char const*, char const*, int const&) in GoogleTrendReader.cpp.o
    “Series::EODDB::instance()”, referenced from:
    GoogleTrendReader::getListOfFiles(char const*, char const*, int const&) in GoogleTrendReader.cpp.o
    “TString::TString()”, referenced from:
    GoogleTrendReader::getListOfFiles(char const*, char const*, int const&) in GoogleTrendReader.cpp.o
    “TString::~TString()”, referenced from:
    GoogleTrendReader::getListOfFiles(char const*, char const*, int const&) in GoogleTrendReader.cpp.o
    “TString::operator=(char const*)”, referenced from:
    GoogleTrendReader::getListOfFiles(char const*, char const*, int const&) in GoogleTrendReader.cpp.o
    “TSystemDirectory::GetListOfFiles() const”, referenced from:
    GoogleTrendReader::getListOfFiles(char const*, char const*, int const&) in GoogleTrendReader.cpp.o
    “Series::EODDB::get(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) const”, referenced from:
    GoogleTrendReader::getListOfFiles(char const*, char const*, int const&) in GoogleTrendReader.cpp.o
    “Series::EODSeries::first_in_week(boost::gregorian::greg_year, boost::gregorian::greg_month, boost::gregorian::greg_day) const”, referenced from:
    GoogleTrendReader::calculatePercentage(boost::gregorian::date const&) in GoogleTrendReader.cpp.o
    “Series::EODSeries::after(boost::gregorian::date const&, unsigned int) const”, referenced from:
    GoogleTrendReader::calculatePercentage(boost::gregorian::date const&) in GoogleTrendReader.cpp.o
    “TString::EndsWith(char const*, TString::ECaseCompare) const”, referenced from:
    GoogleTrendReader::getListOfFiles(char const*, char const*, int const&) in GoogleTrendReader.cpp.o
    “operator+(char const*, TString const&)”, referenced from:
    GoogleTrendReader::getListOfFiles(char const*, char const*, int const&) in GoogleTrendReader.cpp.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [examples/MakeGoogleTrendsTuple/libGoogleTrendReader.dylib] Error 1
    make[1]: *** [examples/MakeGoogleTrendsTuple/CMakeFiles/GoogleTrendReader.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs….
    Linking CXX shared library libNN.dylib
    [ 77%] Built target NN
    In file included from /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/EOMReport.cpp:23:
    In file included from /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/EOMReport.hpp:31:
    In file included from /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/Report.hpp:34:
    /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/ReturnFactors.hpp:130:12: warning: private field ‘_curr_price’ is not used
    [-Wunused-private-field]
    double _curr_price;
    ^
    /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/ReturnFactors.hpp:140:12: warning: private field ‘_curr_price’ is not used
    [-Wunused-private-field]
    double _curr_price;
    ^
    In file included from /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/EOMReturnFactors.cpp:26:
    In file included from /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/EOMReturnFactors.hpp:38:
    /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/ReturnFactors.hpp:130:12: warning: private field ‘_curr_price’ is not used
    [-Wunused-private-field]
    double _curr_price;
    ^
    /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/ReturnFactors.hpp:140:12: warning: private field ‘_curr_price’ is not used
    [-Wunused-private-field]
    double _curr_price;
    ^
    In file included from /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/PortfolioReport.cpp:26:
    In file included from /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/PortfolioReport.hpp:31:
    In file included from /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/PortfolioReturns.hpp:31:
    In file included from /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/EOMReturnFactors.hpp:38:
    /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/ReturnFactors.hpp:130:12: warning: private field ‘_curr_price’ is not used
    [-Wunused-private-field]
    double _curr_price;
    ^
    /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/ReturnFactors.hpp:140:12: warning: private field ‘_curr_price’ is not used
    [-Wunused-private-field]
    double _curr_price;
    ^
    In file included from /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/PositionFactors.cpp:29:
    /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/PositionFactors.hpp:85:34: warning: private field ‘_pt’ is not used
    [-Wunused-private-field]
    const Series::EODDB::PriceType _pt;
    ^
    In file included from /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/PortfolioReturns.cpp:23:
    In file included from /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/PortfolioReturns.hpp:31:
    In file included from /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/EOMReturnFactors.hpp:38:
    /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/ReturnFactors.hpp:130:12: warning: private field ‘_curr_price’ is not used
    [-Wunused-private-field]
    double _curr_price;
    ^
    /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/ReturnFactors.hpp:140:12: warning: private field ‘_curr_price’ is not used
    [-Wunused-private-field]
    double _curr_price;
    ^
    In file included from /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/Report.cpp:26:
    In file included from /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/Report.hpp:34:
    /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/ReturnFactors.hpp:130:12: warning: private field ‘_curr_price’ is not used
    [-Wunused-private-field]
    double _curr_price;
    ^
    /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/ReturnFactors.hpp:140:12: warning: private field ‘_curr_price’ is not used
    [-Wunused-private-field]
    double _curr_price;
    ^
    2 warnings generated.
    2 warnings generated.
    2 warnings generated.
    In file included from /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/ReturnFactors.cpp:36:
    /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/ReturnFactors.hpp:130:12: warning: private field ‘_curr_price’ is not used
    [-Wunused-private-field]
    double _curr_price;
    ^
    /Users/ivanfigueredo/Downloads/hudson-mva/Hudson/ReturnFactors.hpp:140:12: warning: private field ‘_curr_price’ is not used
    [-Wunused-private-field]
    double _curr_price;
    ^
    Linking CXX shared library libVIXTrader.dylib
    Linking CXX shared library libBOWTrader.dylib
    Linking CXX shared library libAATrader.dylib
    Undefined symbols for architecture x86_64:
    “Price::Price(double)”, referenced from:
    BOWTrader::run(unsigned int, unsigned int) in BOWTrader.cpp.o
    “Trader::sell_short(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, boost::gregorian::date const&, Price const&, unsigned int)”, referenced from:
    Undefined symbols for architecture x86_64:
    BOWTrader::run(unsigned int, unsigned int) in BOWTrader.cpp.o
    “PositionSet::open(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)”, referenced from:
    AATrader::check_buy(Series::EOMSeries const&, std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, TA::SMARes const&, int) in AATrader.cpp.o
    AATrader::check_sell(Series::EOMSeries const&, std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, TA::SMARes const&, int) in AATrader.cpp.o
    “Trader::close(unsigned long, boost::gregorian::date const&, Price const&)”, referenced from:
    BOWTrader::run(unsigned int, unsigned int) in BOWTrader.cpp.o
    Undefined symbols for architecture x86_64:
    “TA::TA()”, referenced from:
    VIXTrader::run() in VIXTrader.cpp.o
    “Trader::Trader()”, referenced from:
    “TA::TA()”, referenced from:
    AATrader::run() in AATrader.cpp.o
    BOWTrader::BOWTrader(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, Series::EODSeries const&) in BOWTrader.cpp.o
    “TA::~TA()”, referenced from:
    VIXTrader::run() in VIXTrader.cpp.o
    “TA::~TA()”, referenced from:
    “Series::EODSeries::first_in_week(boost::gregorian::greg_year, boost::gregorian::greg_month, boost::gregorian::greg_day) const”, referenced from:
    AATrader::run() in AATrader.cpp.o
    BOWTrader::run(unsigned int, unsigned int) in BOWTrader.cpp.o
    “Price::Price(double)”, referenced from:
    VIXTrader::run() in VIXTrader.cpp.o
    “Price::Price(double)”, referenced from:
    “Series::EODSeries::after(boost::gregorian::date const&, unsigned int) const”, referenced from:
    BOWTrader::run(unsigned int, unsigned int) in BOWTrader.cpp.o
    AATrader::check_buy(Series::EOMSeries const&, std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, TA::SMARes const&, int) in AATrader.cpp.o
    AATrader::check_sell(Series::EOMSeries const&, std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, TA::SMARes const&, int) in AATrader.cpp.o
    “Trader::buy(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, boost::gregorian::date const&, Price const&, unsigned int)”, referenced from:
    VIXTrader::run() in VIXTrader.cpp.o
    “Series::EODSeries::before(boost::gregorian::date const&, unsigned int) const”, referenced from:
    BOWTrader::run(unsigned int, unsigned int) in BOWTrader.cpp.o
    “Trader::buy(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, boost::gregorian::date const&, Price const&, unsigned int)”, referenced from:
    “Trader::close(unsigned long, boost::gregorian::date const&, Price const&)”, referenced from:
    VIXTrader::run() in VIXTrader.cpp.o
    AATrader::check_buy(Series::EOMSeries const&, std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, TA::SMARes const&, int) in AATrader.cpp.o
    “Trader::Trader()”, referenced from:
    VIXTrader::VIXTrader(Series::EODSeries const&, Series::EODSeries const&) in VIXTrader.cpp.o
    VIXTrader::VIXTrader(Series::EODSeries const&, Series::EODSeries const&) in VIXTrader.cpp.o
    “Trader::close(unsigned long, boost::gregorian::date const&, Price const&)”, referenced from:
    AATrader::check_sell(Series::EOMSeries const&, std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, TA::SMARes const&, int) in AATrader.cpp.o
    ld: symbol(s) not found for architecture x86_64
    “PositionSet::open() const”, referenced from:
    VIXTrader::run() in VIXTrader.cpp.o
    “Trader::Trader()”, referenced from:
    AATrader::AATrader(Series::EODSeries const&, Series::EODSeries const&, Series::EODSeries const&, Series::EODSeries const&, Series::EODSeries const&) in AATrader.cpp.o
    AATrader::AATrader(Series::EODSeries const&, Series::EODSeries const&, Series::EODSeries const&, Series::EODSeries const&, Series::EODSeries const&) in AATrader.cpp.o
    “TA::BBANDS(std::__1::vector<double, std::__1::allocator > const&, unsigned int const&, double const&, double const&) const”, referenced from:
    VIXTrader::run() in VIXTrader.cpp.o
    “TA::SMA(std::__1::vector<double, std::__1::allocator > const&, unsigned int const&) const”, referenced from:
    AATrader::run() in AATrader.cpp.o
    “Series::EODSeries::after(boost::gregorian::date const&, unsigned int) const”, referenced from:
    VIXTrader::run() in VIXTrader.cpp.o
    “Series::EODSeries::monthly() const”, referenced from:
    AATrader::run() in AATrader.cpp.o
    “Series::EODSeries::close(std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >, unsigned long) const”, referenced from:
    VIXTrader::run() in VIXTrader.cpp.o
    “Series::EOMSeries::after(boost::gregorian::date const&, unsigned int) const”, referenced from:
    AATrader::check_buy(Series::EOMSeries const&, std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, TA::SMARes const&, int) in AATrader.cpp.o
    AATrader::check_sell(Series::EOMSeries const&, std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, TA::SMARes const&, int) in AATrader.cpp.o
    “Series::EOMSeries::close() const”, referenced from:
    AATrader::run() in AATrader.cpp.o
    ld: symbol(s) not found for architecture x86_64
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [examples/BOWTrader/libBOWTrader.dylib] Error 1
    make[2]: make[2]: *** [examples/AATrader/libAATrader.dylib] Error 1
    *** [examples/VIXTrader/libVIXTrader.dylib] Error 1
    make[1]: *** [examples/BOWTrader/CMakeFiles/BOWTrader.dir/all] Error 2
    make[1]: *** [examples/AATrader/CMakeFiles/AATrader.dir/all] Error 2
    make[1]: *** [examples/VIXTrader/CMakeFiles/VIXTrader.dir/all] Error 2
    1 warning generated.
    Linking CXX shared library libEOMTrader.dylib
    Linking CXX shared library libJanTrader.dylib
    Undefined symbols for architecture x86_64:
    “Price::Price(double)”, referenced from:
    EOMTrader::run(unsigned int, unsigned int) in EOMTrader.cpp.o
    “Trader::buy(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, boost::gregorian::date const&, Price const&, unsigned int)”, referenced from:
    EOMTrader::run(unsigned int, unsigned int) in EOMTrader.cpp.o
    “Trader::close(unsigned long, boost::gregorian::date const&, Price const&)”, referenced from:
    EOMTrader::run(unsigned int, unsigned int) in EOMTrader.cpp.o
    “Trader::Trader()”, referenced from:
    EOMTrader::EOMTrader(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, Series::EODSeries const&) in EOMTrader.cpp.o
    “Series::EODSeries::last_in_month(boost::gregorian::greg_year, boost::gregorian::greg_month) const”, referenced from:
    EOMTrader::run(unsigned int, unsigned int) in EOMTrader.cpp.o
    “Series::EODSeries::after(boost::gregorian::date const&, unsigned int) const”, referenced from:
    EOMTrader::run(unsigned int, unsigned int) in EOMTrader.cpp.o
    “Series::EODSeries::before(boost::gregorian::date const&, unsigned int) const”, referenced from:
    EOMTrader::run(unsigned int, unsigned int) in EOMTrader.cpp.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [examples/EOMTrader/libEOMTrader.dylib] Error 1
    make[1]: *** [examples/EOMTrader/CMakeFiles/EOMTrader.dir/all] Error 2
    Undefined symbols for architecture x86_64:
    “StrategyTrader::strategy_buy(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, boost::gregorian::date const&, Price const&, unsigned int, double)”, referenced from:
    JanTrader::run(int, int) in JanTrader.cpp.o
    “StrategyTrader::strategy_close(unsigned long, boost::gregorian::date const&, Series::EODDB::PriceType)”, referenced from:
    JanTrader::run(int, int) in JanTrader.cpp.o
    “StrategyTrader::strategy_sell_short(unsigned long, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, boost::gregorian::date const&, Price const&, unsigned int, double)”, referenced from:
    JanTrader::run(int, int) in JanTrader.cpp.o
    “Price::Price(double)”, referenced from:
    JanTrader::run(int, int) in JanTrader.cpp.o
    “Series::EODDB::instance()”, referenced from:
    JanTrader::run(int, int) in JanTrader.cpp.o
    “Trader::Trader()”, referenced from:
    JanTrader::JanTrader(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in JanTrader.cpp.o
    “Series::EODDB::get(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) const”, referenced from:
    JanTrader::run(int, int) in JanTrader.cpp.o
    “Series::EODSeries::at_or_before(boost::gregorian::date const&) const”, referenced from:
    JanTrader::run(int, int) in JanTrader.cpp.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [examples/JanTrader/libJanTrader.dylib] Error 1
    make[1]: *** [examples/JanTrader/CMakeFiles/JanTrader.dir/all] Error 2
    Linking CXX shared library libAATraderMACD.dylib
    Undefined symbols for architecture x86_64:
    “PositionSet::open(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)”, referenced from:
    AATraderMACD::check_buy(Series::EOMSeries const&, std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, TA::MACDRes const&, int) in AATraderMACD.cpp.o
    AATraderMACD::check_sell(Series::EOMSeries const&, std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, TA::MACDRes const&, int) in AATraderMACD.cpp.o
    “TA::MACD(std::__1::vector<double, std::__1::allocator > const&, unsigned int const&, unsigned int const&, unsigned int const&)”, referenced from:
    AATraderMACD::run() in AATraderMACD.cpp.o
    “TA::TA()”, referenced from:
    AATraderMACD::run() in AATraderMACD.cpp.o
    “TA::~TA()”, referenced from:
    AATraderMACD::run() in AATraderMACD.cpp.o
    “Price::Price(double)”, referenced from:
    AATraderMACD::check_buy(Series::EOMSeries const&, std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, TA::MACDRes const&, int) in AATraderMACD.cpp.o
    AATraderMACD::check_sell(Series::EOMSeries const&, std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, TA::MACDRes const&, int) in AATraderMACD.cpp.o
    “Trader::buy(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, boost::gregorian::date const&, Price const&, unsigned int)”, referenced from:
    AATraderMACD::check_buy(Series::EOMSeries const&, std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, TA::MACDRes const&, int) in AATraderMACD.cpp.o
    “Trader::close(unsigned long, boost::gregorian::date const&, Price const&)”, referenced from:
    AATraderMACD::check_sell(Series::EOMSeries const&, std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, TA::MACDRes const&, int) in AATraderMACD.cpp.o
    “Trader::Trader()”, referenced from:
    AATraderMACD::AATraderMACD(Series::EODSeries const&, Series::EODSeries const&, Series::EODSeries const&, Series::EODSeries const&, Series::EODSeries const&) in AATraderMACD.cpp.o
    AATraderMACD::AATraderMACD(Series::EODSeries const&, Series::EODSeries const&, Series::EODSeries const&, Series::EODSeries const&, Series::EODSeries const&) in AATraderMACD.cpp.o
    “Series::EODSeries::monthly() const”, referenced from:
    AATraderMACD::run() in AATraderMACD.cpp.o
    “Series::EOMSeries::after(boost::gregorian::date const&, unsigned int) const”, referenced from:
    AATraderMACD::check_buy(Series::EOMSeries const&, std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, TA::MACDRes const&, int) in AATraderMACD.cpp.o
    AATraderMACD::check_sell(Series::EOMSeries const&, std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, TA::MACDRes const&, int) in AATraderMACD.cpp.o
    “Series::EOMSeries::close() const”, referenced from:
    AATraderMACD::run() in AATraderMACD.cpp.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [examples/AATraderMACD/libAATraderMACD.dylib] Error 1
    make[1]: *** [examples/AATraderMACD/CMakeFiles/AATraderMACD.dir/all] Error 2
    2 warnings generated.
    1 warning generated.
    2 warnings generated.
    2 warnings generated.
    Linking CXX shared library libGoogleMVABacktester.dylib
    Undefined symbols for architecture x86_64:
    “PositionSet::open(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)”, referenced from:
    GoogleMVABacktester::check_buy(std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, float const&) in GoogleMVABacktester.cpp.o
    “IndicatorApp::initialise()”, referenced from:
    GoogleMVABacktester::getListOfFiles(char const*, char const*, int const&) in GoogleMVABacktester.cpp.o
    “IndicatorApp::evaluateBefore(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, boost::gregorian::date const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)”, referenced from:
    GoogleMVABacktester::trade(std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&) in GoogleMVABacktester.cpp.o
    “IndicatorApp::add(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, double const&, double const&, double const&)”, referenced from:
    GoogleMVABacktester::getListOfFiles(char const*, char const*, int const&) in GoogleMVABacktester.cpp.o
    “IndicatorApp::IndicatorApp(Series::EODSeries const&)”, referenced from:
    GoogleMVABacktester::getListOfFiles(char const*, char const*, int const&) in GoogleMVABacktester.cpp.o
    “IndicatorApp::~IndicatorApp()”, referenced from:
    GoogleMVABacktester::~GoogleMVABacktester() in GoogleMVABacktester.cpp.o
    “string_tools::replaceAfter(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)”, referenced from:
    GoogleMVABacktester::getListOfFiles(char const*, char const*, int const&) in GoogleMVABacktester.cpp.o
    “TVersionCheck::TVersionCheck(int)”, referenced from:
    __GLOBAL__I_a in GoogleMVABacktester.cpp.o
    “TSystemDirectory::TSystemDirectory(char const*, char const*)”, referenced from:
    GoogleMVABacktester::getListOfFiles(char const*, char const*, int const&) in GoogleMVABacktester.cpp.o
    “TSystemDirectory::~TSystemDirectory()”, referenced from:
    GoogleMVABacktester::getListOfFiles(char const*, char const*, int const&) in GoogleMVABacktester.cpp.o
    “NN::TMVAReader::getMvaError(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)”, referenced from:
    GoogleMVABacktester::trade(std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&) in GoogleMVABacktester.cpp.o
    “NN::TMVAReader::getMvaValue(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)”, referenced from:
    GoogleMVABacktester::trade(std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&) in GoogleMVABacktester.cpp.o
    “NN::TMVAReader::setVariable(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, float const&)”, referenced from:
    GoogleMVABacktester::trade(std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&) in GoogleMVABacktester.cpp.o
    “NN::TMVAReader::TMVAReader(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > > const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)”, referenced from:
    GoogleMVABacktester::setup(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > > const&, int const&, int const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in GoogleMVABacktester.cpp.o
    “NN::TMVAReader::~TMVAReader()”, referenced from:
    GoogleMVABacktester::setup(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > > const&, int const&, int const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in GoogleMVABacktester.cpp.o
    “TMVA::Timer::DrawProgressBar(int, TString const&)”, referenced from:
    GoogleMVABacktester::run() in GoogleMVABacktester.cpp.o
    “TMVA::Timer::Timer(int, char const*, bool)”, referenced from:
    GoogleMVABacktester::run() in GoogleMVABacktester.cpp.o
    “TMVA::Timer::~Timer()”, referenced from:
    GoogleMVABacktester::run() in GoogleMVABacktester.cpp.o
    “Price::Price(double)”, referenced from:
    GoogleMVABacktester::check_buy(std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, float const&) in GoogleMVABacktester.cpp.o
    “Series::EODDB::load(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, Series::EODDB::DriverType, boost::gregorian::date const&, boost::gregorian::date const&)”, referenced from:
    GoogleMVABacktester::getListOfFiles(char const*, char const*, int const&) in GoogleMVABacktester.cpp.o
    “Series::EODDB::instance()”, referenced from:
    GoogleMVABacktester::getListOfFiles(char const*, char const*, int const&) in GoogleMVABacktester.cpp.o
    “Trader::buy(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, boost::gregorian::date const&, Price const&, unsigned int)”, referenced from:
    GoogleMVABacktester::check_buy(std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, float const&) in GoogleMVABacktester.cpp.o
    “Trader::close(unsigned long, boost::gregorian::date const&, Price const&)”, referenced from:
    GoogleMVABacktester::check_buy(std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, float const&) in GoogleMVABacktester.cpp.o
    “Trader::Trader()”, referenced from:
    GoogleMVABacktester::GoogleMVABacktester(Series::EODSeries const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, float const&) in GoogleMVABacktester.cpp.o
    “TString::TString(char const*)”, referenced from:
    GoogleMVABacktester::run() in GoogleMVABacktester.cpp.o
    “TString::TString()”, referenced from:
    GoogleMVABacktester::getListOfFiles(char const*, char const*, int const&) in GoogleMVABacktester.cpp.o
    “TString::~TString()”, referenced from:
    GoogleMVABacktester::run() in GoogleMVABacktester.cpp.o
    GoogleMVABacktester::getListOfFiles(char const*, char const*, int const&) in GoogleMVABacktester.cpp.o
    “TString::operator=(char const*)”, referenced from:
    GoogleMVABacktester::getListOfFiles(char const*, char const*, int const&) in GoogleMVABacktester.cpp.o
    “TSystemDirectory::GetListOfFiles() const”, referenced from:
    GoogleMVABacktester::getListOfFiles(char const*, char const*, int const&) in GoogleMVABacktester.cpp.o
    “Series::EODDB::get(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) const”, referenced from:
    GoogleMVABacktester::getListOfFiles(char const*, char const*, int const&) in GoogleMVABacktester.cpp.o
    “Series::EODSeries::after(boost::gregorian::date const&, unsigned int) const”, referenced from:
    GoogleMVABacktester::check_buy(std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, float const&) in GoogleMVABacktester.cpp.o
    “TString::EndsWith(char const*, TString::ECaseCompare) const”, referenced from:
    GoogleMVABacktester::getListOfFiles(char const*, char const*, int const&) in GoogleMVABacktester.cpp.o
    “operator+(char const*, TString const&)”, referenced from:
    GoogleMVABacktester::getListOfFiles(char const*, char const*, int const&) in GoogleMVABacktester.cpp.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [examples/GoogleMVABacktester/libGoogleMVABacktester.dylib] Error 1
    make[1]: *** [examples/GoogleMVABacktester/CMakeFiles/GoogleMVABacktester.dir/all] Error 2
    Linking CXX shared library libMVABacktester.dylib
    Undefined symbols for architecture x86_64:
    “PositionSet::open(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)”, referenced from:
    MVABacktester::check_buy(std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, float const&) in MVABacktester.cpp.o
    “IndicatorApp::evaluateAtOrBefore(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, boost::gregorian::date const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)”, referenced from:
    MVABacktester::trade(std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&) in MVABacktester.cpp.o
    “IndicatorApp::~IndicatorApp()”, referenced from:
    MVABacktester::MVABacktester(Series::EODSeries const&, IndicatorApp, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, float const&) in MVABacktester.cpp.o
    MVABacktester::~MVABacktester() in MVABacktester.cpp.o
    “TVersionCheck::TVersionCheck(int)”, referenced from:
    __GLOBAL__I_a in MVABacktester.cpp.o
    “NN::TMVAReader::getMvaValue(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)”, referenced from:
    MVABacktester::trade(std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&) in MVABacktester.cpp.o
    “NN::TMVAReader::setVariable(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, float const&)”, referenced from:
    MVABacktester::trade(std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&) in MVABacktester.cpp.o
    “NN::TMVAReader::TMVAReader(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > > const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)”, referenced from:
    MVABacktester::setup(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > > const&, std::__1::set<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::less<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > > > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in MVABacktester.cpp.o
    “NN::TMVAReader::~TMVAReader()”, referenced from:
    MVABacktester::setup(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > > const&, std::__1::set<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::less<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > > > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in MVABacktester.cpp.o
    “TA::~TA()”, referenced from:
    IndicatorApp::IndicatorApp(IndicatorApp const&) in MVABacktester.cpp.o
    “TMVA::Timer::DrawProgressBar(int, TString const&)”, referenced from:
    MVABacktester::run(unsigned int const&, MVABacktester::Type const&) in MVABacktester.cpp.o
    “TMVA::Timer::Timer(int, char const*, bool)”, referenced from:
    MVABacktester::run(unsigned int const&, MVABacktester::Type const&) in MVABacktester.cpp.o
    “TMVA::Timer::~Timer()”, referenced from:
    MVABacktester::run(unsigned int const&, MVABacktester::Type const&) in MVABacktester.cpp.o
    “Price::Price(double)”, referenced from:
    MVABacktester::check_buy(std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, float const&) in MVABacktester.cpp.o
    “Trader::buy(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, boost::gregorian::date const&, Price const&, unsigned int)”, referenced from:
    MVABacktester::check_buy(std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, float const&) in MVABacktester.cpp.o
    “Trader::close(unsigned long, boost::gregorian::date const&, Price const&)”, referenced from:
    MVABacktester::check_buy(std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, float const&) in MVABacktester.cpp.o
    “Trader::Trader()”, referenced from:
    MVABacktester::MVABacktester(Series::EODSeries const&, IndicatorApp, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, float const&) in MVABacktester.cpp.o
    “TString::TString(char const*)”, referenced from:
    MVABacktester::run(unsigned int const&, MVABacktester::Type const&) in MVABacktester.cpp.o
    “TString::~TString()”, referenced from:
    MVABacktester::run(unsigned int const&, MVABacktester::Type const&) in MVABacktester.cpp.o
    “TRandom3::SetSeed(unsigned int)”, referenced from:
    MVABacktester::setSeed(unsigned int const&) in MVABacktester.cpp.o
    “TRandom3::TRandom3(unsigned int)”, referenced from:
    MVABacktester::MVABacktester(Series::EODSeries const&, IndicatorApp, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, float const&) in MVABacktester.cpp.o
    “TRandom3::~TRandom3()”, referenced from:
    MVABacktester::~MVABacktester() in MVABacktester.cpp.o
    “Series::EODSeries::after(boost::gregorian::date const&, unsigned int) const”, referenced from:
    MVABacktester::check_buy(std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type, std::__1::__tree_node<std::__1::__value_type, void*>*, long> >&, float const&) in MVABacktester.cpp.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [examples/MVABacktester/libMVABacktester.dylib] Error 1
    make[1]: *** [examples/MVABacktester/CMakeFiles/MVABacktester.dir/all] Error 2
    Linking CXX shared library libHudson.so
    [ 77%] Built target Hudson
    make: *** [all] Error 2

    • mattreid9956 says:

      hmmm… I do not have a Mac so this is not easy for me to debug. In theory you could create a simple Makefile to compile this, although that completely goes against the reason why I wrote the cmake build in the first place… I am not sure how to help though as I have no access to a Mac. It seems to be complaining about the x86_64 architecture but I have no idea why?

  2. Ivan Figueredo says:

    BTW, I downloaded the original Hudson and I was able to build (with slight modifications to the makefile) and run all the example programs under MacOS X. FWIW.

  3. NuclAstroPhysicist says:

    The problem has something to do with Mavericks using -stdlib=libc++ instead of -stdlib=libstdc++. I’m troubleshooting the issue but I haven’t found a definitive solution yet. If the necessary correction to the code seems obvious to you, please let me know. Thanks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s