宽客秀

宽客秀

Quant.Show的Web3站点,Archives from quant.show

How to gradually build a quantitative trading platform for private equity funds

Building quantitative trading platforms for private equity funds is no longer a new thing. This article is the author's understanding of how private equity funds gradually establish quantitative trading platforms. Any shortcomings in this article, please criticize and correct.

1. Business Planning#

The development of private equity quantitative funds is recommended to follow the path from single asset to multiple assets, single strategy to multiple strategies, and low frequency to medium-high frequency.

First, from single asset to multiple assets. The trading targets of private equity quantitative funds can start with simple and low-risk bonds and stocks. Bonds and stocks are relatively easy to understand and have lower risks due to the absence of leverage, making them suitable as experimental subjects for quantitative investment strategies. Generally speaking, a quantitative investment product can be set at a scale of approximately 50 to 100 million. After becoming familiar with quantitative investment strategies and understanding the underlying market rules, you can try to expand the types of assets. At this time, you can consider introducing commodity futures or options, as well as stock index futures or options. With the introduction of these financial derivatives, the variety of assets is greatly enriched, forming a benign rotation or hedging mechanism. With this risk-avoidance rotation or hedging mechanism, the scale of funds raised can continue to expand, for example, a quantitative investment product should be expanded to a scale of at least several hundred million, and different products can be set up for different risk preferences of clients, enriching their product series.

Second, from single strategy to multiple strategies. In the early stage of platform construction, single or fewer strategies can be considered. As mentioned earlier, the initial stage of platform construction only needs to consider simple trading targets. For bonds or stocks, quantitative trading strategies are relatively mature. Taking the multi-factor strategy for stocks as an example, the principles and implementation steps of the strategy have been accumulated for many years and have become standardized. For private equity quantitative fund managers, they can focus more on factor mining and comparison. Compared with quantitative strategies for bonds and stocks, the development of commodity futures, stock index futures, and options in China is relatively late, and there are fewer trading targets to choose from. With the development of financial derivatives in China, corresponding quantitative strategies have emerged one after another. In recent years, CTA strategies targeting commodity futures, statistical arbitrage strategies targeting stocks and stock indexes, and so on have developed rapidly and continuously improved. With the continuous expansion of the platform, in conjunction with the expansion of products, the variety of strategies can be expanded.

Finally, from low frequency to medium-high frequency. Quantitative trading platforms need to be continuously improved. The higher the trading frequency, the higher the requirements for the system or platform, and the importance and popularity of high-frequency trading are higher than those of low-frequency trading. Recently, popular high-frequency trading categories include T+0 trading and CTA strategies. The essence of high-frequency trading platforms lies in maximizing the performance of single-machine software and hardware, plus network system performance (such as moving servers to Shanghai Stock Exchange or Shenzhen Binhai data centers), rather than emphasizing high load and scalability like the Internet. The common practice of e-commerce platforms using hundreds or even thousands of server clusters is not suitable for the requirements of private equity quantitative investment platforms. With the increase in trading frequency, on the one hand, the performance of software and hardware needs to be continuously improved, and on the other hand, the intelligence of algorithms and the stability of systems also need to be continuously optimized. If a private equity quantitative trading platform is positioned as a high-frequency trading strategy from the beginning, due to insufficient knowledge and experience, insufficient understanding of the environment required for high-frequency trading, it may lead to trading failures or even inability to execute trades. On the other hand, high-frequency trading has higher risks due to less human intervention. Therefore, private equity quantitative trading platforms should follow the growth process from low frequency to medium-high frequency.

2. Platform Function Design#

A complete quantitative trading platform should include the following systems: 1. Data Center. 2. Strategy Center. 3. Trading Center.

First, the data center is the foundation of the quantitative trading platform. All quantitative trading strategies, whether backtesting or live trading, require data support. The construction of the data center is relatively simple but cumbersome, mainly involving the construction of databases and the storage and cleaning of data. This process involves fewer business considerations, with the main focus on data cleaning. The main task of this system is to provide effective data and relieve the pressure of data processing and judgment in subsequent business flows. For certain attributes of basic market data, such as ex-rights formulas, different data providers have different calculation methods, so a unified data source should be used in this regard. However, due to the limitations of the data providers used and the needs of analysis, it is necessary to collect different data from multiple data sources to ensure the integrity of securities information. For most types of data, the collection process can be divided into two stages: initial collection and incremental collection. Simple and reliable strategies should be used for collection, so that strategies can be easily adjusted when data sources change, and the process of data updates is reliable and robust. Currently, authoritative data service providers such as Wind, Choice, and Tushare, as well as securities firms' own market systems, can be used as data sources. Recently, with the increasing attention to behavioral finance, web scraping has also been used to obtain data other than market prices and transactions, such as blog popularity indexes and news keywords. Quantitative investment and machine learning public accounts have published an article titled "Using Twitter Sentiment to Predict the Stock Market" which may be of interest to readers.

Second, the strategy center is the heart of the quantitative trading platform. The strategy center includes strategy development, backtesting, and evaluation. Among them, backtesting is particularly important for private equity funds. The main purpose of backtesting is to replicate real trading conditions as much as possible and fit the actual trading process to evaluate the performance of the strategy. During the backtesting process, it is necessary to avoid using future data, that is, not using signals generated after day T to affect the data before day T for trading on day T. Common and necessary backtesting evaluations should include evaluations of returns and maximum drawdowns, presentation of trading details, and changes in trading costs and position records. When a strategy completes backtesting within a selected time range, users can view various profit and risk indicators of this strategy, and see charts such as the rate of return curve for the entire strategy operation period. Users can export a strategy's backtesting report and specific trading logs, and the backtesting report includes various indicators and analysis charts of the backtesting results. More advanced backtesting evaluations can include attribution analysis, return analysis, and other functions. The purpose of attributing the performance of funds is to identify the main factors affecting the returns of private equity funds, such as asset allocation methods and industry preferences in stock selection. Analyzing the performance of the target fund and the selected market benchmark from different aspects "slices" the differences in returns, and different "slices" reflect different focuses, such as the aforementioned asset allocation methods and industry preferences in stock selection.

