What is quantitative transaction?Quantitative trading

Quantitative transaction, English is QuantitativeTrading, Abbreviation Quant It is a method of transaction that is often used by financial investment institutions.It aims to perform a large amount of data analysis in a short period of time, and then automatically transaction through the pre-written transaction model to improve transaction efficiency and avoid the impact of human emotion on transactions.

With the popularization of computer language, quantitative transactions have gradually been applied among ordinary investors.70%to 80%of Wall Street are completed through quantitative transactions.There are currently some businessmen, such as Yongyou IBRK and Futu Moomoo The APIs provided for their own quantitative trading strategies are provided.

Bleak American broker:Ying Diandai 劵| | Futu Moomoo| | Microex Securities| | Tiger securities| | First securities| | Robinhood in

Directory of this article

What is quantitative transaction?

Quantitative transaction, English is Quantitative trading It is a quantitative analysis.

For ordinary financial investors, judging whether to hold a stock and when does it hold?How much do you hold?When will it sell?How much is selling?These choices often determine the success or failure of investment.

Before making choices, ordinary investors will analyze some data, including the operating conditions of the target company, financial situation, the performance of the company’s stock price for a period of time, etc.After analyzing a bunch of data, selectThe guidance of some masters, or follow the mainstream trend of the market.

If an investor prepares to invest in multiple stocks, he also wants to collect the situation of the industry where the company is located, and the amount of analysis will increase.Most of the time professional shareholders are collecting information to sort out information and make judgments.

For financial institutions, the amount of information to be processed is thousands of times that of ordinary shareholders.The judgment to be made is to eliminate a large amount of interference to find the most accurate timing.

Regardless of ordinary shareholders or professional institutions, the process of investing can generally be divided into two steps:

  • The first step is to collect and organize the established information to find the law;
  • The second step is to formulate a strategy based on the data to judge the trend of the stock;

The first step lies in “annoying”.The amount of information is too large and too mixed.You need to collect a lot of data from listed companies, including the company’s fundamental data, stock transaction data, etc.

The second part lies in “difficulty”.After obtaining information, personal judgment will be controlled by personal emotions.Many investors may have regretted it: at that time it was too impulsive, just calm down.

With the improvement of information technology and the development of computer computing power, the content of the first step is constantly simplifying.You can easily obtain various types of information data tables and charts, and the time range of data acquisition can also reach a large span.

As for the second part, because the data analysis cannot be performed targeted, the investment operation given through computer data analysis is also in the reference stage.

In modern times, with the continuous development and simplification of computer language, more and more people have mastered computer language, and rely on their own mathematical ability to build a computing model that suits them.In the short period of time, the target object data analysis and transaction point decision-making.In this process, only the computer analysis, no one is emotional interference.

After the verification of this transaction method, it proves that it is effective, so it is used in many large financial institutions.Financial institutions can complete a large number of transactions in the instant, which is now called quantitative transaction:

Through computer languages, such as C/C ++, Matlab, R, Python, etc.to write targeted trading models, using digital analysis and mathematical operations to complete large-volume information collection, data analysis, pure strategy decision, and transaction execution.

C ++ for quantitative transactions

At present, the personnel engaged in quantitative transactions are called Quants (Quants), and the work is mainly:

  • Strategy recognition: Writing the trading model by yourself, or looking for existing strategies, combined with your own advantages to determine the use of the strategy and the frequency of transaction
  • Strategy back test: Apply the target strategy to historical data, and verify whether the calculation results of the model are consistent with the historical results through the model operation.If it matches, it can be continued and adjusts the details.If it does not match, give up the model.
  • Executive system: Apply the verified trading model to actual transactions, complete automatic quantitative transactions, and minimize transaction costs.
  • Risk management: Tracking quantitative transactions based on the trading model, found the risks that may exist during the transaction process, and timely risk management is performed.

The founder of quantitative transaction

Jim Simons is the first great investor to combine computer mathematics models with financial investment.The Renaissance Technologies hedge fund company he founded is currently the most successful hedge fund company with quantitative transactions.

JIM-SIMONS-Quantitative transaction

Jim Simons entered the financial field with the background of mathematicians and password cracked.It advocates excluding various human factors in addition to financial investment decisions, using mature computer languages to determine market conditions and obtain amazing benefits from it.He believes that the computer has its own point of view.After establishing a mature successful trading model, he will blindly follow the results of the computer and reject anyone to interfere with the computing judgment results of the computer.

Since its establishment of a computer-based transaction in 1982, Renaissance Technologies Fund Corporation has been established in just 30 years.Jim Simons has accumulated $ 23 billion in wealth with its quantitative trading system.

The advantages and disadvantages of quantitative transactions

Quantitative transactions have been used by most financial institutions and are gradually being used by many individuals.Like many other transactions, it has its own advantages and disadvantages:

advantage

You can quickly collect and analyze a large amount of data, which greatly reduces the workload of target selection.

When the transaction operation trigger point is set, the transaction can be carried out automatically, reducing the workload of daily investment.

