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

in #trading7 years ago

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.

Sort:  

i want to learn python it is easy to learn or not cause i try to learn c++ but it is totally out of understanding

If I were you, I would try Youtube for FREE tutorials on Python. Try the series by "Newboston" its a very good start for a beginner like you. All the best!

Python is also a good choice.

You could take a course in Coursera where many courses are free and high quality.

Python is my favorite by far, The machine learning plugins available for python make it soo easy ;]

Yes I do use python for deep learning research. But for signal processing and analysis, MATLAB is better than python since matrix is so easy to handle.

I have some experience in both MATLAB and Python. One thing to remember with MATLAB is that you have to pay for it!

You have an experience welcome. Agree matlab requires money to use it. There are a language called Octave which is written by almost same way as Matlab and it is free.
But I recommend to pay some money for matlab since they provides more optimized code base and good toolboxes.
If you are in institutions like university, you could get TAH license. Or student price is really cheap.

Yes, you are correct. I used both MATLAB and Octave for my doctoral research. Currently, I am an independent researcher and a science writer, so that does not give me access to low-priced versions of MATLAB. Thus Python is the way for me.

that groovy sine wave at the start really got me in the mood

Thanks that's a sine function drawn in MATLAB. I would cover more detail later on.

Are markets efficient? Probably you should start by showing us that algorithm trading can make any money at all... There is extensive evidence that fundamental analysis makes much more sense. In any case I'm very curious in learning more from your guides and ideas

My opinion is that markets are not efficient since it is not matured yet.
Also, I am going to start by buy and hold (B/H) strategy where it is the most simple one.
Agree that fundamental analysis is highly profitable especially in this market. I also analyze a lot of fundamental aspects on crypto currencies. I bet that there would be better profit if fundamental and technical analysis are simultaneously applied.

Congratulations @algorithmtrader! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of comments

Click on any badge to view your own Board of Honnor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

In perspective of computer resources(?)/flexibility(?), i prefer python rather tan MATLAB. Of course i know MATLAB is very powerful tool for a scientific program and i used to use MATLAB in my numerical simulation. But after some change of my main subject, i use somewhat slightly more flexible(?) program, mathematica as a computational tool.