Finally, the trading center is the ultimate goal of the quantitative trading platform. The trading center can be divided into simulated trading and live trading. Strategies that have been verified in the strategy center through backtesting can first undergo simulated trading. In simulated trading, real-time data is used to verify the generalization ability of quantitative trading strategy models. The simulation center mainly uses the interfaces of third-party service providers to access third-party simulated trading desks. When the generalization ability of the quantitative trading strategy model is relatively high, it can be switched to live trading. Live trading is mainly implemented through interfaces with brokerage PB trading systems. In the early stage of private equity development, for low-frequency strategies, manual simulated trading and live trading can also be considered.

3. Non-functional Design#

Non-functional design mainly includes two aspects: response speed and usability.

Response speed mainly refers to the response speed of backtesting, especially when the backtesting time range is long, the system should ensure a certain backtesting response speed. With the increasing complexity of trading models and the lengthening of backtesting time ranges, users should be able to quickly obtain backtesting results for research, judgment, and decision-making. In recent years, although the introduction of machine learning has greatly facilitated the construction of models, the tuning process required for machine learning also puts higher demands on system response speed.

Usability mainly refers to how quickly users can get started. Currently, domestic Internet quantitative platforms such as JoinQuant and Uqer provide education sections for beginners, which include not only financial knowledge of quantitative investment but also essential skills such as mathematics, statistics, and programming to help beginners quickly use quantitative trading platforms. As a quantitative trading platform for private equity, it may not be necessary to consider many different users like Internet quantitative platforms, but at least in terms of page flow and platform terminology, it should conform to the business habits of private equity. In addition, private equity quantitative investment platforms should establish their own function libraries.

4. Front-end Technology#

A convenient interface is needed for user interaction, and the B/S mode is the mainstream user interaction method currently. The quantitative investment platform adopts the B/S architecture to provide interactive functions to users. The WEB server is deployed through TOMCAT, and the SSH framework is used for implementation. The data interaction between the front-end and back-end mainly uses REST and WebSocket technologies. REST architecture is a software architecture style proposed by Roy Thomas Fielding. REST architecture is centered around resources, which are unique entities identified by URIs. Clients modify the state of resources by attaching representations in PUT and POST requests, and servers advance application states by attaching representations in response to GET requests from clients. REST architecture can be used to implement non-real-time data requests, such as querying historical prices and financial data. WebSocket technology can be used to interact with the middle-tier engine on the server side. Traditional real-time web applications usually use polling mechanisms to achieve real-time requirements: the client maintains a fixed frequency and sends requests to the server at regular intervals to keep the client and server data synchronized. Polling is simple to implement, as JavaScript can define a timing function in a web page. However, this approach also has a problem: when the client sends requests frequently but the server's data may not have been updated, all these requests are in vain, bringing access pressure to the server and wasting bandwidth resources. WebSocket is a network technology proposed to solve this problem, enabling full-duplex communication between browsers and servers, and achieving bidirectional real-time communication between clients and servers. WebSocket architecture can be used to implement real-time data requests, such as real-time stock prices.

5. Back-end Technology#

In the implementation of the quantitative investment platform, the back-end data processing modules (ETL modules, logical operation modules, backtesting modules, etc.) are relatively independent and mainly focus on data processing and calculations. Therefore, they can be developed independently using Java or C++ languages. In recent years, with the popularity of the Python language, Python technology can also be considered. For the most critical backtesting module in the back-end, it is common to use Zipline to build the strategy center. In addition, vn.py and rqalpha, developed by Chinese developers, have also received high praise on GitHub. The construction of a backtesting platform can be considered for customization or using third-party platforms. Currently, well-known quantitative platforms in China include JoinQuant, Uqer, Ricequant, and others. For newly established private equity funds, it is recommended to consider using third-party platforms. It is also necessary for relatively smaller companies or individual investors to leverage external platforms. Some backtesting platforms have also cooperated with securities firms. If the signal generation can be connected to the securities firm's trading system, it would be beneficial (Shen, 2019).

6. Visualization Technology#

In terms of visualization in the B/S architecture, Echarts or Highcharts libraries can be chosen. Taking Highcharts as an example, Highcharts is a charting library written in pure JavaScript that allows interactive charts to be added to web pages or web applications. It is provided free of charge for personal websites, learning, and non-commercial use. Highcharts supports various types of charts, including area charts, line charts, pie charts, bar charts, combination charts, and scatter charts. Highcharts has a beautiful interface and runs without the need for plugins like Flash and Java, making it fast. In addition, Highcharts has good compatibility and can perfectly support most current browsers.

References:
[1] Kong, L. (n.d.). Design and Implementation of Quantitative Stock Selection Backtesting Platform [Dissertation].
[2] Cao, Y. (n.d.). Design and Implementation of Multi-Factor Quantitative Investment Management System [Dissertation].
[3] Liu, N. (n.d.). Design and Implementation of Web-Based Quantitative Trading Platform [Dissertation].
[4] Shen, S. (n.d.). Design and Implementation of Quantitative Strategy Research Platform [Dissertation].
[5] Wen, C., Wang, J., Lin, Y., et al. (n.d.). Quantitative Trading Strategies and Financial Regulation Based on Big Data Technology [Journal Article].
[6] Shen, N. (2019). Understanding Quantitative System Access and Related Platforms in One Article [Journal Article].

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.