Automated Stock Trading Platform

An automated, real-time trading system that allows administrators to configure trading strategies based on various technical indicators, and investors to invest their money in a selected strategy.

Technologies / Platforms

About the client

Our client is an investment management company that provides services to both individual and institutional investors. The company operates globally and has offices in the UK, the USA, the United Arab Emirates, Mauritius, and the Cayman Islands. It was founded by a professional investor who specializes in technical analysis, who decided to start his own business after 15 years of working for Tier 1 banks, such as the Royal Bank of Scotland and HSBC.

Client's request

After years of manual trading, our client decided to start a business and develop his own platform that would allow him to build unique trading strategies. His idea was to automate trading and strategies management and simplify investor involvement. Itexus was entrusted with the implementation of the project, due to our proven track record in algo trading software development and our solid grasp of the ins and outs of the fintech domain.

Engagement model

Time & Materials

Solution

Automated stock trading and investment platform

Effort and duration

Ongoing since August 2020

Project team

1 Business Analyst, 1 Project Manager, 1 Project Coordinator, 1 Team Lead, 6 Full Stack Developers, 2 QA Engineers

Tech stack

Target audience

The platform is designed for multiple client segments – from individual investors and traders seeking to diversify their portfolios or generate additional returns by investing in an algorithmic trading strategy, to institutional investors such as hedge funds, venture capital funds, and large investment firms looking to invest a part of their portfolios in an active trading vehicle with low or negative correlation to the rest of their portfolios.

Project challenges

Integration with multiple brokers

Our client wanted to be able to trade on different exchanges using different broker integrations, in order to take advantage of as many trading opportunities as possible. The system needed to allow for the selection of  specific brokers so that the administrator could configure strategies according to their investment plans. After taking into consideration the specifics of the solution architecture and a possible increase in the number of supported brokers, we chose to implement the broker aggregator Blackwell Global. Blackwell Global is a subsystem that acts as an intermediary between brokers and the platform, providing access to different brokers via APIs. The rest of the system does not depend on the brokers’ APIs, as it does not communicate directly with the brokers.

Solution overview

The solution is an algorithmic trading system based on a complex, multi-level analysis of prices and the behavior of their derived characteristics. The system allows the administrator to set up trading strategies with different market instruments and backtest them with data obtained from different financial markets and time frames. The trading strategies continuously analyze the behavior of the indicators and initiate the execution of orders once the predetermined conditions are met. In addition, the system allows for parameters to be fine-tuned and displays calculations and events on charts in real-time mode. The solution consists of three subsystems.

1. Admin subsystem

This subsystem allows admins to set up trading strategies and track price movements on the market data chart, as well as configure order execution policy. The data received from the data provider is displayed on the charts in real time, and the calculation and analysis of all indicators are also done in real time. algorithmic trading system When configuring a trading strategy, the admin sets parameters for RSI, stochastic conditions, candlestick patterns, and many other indicators. The trade management module allows the admin to set multiple parameters to configure the order execution policy:

  • entry price 
  • how many orders should be sent (multiple trade execution)
  • trade size
  • exit price (stop-loss management or profit target)

The admin can initiate algo trading with the pre-configured strategy. In this case, the platform performs technical analyses (based on the received market data and counted indicators) and determines triggers. If the predefined conditions for triggers are met, the strategy is executed and the platform places an order. The system allows traders to test and launch their strategies in several different modes. The strategy lifecycle consists of 3 stages: Backtesting, Paper Trading, and Live Trading. Backtesting The backtesting mode allows traders to test the strategy ”back in time” using historical market data. This is the first check performed to understand how the strategy generally performs. Each time a backtest is performed, a trade report is generated to show how profitable the strategy was within a specific time range. Each time the strategy goes through backtesting, traders can make adjustments to make it more profitable. Paper Trading After the strategy has successfully passed the backtesting stage, traders try to launch it in demo mode (i.e., paper trading), which is much closer to real market conditions. Paper trading is performed with market updates in real time, so the only thing simulated is money. Order management is also very close to the conditions of real exchange trading. Live Trading Once the strategy passes the previous two stages, it moves directly to live trading, performed in real time and with real money. Real market conditions can at times be very tough and order execution logic too complicated, leaving only the best strategies to reach this stage. A strategy that has successfully passed this final stage and is able to earn enough money on the real market holds significant value for the trader.

2. Client subsystem

The second subsystem is intended for users. It allows them to register, add money to accounts via the PelicanPay API, withdraw funds, monitor balances and portfolios, and view trade history. Statistics are presented to clients using charts and tables, and users are able to download reports directly.  algorithmic trading system

3. Corporate subsystem

