A python trading robot from scratch. Algotrading

How to start algorithmic trading. Writing robots from scratch for trading. Teaching Trading work on python from scratch. Algotrading :

My first thought about trading came from 4 Faculty of Economics course, when I realized, what you need to have passive income. Started with bank deposits and mutual funds (mutual funds), then fate threw me into IT. I am very addicted to this, entered a technical university and set a goal to combine information technology and exchange trading, because it's interesting, promising and highly paid.

I will talk about, where to start mastering algorithmic trading without experience in trading and programming. More precisely, it will be a series of articles broken down into stages with a detailed description of the learning process and recommendations.. The training program is suitable not only for beginners, but also for experienced programmers, because. it also involves the development of exchange trading. Also, it may be of interest to traders, who will acquire the necessary knowledge in programming. Each stage is structured like this, that it won't take a lot of time, possible combination with work or study.

Stock market Is a high-tech industry, which is actively developing, which makes work in this area very attractive for IT specialists. World currency market, where the daily trading volume is estimated at $5,1 trillion, becomes less and less dependent on the person. So, 94 heads of the largest US and Canadian trading and foreign exchange companies announced their intention to automate most of their foreign exchange transactions during 2018-2020. The development of automated trading today has already become an irreversible process in the global currency, stock market and derivatives market.

It's hard to say yet, that for successful trading it is imperative to create a trading robot, you can trade manually, using automation to find assets and entry points, or control of open positions. But the share of robots in the US trading volume in 2005 year exceeded 50% speaks of their relevance among traders.

Moving on to the training plan.

Python will be used as a programming language for implementing strategies.. This language is cross-platform (which is a must-have for Linux and macOS supporters), easy to learn (from my experience learning Java, I can say that Python is easier), widespread (used in Big Data, web development, test automation, science, system administration, for prototyping quantum models in hedge funds and "quantum" trading units in banks, etc.)

  Film about algorithmic trading - Quantities: Wall Street Alchemists

Stage 1.1. Learning the basics of Python for a trading robot

1. SoloLearn app training.

The first step is to install the SoloLearn app on your smartphone.. It will be especially useful for those, who have not previously programmed. The application will teach the very basics of the language. An undeniable advantage, that you can use it anytime, anywhere.

2. Passing the course on Stepik.org "Programming in Python"

Great for beginners, interactive, the presentation is carried out smoothly from simple to complex, quite interesting tasks, you can watch comments from users, which is very useful if you don't know the solution. The course is free.

Advice: Some task conditions are described very incomprehensibly, in this regard, immediately look in the comments, there you will find an explanation of the problem.

I recommend giving this resource a day. 1 time.

Link to course: https://stepik.org/course/67/syllabus

3. Solving problems in Pythontutor.ru

To consolidate knowledge, the Pythontutor resource will be useful.. This is an interactive Python tutorial, with lots of examples and good problems. An interesting feature is, that after solving the problem, you can see the solutions from the developers and other participants.

I recommend solving at least one problem every day.

Link to tutorial: http://pythontutor.ru/

4. Books: Swaroop — «A Byte of Python»(Python bite)

Python Bite is a free Python book, differs in a minimal amount of "water" and a large number of examples. Contains everything 150 pages, at the same time it perfectly shows the capabilities of the language.

Advice: When reading books on programming, you need to run a sample code in your IDE for better assimilation of the material.

It is enough to read on 5-10 pages.
As an IDE I recommend free PyCharm Community.

Optional: Video courses on Python at YouTube

A series of video tutorials with an average duration of 10 minutes, consisting of 21 episode will help fill in the gaps in previous knowledge.

  SPb-Birzha in January: people's briefcase sagged on 5%, and the trading volume has not changed

For those who know English, it will be very good to watch the Learn Python - Full Course for Beginners. In total, the material consists of four and a half hours of teaching video.

Advice: If you don't know English yet, then be sure to start studying it, because. the vast majority of the necessary materials on algorithmic trading will be available on it. However, I think I did not discover America here, most people already know it, rather just wanted to remind.

There are many methods and materials for learning English on the Internet, everyone can choose the right one for themselves, but I would not mind recommending the book on grammar by Raymond Murphy - Essential Grammar in Use. Fully written in English, but in extremely simple language and with a lot of illustrations.

Stage 1.2. Basics of exchange business

It is also necessary to learn the basics of stock exchange business and below I will give a couple of tips.

1. Explore Interactive Brokers Trader Workstation:

To do this, you will need to open demo account.

TWS terminal has an excellent demo mode, where is available 1 000 000 virtual dollars and unlimited in time. It can be studied up and down. But first you need to learn how to just navigate the interface., be able to search, to choose, buy, sell assets.

Here are some tutorial videos:

It's also worth taking the time to self-study.. Do it personally, what did you watch in the video.

2. Reading literature: Elder - "Trading with Dr. Elder"

I recommend starting with this Books. In it, the author traditionally talks a lot about the psychology of trading.. In addition, it describes the entire trading process. Elder is also good because, what he tells about trading in all details, ie. prepares for difficulties, to be faced.

  High-frequency participants in exchange trading cost billions of dollars every year

I recommend reading 15 pages per day.

Advice: If you have never traded and do not know how the exchange works, I highly recommend reading the first 180 pages of the book of Tvardovsky and Parshikov - "Secrets of exchange trading". To understand, how the exchange works in general, types of orders, who are they Brokers, market makers, etc..

Conclusion

The term of the first stage is approximately 1-2 months, but with good learning and high motivation, you can finish earlier. Then go to the second stage..

Newbies, giving 2 — 2.5 hours a day, will be able to complete the stage in a month. They, who has experience in programming or trading, will be able to pay 1 — 1.5 hours a day.

After a while I will publish an article with the second stage of training, focused on data analysis.

Other articles from the curriculum:

Original article: https://quantrum.me/2328-kak-podstupitsya-k-algotrejdingu/

Scroll to Top