Use computer mathematics models to rationally analyze the market and judge the operation method to effectively avoid human emotional interference.

shortcoming

A single quantitative trading model cannot always be effective in the dynamic market, and parameters need to be adjusted regularly to adapt to the major environmental changes in the market.

What are the quantitative trading platforms?

The use platform for quantitative transactions is currently mainly platforms that need to analyze large amounts of transaction data.

There are also more and more individuals who write trading procedures by themselves after learning computer language to conduct financial transactions that are more in line with their own investment characteristics.

The platforms that can write quantitative transactions are currently several major computer language writing programs, such as C/C ++, Matlab, or Python language writing platforms.

The platform for learning quantitative transactions is currently very popular, and it usually provides a relatively complete curriculum system.It has cultivated high-end quantitative traders from the aspects of mathematics, logic, computer language, and financial knowledge.

Futu’s quantitative transaction API.

Futu not only provides low trading costs, but also supports the financial field of Hong Kong, China and other places in the United States, but also provides investors with API technology to facilitate investors to invest more comprehensive investment.

Futu Moomoo gives up to 5 stocks up to 5 stocks

Futu Moomoo account

Futu quantitative API is called FUTU OPENAPI, mainly composed of FUTUOPEND and FUTU API.

Among them, FUTUOPEND is the gateway program of FUTU API, which is mainly used to run the customer’s local computer and cloud server, and is responsible for sending the transit agreement to the background of Futu, and then returns the processing data to the client.

FUTU API is Futu for several major mainstream computer languages: API SDKs encapsulated by Python, Java, C#, C ++, JavaScript, etc., to facilitate users to call directly and simplify users to develop investment procedures by themselves.Even the language used by investors is not in the language.The above-mentioned liquidation of the nude agreement can still be completed to complete the development of investment strategy.

futu openapi frame

When users need to use FUTU Openapi, they usually need to perform two steps:

  1. Install the starting gateway program FUTUOPEND on the local or cloud client.The program will expose the client interface to the exposure of the TCP protocol to the follow-up data transmission.The protocol interface has nothing to do with the computer programming language.
  2. Download the FUTU API to complete the operating environment to facilitate subsequent quickly call the corresponding API SDK that is pre-packaged.

After the software installation is complete, users need to open a FUTU Openapi account.This account design 2 accounts: platform account number and transaction business account.

  1. The platform account is a registered account in Futu.This account can also be used on Futu Niu Niu and Futu Moomoo platform.
  2. The trading business account needs to be opened separately according to different areas of investors, such as:
  • The Hong Kong stock account is used in the Hong Kong market for securities investment
  • U.S.stock accounts are used in financial investment in the US market
  • A-share accounts used to trade A-share market stock securities
  • Futures accounts are used in futures products that trades global markets, including futures markets such as Hong Kong, the United States, Singapore and Japan

Next, investors can use FUTU Openapi.At present, Futu quantitative transaction API mainly provides two major functions: market analysis and transaction execution.

  • The market analysis function supports users to collect and analyze the market data of all or specific financial product categories in the Hong Kong, the United States, and the A-share market.The data types include real-time quotation, real-time K-line, real-time set, and historical K-line.Essence
  • The transaction execution function supports users in the world’s five major markets: Hong Kong, the United States, A shares, Singapore, and Japan to conduct real transactions and simulation transactions involving stocks, futures, options, etc.

FUTU OpenAPI, as a more mature quantitative trading API in the market, can provide users with:

  • Full platform operation: FUTUOPEND supports multi-system installation and operation of Windows, MacOS, CentOS, Ubuntu and other systems.
  • Multi-language writing: FUTU Openapi supports mainstream languages such as Python, Java, C#, C ++, JavaScript
  • Stable operating environment: FUTU OpenAPI provides a stable technical framework.Users can smoothly write trading models that are suitable for them, and perform recovery and application.
  • Speed experience: Regardless of the code running program or real-time transaction, it can be completed at a speed when the network speed allowed.The fastest place is only 0.0014 seconds, which is very suitable for high-frequency traders.
  • Free transactions: After writing the self-contained trading model, users use it for transactions without paying additional additional costs.
  • Multi-category investment: FUTU Openapi supports real-time transactions and simulation transactions that run Hong Kong, the United States, A shares, Singapore, and Japan.

How to build a Python quantitative trading system?

Quantitative trading systems can be written through a variety of computer languages, and Python is the most popular computer language at the moment, and its usage rate ranks first among multiple languages.

Python is a high-level programming language that is compatible with platforms.The open source environment has multiple professional library functions, such as:

  • SCIPY, Numpy, Pandas, Matplotlib, Quantopian, Zipline, TA-LIB, Pybacktest, etc.can quickly develop barrier-free quantitative trading strategies.
  • TensorFlow, Seaborn, Scikit Learn, Keras, Plotly, Stats can help trading models for more effective data mining and transaction execution.
  • Spyderide optimizes the visualization of data in the trading model, making financial analysis more intuitive and simple.
  • Pyalgotrade, as an exclusive algorithm trading library function of Python, focuses on paper transactions, retrospective testing, real-time transactions and technical analysis, bringing more efficient quantitative transactions.
Python quantitative transaction

The use of Python as a computer language to write a transaction model and all quantitative trading model formulation process, consisting of strategic recognition, strategic recovery, execution system and risk management.

However, the advantage of Python is that in all processes, its computer language is easier to understand, logical sorting is more rational, and it provides multiple exclusive library functions that can be directly called.

  • In the strategic recognition stage, multiple library functions can be called according to the trading characteristics of your own needs to write a transaction strategy that is more suitable for you.
  • During the strategy back test stage, the professional library function can perform more comprehensive data recovery to obtain more accurate recovery results and ensure that the trading model written in the early stage is more effective.
  • In terms of execution system, because of the clarity of language logic, the probability of bugs appears during the execution of the model is greatly reduced, and it is not missing any investment benefits.
  • During the risk management process, because the language is clear, it is easy to find the adjustment point and make the data subtle adjustment to control the necessary risk management without affecting the complete operation of the entire trading model.

What are the quantitative trading strategies?

The quantitative trading strategy is to write targeted trading models according to the characteristics of the transaction style, collect and integrate the required information, and perform data monitoring and decision-making implementation based on the different transaction judgment points.At present, after market verification, the more successful quantitative trading strategies are:

Alpha hedging strategy

Investors will face systemic risks in market transactions -BETA/β risks and non-system risks -Alpha/α risk.By weighting systemic risks, they separate them to obtain excess absolute returns, that is, the strategy of Alpha’s income strategy strategyCalled Alpha hedging strategy.

refer to: Alpha Surgery Strategy Source Code

Turtle trading strategy

The turtle strategy is the trend follow the quantitative trading strategy.Parameters are set on various links such as admission conditions, position control, capital management, stop loss and profit, to perform automated transactions.This strategy can be used as a basic template for the design of complex trading strategies.

refer to: Turtle trading strategy source code

Multi-factor stock selection strategy

Multi-factor stock selection strategy is to build a stock portfolio by finding some indicators related to yield-related indicators.If the stock portfolio runs to win the market index, continue to do more.At the same timeIf you lose, make multiple fingers, short the current stock portfolio, and earn reverse Alpha income.It is an important model in the current quantitative stock selection.

refer to: Multi-factor stock selection strategy source code

Dual moving average strategy

The two-moving average strategy is the basic idea of establishing M-day moving average respectively.The average moving average is the N day.The two moving average will definitely produce intersection.If M> N, N Tan Average “Out of” M -Sky Modeling Point is the buying point, and otherwise it is the selling point.This strategy is based on the intersection of different days based on different days, grasping the strong and weak moments of the stock to perform automated quantitative transactions.

refer to: Dual moving average strategy source code

Cross-breed arbitrage strategy

The basic idea of this strategy is to use two different types of different types, but the difference between the exponential and interconnected index futures products is traded.The interrelated connection refers to the interdependence of mutual replacement or affected by the same supply and demand factors, such as related commodities arbitrage or raw materials and finished products and finished products.Between arbitrage.For the market, this strategy can help distorting market prices to return to normal levels and increase market liquidity.

refer to: Cross-breed arbitrage strategy source code

Cross-term arbitrage strategy

Similar to the cross-product arbitrage strategy, the cross-period arbitrage strategy is also suitable for the quantitative trading strategy of futures.Settlement arbitrage benefits by arbitrage through futures contract transactions that perform the same index and different monthly modules.

refer to: Setal arbitrage strategy source code

Index enhancement strategy

This strategy is suitable for index investors.The fund manager uses this strategy to maintain the characteristics of the characteristic parameters of the investment portfolio higher than the target index to maintain their good investment performance.

refer to: Index enhancement strategy source code

Grid trading strategy

This strategy is an active trading strategy that uses market shocks to make profits.The basic idea is to use the price differences of repeated shocks in the mesh range of the investment target in the preset value range.When the price breaks through the grid, the position is added, and when the grid is returned to the grid, the investment income is to maximize the investment income.

refer to: Grid trading strategy source code

Industry rotation strategy

The strategy aims to automatically switch between different industries according to the strong time of different brands in different industries to maximize investment income.

refer to: Industry rotation strategy source code

High-frequency trading strategy

High-frequency trading strategies can help investors earn benefits in extremely short market changes.Computers can track the market trend in real time according to the set programs, automatically buy or sell the set price difference, and use a large number of transactions through a large number of transactions.Times, earn a lot of benefits from price fluctuations.

R-Breaker Strategy

R-Breaker is a kind of intraday trading strategy.According to the closing price, highest price and lowest price data of the previous trading day, six prices are established with the help of specific mathematical models.The selling price, reverse return price, reversal buying price, observing the purchase price, and breaking the selling price.These six prices are different operation points of the current transaction.Investors can adjust the parameters in the model to adjust the parameters in the modelAdjust the gap between the price to change the automatic operation trigger conditions.This strategy was rated as one of the most profitable strategies by Future Thrut.