This part of the system allows the admin to manage users, check the statistics on trades, make money transfers between the accounts of the system, and manage all of the accounts. algorithmic trading system

Solution main features

Admin subsystem

  • Configure trading strategies (set RSI, stochastic, and other conditions)
  • Access real-time and historical market data
  • Backtest and adjust preset strategies
  • Manage trade execution policy
  • View trade history, statistics, and reports
  • Manage system’s users, accounts, etc.

Client subsystem

  • Create an account
  • Add money to account
  • Withdraw money from the system
  • View trade history, statistics, and reports

Technical solution highlights

Technically, the system consists of several microservices that use event-based communication (message bus). Microservices are asynchronous Python applications that implement a data processing pipeline, i.e. the result from one microservice is used as input data for another (or multiple microservices). Python Socket.IO is used for real-time updates. From the perspective of UI, it is a React application that uses MobX as state management on the front end.

  • We chose the Python language and Django framework for backend development and JavaScript, HTML5, and React JS for the frontend part.
  • The AWS cloud infrastructure that our team chose to run the platform reduces the time it takes for the web application to load in the end user’s browser, and provides additional monitoring and data protection tools.
  • To meet the security requirements of the broker and payment gateway, we implemented role-based access controls, multi-factor authentication, encryption, and other security measures.
  • The general architecture of the platform is defined by high performance requirements. Since trading opportunities can appear and disappear in a fraction of a second, the system must process massive volumes of data simultaneously to react to market events in real time.

Third-party integrations

third-party integrations diagram

  • PelicanPay is a payment provider that helps to process transactions in fiat money including money transfers between different accounts, delayed payments and recurring payments.
  • Blackwell Global is a brokerage company from which the system receives financial data (real-time prices of different assets). Then, this data is analyzed by the system to find the specific sequence of conditions. After the conditions are found, the system executes buy/sell orders through the Blackwell Global account.

Brokers integration approach

The integration with the Broker is achieved through an abstraction layer. This approach uses an adapter to connect a Broker to the system, without requiring any changes to the rest of the system.

The adapter implements a two-way connection and manages tasks such as establishing a connection and formatting the data in a way that the system/broker understands. Moreover, abstraction layers enable the system to utilize data from various sources within a single system.

This system is integrated with brokers’ real-time data feeds using different protocols, such as FIX (Financial Information eXchange) and Websockets. The FIX protocol is the fintech industry standard for transferring financial information, including market data and order management. It is lightweight and uses less data for communication, resulting in better performance and lower latency.

On the other hand, the WebSocket protocol is more versatile and can transfer a wide range of information beyond financial data, providing more customization options. However, it typically incurs higher average latency compared to the FIX protocol.

Integrating the broker involves more than just writing code. As part of the process, we validate the quality of the data and compare it with other sources. We also conduct backtesting and stress testing to ensure that our integration and connection with the broker can handle the load. If necessary, we make tweaks to the infrastructure to improve server capacity.

We recommend that our customers implement the integration in the early stages of the project to use and test the broker as much as possible before going live. Based on our experience, we suggest conducting stability testing on the integration for at least 2-3 weeks. Although the Broker API usually works in a standard way, there may be slight differences that can affect the system. Therefore, when dealing with large-sum trades, it is crucial to ensure that the integration works correctly to avoid any potential issues.

Development process

We completed the project following the agile development process, with frequent deliveries, full transparency, and close collaboration with our client. Every two weeks, we met with the client to deliver and demonstrate results and report on costs. Frequent demonstrations and feedback collection sessions allowed us to conduct early reviews of all materials and initial software versions and make timely adjustments to functionality. Initially, the client provided only a few design sketches, so we held a series of workshops to define and obtain approval for the technical solution architecture, break down product functionality into sprints, prioritize features, and define detailed requirements. After that, we moved on to the development phase, following the product roadmap. Fourteen months after the start of the project, the MVP version with its core functionality was up and running. Currently, Itexus engineers are developing and implementing additional features.

Results & future plans

Within a year, Itexus’ cross-functional team of experts delivered an MVP version of an automated, high-performing, and secure trading solution that met all of our client’s requirements. The platform is up and running. In the meantime, we continue to maintain and support the existing solution and are working on the advanced features of the platform as well as the mobile versions of the application. Looking for a talent pool to fill the software development gap for your project? Itexus engineers are ready to tackle your idea. Let’s discuss it.

Contact Form

Drop us a line and we’ll get back to you shortly.

For Quick Inquiries

Offices

United States

8, The Green, STE road, Dover, DE 19901

Poland

Żurawia 6/12/lok 766, 00-503 Warszawa, Poland

Name
Company name
Phone number
Text
x