Intelligent investment assistant that performs technical analysis for a number of stocks, automatically tracks multiple indicators on stock exchanges, and generates buy/sell and risk signals for a human trader.
The client is an investment company specializing in active day trading in the stock market. It employs traders who actively trade stocks, currencies, commodities, derivatives, and other assets using a number of proprietary trading strategies.
The client needed a configurable platform that could automate technical analysis tasks and calculations according to the company’s strategies for different asset classes. Thus, the in-house trading team could identify investment opportunities faster, make decisions with fewer mistakes, and therefore increase the company’s trading profits.
Fixed price for the MVP stage, Agile/Scrum for other stages
Windows desktop application for Trader Panel, Web application for Admin Panel
6 months to create and launch the MVP, Ongoing since March 2021
2 Full-Stack Web Developers, 2 Backend Developers, 1 Technical Lead, 1 BA, 1 QA, 1 PM
The platform analyzes a large number of assets traded on the stock exchange (mainly stocks and ETFs); it accumulates trading data such as open-high-low-close (OHLC) prices, price changes for different time periods, trading volumes, orders, etc.; it calculates a set of technical analysis indicators per configured strategy and displays the results of the analysis as buy/sell signals when specific market conditions are met.
Trader Panel UI represents a floating window with real-time data that a trader can see on top of their trading station application.
The results of all calculations and analysis are represented by color codes for each position called main lights and backlights.
Main lights – RED, YELLOW, GREEN – mean whether the current price is good or bad for buying or selling this stock.
Backlights – BLUE, GRAY, WHITE – depend on momentum technical indicators and show the strength or weakness of the prices of a stock. And the different backlights show traders when the stock prices are rising or falling significantly.
So different combinations of main lights and backlights show traders a real picture of what is happening with stocks on the market in a short period of time.
The system’s administration module allows administrators to change configuration settings, adjust strategy parameters and manage settings and list of stocks for the Trader Panels. It also displays trading information in different views.
The main technical challenge of the system was to achieve high performance and low latency. The system is required to process data, perform calculations, identify investment opportunities, and display trading signals within milliseconds after the market event happens.
We needed to select a data vendor that would fit the solution both in terms of technical (WebSocket, real-time data, latency) and business (any stock trades) requirements. There are multiple data providers on the market and they can be can be divided into two groups:
Our team conducted research and comparisons of available market data providers, examining data quality, fees, latency, connectivity options, and other criteria. The results and our recommendation were shared with the client for final decision making.
As a result, the Finage data provider was chosen for the best combination of factors:
The basic and very important key to the correct calculation of all technical/economic indicators and trading signals is the accurate calculation of OHLC prices for 24 secs/1 min/4 mins/ 5mins time period bars.
If one implements OHLC calculations on raw data using only mathematical formulas and compares the values to the Yahoo Finance resource, they will see a significant difference.
The problem is that some data providers, including Finage, sometimes supply raw data that must be pre-processed in a certain way before OHLC calculations can be performed. Raw data must be adjusted taking into account sales conditions and volumes. Pre-processing was performed in full accordance with Consolidated Tape Association (CTA) and Unlisted Trading Privileges (UTP) specifications to ensure accuracy of the calculations.
One of the main requirements of the client was that the solution should have very low latency. The indicators should be shown to the trader milliseconds after the occurrence of a certain event on the stock exchange.
To achieve this, our team developed a multi-layered architecture with advanced caching and multi-threaded calculations to fully utilize multi-core and multi-processor server instances.
We split indicators and signal calculations between the backend and frontend components. Performing some of the calculations on the client side allowed to significantly reduce the load on the server and increase performance.
The solution is integrated with data vendor Finage to receive real-time stock market data via the WebSocket mechanism.
We used the Scrum framework to implement this project. One iteration lasted three weeks, of which we spent two implementing the requirements from the iteration backlog and the third week testing and debugging.
At the end of the three-week sprint, we held a demo session to demonstrate the functionality increment to the client. Any resulting notes or update requests were forwarded to us and we implemented them simultaneously with the following sprint.
The client part of the solution was implemented as a resizable Windows desktop application using the Blazor solution. The resize feature is very important because traders usually have many programs open on the desktop and space availability is a critical issue. And Blazor was chosen because it is one of the most exciting technologies for web developers on the .NET stack, allowing client/server-side web and desktop & mobile applications to be developed entirely in C#.
Using the same technology to develop web and desktop parts allowed to reduce the cost of the product.
Multiple instances of the client application can be run on the same PC. This allows users to run as many instances as needed to track information about the most traded stocks during the current market session.
The architecture of the system is defined by very high performance requirements. Trading opportunities can appear and disappear in a fraction of a second. Therefore, the system must process massive volumes of data simultaneously to respond to market events in real-time.
Here you can see the diagram of the backend architecture:
Microsoft .NET, C#, Microsoft Azure, and SQL Server were selected as a mature, well-supported, enterprise-grade technology stack.
React.js, SignalR, and Blazor were chosen to implement rich real-time interfaces of the system.
The system can be easily scaled by adding additional server instances.
To ensure quasi-real-time performance, the system uses parallel calculations in multiple threads with asynchronous queues for event processing to fully utilize multi-core multiprocessor server instances.
The first version of the platform was delivered in full compliance with the specifications, on time, and on budget. Within 6 months of the project’s start, the system was live and available to real end-users trading real stocks.
The system allowed to significantly reduce the amount of time traders spent on technical analysis, decrease the number of mistakes, and increase profits from the trading operations.
The project is still underway, and the SoluLab team continues to provide support and maintenance services.