top of page

The basic principles of learning Python for Algorithmic Trading

Super simple - yet useful advice for beginners!

Let this introductory article be the basic explanation about how I started to work with Python and what helped me the most at a starting line. I’ll share some beginner tips, so you’ll be on the right path to creating successful algo-trading strategies.

Please note that this is not a guide on installing Python, what it is, how to use it, or why to use it. I believe you all know why to use it, that’s why you are here, reading this.

I try write our articles about things you can hardly find online, but instead, they should have some added value for you. If you are a beginner programmer and want to learn python (not only for finance), open your web browser and  type ‘python.’ You will find plenty of free and good quality stuff which will help you to start your journey. In this article, I will write about how I learned python, targeting finance from the beginning. Basically, in this section of Python for Finance, you will find practical articles on solving some problems in finance, useful for traders or quants.

The fastest and the most fun way to learn it is by solving problems (don’t worry if you are a total beginner, we will cover many useful topics, just be prepared to google a lot of stuff as well).


I have to admit that my programming beginnings were not from a totally different field – I studied applied math, so I had some classes for programming in Java, but that’s all. And also all math you’re doing nowadays you do with your computer (if you’re not proving some theories on paper). So this is the first hint for you: everyone did his homework in a suggested software (R, Matlab in my case), I had zero experience with python, downloaded it, spent three days reading basics, and started doing all my stuff there – yes, it is simple like that!

Everything you need to know about coding is already out there on google, and it’s free! Every programmer in the world can have another title as ‘professional googler.’ **This is not investment advice but today’s synonym for searching on the internet.

So if you’re asking if it’s normal to be googling everything, my answer is, yes – more than normal.


So my another advice, especially when you are starting out and after you googled some basics, is to try to do every task you have to do in Python.

Even though it will take more time, in the end, you’ll realize that you learned much more by trying everything by yourself. It’s because you are not learning only the programming language. You are learning the way how to solve the problems; you are learning how to program. 

Python language is just a foreign language, like English or Spanish (I think C++ is something like Chinese – it is harder, but it makes every sh*t you need to be successful, no offense, just a silly joke from a fellow programmer). 

If you are not a student, but at least from a bit technical field and you used some software, try to look at your old notes and re-program the stuff you understand (or understood a long time ago) into Python. If you are not from any field with at least some basic math, well my advice, google even more and learn math, you will need it for trading (basic math, probability, and statistics).

Now you might be asking:

"Do I have to Have Math Background?"

Depending on what you want to do, if you’re going to do some machine learning for algo-trading and don’t know any math, optimization, statistics, or programming, well, it will take years. When you have a solid mathematical background like me, understanding most machine learning algorithms will be a lovely reading for evenings. 

I won’t continue this article about machine learning because I don’t think I am the right person to teach you how to start with that. But you don’t need machine learning to be a successful algo-trader (with machine learning comes enormous amounts of high quality and costly data + alternative data). 

The best trading algorithms and the most successful ones are simple yet have some fundamental logic. The simpler it is, the fewer parameters it uses, fewer problems with biases, overfitting, and so on. I’m speaking from my own experience, I used unique data and made great machine learning models. Still, it had never beaten the algorithms with simple logic for which I didn’t even need to know anything about ML or advanced programming.

But to be honest, finding a simple, well-working logic is much harder than creating a machine learning algorithm!

in next articles I will show you some advanced and but also basic stuff, in a more practical way. If you find it too advanced for you, yet you are dedicated to really learn it, it won’t be a problem.


The thing that worked for me the most when I was learning Python was not asking others for help, but doing it myself.

Even when some tasks took me 3 hours instead of 10 minutes. My first simple task took me 3 hours, the second 2.5 hours, and the third for just one hour. Do you get my point? I learned so much only by looking for solving particular parts of another problem.

The sooner you learn how to google correctly, you will do it faster and precisely, and no teacher will tell you this. Oh yes, also will be your favorite part of the internet (you will find out soon). When you have passed your first month as a beginner, you will notice stuff like GitHub.

I would say, the most useful advice is – just look for the answers wherever possible you can find them. And solve problems by yourself!



Recent Posts


Recent Comments

0 views0 comments


bottom of page