[Algorithm Trading #1] Which programming language to select?

Hi all,

It's @algorithmtrader

01_title.png

Today, I begin series of posting regarding algorithm trading.

First thing to decide is to select programming language.
There are many options to do, but let's consider most simple language.

C++

02_cpp.png

C++ is a object-oriented language where you could easily define classes.
Also, the computational speed is the one of fastest among many languages.

But, the language is primitive such that it is hard to prototype.
For example, if you want to compute mathematical operation such as regression, you need to find other libraries.

In sum, it is good for fast speed but it is bad for prototyping.

Python

03_python.png

Python is a modern programming language where codes are often simplified.
It provides many library-kits, such as sci-py, num-py, sym-py which could be used for scientific computing, numerical computing, symbolic computing respectively.
Moreover, it is popular for machine learning and deep learning where many libraries such as Theano, Tensorflow are built based on python.
There are also, some financial libraries developed for python.

But, the computation time is slower than C++.
Also, it is often hard to debug specific vector, matrix, tensor.
Scientific algorithms are relatively less implemented than MATLAB.

In sum, if you want to develop a trading algorithm that employs the AI, then python would be strong language.

MATLAB

04_matlab.png

MATLAB is a language for mathematical computation developed by a company, Mathworks.
In MATLAB, all variables are basically declared by vector or matrix or tensor. So it is very easy to manipulate them.
Also, it provides strong linear algebra package where you could find almost operations are implemented.
It also provides symbolic operation, automatic differentiation, integration, numerical computings.
Moreover, it provides financial toolbox which includes data structure and algorithm.
There are many other algorithm toolbox such as genetic algorithm, image processing, etc.

But, MATLAB is weak for AI computing and slow computation.

Conclusion

I bet that there could be debate regarding which languate is the best between python and MATLAB.
My post is biased since I'm an extensive user of MATLAB.
My choice is would be MATLAB since it is important to see every details of vectors and matricies in order to fundamentally understand the operation.
Also, MATLAB is good choice for computing where some computations are optimized in level of CPUs,
and it provides parallel computing package for multi-core CPU and GPU parallelization with simple option.

So, my choice is MATLAB.

Thank you.

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now
Logo
Center