WO2023044809A1 - 创建量化交易策略的方法和装置 - Google Patents

创建量化交易策略的方法和装置 Download PDF

Info

Publication number
WO2023044809A1
WO2023044809A1 PCT/CN2021/120466 CN2021120466W WO2023044809A1 WO 2023044809 A1 WO2023044809 A1 WO 2023044809A1 CN 2021120466 W CN2021120466 W CN 2021120466W WO 2023044809 A1 WO2023044809 A1 WO 2023044809A1
Authority
WO
WIPO (PCT)
Prior art keywords
control
graphical
quantitative trading
trading strategy
strategy
Prior art date
Application number
PCT/CN2021/120466
Other languages
English (en)
French (fr)
Inventor
李健
Original Assignee
富途网络科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 富途网络科技(深圳)有限公司 filed Critical 富途网络科技(深圳)有限公司
Priority to PCT/CN2021/120466 priority Critical patent/WO2023044809A1/zh
Priority to AU2021427873A priority patent/AU2021427873A1/en
Priority to CN202180010866.9A priority patent/CN115053245A/zh
Priority to JP2022559690A priority patent/JP7492028B2/ja
Priority to US17/896,092 priority patent/US20230101521A1/en
Publication of WO2023044809A1 publication Critical patent/WO2023044809A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Definitions

  • the embodiment of the present application relates to the field of software technology, and more specifically, relates to a method and device for creating a quantitative trading strategy.
  • Quantitative trading strategies are increasingly used in financial markets. Quantitative trading strategies can directly affect the loss of interests of investment users or teams. Therefore, it is particularly important to create quantitative trading strategies.
  • the embodiments of the present application provide a method and device for creating quantitative trading strategies, which can realize simple and flexible creation of quantitative trading strategies and meet various needs of users.
  • a method for creating a quantitative trading strategy which includes:
  • the graphical interface including at least one editable control
  • the graphical quantitative trading strategy includes at least two edited controls and a connecting line, wherein the connecting line is used to connect the edited controls , the edited control includes attribute parameters;
  • a device for creating a quantitative trading strategy which includes:
  • a display unit configured to display a graphical interface, the graphical interface includes at least one editable control
  • An acquisition unit configured to acquire a graphical quantitative trading strategy input by the user through the graphical interface, the graphical quantitative trading strategy includes at least two edited controls and a connecting line, wherein the connecting line is used to connect all Describe the edited control, the edited control includes attribute parameters;
  • a processing unit configured to obtain a quantitative trading strategy script according to the graphical quantitative trading strategy
  • the processing unit is also used to run the quantitative trading strategy script to obtain quantitative trading results.
  • an electronic device including a processor and a memory.
  • the memory is used to store a computer program
  • the processor is used to call and run the computer program stored in the memory to execute the method in the first aspect above.
  • a computer-readable storage medium for storing a computer program, and the computer program causes a computer to execute the method in the above-mentioned first aspect and any implementation manner of the first aspect.
  • a computer program product including computer program instructions, the computer program instructions cause a computer to execute the method in the above first aspect and any implementation manner of the first aspect.
  • a computer program which, when running on a computer, causes the computer to execute the method in the above first aspect and any implementation manner of the first aspect.
  • the graphical quantitative trading strategy input by the user through the graphical interface is obtained, and the graphical quantitative trading strategy is compiled to obtain the quantitative trading strategy script, and the quantitative trading result can be obtained by running the strategy script.
  • users can edit the desired graphical quantitative trading strategy according to various needs through the graphical interface without the ability to write program codes, so this application can realize simple and flexible creation of quantitative trading strategies to meet Various needs of users.
  • FIG. 1 is a schematic diagram of an application scenario applied in an embodiment of the present application
  • Fig. 2 is a schematic flowchart of a method for creating a quantitative trading strategy provided by an embodiment of the present application
  • Fig. 3 is a specific example of the graphical interface provided by the embodiment of the present application.
  • Fig. 4 is a specific example of the attribute column corresponding to the condition box provided by the embodiment of the present application.
  • Figure 5 is an example of an interface for editing combined conditions in a pop-up window provided by the embodiment of the present application
  • FIG. 6 is an example of logical association of various conditions provided by the embodiment of the present application.
  • Fig. 7 is an example of the preview of the combination condition control provided by the embodiment of the present application.
  • Fig. 8 is another example of the combined conditional control preview provided by the embodiment of the present application.
  • FIG. 9 is a specific example of the property bar corresponding to the event box provided by the embodiment of the present application.
  • Figure 10 is a specific example of at least one path determined according to the graphical quantitative trading strategy provided by the embodiment of the present application.
  • Fig. 11 is another specific example of at least one path determined according to the graphical quantitative trading strategy provided by the embodiment of the present application.
  • Fig. 12 is a schematic flowchart of the operation of the policy script provided by the embodiment of the present application.
  • Fig. 13 is a schematic block diagram of the communication architecture of the interface response provided by the embodiment of the present application.
  • Fig. 14 is a schematic block diagram of an apparatus 400 for creating a quantitative trading strategy according to an embodiment of the present application
  • FIG. 15 is a schematic block diagram of an electronic device 800 provided by an embodiment of the present application.
  • B corresponding to A means that B is associated with A.
  • B may be determined from A.
  • determining B according to A does not mean determining B only according to A, and B may also be determined according to A and/or other information.
  • At least one means one or more
  • plural means two or more than two.
  • “and/or” describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B, which may indicate: A exists alone, A and B exist simultaneously, and B exists alone, among them A and B can be singular or plural.
  • the character “/” generally indicates that the contextual objects are an “or” relationship.
  • “At least one of the following” or similar expressions refer to any combination of these items, including any combination of single or plural items.
  • At least one item (piece) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple .
  • FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the present application.
  • This application scenario involves electronic equipment 101, and electronic equipment 101 can be various terminal equipments, such as smart phones (such as Android mobile phones, iOS mobile phones, Windows Phone mobile phones, etc.), tablet computers, palmtop computers, notebook computers, mobile Internet devices (mobile Internet device), wearable devices, vehicle-mounted devices, etc., are not limited.
  • the terminal equipment may also be called user equipment (User Equipment, UE), terminal or user device, etc., without limitation.
  • UE User Equipment
  • the electronic device 101 may perform data transmission with a server (such as a quotation server) through a wireless communication technology.
  • a server such as a quotation server
  • the electronic device 101 shown in FIG. 1 may be in a client/server (client/server, C/S) mode, and the client may pull data from a server (such as a server).
  • the client may adopt the MVP (Model-View-Presenter) architecture, so that the interface, data operation, data warehouse, etc. are separated from each other.
  • MVP Model-View-Presenter
  • the electronic device may display a graphical interface including at least one editable control, and the user may input a graphical quantitative trading strategy by operating the electronic device 101.
  • the graphical quantitative trading strategy includes at least two Edited controls and connectors.
  • the electronic device 101 obtains a graphical quantitative trading strategy and a script of the quantitative trading strategy, and then runs the script to obtain a quantitative trading result.
  • the target of the quantitative transaction in the embodiment of the present application may be products such as futures, stocks or funds, without limitation.
  • FIG. 1 is only used to illustrate the embodiment of the present application rather than limit it.
  • the technical solutions provided by the embodiments of the present application may be flexibly applied according to actual needs.
  • FIG. 2 shows a schematic flowchart of a method 200 for creating a quantitative trading strategy provided by an embodiment of the present application.
  • the method 200 may be executed by the electronic device 101 in FIG. 1 , or a circuit or chip disposed in the electronic device 101 .
  • method 200 includes steps 210 to 240 .
  • an interface of an application (application, APP) installed on the terminal device may display a graphical interface for the user to create a quantitative trading strategy.
  • the APP can be a desktop APP or a mobile APP, without limitation.
  • control may be a graphical control.
  • the quantitative trading strategy can be abstracted as a graphical control.
  • the controls include at least one of start controls, condition controls and event controls.
  • each control in the graphical interface is editable, and the user can input property parameters of the control through editing.
  • the graphical quantitative trading strategy includes at least two edited controls and a connecting line, wherein the connecting line is used to connect the edited
  • the edited control includes property parameters.
  • the user can split the quantitative trading strategy process into different conditions or events, and then select a control (such as at least one of start control, condition control, and event control) through a graphical interface, and edit the control to input The attribute parameters of the selected control, and then connect at least two controls through the connection line, such as series or parallel connection, to realize various quantitative trading strategies.
  • a control such as at least one of start control, condition control, and event control
  • the connection line such as series or parallel connection, to realize various quantitative trading strategies.
  • the connecting line may represent an association relationship between at least two connected controls.
  • the graphical interface includes a control bar, a strategy canvas and a property bar.
  • at least one control selected by the user in the control column may be obtained.
  • the at least one control is added to the strategy canvas, wherein the start control is preset in the strategy canvas.
  • the control selected by the user in the policy canvas may be obtained, and the property parameters of the selected control may be edited in the property bar.
  • the at least one control and the start control are connected through the connecting line, so as to generate the graphical quantitative trading strategy.
  • FIG. 3 shows a specific example of a graphical interface, which includes a navigation bar 310 , a control bar 320 , a policy canvas 330 and a property bar 340 .
  • the navigation bar 310 can display the current quantitative trading strategy (such as strategy 1, strategy 2, strategy 3, new strategy, new strategy 1, new strategy 2, etc. in Figure 3), or the running quantitative trading strategy .
  • the navigation bar 310 may also display the status of the quantitative trading strategy, for example, it is being backtested.
  • the navigation bar may also display an icon of the newly created quantitative trading strategy, such as "+”.
  • control bar 320 is used to display multiple editable controls, such as condition controls and event controls.
  • condition control library is used to store judgment conditions
  • event control library is used to store events for executing operations.
  • One or more conditions may correspond to a condition control
  • one or more events may correspond to an event control, without limitation.
  • condition control may be, for example, a group of logical judgments, such as if/else logical judgments. Users can choose different judgment conditions by themselves, such as whether the moving average is in a long-term arrangement? Is the maximum purchase quantity greater than 1? The condition control can also judge whether the selected account holds a position, whether there are unfinished order conditions, etc.
  • the event control can be an execution function, such as buying 1 lot of a certain stock at the opponent's price, or canceling all orders for the entire account. Seemingly simple logic, it needs to handle exceptions internally, and also needs to do global interval management to prevent too concentrated concurrent requests to the server.
  • condition control includes at least one of a signal control, an account control and a combination control.
  • signals are objective data related to the market.
  • the signal condition controls can be divided into technical, fundamental, capital and news categories according to the trading basis commonly used by users.
  • signals can be predefined for users to drag and drop.
  • the predefined results of MACD are "golden cross", “dead cross”, “top divergence”, “bottom divergence” and so on.
  • the control bar 320 in FIG. 3 shows a specific example of the signal control.
  • technical aspects can include conditional controls such as Moving Average Convergence and Divergence (MACD), Stochastic Index (KDJ), Relative Strength Index (Relative Strength Index, RSI), momentum indicators, etc.
  • Fundamental aspects can include price-earnings ratios (Price to Earning Ratio, PE), return on assets (Return on Assets, ROA), return on net assets (Rate of Return on Common Stockholders' Equity, ROE), earnings per share (Earnings Per Share, EPS) and other conditional controls
  • the fund side can include condition controls such as capital flow, fund distribution, and bargaining chip distribution
  • the message side can include public opinion tracking condition controls.
  • control bar may also include a variable comparison signal, which is used to compare the magnitude relationship among global variables, constants, and numerical conditional variables.
  • the account conditions are related to an individual's trading business account and are personalized.
  • the account condition controls can be divided into several categories such as account assets, maximum buy and sell, position, order, and transaction.
  • the asset account can include condition controls such as maximum purchasing power, short selling purchasing power, cash purchasing power, net asset value, risk status, cash, long market value, short market value, initial margin, margin call margin, maintenance margin, etc.
  • the maximum buyable and sellable can include Cash can be bought, the maximum can be bought, the position can be sold and other condition controls
  • the position can include position direction, holding quantity, sellable quantity, cost price/opening price, position market value, profit and loss ratio, profit and loss amount, and today's total purchase amount (stocks only), total purchases today (stocks only), total sales today (stocks only), total sales today (stocks only), unrealized profit and loss (only futures), realized profit and loss (only futures) and other conditions Controls
  • the order can include conditional controls such as order status, the price of the last long order, and the price of the last short order
  • the transaction can include conditional controls such as transaction status, transaction price, and transaction quantity.
  • a plurality of conditions can be packaged into a combined condition through logical relationships of and, or, (), and the combined condition can correspond to a combined condition control.
  • the multiple conditions may be referred to as sub-conditions.
  • the number of sub-conditions may be no more than 10.
  • this embodiment of the present application supports user-defined combined condition controls.
  • the event controls include time controls such as placing an order, canceling an order, clearing a position, message reminder, exit strategy program, and assignment operation.
  • placing an order, canceling an order, and clearing a position can belong to transaction event controls.
  • the user can search for the desired condition control or event control, and the corresponding interface will automatically jump to the condition control or event control.
  • the user may, through the first operation, select a control in the control bar 320 and add it to the strategy canvas 330 to form a corresponding box, so as to form a graphical quantitative trading strategy.
  • the control can be added to the strategy canvas 330 by long-pressing the left button and/or dragging and dropping the combined control button.
  • the control will float, prompting the user that it can be dragged.
  • the color of the canvas can be changed accordingly, to prompt the user of the area that can be placed.
  • the control is dragged into the canvas area completely, the control will switch from the style in the original control bar to the style in the canvas, indicating that it is ready to be placed.
  • Elements in strategy canvas 330 include boxes and lines.
  • the frame may correspond to a control added by a user, or a preset start control.
  • the property bar 340 is used to edit properties of the control.
  • the control may have a large number of complex attributes.
  • the attributes of the order placing time control may include order type, target, direction, price, quantity, and so on.
  • each graphical quantitative trading strategy may have a start control.
  • the start control can be generated by default when creating a strategy, that is, it does not need to be dragged and created by the user.
  • the policy canvas 330 may be set by default to display a frame corresponding to the start control (which may be called a start frame).
  • the start control may include global attribute settings for the entire graphical quantitative trading strategy, for example including at least one of applicable account settings, cycle settings, and global variable settings.
  • Account types can also be referred to as policy types.
  • the control bar can automatically display the applicable controls in conjunction to avoid distracting items.
  • the strategy type can be selected through a drop-down menu, for example, securities, futures, stocks, funds, etc., without limitation.
  • a warning or reminder can be given.
  • the cycle setting can be set in the start setting, which can include the cycle setting of the whole strategy.
  • the cycle of the script of the strategy depends on the quotation drive of the secondary market.
  • the user can choose to run once for each quotation change of each stock, or to run once for each K first.
  • the target represents the target of the circular reference
  • the frequency represents the frequency of the policy cycle.
  • on_bar_open() can indicate that the signal is run once at the opening of each K line under the specified K-line cycle
  • on_tick() means that each signal is run once for each tick, and only executed once means that the strategy only runs once .
  • Global variables are used to maintain the connection between front and back nodes (such as controls), and data between nodes can be transferred through global variables.
  • Global variable settings support the creation of global variables for the selection of condition boxes and/or event box parameters in the canvas, such as scenarios that can be used for assignment calculations and loop iterations. Exemplarily, as shown in FIG. 3 , operations such as adding, editing, and deleting global variables can be performed through corresponding buttons.
  • an editable global variable box 341 appears below the global variable.
  • the global variable box can be edited, such as filling in the variable name and assigning a value. , the global variable is established successfully. It should be noted that when the variable name or assignment of the global variable is modified in the properties of the start box, when the corresponding control is used later, the global variable will be changed accordingly.
  • the assignment can choose to be entered manually, or to select a condition variable. If the user selects a condition variable, a parameter box corresponding to the condition variable (such as a signal condition control or an account condition control) may be displayed for parameter setting.
  • a condition variable such as a signal condition control or an account condition control
  • the parameter information can be displayed in the strategy canvas, so that the user can read it easily.
  • the leaked information includes, for example, at least one of name, target, frequency, or others, which is not limited.
  • the revealing information of the start block 331 is "run once a day K", where "day K" is frequency information.
  • a box corresponding to the control is displayed in the strategy canvas 320, such as a box corresponding to a conditional control (may be referred to as a conditional box) ,
  • the box corresponding to the event control may be called an event box).
  • the parameter editing settings of the condition control may be displayed in the property bar 340 .
  • the condition box can have parameters in four areas that can be adjusted, namely the variable 1 area, the judgment area and the variable 2 area.
  • the parameter setting of the condition box will be described below in conjunction with FIG. 4 .
  • FIG. 4 shows a specific example of the property bar corresponding to the condition box.
  • the conditional variable in the area of variable 1 is MACD
  • the conditional variable in the area of variable 1 is the maximum buyable.
  • the variable 1 area can present parameter settings related to variable 1, and the number of parameter settings changes as the user drags and drops variable 1. For example, as shown in (a) of FIG. 4 , when MACD is selected for variable 1, parameters related to MACD are presented below for the user to set.
  • the judgment area can be set as an enumeration type, for example, the user can select through a drop-down menu.
  • the judgment can form corresponding drop-down enumeration options according to the conditions selected by the user.
  • variable 2 may vary according to the variation of variable 1. Can be divided into two situations:
  • variable 1 When variable 1 is an enumerated condition variable, variable 2 can be a drop-down enumeration option;
  • variable 1 is a numerical conditional variable
  • variable 2 can be input in three ways: 1. manual input; 2. conditional variable (such as a numerical conditional variable); 3. global variable.
  • variable 1 or variable 2 if there is a conflict with the policy type set in the start box, the user can be reminded of the use of the condition, for example, the user can be reminded which account the condition applies to. For example, cash can be bought is only applicable to securities accounts, but not to futures accounts.
  • the naming of the condition box supports user modification, and is also suitable for displaying on the canvas.
  • the boxes can be named by default, such as ordering can be performed according to the order of the boxes dragged into the canvas.
  • the second dragged-in condition control can be named as condition 2.
  • users may be supported to comment on conditions.
  • the remark can be recorded in the code generated by the canvas to form a remark.
  • the parameter information can be displayed in the strategy canvas, so that the user can read it easily.
  • the leaked information includes, for example, at least one of name, variable 1, variable 1 related parameters, judgment, variable 2, variable 2 related parameters, etc., or other, which is not limited. For example, in FIG.
  • the revealing information of the condition box 332 is "Condition 1 MACD is a low-level golden cross", wherein “condition 1" is the name, “MACD” is the variable 1, “yes” is the judgment, and “low-level golden cross” is the variable 2; the revealing information of the condition box 333 is "condition 2b>6?”, wherein “condition 2" is the name, “b” is the variable 1, “>” is the judgment, and "6” is the variable 2.
  • the user can also add a combination condition control in the policy canvas 330 .
  • the method 300 above further includes displaying a pop-up window in response to the third operation of the user; obtaining at least two conditions (ie, sub-conditions) input by the user in the pop-up window and the association relationship between the at least two conditions ; Generate the combination condition control according to the at least two conditions and the association relationship.
  • Fig. 5 shows an example of an interface for editing combination conditions in a pop-up window.
  • the pop-up window interface may include two parts, namely a condition setting part (such as the left part in FIG. 5 ) and an association relationship part of different conditions (such as the right part in FIG. 5 ).
  • the edit window of popup window 350 may pop up by long pressing the left button and/or dragging the combination condition control button, in which the user can input the name of the combination condition.
  • click the "+New condition" button, and the sub-condition edit box will appear, for example, it can include variable 1 area, judgment area, variable 2 area, etc.
  • variable 1 area there can be 2 input methods: 1 conditional variable, 2 global variable (the entry to create a global variable can be provided).
  • the content in the drop-down box may be all the conditions in the condition library, and at this time a corresponding parameter box (required to be filled in by the user) may also be presented, and the parameter box is the parameter setting corresponding to the condition variable.
  • the content in the drop-down box can be the global variable that has been set in the start box, and it can be displayed without a parameter box at this time.
  • variable 1 When the user selects a condition variable and writes the relevant parameters of variable 1, a preview of the condition variable and its parameters can be displayed in variable 1.
  • the preview When the user selects a global variable, the preview is the global variable name.
  • the sub-conditions can be deleted, for example, the sub-conditions can be deleted through a "delete" button.
  • deleting a sub-condition does not affect the numbers of other sub-conditions.
  • FIG. 6 shows an example of logically associating various conditions. Exemplarily, for “condition”, “or”, “and”, etc., it can be input by clicking a button, and for “(", ")", it can be input by keyboard or by button. After “condition”, “or” and “and” are entered into the edit box, they can be changed through the drop-down box.
  • a binary tree can also be generated by means of an inorder variable, in which the leaf nodes can be conditions, and the branch nodes can be logical operation symbols, and then can be passed
  • the tree structure displays the binary tree.
  • Figure 7 shows an example of a preview of a combined conditional control. Among them, the logically related content can be displayed in the form of a tree.
  • condition A and condition B or condition C is equivalent to “condition A and condition B” or condition C.
  • can increase the fork according to the number of conditions, instead of increasing the number of " ⁇ " trees.
  • tree structure corresponding to two conditions, greater than two conditions, the same logic word, greater than two conditions, and different logic words in Fig. 8 .
  • the parameter settings in the pop-up window can be saved and the pop-up window can be closed.
  • the corresponding combined conditions can be displayed in the strategy canvas.
  • verification logic can be performed during the process of editing the combined condition control by the user. If there is a problem with the inspection, the front-end interactive reminder.
  • the rules for checking logic are as follows:
  • the parameter (such as condition, judgment, value) in the condition setting must have a value
  • brackets need to be paired, and single brackets cannot be placed alone; logical words “and” and “or” cannot be placed consecutively; “("” )” must have content between them, and empty brackets cannot appear; single brackets cannot appear around the logical word “or” or “and”, such as: “or)", "(and”, etc.
  • the main content of the property bar may include the condition name and preview.
  • the content of the sub-conditions in the combined condition can be exposed, but the specific parameters of the sub-conditions can not be displayed.
  • the content of the exposed sub-conditions can be "MACD is a low golden cross", "net profit > 20%”, “maximum buyable > 0" and so on.
  • the combination condition control in the property bar may also be an edit entry for the combination condition control in the property bar, which can enter a pop-up window after clicking, and then edit the combination condition.
  • FIG. 9 shows a specific example of the property bar corresponding to the event box.
  • the event is used as an example to place an order, and the quantity and price respectively support three input methods: 1 manual input, 2 conditional variables (such as numerical conditional variables), and 3 global variables.
  • the event is used as an example of the assignment operation.
  • the assigned variable supports enumeration type.
  • the user can select the assigned global handle from the drop-down list.
  • the global variable displayed in the drop-down item is set in the start box. If there is no setting Global variables, the drop-down items can be empty; the operation can be enumerated, and the user can select the operator from the drop-down to determine the number of variables below.
  • the operator may include: summation, difference, rounding, absolute value, integer division, remainder of divisor, and the like. The number of values depends on the selected operation. Variables can be entered in 3 ways, the same as above, no more details.
  • the naming of the event box supports user modification, and is also suitable for displaying in the canvas.
  • the boxes can be named by default, such as ordering can be performed according to the order of the boxes dragged into the canvas.
  • the second event control dragged in can be named event 2.
  • the parameter information can be displayed in the strategy canvas, so that the user can read it easily.
  • the revealing information of an order event includes, for example, the name, and part or all of all parameters, such as the event box 334 in FIG. 3 : "event 2 order signal target buy 100 stock price order”.
  • controls can be abstracted as data structures.
  • the serialization interface can be implemented for the control, and complete policy storage can be realized according to the control function, for example, the save and read interface can be implemented for different types of controls to realize the storage of control information, so that it can be used across time and across devices The same policy realizes policy cloud synchronization.
  • the boxes corresponding to the controls in the strategy canvas 330 may be connected by lines, for example, connected in series or in parallel.
  • the start control includes the starting point of the graphical quantitative trading strategy.
  • the start control may be the starting point of the entire graphical quantitative trading strategy, that is, the main entry of the program corresponding to the graphical quantitative trading strategy.
  • the condition control or event control includes an entry and an exit, the entry is used to place the end point of the connection line, and the exit is used to place the start point of the connection line.
  • the user can place the two ends of the connecting line on the outlet and the inlet of the control respectively according to the desired quantitative trading strategy through the second operation.
  • the line may have arrows, which are used to represent the running sequence of the controls, so that individual controls can be connected into a complete strategy flow chart.
  • the start box can have multiple exits, the condition box supports one entry and one exit or one entry and two exits, and the event box supports one entry and one exit or one entry and no exit.
  • the frame can support adding to the canvas, dragging and dropping in the canvas, hover&select, multi-select, copy, cut and paste, paste, delete, etc., without limitation.
  • the start box does not support delete, copy, cut, or paste operations.
  • connection lines there are two types of connection lines, namely lines with parameters and lines without parameters.
  • a line without parameters may include a direction but not parameters, such as a line behind a start control or an event control.
  • a line with parameters can include direction and parameters.
  • the connection line placed at the outlet of the conditional control includes a first parameter, and the first parameter is used to indicate whether the condition represented by the conditional control is satisfied. That is to say, the parameter of the line drawn from the condition box can be "yes” or "no".
  • the corresponding situation can be marked on the line, for example, the font "yes” or "no" can be superimposed on the line.
  • the parameters of the line can be modified.
  • conditional box comes out of the line, and the default parameter is "yes”. After the line is selected, you can modify the parameters of the line in the property bar, for example, change from "Yes” to "No".
  • lines can exit the right side of a box and enter the left; lines can pass through a box in the canvas and be placed in front of the box; lines can be placed on the canvas as separate objects.
  • operations on lines support line connection, dragging, hover&selection, multi-selection, deletion, clipping, copying or pasting, etc.
  • the detection of quantitative trading strategies on the strategy canvas can accompany the entire process of creating strategies, for example, it can include the detection of the overall strategy, the detection inside the control, and the detection between controls, such as checking whether the data of each node is Comply with the rules, whether the path is reasonable, etc., to ensure that the final strategy can generate code normally and is available.
  • association relationship determine whether the two controls can be connected, so that when the two controls cannot be connected but the user connects the two, an error will be reported.
  • the function coefficient corresponding to the control is determined based on the function of the control, for example, the function coefficient of the node control (start control and end control) is set to 0.1, the function coefficient of the condition control is 0.3, and the function coefficient of the event control is 0.6.
  • the absolute value of the difference between the functional coefficients of the two controls is greater than or equal to 0.3, it is determined that the two are strongly correlated; if the absolute value of the difference between the functional coefficients of the two controls is greater than or equal to 0.2 and less than 0.3, the two If the absolute value of the difference between the functional coefficients of the two controls is less than 0.2, it is determined that the two are weakly correlated.
  • the two controls are weakly associated with each other, it is determined that the two controls cannot be connected, and when the user connects the two, an error is reported.
  • the graphical quantitative trading strategy can be compiled to generate a quantitative trading strategy script.
  • At least one path may be determined according to the graphical quantitative trading strategy, and the path includes at least one first control and a connection line between the first control and adjacent controls.
  • the first control may be packaged as a first function.
  • the path is encapsulated into a second function, and the second function internally calls the first function of the first control in the path.
  • the quantitative trading strategy script is obtained, wherein the quantitative trading strategy script includes a callback function, and the callback function calls the second function.
  • Fig. 10 shows a specific example of at least one path determined according to the graphical quantitative trading strategy.
  • a circle can represent a control, which can be called a node.
  • the leftmost node represents the start control, and the remaining nodes are conditional controls or event controls, and each path may include at least one node (for example, the node corresponding to the first control, the first control is, for example, a conditional control or event control) and connecting lines between this node and adjacent nodes.
  • the number of paths may be the same as the number of exits of the start control. That is to say, starting from the node that starts the control, the nodes on each line and the connections between nodes can form a path. At the same time, the sequence relationship of the nodes in each path can be determined according to the connection lines between the nodes on each path. For details, refer to path 1 to path n in FIG. 10 .
  • the at least two first controls form a tree network topology.
  • the present application does not limit the number of forks of each node on the path, for example, each forked node may be a 1-fork tree or a binary tree.
  • control island there may also be parts in the graphical quantitative trading strategy that are not included in the path, such as the two nodes corresponding to the control island in Figure 10.
  • the part that is not included in the path may not be in the running system of the current policy script, for example, it may be isolated from the process in the form of an island of control.
  • the control island can exist on the strategy canvas, so that users can call it at any time during the strategy debugging process, but it will not participate in code compilation.
  • each time the main callback function is triggered multiple paths can be triggered serially in sequence.
  • each path can be encapsulated into a separate path function (such as the second function), and each control can also be packaged into a separate control function (such as the first function).
  • the main callback function can call the path function corresponding to each path, and the path function corresponding to each path can call the control function corresponding to each control inside.
  • At least one path based on the graphical quantitative trading strategy makes the function call relationship clear and the hierarchical relationship obvious, so that the automatic strategy code generation process is more controllable, and various exception handling has clear boundaries.
  • the process of generating the script according to the conditional control it may be determined whether the condition is established to select a function generated by the next node to be executed.
  • Fig. 11 is another specific example of at least one path determined according to the graphical quantitative trading strategy.
  • the converted code of the path 1 part in Figure 11 is as follows:
  • each node when generating the strategy script, each node can also generate a method, and then the entire path can gradually call the process of each method.
  • the entire strategy can also be regarded as a tree structure. According to the tree structure, the corresponding code and indentation can be generated, and the code in a path can be put in one method to avoid generating more methods. , for logical reading.
  • Fig. 12 shows a schematic flowchart of policy script running.
  • the policy program can establish a connection with the application programming interface (Application Programming Interface, API) module of the client (such as Windows/MAC).
  • API Application Programming Interface
  • the API modules complete the sending and receiving of their respective requests, and do data caching to reduce the request pressure on the background.
  • the cached data can be returned directly, and other data can be requested from the background again.
  • the API module processes the data, it can return the data to the strategy program.
  • all quotation requests and transaction requests can be implemented according to the architecture shown in FIG. 12 .
  • Python may be used as a presentation language for running policy scripts. Since Python language users are easy to operate and do not need a separate installation environment, users can easily edit, access and run by themselves.
  • FIG. 13 shows a schematic block diagram of the communication architecture of the interface response provided by the embodiment of the present application.
  • the operation results may include information such as account assets, positions, and orders, or include dot information on K-lines and preset message notifications.
  • the policy management module and the policy program can be run in separate processes.
  • the policy management module acts as a parent process, which can easily control the operation of the child process, and also avoid the problem that the policy management module is stuck when the policy program is abnormal.
  • socket communication can be used between processes to achieve portability or expansion.
  • the socket communication can also make the script program compatible with the existing OpenD program, that is, the script can run on the existing OpenAPI program.
  • the embodiments of the present application may also use other methods to implement cross-process communication, such as pipes, shared memory, remote procedure calls, etc., which are not limited in the present application.
  • this embodiment after running the quantitative trading strategy script based on the graphical quantitative trading strategy and running it successfully, the strategy name of the graphical quantitative trading strategy can be obtained, and then the graphical quantitative trading strategy can be stored for later repetition. disk or reuse.
  • this embodiment also includes the following steps:
  • the target strategy is selected from the stored graphical quantitative trading strategies for recommendation.
  • the method of generating strategy control information based on the control identifiers in the graphical quantitative trading strategy may be to connect all the control identifiers in the graphical strategy to obtain the control information, so that the stored information can be directly obtained from the control information. control; after obtaining the new name of the new graphical strategy, match it from the stored graphical quantitative trading strategy to determine the corresponding target strategy and recommend it.
  • the embodiment of the present application obtains the graphical quantitative trading strategy input by the user through the graphical interface, compiles the graphical quantitative trading strategy to obtain the quantitative trading strategy script, and obtains the quantitative trading result by running the strategy script.
  • users can edit the desired graphical quantitative trading strategy according to various needs through the graphical interface without the ability to write program codes, so this application can realize simple and flexible creation of quantitative trading strategies to meet Various needs of users.
  • sequence numbers of the above-mentioned processes do not mean the order of execution, and the order of execution of the processes should be determined by their functions and internal logic, and should not be used in this application.
  • the implementation of the examples constitutes no limitation. It is to be understood that these ordinal numbers may be interchanged under appropriate circumstances such that the described embodiments of the application can be practiced in sequences other than those illustrated or described.
  • FIG. 14 is a schematic block diagram of an apparatus 400 for creating a quantitative trading strategy according to an embodiment of the present application.
  • the apparatus 400 may include a display unit 410 , an acquisition unit 420 and a processing unit 430 .
  • the display unit 410 is configured to display a graphical interface, and the graphical interface includes at least one editable control.
  • the obtaining unit 420 is configured to obtain a graphical quantitative trading strategy input by the user through the graphical interface, the graphical quantitative trading strategy includes at least two edited controls and a connecting line, wherein the connecting line is used to connect For the edited control, the edited control includes attribute parameters.
  • the processing unit 430 is configured to obtain a quantitative trading strategy script according to the graphical quantitative trading strategy.
  • the processing unit 430 is also configured to run the quantitative trading strategy script to obtain quantitative trading results.
  • the graphical interface includes a control bar, a strategy canvas and a property bar.
  • the acquiring unit 420 is specifically used for:
  • the at least one control and the start control are connected through the connecting line, so as to generate the graphical quantitative trading strategy.
  • control bar includes condition controls and/or event controls.
  • the condition control includes a combined condition control
  • the display unit 410 is further configured to display a pop-up window in response to a third operation of the user.
  • the acquiring unit 420 further includes: acquiring the at least two conditions input by the user in the pop-up window and the association relationship of the at least two conditions.
  • the processing unit 430 is further configured to generate the combined condition control according to the at least two conditions and the association relationship.
  • processing unit 430 is also used for:
  • a binary tree is generated by means of an inorder variable, wherein a leaf node of the binary tree represents the at least two conditions, and a branch node of the binary tree represents an association relationship of the at least two conditions.
  • the display unit 410 is further configured to display a preview image of the combined conditional control, and the preview image includes the binary tree.
  • the property setting of the start control includes at least one of applicable account setting, cycle setting and global variable setting.
  • processing unit 430 is specifically configured to:
  • At least one path is determined, and the path includes at least one first control and a connecting line between the first control and adjacent controls;
  • the path is encapsulated into a second function, and the second function internally calls the first function of the first control in the path. function;
  • the quantitative trading strategy script is acquired, wherein the quantitative trading strategy script includes a callback function, and the callback function calls the second function.
  • the path includes at least two first controls, and the at least two first controls form a tree network topology.
  • the graphical quantitative trading strategy includes a start control, wherein the quantity of the at least one path is determined according to the number of exits of the start control.
  • the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, details are not repeated here.
  • the device 400 may correspond to the corresponding body that executes the method 200 of the embodiment of the present application, and the aforementioned and other operations and/or functions of the various modules in the device 400 are for realizing the respective methods in FIG. 2 The corresponding process in , for the sake of brevity, will not be repeated here.
  • the functional modules may be implemented in the form of hardware, may also be implemented by instructions in the form of software, and may also be implemented by a combination of hardware and software modules.
  • each step of the method embodiment in the embodiment of the present application can be completed by an integrated logic circuit of the hardware in the processor and/or instructions in the form of software, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as hardware
  • the decoding processor is executed, or the combination of hardware and software modules in the decoding processor is used to complete the execution.
  • the software module may be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, and registers.
  • the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps in the above method embodiments in combination with its hardware.
  • FIG. 15 is a schematic block diagram of an electronic device 800 provided by an embodiment of the present application.
  • the electronic device 800 may include:
  • a memory 810 and a processor 820 the memory 810 is used to store computer programs and transmit the program codes to the processor 820 .
  • the processor 820 can invoke and run a computer program from the memory 810, so as to implement the method in the embodiment of the present application.
  • the processor 820 can be used to execute the steps in the above-mentioned method 200 according to the instructions in the computer program.
  • the processor 820 may include but not limited to:
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • the memory 810 includes but is not limited to:
  • non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electronically programmable Erase Programmable Read-Only Memory (Electrically EPROM, EEPROM) or Flash.
  • the volatile memory can be Random Access Memory (RAM), which acts as external cache memory.
  • RAM Static Random Access Memory
  • SRAM Static Random Access Memory
  • DRAM Dynamic Random Access Memory
  • Synchronous Dynamic Random Access Memory Synchronous Dynamic Random Access Memory
  • SDRAM double data rate synchronous dynamic random access memory
  • Double Data Rate SDRAM, DDR SDRAM double data rate synchronous dynamic random access memory
  • Enhanced SDRAM, ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous connection dynamic random access memory
  • Direct Rambus RAM Direct Rambus RAM
  • the computer program can be divided into one or more modules, and the one or more modules are stored in the memory 810 and executed by the processor 820 to complete the encoding method.
  • the one or more modules may be a series of computer program instruction segments capable of accomplishing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device 800 .
  • the electronic device 800 may further include:
  • Transceiver 830 the transceiver 830 can be connected to the processor 820 or the memory 810 .
  • the processor 820 can control the transceiver 830 to communicate with other devices, specifically, can send information or data to other devices, or receive information or data sent by other devices.
  • Transceiver 830 may include a transmitter and a receiver.
  • the transceiver 830 may further include antennas, and the number of antennas may be one or more.
  • bus system includes a power bus, a control bus and a status signal bus in addition to a data bus.
  • a communication device including a processor and a memory, the memory is used to store a computer program, and the processor is used to invoke and run the computer program stored in the memory, so that the encoder performs The method of the above method embodiment.
  • a computer storage medium on which a computer program is stored, and when the computer program is executed by a computer, the computer can execute the methods of the above method embodiments.
  • the embodiments of the present application further provide a computer program product including instructions, and when the instructions are executed by a computer, the computer executes the methods of the foregoing method embodiments.
  • a computer program product or computer program comprising computer instructions stored in a computer readable storage medium.
  • the processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method of the above method embodiment.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transferred from a website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) to another website site, computer, server or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
  • the available medium may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a digital video disc (digital video disc, DVD)), or a semiconductor medium (such as a solid state disk (solid state disk, SSD)), etc.
  • a magnetic medium such as a floppy disk, a hard disk, or a magnetic tape
  • an optical medium such as a digital video disc (digital video disc, DVD)
  • a semiconductor medium such as a solid state disk (solid state disk, SSD)
  • modules and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
  • the disclosed devices, devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the modules is only a logical function division. In actual implementation, there may be other division methods.
  • multiple modules or components can be combined or can be Integrate into another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or modules may be in electrical, mechanical or other forms.
  • a module described as a separate component may or may not be physically separated, and a component displayed as a module may or may not be a physical module, that is, it may be located in one place, or may also be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • Technology Law (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • User Interface Of Digital Computer (AREA)
  • Stored Programmes (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

一种创建量化交易策略的方法和装置,该方法包括:显示图形化界面,该图形化界面包括至少一个可编辑的控件(210);获取用户通过该图形化界面输入的图形化量化交易策略,该图形化量化交易策略包括至少两个已编辑的控件和连接线(220),其中,该连接线用于连接已编辑的控件,该已编辑的控件包括属性参数;根据图形化量化交易策略,获取量化交易策略脚本(230);运行该量化交易策略脚本,获取量化交易结果(240)。用户通过图形化界面,可以根据各种需求编辑出想要的图形化量化交易策略,而不需要具有编写程序代码的能力,从而能够实现简单、灵活地创建量化交易策略,满足用户的各种需求。

Description

创建量化交易策略的方法和装置 技术领域
本申请实施例涉及软件技术领域,并且更具体地,涉及一种创建量化交易策略的方法和装置。
背景技术
量化交易策略在金融市场的应用日益广泛。量化交易策略可直接影响投资用户或团队的利益损失。因此,创建量化交易策略显得尤其重要。
用户在创建量化交易策略时,往往是通过编程语言编写代码的方式实现对数据的定量分析。在该方式下,用户需要具有写程序代码的能力,例如理解编程中的变量、函数、类、TCP连接等复杂的概念,阅读繁重的API文档,专业门槛较高。另外,还可以通过策略导向的方式引导用户创建量化交易策略,例如通过向用户提供固定的规则接口,使得用户可以通过比如勾选的方式实现量化交易策略的创建,但该方式难以满足用户的个性化需求。
因此,亟需一种简单、灵活的创建量化交易策略的方式来满足用户需求。
发明内容
本申请实施例提供了一种创建量化交易策略的方法和装置,能够实现简单、灵活地创建量化交易策略,满足用户的各种需求。
第一方面,提供了一种创建量化交易策略的方法,该方法包括:
显示图形化界面,所述图形化界面包括至少一个可编辑的控件;
获取用户通过所述图形化界面输入的图形化量化交易策略,所述图形化量化交易策略包括至少两个已编辑的控件和连接线,其中,所述连接线用于连接所述已编辑的控件,所述已编辑的控件包括属性参数;
根据所述图形化量化交易策略,获取量化交易策略脚本;
运行所述量化交易策略脚本,获取量化交易结果。
第二方面,提供了一种创建量化交易策略的装置,该装置包括:
显示单元,用于显示图形化界面,所述图形化界面包括至少一个可编辑的控件;
获取单元,用于获取用户通过所述图形化界面输入的图形化量化交易策略,所述图形化量化交易策略包括至少两个已编辑的控件和连接线,其中,所述连接线用于连接所述已编辑的控件,所述已编辑的控件包括属性参数;
处理单元,用于根据所述图形化量化交易策略,获取量化交易策略脚本;
所述处理单元还用于运行所述量化交易策略脚本,获取量化交易结果。
第三方面,提供了一种电子设备,包括处理器和存储器。该存储器用于存储计算机程序,该处理器用于调用并运行该存储器中存储的计算机程序,执行上述第一方面中的方法。
第四方面,提供了一种计算机可读存储介质,用于存储计算机程序,该计算机程序使得计算机执行上述第一方面以及第一方面的任意实现方式中的方法。
第五方面,提供了一种计算机程序产品,包括计算机程序指令,所述计算机程序指 令使得计算机执行上述第一方面以及第一方面的任意实现方式中的方法。
第六方面,提供了一种计算机程序,当其在计算机上运行时,使得计算机执行上述第一方面以及第一方面的任意实现方式中的方法。
本申请实施例通过获取用户通过图形化界面输入的图形化量化交易策略,并对该图形化量化交易策略进行编译获取量化交易策略脚本,通过运行该策略脚本,能够获取量化交易结果。本申请中用户通过图形化界面,可以根据各种需求编辑出想要的图形化量化交易策略,而不需要具有编写程序代码的能力,从而本申请能够实现简单、灵活地创建量化交易策略,满足用户的各种需求。
附图说明
图1是本申请实施例应用的一种应用场景的示意图;
图2是本申请实施例提供的一种创建量化交易策略的方法的示意性流程图;
图3是本申请实施例提供的图形化界面的一个具体示例;
图4是本申请实施例提供的条件框对应的属性栏的具体的例子;
图5是本申请实施例提供的在弹窗中编辑组合条件的界面的一个示例;
图6是本申请实施例提供的对各条件进行逻辑关联的一个示例;
图7是本申请实施例提供的组合条件控件预览的一个示例;
图8是本申请实施例提供的组合条件控件预览的另一个示例;
图9是本申请实施例提供的事件框对应的属性栏的具体的例子;
图10是本申请实施例提供的根据图形化量化交易策略确定的至少一个路径的一个具体例子;
图11是本申请实施例提供的根据图形化量化交易策略确定的至少一个路径的另一个具体例子;
图12是本申请实施例提供的策略脚本运行的一个示意性流程图;
图13是本申请实施例提供的接口响应的通信架构的一个示意性框图;
图14是本申请实施例的创建量化交易策略的装置400的示意性框图;
图15是本申请实施例提供的电子设备800的示意性框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。针对本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
应理解,在本申请实施例中,“与A对应的B”表示B与A相关联。在一种实现方式中,可以根据A确定B。但还应理解,根据A确定B并不意味着仅仅根据A确定B,还可以根据A和/或其它信息确定B。
在本申请的描述中,除非另有说明,“至少一个”是指一个或多个,“多个”是指两个或多于两个。另外,“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以 下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。
还应理解,本申请实施例中出现的第一、第二等描述,仅作示意与区分描述对象之用,没有次序之分,也不表示本申请实施例中对设备个数的特别限定,不能构成对本申请实施例的任何限制。
还应理解,说明书中与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。
此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或服务器不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
图1是本申请实施例提供的一种应用场景示意图。该应用场景涉及电子设备101,电子设备101可以是各类终端设备,例如智能手机(如Android手机,iOS手机、Windows Phone手机等)、平板电脑、掌上电脑、笔记本电脑、移动互联网设备(mobile Internet device)、可穿戴设备、车载设备等,不做限定。终端设备也可以称为用户设备(User Equipment,UE)、终端或用户装置等,不做限定。
可选的,电子设备101可以与服务器(例如行情服务器)通过无线通信技术进行数据的传输。示例性的,图1所示电子设备101可以为客户端/服务器(client/server,C/S)模式,客户端可以从服务端(例如服务器)拉取数据。作为一个具体的示例,客户端可以采用MVP(Model-View-Presenter)架构,使得界面、数据操作、数据仓库等相互分离。
本申请实施例中,示例性的,电子设备可以显示包括至少一个可编辑控件的图形化界面,用户可以通过操作电子设备101输入图形化量化交易策略,该图形化量化交易策略包括至少两个已编辑的控件和连接线。电子设备101响应于用户的操作,获取到图形化量化交易策略,并获取量化交易策略脚本,进而对该脚本进行运行,获取量化交易结果。
示例性的,本申请实施例中量化交易的标的可以为期货、股票或基金等产品,不做限定。
需要说明的是,图1中所示的应用场景仅用于说明本申请实施例而非限定。在具体实施时,可以根据实际需要灵活地应用本申请实施例提供的技术方案。
图2示出了本申请实施例提供的一种创建量化交易策略的方法200的示意性流程图。方法200可以由图1中的电子设备101,或设置于该电子设备101中的电路或芯片执行。如图2所示,方法200包括步骤210至240。
210,显示图形化界面,所述图形化界面包括至少一个可编辑的控件。
示例性的,终端设备上安装的应用程序(application,APP)的界面上可以显示图形化界面,用于用户创建量化交易策略。该APP可以为桌面端APP,或手机端APP,不作限定。
这里,控件可以为图形化控件。具体而言,在本申请实施例中,可以将量化交易策略抽象为图形化控件。示例性的,控件包括开始控件、条件控件和事件控件中的至少一 种。其中,图形化界面中的各个控件是可编辑的,用户可以通过编辑输入控件的属性参数。
220,获取用户通过所述图形化界面输入的图形化量化交易策略,所述图形化量化交易策略包括至少两个已编辑的控件和连接线,其中,所述连接线用于连接所述已编辑的控件,所述已编辑的控件包括属性参数。
示例性的,用户可以将量化交易策略过程拆分成不同的条件或事件,然后通过图形化界面选择控件(例如开始控件、条件控件和事件控件中的至少一种),并通过编辑控件以输入所选控件的属性参数,然后通过连接线对至少两个控件进行连接,例如串联或并联,实现各种各样的量化交易策略。这里,该连接线可以表示所连接的至少两个控件之间的关联关系。
在一些可选的实施例中,所述图形化界面包括控件栏、策略画布和属性栏。此时,作为获取用户通过所述图形化界面输入的图形化量化交易策略的一种实现方式,可以获取用户在所述控件栏中选择的至少一个控件。然后,响应于用户的第一操作,将所述至少一个控件添加至所述策略画布,其中,所述策略画布中预先设置开始控件。然后,可以获取用户在所述策略画布中选择的控件,并在所述属性栏对所述选择的控件的属性参数进行编辑。之后,响应于用户的第二操作,将所述至少一个控件和所述开始控件通过所述连接线进行连接,以生成所述图形化量化交易策略。
下面结合APP的显示界面对创建图形化量化交易策略的过程进行详细描述。应理解,以下实施例中的各界面图只是为了便于理解本申请实施例提供的技术方案,并不构成对本申请技术方案的限定。
图3示出了图形化界面的一个具体示例,该图形化界面包括导航栏310、控件栏320、策略画布330和属性栏340。
如图3所示,导航栏310可以显示当前的量化交易策略(比如图3中的策略1、策略2、策略3、新建策略、新建策略1、新建策略2等),或运行的量化交易策略。可选的,导航栏310还可以显示量化交易策略的状态,例如正在回测。可选的,导航栏还可以显示新建量化交易策略的图标,例如“+”。
继续参见图3,控件栏320用于显示多个可编辑的控件,例如条件控件和事件控件。其中,条件控件库用于存放判断条件,事件控件库用于存放执行操作的事件。一个或多个条件可以对应一个条件控件,一个或多个事件可以对应一个事件控件,不作限定。
示例性的,条件控件例如可以是一组逻辑判断,例如if/else逻辑判断。用户可以自行选择不同的判断条件,例如均线是否为多头排列?最大可买数量是否大于1?条件控件还可以对选择的账户判断是否持仓,是否有未完成的订单条件进行判断等。
示例性的,事件控件可以是一个执行函数,例如以对手价格买入1手某股票,或对整个账户全部撤单。看似简单的逻辑,内部则需要对异常做处理,同时还需要做全局的间隔管理,防止对服务器造成过于集中的并发请求。
在一些可选的实施例中,条件控件包括信号控件、账户控件和组合控件中的至少一种。
具体而言,信号是跟市场有关的客观数据。可选的,可以根据用户常用的交易依据将信号条件控件分为技术面、基本面、资金面和消息面等几类。在一些实施例中,可以预定义信号,让用户拖来即用,例如MACD的预定义结果是“金叉”、“死叉”、“顶 背离”、“底背离”等。图3中的控件栏320示出了信号控件的一个具体例子。例如,技术面可以包括指数平滑异动平均线(Moving Average Convergence and Divergence,MACD)、随机指标(KDJ)、相对强弱指标(Relative Strenth Index,RSI)、动量指标等条件控件,基本面可以包括市盈率(Price to Earning Ratio,PE)、资产收益率(Return on Assets,ROA)、净资产收益率(Rate of Return on Common Stockholders’Equity,ROE)、每股收益(Earnings Per Share,EPS)等条件控件,资金面可以包括资金流向、资金分布、筹码分布等条件控件,消息面可以包括舆情跟踪条件控件。
可选的,控件栏中还可以包括变量比较信号,用于比较全局变量、常数、数值型条件变量之间的大小关系。
具体而言,账户条件是跟个人的交易业务账户有关的,是个性化的。可选的,可以根据用户常用的账号状态,将账户条件控件分别账户资产、最大可买可卖、持仓、订单、成交等几类。例如,资产账户可以包括最大购买力、卖空购买力、现金购买力、资产净值、风险状态、现金、多头市值、空头市值、初始保证金、margin call保证金、维持保证金等条件控件,最大可买可卖可以包括现金可买、最大可买、持仓可卖等条件控件,持仓可以包括持仓方向、持有数量、可卖数量、成本价/开仓价、持仓市值、盈亏比例、盈亏金额、今日买入总量(仅股票)、今日买入总额(仅股票)、今日卖出总量(仅股票)、今日卖出总额(仅股票)、未实现盈亏(仅期货)、以实现盈亏(仅期货)等条件控件,订单可以包括订单状态、上一笔多单的价格、上一笔空单的价格等条件控件,成交可以包括成交状态、成交价格、成交数量等条件控件。
具体而言,可以将多个条件,通过且、或、()的逻辑关系打包成一个组合条件,该组合条件可以对应一个组合条件控件。其中,该多个条件可以称为子条件。示例性的,子条件的数量可以为不大于10个。可选的,本申请实施例支持用户自定义组合条件控件。
在一些可选的实施例中,事件控件包括下单、撤单、清仓、消息提醒、退出策略程序、赋值运算等时间控件。可选的,下单、撤单和清仓可以属于交易类事件控件。
作为一种实现方式,由于控件的内容较多,可以列举一些比较常用的放置在控件栏中,其余可以通过下拉菜单,或点击查看更多展示,不作限定。
在一些实施例中,用户可以搜索想要的条件控件或事件控件,对应的界面将自动跳转到该条件控件或事件控件。
在一些可选的实施例中,用户可以通过第一操作,选择控件栏320中的控件并添加到策略画布330中形成对应的框,以形成图形化量化交易策略。作为第一操作的一个示例,可以通过左键长按,和/或拖拽组合控件按钮,将该控件添加到策略画布330中。作为具体的示例,当鼠标悬浮在控件栏中的控件上时,此控件会浮起,提示用户可以拖动。可选的,此时画布颜色可以相应变化,以提示用户可以放置的区域。当拖动控件完全进入画布区域后,控件会从原来控件栏中的样式切换成画布内的样式,表示进入可放置的状态。
策略画布330中的元素包括框和线。其中,框可以对应用户添加的控件,或预先设置的开始控件。属性栏340用于对控件进行属性编辑。当用户选中策略画布330中的元素(例如框或线)时,属性栏340中可以显示出该元素对应的可编辑参数。示例性的,控件可能存在大量复杂的属性,例如下单时间控件的属性可以包括订单类型、标的、方向、价格、数量等。本申请实施例通过将属性编辑集中在属性栏中,能够有助于帮助用 户理解控件属性,降低开发的复杂度。
示例性的,每个图形化量化交易策略可以都有一个开始控件。开始控件可以在创建策略的时候默认生成,即不需要用户拖动创建。
继续参见图3,策略画布330中可以默认设置为显示开始控件对应的框(可以称之为开始框)。当选中开始框时,属性栏340中可以显示开始控件的参数编辑设置。开始控件可以包括对于整个图形化量化交易策略的全局属性设置,例如包括适用账户设置、循环设置和全局变量设置中的至少一种。
示例性的,由于不同类型的账户(例如期货账户、证券账户等)之间存在部分差异,通过设置适用账户参数,能够在同一款量化交易产品中兼容不同类型的金融产品或衍生品。账户类型也可以称为策略类型。当设置了该参数时,控件栏可以自动联动显示适用的控件,从而避免干扰项。
如图3中属性栏340所示,可以通过下拉菜单选择策略类型,例如可以为证券、期货、股票、基金等,不作限定。在一些实施例中,当确定了策略类型之后,如果用户拉取了不适用于所选的策略类型的条件,可以进行警告或提醒。
循环设置可以设置在开始设置中,可以包括整个策略的循环设置。具体而言,策略的脚本的循环依赖于二级市场的报价驱动,相应的,用户可以选择每只股票每个报价变动运行一次,或者每根K先开盘运行一次。如图3中属性340所示,标的表示循环参照的标的,频率表示策略循环的频率。作为示例,on_bar_open()可以表示信号标的在指定的K线周期下,每根K线开盘的时候运行一次,on_tick()表示信号标的每个逐笔运行一次,仅执行一次表示该策略只运行一次。
全局变量是为了维系前后节点(例如控件)的联系,可以通过全局变量传递节点之间的数据。全局变量设置支持创建全局变量,以供画布内的条件框和/或事件框参数选择,例如可以用于赋值计算、循环迭代的场景。示例性的,如图3所示,可以通过相应的按钮,对全局变量进行新增、编辑、删除等操作。
例如,当在开始控件331对应的属性栏340中点击新建按钮,全局变量下方出现可编辑的全局变量框341,此时可以对该全局变量框进行编辑,例如填写变量名、赋值,当点击完成时,该全局变量建立成功。应注意,当在开始框的属性中修改全局变量的变量名或赋值,则后面用到对应的控件时,该全局变量随之改变。
作为示例,赋值可以选择手动输入,或选择条件变量。如果用户选择了条件变量,那么可以显示条件变量(例如个信号条件控件或账户条件控件)对应的参数框以进行参数设置。
在一些实施例中,当在属性栏编写了开始框的参数后,在策略画布中可以显示参数信息,以便于用户阅读。透出信息例如包括命名、标的、频率中的至少一种,或者其他,不作限定。例如,在图3中,开始框331的透出信息为“每日K运行一次”,其中“日K”为频率信息。
在一些实施例中,当用于选择控件栏320中的控件并添加到策略画布330中时,策略画布320中显示该控件对应的框,例如条件控件对应的框(可以称之为条件框)、事件控件对应的框(可以称之为事件框)。
本申请实施例中,当选中条件框时,属性栏340中可以显示条件控件的参数编辑设置。示例性的,条件框可以有四个区域的参数可以调配,分别为变量1区域、判断区域 和变量2区域。以下结合图4对条件框的参数设置进行说明。
图4示出了条件框对应的属性栏的具体的例子。在(a)图中,变量1区域的条件变量为MACD,在(b)图中,变量1区域的条件变量为最大可买。具体而言,变量1区域可以呈现于变量1相关的参数设置,参数设置条数随用户拖拽变量1的不同而改变。例如,如图4中(a)所示,当变量1选择MACD时,则下方呈现与MACD相关的参数供用户进行设置。
示例性的,判断区域可以设置为枚举型,例如用户可以通过下拉菜单进行选择。具体而言,判断可以根据用户选择的条件形成对应的下拉枚举选项,例如对于MACD、EMA、KDJ、量比等字段型调节,判断下拉选项可以为“是”和“不是”;对于流动比率、速冻比率、净利率等数值型条件,判断下拉选项可以为“>”、“<”、“≥”、“≤”、“=”和“≠”等,不做限定。
示例性的,变量2区域可以根据变量1的变化而变量。可以分为两种情况:
情况一:当变量1为枚举型条件变量时,变量2可以为下拉枚举选项;
情况二:当变量1为数值型条件变量时,变量2可以为三种输入方式:1手动输入;2条件变量(例如数值型条件变量);3全局变量。
需要说明的是,在变量1或变量2选择后,如果与开始框设置的策略类型出现冲突,则可以对用户进行条件使用提醒,例如可以提醒用户此条件对哪种账户适用。例如,现金可买是只对证券账户适用,而期货账户不适用。
示例性的,条件框的命名支持用户修改,也适用于在画布中展示。例如,可以默认对框进行命名,比如可以根据拖入画布的框的顺位进行命令。作为具体的例子,第二个拖进来的条件控件,命名可以为条件2。
在一些实施例中,可以支持用户对条件进行备注。可选的,该备注可以记录在画布产生的代码中,形成备注。
在一些实施例中,当在属性栏编写了条件框的参数后,在策略画布中可以显示参数信息,以便于用户阅读。透出信息例如包括命名、变量1、变量1相关参数、判断、变量2、变量2相关参数等中的至少一种,或者其他,不作限定。例如,在图3中,条件框332的透出信息为“条件1MACD是低位金叉”,其中“条件1”为命名,“MACD”为变量1,“是”为判断,“低位金叉”为变量2;条件框333的透出信息为“条件2b>6?”,其中“条件2”为命名,“b”为变量1,“>”为判断,“6”为变量2。
在一些实施例中,用户还可以在策略画布330中添加组合条件控件。可选的,上述方法300还包括响应于用户的第三操作,显示弹窗;获取用户在所述弹窗中输入的至少两个条件(即子条件)和所述至少两个条件的关联关系;根据所述至少两个条件和所述关联关系,生成所述组合条件控件。
示例性的,组合条件控件的参数编辑在弹窗中完成,而不是在属性栏中。图5示出了在弹窗中编辑组合条件的界面的一个示例。示例性的,弹窗界面可以包括两部分,分别为条件设置部分(例如图5中的左侧部分)和不同条件的关联关系部分(如图5中的右侧部分)。
如图5所示,作为第三操作的一个示例,可以通过左键长按,和/或拖拽组合条件控件按钮,弹出弹窗350的编辑窗口,其中用户可以输入组合条件名称。在条件设置中,点击“+新增条件”按钮,可以出现子条件编辑框,例如可以包括变量1区域、判断区域、 变量2区域等。
示例性的,对于变量1区域,可以有2中输入方式:1条件变量、2全局变量(可提供创建全局变量入口)。示例性的,当选择条件变量时,下拉框中的内容可以为条件库中的全部条件,此时还可以呈现对应的参数框(需要用户填写),参数框为条件变量对应的参数设置。当选择全局变量时,下拉框中的内容可以为开始框中已设置的全局变量,此时可以无参数框展示。
当用户选择条件变量,并编写完变量1的相关参数后,可以在变量1中显示条件变量及其参数的预览。当用户选择全局变量时,预览为全局变量名称。
示例性的,对于判断区域和变量2区域,与上文中条件框对应的属性栏类似,具体可以参见上文中的描述,不再赘述。
在一些可选的实施例中,可以对子条件进行删除,例如可以通过“删除”按钮删除子条件。可选的,删除子条件不影响其他子条件的编号。
对于组合条件控件中的已设置过的条件,可以用“或”、“且”、“(”、“)”进行关联。图6示出了对各条件进行逻辑关联的一个示例。示例性的,对于“条件”、“或”、“且”等,可以通过点击按钮输入,对于“(”、“)”,可以通过键盘输入,或通过按钮输入。“条件”、“或”、“且”输入至编辑框内后,可以通过下拉框进行更改。
在一些可选的实施例中,例如在用户编辑好条件之间的关联关系后,还可以通过中序变量的方式生成二叉树,其中叶子节点可以是条件,树枝节点是逻辑运算符号,然后可以通过树形结构将该二叉树展示出来。图7示出了组合条件控件预览的一个示例。其中,可以将逻辑关联的内容通过树的形式展示。
应注意,如果逻辑关联中存在部分正常和部分异常的情况,可以按照最多能展示的正常情况展示与逻辑展示即可。
作为示例,在正常情况下,多个条件多个逻辑次属于正常情况,可以按照顺序逐步运算即可。例如,“条件A且条件B或条件C”等同于“条件A且条件B”或条件C。在出现相同逻辑词多个条件的情况下,{可以根据条件数量增加分叉,而不是增加“{”树的数量。具体可以参见图8中的两个条件、大于两个条件,相同逻辑词、大于两个条件,不同逻辑词对应的“{”树结构。
对于一些异常情况,例如包括最小颗粒为空括号、括号未配对、条件+条件、逻辑词+逻辑词、条件+逻辑词、逻辑词+条件等,当逻辑关系中只存在空括号、括号未配对时,不做逻辑展示,意味着显示为空。如果逻辑关联检测本身是异常,则按逻辑关系中能展示的最小颗粒展示,例如存在条件+逻辑词、逻辑词+条件时,例如可以展示“A且”或“且B”。逻辑关联中只存在条件+条件、逻辑词+逻辑词时,按照最多能展示的正常情况展示逻辑展示,例如可以展示“A B”、“且且”等。
示例性的,当完成组合条件编辑时,可以保存弹窗中的参数设置,并关闭弹窗。对应的,策略画布中可以显示对应的组合条件。
在一些可选的实施例中,在用户编辑组合条件控件的过程中,可以进行检验逻辑。如果检验出现问题则前端交互提醒。示例性的,检验逻辑的规则如下:
对于参数填写,条件设置中参数(例如条件、判断、值)必须有值;
对于逻辑关联,条件与条件之间需要用“或”、“且”等进行关联;括号需要配对, 不能有落单的单括号;逻辑词“且”“或”不能连续放置;“(”“)”之间需要有内容,不能出现空括号;逻辑词“或”或“且”左右均不能出现单括号,如:“或)”、“(且”等。
在一些实施例中,当选中策略画布中组合条件控件时,属性栏的主要内容可以包括条件名称以及预览。可选的,可以将组合条件中的子条件内容透出来,而子条件的具体参数可以不展示。例如,透出来的子条件的内容可以为“MACD是低位金叉”、“净利润>20%”、“最大可买>0”等。
可选的,属性栏中还可以存在组合条件控件的编辑入口,点击后可以进入弹窗,进而可以对该组合条件进行编辑。
本申请实施例中,当选中事件框时,属性栏340中可以显示事件控件的参数编辑设置。图9示出了事件框对应的属性栏的具体的例子。其中(a)图中以事件为下单为例,其中数量和价格分别支持3种输入方式:1手动输入、2条件变量(例如数值型条件变量)、3全局变量。
其中(b)图中以事件为赋值运算为例,被赋值变量支持枚举型,用户可下拉选择被赋值的全局办理,下拉项中展示的全局变量是在开始框中设置的,若无设置全局变量,则下拉项可为空;运算可以为枚举型,用户可下拉选择运算符,决定下面变量的数量。示例性的,运算符可以包括:求和、做差、四舍五入、绝对值、整除、除数取余等。值的数量与选择的运算有关。变量可以由3中输入方式,同上,不再赘述。
示例性的,事件框的命名支持用户修改,也适用于在画布中展示。例如,可以默认对框进行命名,比如可以根据拖入画布的框的顺位进行命令。作为具体的例子,第二个拖进来的事件控件,命名可以为事件2。
在一些实施例中,当在属性栏编写了事件框的参数后,在策略画布中可以显示参数信息,以便于用户阅读。例如,下单事件的透出信息例如包括命名,以及所有参数的部分或全部,比如图3中的事件框334:“事件2下单信号标的买100股市价单”。又例如,赋值事件的投出信息例如包括命名,以及属性栏中的预览,比如图3中的事件框335:“事件1b=1+2”。
在一些可选的实施例中,可以将控件(例如开始控件、条件控件或事件控件)抽象为数据结构。进一步的,可以对控件实现序列化接口,可以根据控件功能实现完整策略存储,例如对于不同类型的控件实现保存和读取接口,以实现对控件信息的存储,从而可以跨时间、跨设备地使用同一策略,实现策略云同步。
本申请实施例中,策略画布330中各控件对应的框可以通过线连接,例如进行串联或并联。其中,开始控件包括图形化量化交易策略的起点。示例性的,开始控件可以是整个图形化量化交易策略的起点,也即图形化量化交易策略对应的程序的主入口。条件控件或事件控件包括入口和出口,所述入口用于放置所述连接线的终点,所述出口用于放置所述连接线的起点。示例性的,用户可以通过第二操作,根据所需要的量化交易策略,将连接线的两端分别放置在控件的出口和入口。
示例性的,线可以具有箭头,用于表示控件的运行顺序,从而可以将单独的控件连接成完整的策略流程图。
在一些可选的实施例中,开始框可以有多个出口,条件框支持单进单出或者单进双出,事件框支持单进单出或者单进无出。可选的,框可以支持新增至画布、画布中拖拽、 hover&选中、多选、复制、剪贴、粘贴、删除等,不做限定。在一些实施例中,开始框不支持删除、复制、剪贴或粘贴等操作。
在一些可选的实施例中,连接线包括两种,分别为带参数的线和不带参数的线。不带参数的线,即可以包括方向而不包括参数,例如可以为开始控件或事件控件后面的线。带参数的线,可以包括方向和参数。例如,条件控件的出口放置的连接线包括第一参数,所述第一参数用于指示所述条件控件所表示的条件是否成立。也就是说,由条件框出来的线,参数可以为“是”或“否”,对应的,线上可以标识出对应的情形,例如可以在线上叠加显示“是”或“否”字体。可选的,可以对线的参数进行修改。
作为一个具体的例子,条件框出来的线,默认参数为“是”。当选中线之后,可以在属性栏中修改线的参数,例如由“是”修改为“否”。
作为示例,线可以从框的右侧出,左侧进;线可以穿过画布中的框,并置于框的前面;线可以作为单独的对象放置在画布中。示例性的,对线的操作,支持连线、拖拽、hover&选中、多选、删除、剪贴、复制或粘贴等。
需要说明的是,对策略画布上的量化交易策略的检测可以伴随整个创建策略的过程,例如可以包括策略整体的检测、控件内部的检测、控件之间的检测,例如检查每个节点的数据是否符合规则,路径是否合理等,以保证最终的策略能够正常生成代码并且是可用的。
进一步的,本实施例中可以包括如下步骤:
基于控件的功能,确定控件对应的功能系数;
基于各控件之间的功能系数,确定控件之间的关联关系;
根据关联关系,判定两个控件之间是否可以连线,以在两个控件不能连线但用户将两者连接时,进行报错。
具体的,基于控件的功能确定控件对应的功能系数,例如设定节点控件(开始控件和结束控件)的功能系数为0.1、条件控件的功能系数为0.3,事件控件的功能系数为0.6,若当两个控件的功能系数之差的绝对值大于或者等于0.3时,判定两者为强关联关系;若当两个控件的功能系数之差的绝对值大于或者等于0.2、且小于0.3时,判定两者为中关联关系;若当两个控件的功能系数之差的绝对值小于0.2时,判定两者为弱关联关系。在两个控件互相为弱关联关系时,则判定两个控件之间不能连线,在用户将两者连接时,进行报错。通过上述方式可以快速、高效的进行错误提醒,提高策略生成的效率。
230,根据所述图形化量化交易策略,获取量化交易策略脚本。
具体而言,当用户在策略画布上完成图形化量化交易策略,即将完整的策略流程绘制完成之后,可以对该图形化量化交易策略进行编译,生成量化交易策略脚本。
在一些可选的实施例中,可以根据所述图形化量化交易策略,确定至少一个路径(path),该路径包括至少一个第一控件和该第一控件与相邻控件的连接线。作为一种可能的实现方式,可以将该第一控件封装为第一函数。之后,根据该第一函数和第一控件与相邻控件的连接线,将所述路径封装为第二函数,第二函数内部调用所述路径内的第一控件的第一函数。之后,根据该第二函数,获取所述量化交易策略脚本,其中,所述量化交易策略脚本包括回调函数,该回调函数调用第二函数。
图10示出了根据图形化量化交易策略确定的至少一个路径的一个具体例子。其中,一个圆圈可以代表一个控件,可以称之为节点。如图10所示,最左侧的节点表示开始控 件,其余的节点为条件控件或事件控件,每条路径上可以包括至少一个节点(例如第一控件对应的节点,第一控件例如为条件控件或事件控件)和该节点与相邻节点的连接线。
示例性的,在确定至少一个路径时,路径的数量可以与开始控件的出口数相同。也就是说,从开始控件的节点出发,每条线上的节点和节点之间的连线可以组成一条路径。同时,根据每条路径上节点之间的连线可以确定每条路径内的节点的顺序关系。具体可以参见图10中路径1至路径n。
如图10所示,当路径包括至少两个第一控件(即节点),该至少两个第一控件组成树形网络拓扑结构。具体的,本申请对路径上每个节点的分叉次数不做限定,例如每个分叉节点可能是1叉树,也可能是2叉树。
需要说明的是,图形化量化交易策略中还可能存在未被纳入路径的部分,例如图10中的控件孤岛对应的2个节点。未被纳入路径的部分,可以不在当前策略脚本的运行体系当中,例如可以以控件孤岛的形式游离在流程之外。另外,控件孤岛可以存在在策略画布上,以方便用户在策略调试的过程中随时调取,但并不会参与代码编译。
由于开始控件中设置了整个量化交易策略的循环属性,从而每次触发主回调函数,可以按顺序串行触发多条路径。示例性的,每条路径可以被封装成单独的路径函数(例如第二函数),每个控件也可以被封装成单独的控件函数(例如第一函数)。在量化交易策略脚本运行时,主回调函数可以调用每条路径对应的路径函数,每条路径对应的路径函数内部可以调用每个控件对应的控件函数。
在本申请实施例中,基于图形化量化交易策略构建的至少一个路径,使得函数调用关系清晰,层次关系明显,从而自动化的策略代码生成过程更加可控,各种异常处理都有明确的边界。
在一些可选的实施例中,在根据条件控件生成脚本的过程中,可以判断条件是否成立来选择下一个要执行的节点生成的函数。
图11是根据图形化量化交易策略确定的至少一个路径的另一个具体例子。示例性的,图11中路径1部分的转换后代码如下:
Figure PCTCN2021120466-appb-000001
Figure PCTCN2021120466-appb-000002
在另一些可能的实现方式,在生成策略脚本时,还可以把每个节点生成一个方法,然后整个路径可以逐步调用每个方法的过程。或者,还可以把整个策略看成是一个树形结构,根据该树形结构,生成对应的代码和缩进,可以把一个路径里的代码都放在一个方法里,以避免生成较多的方法,方便逻辑阅读。
240,运行所述量化交易策略脚本,获取量化交易结果。
图12示出了策略脚本运行的一个示意性流程图。如图12所示,策略脚本运行时,策略程序可以与客户端(例如Windows/MAC)的应用程序编程接口(Application Programming Interface,API)模块建立连接。API模块完成各自请求的收发,并做数据缓存,以减少对于后台的请求压力。缓存数据可以直接返回,其他数据可以再次向后台请求。API模块对数据做处理后,可以返回数据给策略程序。示例性的,所有行情类请求和交易类请求,都可以按照图12所示的架构实现。
示例性的,可以使用Python作为运行策略脚本的呈现语言。由于Python语言用户操作简单,不需要单独安装环境,用户可方便自行编辑和接入运行。
图13示出了本申请实施例提供的接口响应的通信架构的一个示意性框图。如图13所示,策略运行过程中,可以实时管理策略的运行、查看策略运行的状态和/或查看策略运行结果。示例性的,运行结果可以包括账号资产、持仓、订单等信息,或者包括K线上的打点信息和预设的消息通知。
如图13所示,策略管理模块和策略程序可以分进程运行,这样策略管理模块作为父进程,容易控制子进程的运行情况,也避免策略程序异常时导致策略管理模块卡死的问题。
示例性的,进程之间可以采用socket通信,以实现方便可移植或扩展。另外,通过socket通信也能够使得脚本程序兼容现有的OpenD程序,即脚本可以在现有的OpenAPI程序上运行。除此之外,本申请实施例也可以采用其他方式实现跨进程通信,例如管道、共享内存、远程过程调用等,本申请对此不做限定。
进一步的,本实施例中在基于图形化量化交易策略运行量化交易策略脚本,并运行成功之后,可以获取图形化量化交易策略的策略名称,之后将该图形化量化交易策略存储,以便于之后复盘或者复用。除此之外,本实施例还包括如下步骤:
基于图形化量化交易策略中的控件标识生成策略控件信息;
基于图形化量化交易策略的策略功能和策略控件信息,存储所述图形化量化交易策略;
在获取到新建图形策略的新建名称时,从存储的图形化量化交易策略中选取目标策略进行推荐。
本实施例中基于图形化量化交易策略中的控件标识生成策略控件信息的方式可以是将图形策略中所有的控件标识连接起来,得到控件信息,以从控件信息中可以直接获取到其中存有的控件;之后在获取到新建图形策略的新建名称时,从存储的图形化量化交易策略中进行匹配,以确定对应的目标策略并进行推荐。
因此,本申请实施例通过获取用户通过图形化界面输入的图形化量化交易策略,并对该图形化量化交易策略进行编译获取量化交易策略脚本,通过运行该策略脚本,能够获取量化交易结果。本申请中用户通过图形化界面,可以根据各种需求编辑出想要的图形化量化交易策略,而不需要具有编写程序代码的能力,从而本申请能够实现简单、灵活地创建量化交易策略,满足用户的各种需求。
以上结合附图详细描述了本申请的具体实施方式,但是,本申请并不限于上述实施方式中的具体细节,在本申请的技术构思范围内,可以对本申请的技术方案进行多种简单变型,这些简单变型均属于本申请的保护范围。例如,在上述具体实施方式中所描述的各个具体技术特征,在不矛盾的情况下,可以通过任何合适的方式进行组合,为了避免不必要的重复,本申请对各种可能的组合方式不再另行说明。又例如,本申请的各种不同的实施方式之间也可以进行任意组合,只要其不违背本申请的思想,其同样应当视为本申请所公开的内容。
还应理解,在本申请的各种方法实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。应理解这些序号在适当情况下可以互换,以便描述的本申请的实施例能够以除了在图示或描述的那些以外的顺序实施。
上文结合图1至图13,详细描述了本申请的方法实施例,下文结合图14至图15,详细描述本申请的装置实施例。
图14是本申请实施例的创建量化交易策略的装置400的示意性框图。如图14所示,所述装置400可包括显示单元410、获取单元420和处理单元430。
显示单元410,用于显示图形化界面,所述图形化界面包括至少一个可编辑的控件。
获取单元420,用于获取用户通过所述图形化界面输入的图形化量化交易策略,所述图形化量化交易策略包括至少两个已编辑的控件和连接线,其中,所述连接线用于连接所述已编辑的控件,所述已编辑的控件包括属性参数。
处理单元430,用于根据所述图形化量化交易策略,获取量化交易策略脚本。
所述处理单元430还用于运行所述量化交易策略脚本,获取量化交易结果。
在一些可选的实施例中,所述图形化界面包括控件栏、策略画布和属性栏。所述获取单元420具体用于:
获取用户在所述控件栏中选择的至少一个控件;
响应于用户的第一操作,将所述至少一个控件添加至所述策略画布,其中,所述策略画布中预先设置开始控件;
获取用户在所述策略画布中选择的控件,并在所述属性栏对所述选择的控件的属性 参数进行编辑;
响应于用户的第二操作,将所述至少一个控件和所述开始控件通过所述连接线进行连接,以生成所述图形化量化交易策略。
在一些可选的实施例中,所述控件栏包括条件控件和/或事件控件。
在一些可选的实施例中,所述条件控件包括组合条件控件,所述显示单元410还用于响应于用户的第三操作,显示弹窗。所述获取单元420还包括:获取用户在所述弹窗中输入的至少两个条件和所述至少两个条件的关联关系。所述处理单元430还用于根据所述至少两个条件和所述关联关系,生成所述组合条件控件。
在一些可选的实施例中,处理单元430还用于:
通过中序变量的方式生成二叉树,其中,所述二叉树的叶子节点表示所述至少两个条件,所述二叉树的树枝节点表示所述至少两个条件的关联关系。
显示单元410还用于显示所述组合条件控件的预览图,所述预览图包括所述二叉树。
所述开始控件的属性设置包括适用账户设置、循环设置和全局变量设置中的至少一种。
在一些可选的实施例中,所述处理单元430具体用于:
根据所述图形化量化交易策略,确定至少一个路径,所述路径包括至少一个第一控件和所述第一控件与相邻控件的连接线;
将所述第一控件封装为第一函数;
根据所述第一函数和所述第一控件与相邻控件的连接线,将所述路径封装为第二函数,所述第二函数内部调用所述路径内的所述第一控件的第一函数;
根据所述第二函数,获取所述量化交易策略脚本,其中,所述量化交易策略脚本包括回调函数,所述回调函数调用所述第二函数。
在一些可选的实施例中,所述路径包括至少两个所述第一控件,所述至少两个第一控件组成树形网络拓扑结构。
在一些可选的实施例中,所述图形化量化交易策略包括开始控件,其中,所述至少一个路径的数量是根据所述开始控件的出口数确定的。
应理解,装置实施例与方法实施例可以相互对应,类似的描述可以参照方法实施例。为避免重复,此处不再赘述。具体地,在该实施例中装置400可以对应于执行本申请实施例的方法200的相应主体,并且装置400中的各个模块的前述和其它操作和/或功能分别为了实现图2中的各个方法中的相应流程,为了简洁,在此不再赘述。
上文中结合附图从功能模块的角度描述了本申请实施例的装置和系统。应理解,该功能模块可以通过硬件形式实现,也可以通过软件形式的指令实现,还可以通过硬件和软件模块组合实现。具体地,本申请实施例中的方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路和/或软件形式的指令完成,结合本申请实施例公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。可选地,软件模块可以位于随机存储器,闪存、只读存储器、可编程只读存储器、电可擦写可编程存储器、寄存器等本领域的成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法实施例中的步骤。
如图15是本申请实施例提供的电子设备800的示意性框图。
如图15所示,该电子设备800可包括:
存储器810和处理器820,该存储器810用于存储计算机程序,并将该程序代码传输给该处理器820。换言之,该处理器820可以从存储器810中调用并运行计算机程序,以实现本申请实施例中的方法。
例如,该处理器820可用于根据该计算机程序中的指令执行上述方法200中的步骤中的步骤。
在本申请的一些实施例中,该处理器820可以包括但不限于:
通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等等。
在本申请的一些实施例中,该存储器810包括但不限于:
易失性存储器和/或非易失性存储器。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。
在本申请的一些实施例中,该计算机程序可以被分割成一个或多个模块,该一个或者多个模块被存储在该存储器810中,并由该处理器820执行,以完成本申请提供的编码方法。该一个或多个模块可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述该计算机程序在该电子设备800中的执行过程。
可选的,如图8所示,该电子设备800还可包括:
收发器830,该收发器830可连接至该处理器820或存储器810。
其中,处理器820可以控制该收发器830与其他设备进行通信,具体地,可以向其他设备发送信息或数据,或接收其他设备发送的信息或数据。收发器830可以包括发射机和接收机。收发器830还可以进一步包括天线,天线的数量可以为一个或多个。
应当理解,该电子设备800中的各个组件通过总线系统相连,其中,总线系统除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。
根据本申请的一个方面,提供了一种通信装置,包括处理器和存储器,该存储器用于存储计算机程序,该处理器用于调用并运行所述存储器中存储的计算机程序,使得所述编码器执行上述方法实施例的方法。
根据本申请的一个方面,提供了一种计算机存储介质,其上存储有计算机程序,该计算机程序被计算机执行时使得该计算机能够执行上述方法实施例的方法。或者说,本申请实施例还提供一种包含指令的计算机程序产品,该指令被计算机执行时使得计算机执行上述方法实施例的方法。
根据本申请的另一个方面,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述方法实施例的方法。
换言之,当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机程序指令时,全部或部分地产生按照本申请实施例该的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,该计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如数字视频光盘(digital video disc,DVD))、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的模块及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,该模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。例如,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。
以上仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以该权利要求的保护范围为准。

Claims (12)

  1. 一种创建量化交易策略的方法,其特征在于,包括:
    显示图形化界面,所述图形化界面包括至少一个可编辑的控件;
    获取用户通过所述图形化界面输入的图形化量化交易策略,所述图形化量化交易策略包括至少两个已编辑的控件和连接线,其中,所述连接线用于连接所述已编辑的控件,所述已编辑的控件包括属性参数;
    根据所述图形化量化交易策略,获取量化交易策略脚本;
    运行所述量化交易策略脚本,获取量化交易结果。
  2. 根据权利要求1所述的方法,其特征在于,所述图形化界面包括控件栏、策略画布和属性栏;
    所述获取用户通过所述图形化界面输入的图形化量化交易策略,包括:
    获取用户在所述控件栏中选择的至少一个控件;
    响应于用户的第一操作,将所述至少一个控件添加至所述策略画布,其中,所述策略画布中预先设置开始控件;
    获取用户在所述策略画布中选择的控件,并在所述属性栏对所述选择的控件的属性参数进行编辑;
    响应于用户的第二操作,将所述至少一个控件和所述开始控件通过所述连接线进行连接,以生成所述图形化量化交易策略。
  3. 根据权利要求2所述的方法,其特征在于,所述控件栏包括条件控件和/或事件控件。
  4. 根据权利要求3所述的方法,其特征在于,所述条件控件包括组合条件控件,所述方法还包括:
    响应于用户的第三操作,显示弹窗;
    获取用户在所述弹窗中输入的至少两个条件和所述至少两个条件的关联关系;
    根据所述至少两个条件和所述关联关系,生成所述组合条件控件。
  5. 根据权利要求4所述的方法,其特征在于,还包括:
    通过中序变量的方式生成二叉树,其中,所述二叉树的叶子节点表示所述至少两个条件,所述二叉树的树枝节点表示所述至少两个条件的关联关系;
    显示所述组合条件控件的预览图,所述预览图包括所述二叉树。
  6. 根据权利要求2所述的方法,其特征在于,所述开始控件的属性设置包括适用账户设置、循环设置和全局变量设置中的至少一种。
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述根据所述图形化量化交易策略,获取量化交易策略脚本,包括:
    根据所述图形化量化交易策略,确定至少一个路径,所述路径包括至少一个第一控件和所述第一控件与相邻控件之间的连接线;
    将所述第一控件封装为第一函数;
    根据所述第一函数和所述第一控件与相邻控件的连接线,将所述路径封装为第二函数,所述第二函数内部调用所述路径内的所述第一控件的第一函数;
    根据所述第二函数,获取所述量化交易策略脚本,其中,所述量化交易策略脚本包括回调函数,所述回调函数调用所述第二函数。
  8. 根据权利要求7所述的方法,其特征在于,所述路径包括至少两个所述第一控件,所述至少两个第一控件组成树形网络拓扑结构。
  9. 根据权利要求7所述的方法,其特征在于,所述图形化量化交易策略包括开始控件,其中,所述至少一个路径的数量是根据所述开始控件的出口数确定的。
  10. 一种创建量化交易策略的装置,其特征在于,包括:
    显示单元,用于显示图形化界面,所述图形化界面包括至少一个可编辑的控件;
    获取单元,用于获取用户通过所述图形化界面输入的图形化量化交易策略,所述图形化量化交易策略包括至少两个已编辑的控件和连接线,其中,所述连接线用于连接所述已编辑的控件,所述已编辑的控件包括属性参数;
    处理单元,用于根据所述图形化量化交易策略,获取量化交易策略脚本;
    所述处理单元还用于运行所述量化交易策略脚本,获取量化交易结果。
  11. 一种电子设备,其特征在于,包括处理器和存储器,所述存储器中存储有指令,所述处理器执行所述指令时,使得所述处理器执行权利要求1-9任一项所述的方法。
  12. 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序使得计算机执行权利要求1-9任一项所述的方法。
PCT/CN2021/120466 2021-09-24 2021-09-24 创建量化交易策略的方法和装置 WO2023044809A1 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
PCT/CN2021/120466 WO2023044809A1 (zh) 2021-09-24 2021-09-24 创建量化交易策略的方法和装置
AU2021427873A AU2021427873A1 (en) 2021-09-24 2021-09-24 Method and apparatus for creating quantitative trading strategy
CN202180010866.9A CN115053245A (zh) 2021-09-24 2021-09-24 创建量化交易策略的方法和装置
JP2022559690A JP7492028B2 (ja) 2021-09-24 2021-09-24 定量的取引戦略の作成方法及び装置
US17/896,092 US20230101521A1 (en) 2021-09-24 2022-08-26 Method and apparatus for creating quantitative trading strategy

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/120466 WO2023044809A1 (zh) 2021-09-24 2021-09-24 创建量化交易策略的方法和装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/896,092 Continuation US20230101521A1 (en) 2021-09-24 2022-08-26 Method and apparatus for creating quantitative trading strategy

Publications (1)

Publication Number Publication Date
WO2023044809A1 true WO2023044809A1 (zh) 2023-03-30

Family

ID=83156751

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/120466 WO2023044809A1 (zh) 2021-09-24 2021-09-24 创建量化交易策略的方法和装置

Country Status (5)

Country Link
US (1) US20230101521A1 (zh)
JP (1) JP7492028B2 (zh)
CN (1) CN115053245A (zh)
AU (1) AU2021427873A1 (zh)
WO (1) WO2023044809A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114237477B (zh) * 2021-12-21 2024-05-14 富途网络科技(深圳)有限公司 策略风险定位方法、装置、电子设备及存储介质
CN116501312B (zh) * 2023-04-03 2024-04-16 上海卡方信息科技有限公司 一种数据处理方法、装置、设备及可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110072414A1 (en) * 2009-09-20 2011-03-24 Richard Dee Gardner Method of using a diagram to create a program code
CN106504088A (zh) * 2015-09-07 2017-03-15 高庆文 一种在可移动计算设备实现量化交易的方法及系统
CN107797797A (zh) * 2017-11-03 2018-03-13 上海宽全智能科技有限公司 量化回测与量化交易方法和装置、存储介质、设备和系统
CN108984167A (zh) * 2018-07-10 2018-12-11 成都德承科技有限公司 一种基于图形化的程序化交易逻辑搭建的方法和产品
CN111930373A (zh) * 2020-08-14 2020-11-13 上海量锐信息科技有限公司 一种基于流程图高效创建量化交易策略的方法及装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7861185B1 (en) 2003-12-30 2010-12-28 Trading Technologies International, Inc. System and method for dynamically determining quantity for risk management
EP1952330A1 (en) 2005-11-21 2008-08-06 Saxo Bank A/S A financial trading system
JP2008129984A (ja) 2006-11-24 2008-06-05 Osaka Prefecture Univ 取引支援システム、取引支援プログラム及びその記録媒体。
US8682773B1 (en) 2010-05-03 2014-03-25 KnowVera, LLC Methods and system for visually designing trading strategies and execution thereof
US11055774B2 (en) 2011-04-08 2021-07-06 Trading Technologies International, Inc. Authorization of a trading strategy algorithm

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110072414A1 (en) * 2009-09-20 2011-03-24 Richard Dee Gardner Method of using a diagram to create a program code
CN106504088A (zh) * 2015-09-07 2017-03-15 高庆文 一种在可移动计算设备实现量化交易的方法及系统
CN107797797A (zh) * 2017-11-03 2018-03-13 上海宽全智能科技有限公司 量化回测与量化交易方法和装置、存储介质、设备和系统
CN108984167A (zh) * 2018-07-10 2018-12-11 成都德承科技有限公司 一种基于图形化的程序化交易逻辑搭建的方法和产品
CN111930373A (zh) * 2020-08-14 2020-11-13 上海量锐信息科技有限公司 一种基于流程图高效创建量化交易策略的方法及装置

Also Published As

Publication number Publication date
JP7492028B2 (ja) 2024-05-28
AU2021427873A1 (en) 2023-04-13
CN115053245A (zh) 2022-09-13
US20230101521A1 (en) 2023-03-30
JP2023545881A (ja) 2023-11-01

Similar Documents

Publication Publication Date Title
CN109324791B (zh) 金融自助终端业务流程开发方法、装置及终端设备
US10198425B2 (en) Methods and apparatus for reusing report design components and templates
US8635177B2 (en) Rule-based binding
KR101982303B1 (ko) 프로세스를 구성하기 위한 어플리케이션의 구축
WO2023044809A1 (zh) 创建量化交易策略的方法和装置
US8682773B1 (en) Methods and system for visually designing trading strategies and execution thereof
US7984115B2 (en) Extensible application platform
US8381178B2 (en) Intuitive visualization of Boolean expressions using flows
US10607176B2 (en) Building business objects based on Sankey diagram
US20150235318A1 (en) Trading systems and methods
US11204785B1 (en) Parameterized user interface for capturing user feedback
US9953353B2 (en) Method and system for implementing an architecture for a sales catalog
US10902060B2 (en) Unbounded list processing
WO2021183219A1 (en) System for custom validations and scripts for mobile applications
US9990348B2 (en) System and method for managing data using a spreadsheet model
CN111179081A (zh) 一种消息的处理方法和处理装置
CN116501312B (zh) 一种数据处理方法、装置、设备及可读存储介质
US11256501B2 (en) Federated extensibility workbench
CN114819430A (zh) 风控管理方法、装置、电子设备和存储介质
US20150248685A1 (en) Automated identification of sales opportunities based on stored market data
US10713016B1 (en) Method of implementing rules on visual language using visual blocks
US20220035606A1 (en) System and method for tailoring a customizer for integration process modeling visual element to a domain specific language for business integrations
CN115509630B (zh) 控件处理方法、装置、电子设备及介质
CN113477548B (zh) 一种物品筛选装置和方法
US11068324B1 (en) Advanced notification system

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 2022559690

Country of ref document: JP

ENP Entry into the national phase

Ref document number: 2021427873

Country of ref document: AU

Date of ref document: 20210924

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21957933

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE