Use strategy of stock quantitative analysis tool QTYX - real trading signal monitoring (updated 2.5.7)

9082ce84270ea1910e1b31d02b0865c6.png

Build your own quantitative system

7fece2940b969bb42a94c6f42e441ada.png

If you want to remain invincible in the market for a long time! It is necessary to form a set of own trading system.

How to learn to build your own quantitative trading system?

Learning while actually fighting, learning in actual combat is the most effective way . So we share a quantitative system that can be used for both learning and actual stock trading analysis - QTYX.

The purpose of sharing the QTYX system is to provide you with a template for building a quantitative system, and ultimately help you build your own system. Therefore, we provide the source code, which can be re-developed according to your own style.

The QTYX system structure is as follows:

ae9e76c87c5201a50466b053f6b1cef2.png

Since QTYX has been iteratively updated, the current introduction corresponds to version V2.5.7 . Subsequent upgrades will update the content of the document synchronously.

997e616ecfee335a0fe1351b605364a7.png

Function overview

b920048ba1ffd61b526cbc7f075b95e9.png

The "Trade" sub-page of the stock quantitative analysis tool QTYX provides the function of remote market monitoring.

We can deploy QTYX on the cloud server, and let QTYX help us keep an eye on the market in real time. When the real market market reaches the target we set, we will be notified by instant messaging tools such as email, WeChat or DingTalk.

b2d66be247baa20ca1b1a2a7e0433bfa.png

Start real disk monitoring

b00d73a64f2d101171852a97dd564fd0.png

Click on QTYX "Trade" to enter the sub-page.

Select "Fixed disk scan time", there are four levels of "5 seconds, 15 seconds, 30 seconds and 60 seconds".

After clicking "Start Firm Offer", the monitoring will start. The monitoring time period is 9:25--11:31 and 12:59--15:01.

dad2bd3a509937608942c68ba7af8e88.png

QTYX will obtain the latest market data of the whole market in real time, and read the allocation of individual stocks in the "trading stock pool (trading condition list)" and "holding stock pool".

When it is judged that the instructions in the "trading condition list" and "holding stock pool" meet the conditions, an alarm will be triggered and the transaction will be executed.

How to generate the content in the "Trading Condition Sheet" and "Pool of Holding Stocks"? Next, let's take QTYX deployed on the cloud server as an example to introduce.

a4ad80a86908803942a9823b3c30b98a.png

Add transaction terms

c948a66b14e25f31505110f50e0198d6.png

The "trading condition sheet" records the information of the stocks that need to be traded in the real market, such as the stocks bought and sold, quantity, price, strategies executed in the market, etc.

After clicking "Import Stock Pool", the latest market data of the stocks in the self-selected stocks will be loaded into the interface.

After clicking the stock code, the transaction order configuration interface will appear.

bd2b2807dbc2625fe9c889b92d995059.png

We fill in the trading direction (buy or sell), the price of buying and selling, and the number of stocks bought and sold according to the results of our own strategy analysis.

Fill in the transaction configuration parameters for Miracle Pharma as follows:

42fe00cd8134815d3262a1ac4e5fd592.png

After the configuration is complete, click OK and it will be added to the "trading stock pool" on the left.

If you want to delete the stock or change the trading parameters, double-click the stock code in the stock pool to select it.

7e7a34a8aedf1df4e8467faffd6a2204.png

62ad512014af000ec3208a1afa499107.png

Add stop loss order

ad7f19df6ccfe5fe28e5faa4f3ab80fc.png

The "holding stock pool" records the take-profit and stop-loss setting values ​​of the held stocks.

A sell signal will be triggered when the take profit and stop loss value is triggered in the day.

After clicking "Import Stock Pool", the latest market data of the stocks in the self-selected stocks will be loaded into the interface.

b4c6bf2d75ee853ba20ed46fc22ee671.png

Click on the stock code, then select "holding stock pool" and the configuration interface will appear.

We can change the mode and range of take profit and stop loss, and the configuration interface will also display the buying price and the highest price after holding.

At present, the take-profit mode we support is a fixed ratio, such as a 10% stop-profit after buying. The stop loss mode is a dynamic retracement stop loss. For example, after buying, the stock price falls by 5% from the highest price, and then the stop loss is exited.

Fill in the take profit and stop loss configuration parameters of "Quanjude" as shown below.

b7429611135a1036404569e9765f5f9d.png

After clicking confirm, it will be added to the "holding stock pool".

3a5b3db423ed8ed1468434f38d386436.png

If you want to delete the stock or change the take profit and stop loss parameters, double-click the stock code in the stock pool to select it.

In addition, when the purchase of the stocks in the "trading conditional order" is triggered, it will be automatically updated to the "holding stock pool".

If there are stocks that are purchased manually, you can also update the "holding stock pool" by adding information in ConfigFiles/hold_para.json

e7195d684c9200ecbd37daafec40b01c.png

Send analysis report remotely

221f0f83c72df20adddf4050ff7c7fed.png

After the firm offer monitoring is started, the latest market data of the specified stocks will be refreshed periodically.

e7990b862a04beb0d28a67ed07617253.jpeg

When it is found that the stock has reached the buying or selling price during the firm offer, or meets the conditions for stop-profit and stop-loss trading, a message reminder will be sent remotely. (Remember to fill in the mailbox information in ConfigFiles/sys_para.json, and enable the QQ mailbox reminder function on WeChat, the effect is the same as WeChat reminder)

aae2cbada7efb0d5649c899de93a2c3c.jpeg

7e01656468e31ed8c31e8b9f404bcd66.png

Automatic trading interface‍

7a9b3c35f4e1b73a55ff4906aeb32846.png

In the configuration parameter dialog box, if automatic trading is checked, the system will automatically execute the buying and selling operation according to the set parameters.

210c2c90c79316f466e776d01d84f23c.png

It should be noted that QTYX supports access to the third-party library easytrader to perform automatic transactions, and it is enough to debug the easytrader library in your own environment before using it.

306db0f5c756f8f320c17a3a95fb6854.png

For details, please refer to the following public number articles:

Xiaosan Quantitative Stock Trading|To overcome the weakness of human nature? Activate fully automated stock trading!

If you have stabilized the debugging of automatic trading, you can add the function of automatic trading to the following code, thus completing the end link of automatic trading.

if val['auto_trade'] == True:
    print("自动交易需调试交易环境,查看公众号《小散量化炒股记|要克服人性弱点?激活股票全自动化交易!》")

illustrate

The complete QTYX source code is uploaded to Knowledge Planet "Fun with Stock Quantitative Trading". Friends who want to join Knowledge Planet remember to call me on WeChat to get benefits!

Knowledge Planet Introduction Click: Knowledge Planet "Fun with Stock Quantitative Trading" essence content overview

a928e63001a46e33a345056950b6d618.jpeg

Guess you like

Origin blog.csdn.net/hangzhouyx/article/details/128424339