Giter Site home page Giter Site logo

olmallet81 / urt Goto Github PK

View Code? Open in Web Editor NEW
88.0 88.0 24.0 283 KB

Fast Unit Root Tests and OLS regression in C++ with wrappers for R and Python

License: MIT License

Makefile 0.77% C++ 80.46% Python 6.98% R 11.80%
algorithmic-trading armadillo blas blaze cpp11 cython-wrapper eigen linear-algebra-library mkl ols-regression openblas openmp rcpp rcpparmadillo statistical-tests urt

urt's People

Contributors

olmallet81 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

urt's Issues

install on windows?

Is there instructions on how to install this on windows? or is it linux only?

incorrect observations in README.md

In the Observations section of README.md, it is stated that:

As expected Armadillo with internal BLAS/LAPACK wrappers performance is pretty poor.

This is incorrect, as the meaning of the "internal wrapper" is wrong. There is either a wrapper for an external library, or there isn't. A re-implementation of a function is not an "internal" wrapper, but simply internal functionality. The correct wording for the quoted problematic statement should be:

Armadillo without the use of OpenBLAS or MKL wrappers obtains poor performance. However, when the wrappers for OpenBLAS or MKL are enabled within Armadillo, the performance is virtually the same as for the other libraries.

minor adjustments

My first version of URT was using std::make_unique only available in C++ 14, the last version is no longer using it but instead std::make_shared available in C++ 11, makefile for C++, setup.py for Cython and Makevars for Rcpp have been amended, C++ 14 is no longer required and URT can be compiled using C++ 11 only.

running Python, ADF_d error

After:
make USE_OPENMP=1 USE_BLAZE=1 USE_BLAS=1
python setup.py build_ext --inplace --force
...

adf.csv is saved from Example2.cpp

Example2.cpp
...
urt::Vector<double> data = urt::wiener_process<double>(nobs);
urt::WriteToCSV("adf.csv", data);
...

Python code:

adf = pd.read_csv('adf.csv', sep=',', header=None)
test = urt.ADF_d(adf[0].values, lags=10, trend='ct')
test.show()

Result is:

TypeError Traceback (most recent call last)
in
1 adf = pd.read_csv('adf.csv', sep=',', header=None)
----> 2 test = urt.ADF_d(adf[0].values, lags=10, trend='ct')
3 test.show()

~/URT/Python/CyURT.pyx in CyURT.ADF_d.init()

TypeError: expected bytes, str found

Head of adf.csv
print(adf[0].head())

0 -0.150035
1 -0.594445
2 -2.272570
3 0.203642
4 -0.325208
Name: 0, dtype: float64

Also, same error:

>python benchmark.py
Traceback (most recent call last):
File "benchmark.py", line 25, in
test = urt.ADF_d(data, method='AIC')
File "CyURT.pyx", line 243, in CyURT.ADF_d.init
self.adf = unique_ptr[ADF[double]](new ADF[double](xd, method, trend, regression))
TypeError: expected bytes, str found

How to use this module in Java?

Hi~Thanks for your brilliant work!
Can you giv eme some advice on how to use this module in java Or is there an available version in Java like this?
I would appreciate it if you could help me.

cant link liburt.so?

Hi,

I installed armadillo, and make lib use:
make (without any link param)
but the so file i complied out is not good.
when i link it, it comes out:
./libURT.so: undefined reference to urt::UnitRoot<double>::set_trend()' ./libURT.so: undefined reference to urt::UnitRoot::compute_adf()'
./libURT.so: undefined reference to urt::UnitRoot<float>::pvalue()' ./libURT.so: undefined reference to urt::UnitRoot::gls_detrend()'
./libURT.so: undefined reference to urt::UnitRoot<double>::show()' ./libURT.so: undefined reference to urt::UnitRoot::pvalue()'
./libURT.so: undefined reference to urt::UnitRoot<double>::set_method()' ./libURT.so: undefined reference to urt::UnitRoot::set_lags()'
./libURT.so: undefined reference to urt::UnitRoot<double>::adf_regression()' ./libURT.so: undefined reference to urt::UnitRoot::set_trend()'

but i confirmed, all cpp file is compiled, can you help on this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.