CN117111936A - Method, device, equipment and medium for creating quantitative transaction strategy - Google Patents

Method, device, equipment and medium for creating quantitative transaction strategy Download PDF

Info

Publication number
CN117111936A
CN117111936A CN202311017124.6A CN202311017124A CN117111936A CN 117111936 A CN117111936 A CN 117111936A CN 202311017124 A CN202311017124 A CN 202311017124A CN 117111936 A CN117111936 A CN 117111936A
Authority
CN
China
Prior art keywords
control
code
self
strategy
coding
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202311017124.6A
Other languages
Chinese (zh)
Inventor
李健
卢君默
欧格良
冯晓泉
涂诚孟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Futuo Network Technology Shenzhen Co ltd
Original Assignee
Futuo Network Technology Shenzhen Co ltd
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 Futuo Network Technology Shenzhen Co ltd filed Critical Futuo Network Technology Shenzhen Co ltd
Priority to CN202311017124.6A priority Critical patent/CN117111936A/en
Publication of CN117111936A publication Critical patent/CN117111936A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation
    • 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/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Human Computer Interaction (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides a method, a device, equipment and a medium for creating a quantitative transaction strategy. The method comprises the following steps: determining a target quantization strategy control selected by a user in response to control selection operation triggered on a graphical interface, wherein the graphical interface is used for creating a quantization transaction strategy; displaying original code information of the target quantization strategy control in a code area corresponding to the target quantization strategy control; in response to a code editing operation for the original code information, adjusting the original code information to target code information, and converting the target quantization strategy control to a self-coding control based on the target code information; based on the self-encoding control, a quantized transaction policy is created. The method and the system can simplify the creation mode of the quantitative transaction strategy and reduce the creation difficulty of the quantitative transaction strategy, thereby improving the investment enthusiasm of users and meeting various investment demands of the users.

Description

Method, device, equipment and medium for creating quantitative transaction strategy
Technical Field
The embodiment of the application relates to the technical field of software, in particular to a method, a device, equipment and a medium for creating a quantitative transaction strategy.
Background
Quantitative trading strategies are one way to invest in financial products by means of computers, relying on mathematical and statistical methods. The quantitative trading strategy can reduce subjective influences such as emotion fluctuation of investors to make irrational investment decisions, and more investment users adopt the quantitative trading strategy to trade financial products.
The conventional manner of creating a quantized transaction policy is typically implemented by a user writing a code of the quantized transaction policy in a programming language, such as the Python language. However, this creation may require the user to write hundreds or even thousands of travel code, requiring a high level of programming effort for the user, resulting in a difficult implementation of the quantized transaction policy created by writing the code, thereby affecting the investment aggressiveness of the user.
Disclosure of Invention
The application provides a method, a device, equipment and a medium for creating a quantized transaction strategy, which can simplify the creation mode of the quantized transaction strategy and reduce the creation difficulty of the quantized transaction strategy, thereby improving the investment enthusiasm of users and meeting various investment demands of the users.
In a first aspect, the present application provides a method for creating a quantized transaction policy, including:
Determining a target quantization strategy control selected by a user in response to control selection operation triggered on a graphical interface, wherein the graphical interface is used for creating a quantization transaction strategy;
displaying original code information of the target quantization strategy control in a code area corresponding to the target quantization strategy control;
in response to a code editing operation for the original code information, adjusting the original code information to target code information, and converting the target quantization strategy control to a self-coding control based on the target code information;
based on the self-encoding control, a quantized transaction policy is created.
In a second aspect, the present application provides a creation apparatus for a quantized transaction policy, including:
the control determining module is used for determining a target quantization strategy control selected by a user in response to control selection operation triggered on a graphical interface, wherein the graphical interface is used for creating a quantization transaction strategy;
the code display module is used for displaying the original code information of the target quantization strategy control in a code area corresponding to the target quantization strategy control;
the code editing module is used for responding to code editing operation aiming at the original code information, adjusting the original code information into target code information and converting the target quantization strategy control into a self-coding control based on the target code information;
And the strategy creation module is used for creating a quantized transaction strategy based on the self-coding control.
In a third aspect, an embodiment of the present application provides an electronic device, including:
a processor and a memory for storing a computer program, the processor being adapted to invoke and run the computer program stored in the memory for performing the method of creating a quantized transaction policy as described in the embodiments of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium storing a computer program, where the computer program causes a computer to execute the method for creating a quantized transaction policy according to the embodiment of the first aspect.
The technical scheme disclosed by the embodiment of the application has at least the following beneficial effects:
the method comprises the steps of determining a target quantization strategy control selected by a user through responding to control selection operation triggered on a graphical interface, displaying original code information of the target quantization strategy control in a code area corresponding to the target quantization strategy control, responding to code editing operation of the original code information, adjusting the original code information into target code information, converting the target quantization strategy control into a self-coding control based on the target code information, and further creating a quantization transaction strategy based on the self-coding control. The method and the system provide a graphical interface for supporting the user to create the graphical quantized transaction strategy, so that the user can simply and quickly create the quantized transaction strategy in the graphical interface, and the user can edit code information corresponding to at least one quantized strategy control of the editable code in the process of creating the quantized transaction strategy by setting the quantized strategy control of the editable code in the graphical interface, so that the executable operation of the quantized strategy control of the editable code can be modified or expanded on the basis of the corresponding operation of the quantized strategy control of the editable code to generate the self-coding control, and further, the quantized transaction strategy required by the user is created on the basis of the self-coding control, the requirements on the work level and the speciality of the user for writing the program code are lower, the creation mode of the quantized transaction strategy can be simplified, and the creation difficulty of the quantized transaction strategy is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for creating a quantized transaction policy according to an embodiment of the present application;
FIG. 2 is a functional schematic diagram of a target quantization strategy control association provided by an embodiment of the present application;
FIG. 3 is a schematic diagram of a code region display position according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a graphical interface provided by an embodiment of the present application;
FIG. 5 is a flowchart of another method for creating a quantized transaction policy according to an embodiment of the application;
FIG. 6 is a schematic diagram of setting an edit control in a code region provided by an embodiment of the present application;
fig. 7 is a schematic diagram of first popup window information according to an embodiment of the present application;
FIG. 8A is a schematic diagram of a self-encoding control provided by an embodiment of the present application;
FIG. 8B is a schematic diagram of another self-encoding control provided by an embodiment of the present application;
FIG. 9 is a flowchart of a method for creating a quantized transaction policy according to an embodiment of the application;
FIG. 10 is a schematic diagram of displaying errors in a detection area according to an embodiment of the present application;
FIG. 11 is a flowchart of another method for creating a quantized transaction policy according to an embodiment of the application;
FIG. 12 is a schematic diagram of determining at least one execution path in a graphical quantized transaction policy according to an embodiment of the application;
FIG. 13A is a schematic diagram of a packaging process for a self-encoding conditional control provided by an embodiment of the present application;
FIG. 13B is a schematic illustration of a packaging process for a self-encoding event control provided by an embodiment of the present application;
FIG. 13C is a schematic diagram illustrating a process of encapsulating an execution path according to an embodiment of the present application;
fig. 14 is a schematic diagram of a second popup window according to an embodiment of the present application;
FIG. 15 is a diagram of a quantized transaction policy code provided by an embodiment of the application;
FIG. 16 is a schematic block diagram of a creation apparatus for a quantized transaction policy provided by an embodiment of the application;
fig. 17 is a schematic block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or server that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In embodiments of the application, the words "exemplary" or "such as" are used to mean that any embodiment or aspect of the application described as "exemplary" or "such as" is not to be interpreted as preferred or advantageous over other embodiments or aspects. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
When the quantized transaction strategy is created by writing codes of the quantized transaction strategy by using a programming language, hundreds of lines and even thousands of journey sequence codes are required to be written by a user, so that the requirements on programming work bottoms and specialization of the user are high, the implementation difficulty of creating the quantized transaction strategy by writing the codes is high, and the investment enthusiasm of the user is influenced. Therefore, the application provides a creation scheme of the quantitative transaction strategy, so that the creation mode of the quantitative transaction strategy can be simplified, the creation difficulty of the quantitative transaction strategy is reduced, the investment enthusiasm of a user can be improved, and various investment demands of the user are met.
The following describes a method, an apparatus, a device, and a medium for creating a quantized transaction policy according to an embodiment of the present application in detail with reference to the accompanying drawings.
Fig. 1 is a flowchart of a method for creating a quantized transaction policy according to an embodiment of the present application. The method for creating the quantized transaction policy provided by the embodiment of the application can be executed by the device for creating the quantized transaction policy. The creation means of the quantized transaction policy may be composed of hardware and/or software, and may be integrated in the electronic device. Optionally, the electronic device of the present application may be various terminal devices, such as a smart phone (e.g. Android phone, IOS phone, windows phone, etc.), a tablet computer, a palm computer, a notebook computer, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, a personal digital assistant (personal digital assistant, PDA), etc., and the present application does not limit the type of the electronic device. The terminal device may also be referred to as a User Equipment (UE), a terminal, a User Equipment, or the like, and is not limited herein.
As shown in fig. 1, the method may include the steps of:
s101, determining a target quantization strategy control selected by a user in response to control selection operation triggered on a graphical interface, wherein the graphical interface is used for creating a quantization transaction strategy.
In the present application, the graphical interface may be understood as any Application program (App) that supports creation of a graphical quantized transaction policy on an electronic device, and is presented to a user. The user can trigger the application program APP so that the application program APP can present a graphical interface to the user, and the user can create a graphical quantitative transaction strategy based on the graphical interface.
The graphical interface may include a plurality of controls, where the controls may include at least one of: a start control, a condition control, and an event control. It should be appreciated that the start control, the condition control, and the event control described above are all quantization policy controls.
The target quantization policy control may be understood as a control capable of supporting a user to perform a code editing operation. The target quantization strategy control comprises the following components: a target condition control, a target event control, and/or a start control. Considering that the graphical interface comprises a control bar and a strategy canvas, the target condition control can be selected as any condition control in the control bar or the strategy canvas; correspondingly, the target event control can be selected as any event control in a control column or a strategy canvas; accordingly, the start control may be selected as a start control in the policy canvas.
In the application, the condition control is generally used for judging market information, account information and the like. Event controls are typically used to perform ordering, removing, and flushing operations. The start control is used to indicate the start of the quantization strategy.
It should be appreciated that the start control, the condition control, and the event control described above are graphical controls. And, the start control, condition control, and event control described above may support a code viewing function and a code editing function.
In some implementations, when a quantized transaction policy needs to be created, a user may open an application APP supporting quantized transaction policy creation functionality by triggering the application APP so that the application APP presents a graphical interface to the user so that the user may create a personalized quantized transaction policy required for investment based on a start control, a condition control, and an event control in the graphical interface.
In the process of creating the personalized quantized transaction strategy in the graphical interface, a user can firstly create required events and/or conditions according to the quantized transaction strategy, and select a target quantized strategy control from a control column of the graphical interface, namely select a target condition control and/or a target event control. When the electronic equipment detects a control selection operation of a user in a control column, a control corresponding to the control selection operation can be determined to be a target quantization strategy control. And simultaneously adding the target quantization strategy control into a strategy canvas in the graphical interface, so that a user can create a personalized quantization transaction strategy based on the target quantization strategy control in the strategy canvas.
The policy canvas described above typically includes both connecting lines and boxes of display elements. The frame is used for representing the control selected by the user, namely, when the control is a conditional control, the frame is a conditional frame; when the control is an event control, the box is an event box; when the control is a start control, the box is a start box. In the application, the corresponding boxes of the controls in the strategy canvas can be connected in series or in parallel through connecting wires to generate the graphical quantitative transaction strategy.
In the application, adding the target quantization strategy control into the strategy canvas in the graphical interface can comprise the following two cases:
case one
When a user clicks the target quantization strategy control, the target quantization strategy control is automatically added into the strategy canvas.
Case two
And selecting the target quantization strategy control by the user, and dragging the target quantization strategy control into the strategy canvas to realize the addition of the target quantization strategy control into the strategy canvas.
When a user needs to add two or more target quantization strategy controls into a strategy canvas, the specific implementation process is as follows: only one target quantization strategy control is added at a time. For example, when a user needs to add three quantization policy controls to a policy canvas, a first user may select a first condition control or a first event control in the control bar as a first target quantization policy control and add the first target quantization policy control to the policy canvas. Then, the user can select a second condition control or a second event control in the control bar as a second target quantization strategy control, and add the second target quantization strategy control into the strategy canvas. Finally, the user may select a third condition control or a third event control in the control bar as a third target quantization strategy control and add the third target quantization strategy control to the strategy canvas. The arrangement has the advantages that the phenomenon of wrong judgment or disordered judgment of the selection and addition operation of a plurality of quantization strategy controls can be avoided, and therefore the order of adding target quantization strategy controls in the strategy canvas can be ensured.
It should be noted that, the start control in the present application is default preset on the policy canvas in the graphical interface. That is, no control is started in the control column in the graphical interface. Thus, the creation operation of the quantized transaction policy can be further simplified.
Further, in some implementations, after adding a quantized policy control, such as a condition control or an event control, to a policy canvas in a graphical interface, a user may select a certain quantized policy control in the policy canvas through the graphical interface, and the electronic device may further determine a target quantized policy control selected by the user in response to a control selection operation triggered on the policy canvas.
In some alternative implementations, self-coding controls may also be provided in the control column in the graphical interface of the present application. That is, the control column includes self-encoding controls in addition to condition controls and event controls. Wherein, the self-encoding control includes: a self-encoding condition control and/or a self-encoding event control. It will be appreciated that the code information for the self-encoding control in the control column is null, as distinguished from the condition control, event control, and start control.
Furthermore, the method for determining the target quantization strategy control selected by the user in response to the control selection operation triggered on the graphical interface specifically further comprises the following steps: and responding to the self-coding control selection operation triggered in the control column, and determining the target self-coding control selected by the user.
That is, two types of quantization strategy controls can be newly added in the control column of the graphical interface, one type is a self-coding condition control, the other type is a self-coding event control, a user can select any self-coding condition control and/or self-coding event control from the control column as a target quantization strategy control, and a quantization transaction strategy is created based on the selected target quantization strategy, so that the self-coding condition control is not required to be generated based on the condition control, and/or the self-coding event control is generated based on the event control, and the creation step of the quantization transaction strategy can be simplified.
S102, displaying original code information of the target quantization strategy control in a code area corresponding to the target quantization strategy control.
Optionally, the implementation manner of displaying the original code information of the target quantization strategy control may include, but is not limited to, the following several manners:
in the first mode, the user can control the cursor to hover over the target quantization strategy control and click the right button of the mouse to open the code area corresponding to the target quantization strategy control. Further, raw code information of the target quantization strategy control is displayed in the code region.
In the second mode, the user can also open the code area corresponding to the target quantization strategy control by pressing the target quantization strategy control for a long time, so that the original code information of the target quantization strategy control can be displayed in the code area.
And thirdly, the user can select the target quantization strategy control to display the related functions in the form of popup windows or floating windows and the like near the target quantization strategy control, so that the user can select and view the code function from the functions to open a code area corresponding to the target quantization strategy control and display the original code information of the target quantization strategy control in the code area.
The plurality of functions associated with the target quantization policy control may include, but are not limited to: delete, copy, cut, view code, etc., see fig. 2.
In the application, the code area corresponding to the target quantization strategy control can be positioned below the strategy canvas or other blank areas in the graphical interface, and the like, and the code area is not limited at all. Wherein, when the code region is located below the policy canvas, the code region may be located in any blank region below the policy canvas, for example as shown in FIG. 3.
In addition, the code area supports the expanding and collapsing functions and also supports the upward dragging height, so that when the code content in the code area is too much to be displayed completely, a user can drag the code area height to expand the code area, so that the whole code content is displayed as much as possible, and the user can conveniently view or edit the code area.
In order to avoid that the code area after being dragged is too large, so that the strategy canvas is too small to display all the added controls, the method and the device can preset the maximum dragging range of the code area, so that the aim that the added controls in the strategy canvas can be clearly and completely displayed while the code area is enlarged is achieved.
In some alternative implementations, when the user performs code viewing operation on the controls in the policy canvas, multiple controls may be selected at the same time, or the controls are not selected, or connection lines between the connected controls are selected. Aiming at the situation, the method and the device can enter the null state optionally, and display null state prompt information in the code area by default so as to remind a user to select any control in the strategy canvas and display corresponding code content of the control in the code area.
Illustratively, the above default display of null state hint information in the code area may be selected as "select 1 control, here the code of which will be presented", or the like.
It should be noted that, the graphical interface in the present application further includes: and an attribute bar for attribute editing of controls added to the policy canvas. Optionally, when the user selects any control in the strategy canvas, editable parameter information corresponding to the control is correspondingly displayed in the attribute column. For example, assuming that the user selects the start control in the policy canvas, the editable parameter information corresponding to the start control is displayed in the property bar accordingly, including the following: policy type, run target, and global variables.
Therefore, the displaying the original code information of the target quantization strategy control in the code area corresponding to the target quantization strategy control specifically includes: at least one attribute information of a target quantization strategy control is read; acquiring an interface function corresponding to each attribute information; and generating original code information of the target quantization strategy control according to the interface function and the attribute value corresponding to each attribute information, and displaying the original code information of the target quantization strategy control in the code area corresponding to the target quantization strategy control.
At least one attribute information of the target quantization strategy control is read, specifically, the attribute information is read from an attribute column corresponding to the target quantization strategy control.
In some optional implementations, in a code region corresponding to the target quantization policy control, original code information of the target quantization policy control is displayed, which may include the following cases based on the control type:
first case
When the control is a conditional control that supports a code editing function, the original code information of the conditional control includes, but is not limited to: definition functions of the condition boxes, etc.
The definition function of the condition frame is specifically a definition function of a condition frame corresponding to the condition control, and the definition function of the condition frame can be called as a condition frame function.
Wherein the conditional box function comprises: the condition box function declaration and the implementation content of the condition box function. The above-described conditional box function declares a name for defining the conditional box function. For example, when box_id of the condition box is 1, the name of the condition box function is condition_1. The implementation content of the conditional box function comprises at least one of the following: structural form and return value type. The structure form is preferably an if-else structure form, and the return value type is preferably a bool type.
Second case
When the control is an event control supporting a code editing function, the original code information of the event control includes, but is not limited to: definition functions of event boxes, etc.
The defining function of the event frame is specifically a defining function of the event frame corresponding to the event control, and the defining function of the event frame may be called as an event frame function.
Wherein the event box function comprises: event box function declarations, implementation content of event box functions. The event frame function declaration defines the name of the event frame function. For example, when box_id of the event box is 1, the name of the event box function is action_1. The implementation content of the event frame function comprises at least one of the following: the interface invokes the information.
Third case
When the control is a start control supporting a code editing function, the original code information of the start control includes, but is not limited to: a definition function of global variables, a definition function of operation targets, a definition function of custom index information, a function for initializing call, and the like.
Wherein, for a global variable, the definition function of the global variable includes: the method comprises the following steps of setting a contract function statement of a global variable and initializing content of the global variable, wherein the initializing content comprises at least one of the following items: numerical variables, target variables, and return values of the auto-code dependent interface calls.
For the operation target, the definition function of the operation target includes: the contract function declaration of the operation target and the initialization content of the operation target.
For the custom index information, the definition function of the custom index information includes: the default function statement of the custom index information and the initialization content of the custom index, wherein the initialization content comprises at least one of the following items: initializing a custom function of the custom index. The initialization convention function of the custom index at least comprises: the name of the custom index, the content of the wheat language script corresponding to the custom index and the parameter list required by executing the wheat language script.
For a function for initializing a call, the function for initializing a call includes: the initialized contract function declaration and the initialized contract function execute specific initialization contents. The initialized provisioning function can be understood as a provisioning function which is fixedly generated when the code creation process creates the complete executable code, and user intervention is not needed.
As an alternative exemplary illustration, assuming that the control selected by the user is the start control, the original code information displayed in the code area corresponding to the start control is as follows: the method comprises the steps of initializing a contract function statement, declaring contents of a first contract function in the initialized contract function statement and initializing contents of execution of the first contract function, and life contents of a second contract function in the initialized contract function statement and initializing contents of execution of the second contract function. Wherein the first contract function may be selected as trigger_symbols, the second contract function may be selected as custom_indicator, and the third contract function may be selected as global_variables.
Considering that the target quantization strategy control may be a newly added self-coding condition control and/or self-coding event control in the control column, the original code information displayed in the code region corresponding to the self-coding condition control or the self-coding event control is usually null, and only the preset code prompt information is displayed, so that a user can perform code editing operation on the self-coding condition control or the self-coding event control based on the preset code prompt information, and the self-coding condition control and/or the self-coding event control meeting the personalized operation requirement can be conveniently generated.
S103, in response to the code editing operation for the original code information, the original code information is adjusted to target code information, and the target quantization strategy control is converted into a self-coding control based on the target code information.
S104, based on the self-coding control, creating a quantized transaction strategy.
After the original code information is displayed in the code area corresponding to the target quantization strategy control, the user can perform code editing operation on the original code information of the target quantization strategy control. For example, the code parameters in the code area are modified, or all the original code information is deleted and then new codes are rewritten, or codes for realizing new functions can be added on the basis of the original code information, so that the code editing operation in the code area is realized, and the original code information is adjusted to be target code information based on the editing operation of a user. Further, the target quantization policy control in the policy canvas is converted to a self-encoding control based on the target code information.
Further, in some implementations, adjusting the original code information to the target code information in response to a code editing operation for the original code information may include: acquiring first code information input by a user at a target position in a code region; acquiring recommended function sentences from a general function library according to the first code information and the original code information; and displaying the recommended function statement in the code area, and responding to the triggering operation of the recommended function statement, and inputting the recommended function statement into the target position as new code information.
The general function library comprises general function sentences for constructing quantization strategies. The electronic equipment can acquire the first code information input by the user at the target position in real time, and further, the electronic equipment can perform code matching in the general function library based on the first code information input by the user and the original code information existing in the code region so as to realize recommendation of the function statement; specifically, function fields constituting a function statement may be extracted from the original code information, and associated candidate function statements may be matched from a general function library according to each function field in the original code information through an association rule model. The association rule model can be obtained by collecting code information in the historical self-coding control in advance, mining co-occurrence probabilities among all function sentences in the corresponding code information of each historical self-coding control, and further obtaining the co-occurrence probabilities among different function sentences; after each function field in the original code information is obtained, the function field can be input into an association rule model, and function sentences with the co-occurrence probability larger than a preset probability threshold value between the function digit sections are obtained from a general function library through the association rule model and serve as candidate function sentences. Furthermore, the candidate function sentences can be ordered according to the first code information input by the user, and the ordered candidate function sentences are pushed and displayed in the code area as recommended function bodies; specifically, field matching may be performed on the first code information and each candidate function statement, and each candidate function statement may be ordered according to a matching value of the field matching, for example, a matching value between the first code information and each candidate function statement may be obtained by the following formula:
Wherein, code A represents the first code information, code B represents the candidate function statement; the code A U code B represents the intersection size of each letter between the first code information and the candidate function statement, and the code A U code B represents the union size of each letter between the first code information and the candidate function statement; j (code a, code b) represents a matching value between the first code information and the candidate function statement.
After the code editing is completed, the generated self-encoding control and the start control can be connected through a connecting wire to create a graphical quantized transaction strategy. Therefore, the graphical quantized transaction strategy is compiled, and quantized transaction strategy codes are obtained to fulfill the aim of creating the quantized transaction strategy.
In some implementations, in the process of performing the code editing operation on the original code of the target quantization strategy control, the attribute bar in the graphical interface performs linkage back display based on the code modifying operation at the same time, so that the code editing operation for the target quantization strategy control is visually displayed through the attribute bar, and a user can conveniently view the specific parameter information after the code editing of the target quantization strategy control.
Meanwhile, in the code editing process of the target quantization strategy control, the identification information representing the editing operation is added to the target quantization strategy control, so that a user can intuitively and clearly distinguish which target quantization strategy control in the strategy canvas is in the code editing operation. For example, the identification information representing the editing operation may be added to the target quantization policy control, and may be selected as "in-edit …" text information, and/or "×" symbol information, etc., which is not limited herein.
In order to facilitate understanding of the present application, a specific description of the creation of a graphical quantized transaction policy process in an embodiment of the present application is provided below in connection with fig. 4. Illustratively, as shown in FIG. 4, the graphical interface of the present application may comprise: a navigation bar 210, a control bar 220, a policy canvas 230, and an attribute bar 240.
The navigation bar 210 is used for displaying policy management information, where the policy management information includes established quantized transaction policies, such as new policy 1, new policy 2, etc., and currently running quantized transaction policies. In addition, the navigation bar 210 may display an indication icon of a new quantized transaction policy, such as "+", etc., and the user may create a new quantized transaction policy by triggering the new indication icon.
The control column 220 is used to display a plurality of quantization policy controls, e.g., a condition control of an editable code, an event control of an editable code. It should be appreciated that the condition control described above may be a set of logical decisions, such as if/else logical decisions. The user may select different judgment conditions according to the quantized transaction policy. For example, the condition control may determine whether to take a bin for the selected account, or the condition control may be to determine whether the index smooth movement average line index (Moving Average Convergence and Divergence, MACD) of running object 1 meets the golden fork, or the like. The event control may be an execution function (operation function). Such as buying 600 hands on a market bill, or doing a case removal operation, etc.
Optionally, the condition controls include at least one of a signal condition control, an account condition control, and other condition controls. Wherein the signal condition control is objective data related to the market. The account condition control is related to the personal transaction business account and belongs to personalized controls. Other condition controls may include at least one of: the conditions and global variable conditions are combined. The combination condition may be that a plurality of single conditions are combined into one condition through a logical relationship such as a sum, or a sum (), and one combination condition may correspond to one combination condition control. The global variable condition can be set according to the personalized requirements of the user and used in judging the condition.
The signal condition controls can be classified into but not limited to the following categories according to the transaction basis commonly used by users: a price class, a base class, a funding class, a finance class, and a technology class. Among these, the valence classes may include, but are not limited to: the latest price, the disc-arranging consignment price, the highest price of the K line, the lowest price of the K line, the disc-collecting price of the K line, the disc-opening price of the K line and the like. The base classes may include, but are not limited to: all trade time, current time, stock number per hand, contract multiplier and whether to stop the card. Funding classes may include, but are not limited to: whether to allow financing, whether to allow coupons, and the like. Financial classes may include, but are not limited to: total market value, total stock, per-stock profit, per-stock equity, etc. The technology class is mainly used for storing various index controls, wherein the index controls can include but are not limited to: a Moving Average (MA), an index smoothing average (Moving Average Convergence and Divergence, MACD), a relative strength (Research System Inc, RSI), a bringer Bands (Bolinger Bands, BOLL), a random (KDJ), an average (Average true range, ATR), and other indices, among others.
The account condition controls can be divided into the following categories according to the common account numbers of the users: assets, purchasing power, maximum available and sold, hand-held, and risk level. The assets may include equity, cash, unrealized earning, etc. condition controls, among others. Purchasing power may include: maximum purchasing power, selling purchasing power, cash purchasing power and other condition controls. The maximum available sellers may include: cash available, maximum available, hand-held bin available, etc. The holding of the cartridge may include: and the holding quantity, the market value, the profit and loss proportion, the profit and loss amount, the marketable quantity and other condition controls. The risk level may include: risk status, initial deposit, etc.
In some alternative implementations, the control bar 220 may also display a self-encoding condition control and a self-encoding event control. For example, the self-encoding condition control may be placed under other condition controls under the condition control. For example, the self-encoding event control may be placed under other event controls under the event control.
It is noted that when a graphical interface with a self-coding condition control and a self-coding event control is used for the first time, prompt information is added in the control column 220. For example, in the initial state, red points are displayed on the self-coding condition control and the self-coding event control, and red points are displayed on other upper-level buttons, namely, three points including a condition control, an event control and other points. Further, when the user operates the self-encoding condition control, such as clicking or dragging, the red dot is then messaging with the red dot at the upper level. When the user operates the self-encoding event control, such as clicking or dragging, the red dot is then messaging with the red dot at the upper level.
Considering that the number of each type of control in the control column 220 is large, the optional application can list some commonly used controls in the control column 220, while other controls can be expanded through a drop-down menu or by clicking more buttons, etc., and the application does not limit the specific display mode of the control.
In addition, a search control can be set in the control bar 220, so that a user can trigger the search operation of the control by clicking the search control, and the electronic equipment can directly position the corresponding control according to the detected control search operation, thereby avoiding the problem of time consumption caused by manual search of the control, and further improving the creation speed of the quantized transaction strategy.
The corresponding boxes of the controls in the policy canvas 230 may be connected in series or in parallel via connecting wires to generate a graphical quantized transaction policy.
It should be noted that, because the condition control or the self-coding condition control corresponds to a set of logic judgments, the connection line coming out of the condition box corresponding to the condition control or the self-coding condition control includes a direction and a parameter. Wherein the parameter is "yes" or "no". And what the start control, the event control and the self-coding event control specifically perform, the start box corresponding to the start control and the connecting line coming out of the event boxes corresponding to the event control and the self-coding event control only comprise directions and do not comprise parameters.
The properties bar 240 is used to property edit controls added to the policy canvas 230. Optionally, when the user selects any control in the policy canvas 230, editable parameter information corresponding to the control is displayed in the attribute column 240 accordingly.
Then, when creating the graphical quantized transaction policy based on the graphical interface shown in fig. 4, the user may select the target condition control, the target event control, the target self-coding condition control and/or the target self-coding event control from the control column 220, add the selected target quantized policy control to the policy canvas 230, and click on a box corresponding to any target quantized policy control, so as to display a code area corresponding to the target quantized policy control in the graphical interface, and display original code information of the target quantized policy control in the code area. Thus, the user may perform a code editing operation on the original code information in the code region to adjust the original code information to target code information and convert the target quantization strategy control to a self-encoding control based on the target code information. Further, the start control and the self-encoding control, or the start control, the self-encoding control, the event control, and/or the condition control in the policy canvas 230 are connected by connecting wires to create a graphical quantized transaction policy. The self-coding control in the policy canvas 230 may be a self-coding condition control, or may be a self-coding event control, or may be a self-coding condition control and a self-coding event control, which is not limited in the present application.
According to the method for creating the quantized transaction strategy, provided by the application, the target quantized strategy control selected by a user is determined by responding to the control selection operation triggered on the graphical interface, the original code information of the target quantized strategy control is displayed in the code area corresponding to the target quantized strategy control, the original code information is adjusted to be target code information in response to the code editing operation of the original code information, the target quantized strategy control is converted to the self-coding control based on the target code information, and the quantized transaction strategy is created based on the self-coding control. The method and the system provide a graphical interface for supporting the user to create the graphical quantized transaction strategy, so that the user can simply and quickly create the quantized transaction strategy in the graphical interface, and the quantized strategy control of the editable code is arranged in the graphical interface, so that the user can edit code information corresponding to the quantized strategy control of at least one editable code in the process of creating the quantized transaction strategy, modify or expand executable operations of the quantized strategy control of the editable code on the basis of corresponding operations of the quantized strategy control of the editable code so as to generate the self-coding control, further, the requirements on the work level and the speciality of the program code written by the user are lower on the basis of the quantized transaction strategy required by the self-coding control, the creation mode of the quantized transaction strategy can be simplified, the creation difficulty of the quantized transaction strategy is reduced, the investment enthusiasm of the user can be improved, and various investment requirements of the user are met.
On the basis of the foregoing embodiments, the present application will be further explained in response to a code editing operation for original code information, adjusting the original code information to target code information, with particular reference to fig. 5.
As shown in fig. 5, the method may include the steps of:
s201, determining a target quantized strategy control selected by a user in response to control selection operation triggered on a graphical interface, wherein the graphical interface is used for creating quantized transaction strategies.
S202, displaying original code information of the target quantization strategy control in a code area corresponding to the target quantization strategy control.
S203, in response to the selected operation of the editing control in the code area, the original code information in the code area is controlled to be converted from the preview state to the editing state.
S204, in response to the code editing operation of the original code information in the editing state, the original code information is adjusted to the target code information.
S205, based on the self-coding control, a quantized transaction strategy is created.
Considering that the partial quantization strategy control only supports the function of code viewing, but not the function of code editing, when the original code information corresponding to the target quantization strategy control is displayed in the code area corresponding to the target quantization strategy control according to the code viewing operation of a user on any target quantization strategy control, editing controls, such as editing buttons, can be selectively displayed in the code area according to the control type of the target quantization strategy control viewed by the user. Furthermore, the user can edit the code content in the code area displayed with the editing control, so that the problems that the created quantization transaction strategy is wrong and the like caused by the fact that the user edits the code of the control with the non-editable code are avoided.
For example, the types of controls viewed by the user may include: an editable code control and a non-editable code control. Correspondingly, according to the control type checked by the user, selectively displaying the editing control in the code area, specifically: if the type of control viewed by the user is an editable code control, displaying the editing control in the code area. If the type of control viewed by the user is a non-editable code control, the editing control is not displayed in the code area. Illustratively, the edit control displayed in the code region may be as shown in FIG. 6. It should be appreciated that the editing control is a code editing control.
In some alternative implementations, when an edit control is included in the displayed code region, the target quantization policy control that the user currently triggers is illustrated as a quantization policy control for the editable code. At this time, the user may switch the code region corresponding to the target quantization strategy control from the preview state to the edit state by selecting the edit control in the code region. The preview state may be understood as a state when the code information is checked in advance, and the edit state may be understood as a state corresponding to when the user performs operations such as modifying or expanding the code information in the code area. Furthermore, the user may modify the original code information in the code area in the edited state, or delete all the original code information and then rewrite the original code, or add a code for realizing a new function or the like on the basis of the original code information, so as to implement a code editing operation in the code area. And further, based on the latest codes edited by the user, converting the target quantization strategy control into a personalized self-coding control required by the user.
In the present application, the original code information content displayed in the code region in the preview state is completely identical to the code content displayed in the code region in the edit state. For example, the target quantization policy control is a condition control, and then the code content of the condition control when the corresponding code region is in the preview state and the code content of the code region when the code region is in the editing state include the following steps: the condition box function declaration and the implementation content of the condition box function.
As some alternative implementations, the user may modify parameters in the properties bar when the code region is in the preview state. Correspondingly, the same parameters in the code area in the preview state are synchronously modified in a linkage way so as to achieve the synchronous modification effect.
In some implementations, the operation of converting at least one quantized policy control in the policy canvas into a personalized self-encoding control is considered irreversible. That is, after the quantization strategy control of the editable code is converted into the self-coding control, the self-coding control cannot be converted into the original target quantization strategy control.
Therefore, before editing the original code information in the code area of the target quantization strategy control, the method optionally displays first popup information, wherein the first popup information at least comprises: a first control. Further, in response to a selection operation of the first control, the original code information displayed in the code area is controlled to be converted from the preview state to the edit state.
In other words, the method and the device can enable the user to determine whether to continue editing operation on the original code information in the code area based on the first popup information by outputting the first popup information to the user so as to convert the target quantization strategy control into the irreversible self-coding control.
The first popup information may include: the system comprises a first control, a second control, prompt information and a hook option. Wherein the first control may be selected as a determination control, such as determining or otherwise. The second control may be selected as a cancel control, such as cancel or recall, etc. The hook option may be selected to not remind any more, and the application is not limited in this respect.
For example, the first popup message may be as shown in fig. 7, where the first control is a determination control, the second control is a cancel control, the prompt message may be "after editing, [ event X ] control may be converted into a self-coding control, and you cannot modify parameters in the attribute column, and confirm whether to continue editing.
Further, if it is detected that the user triggers the first control in the first popup window information, namely, the control is determined, the user is stated to determine that the original code information in the code area needs to be edited continuously, and the self-coding control is generated. At the moment, the original code information in the code area is adjusted to target code information based on the code editing operation of the user on the code area, and the target quantization strategy control is converted into the self-coding control based on the target code information. For example, the generated self-encoding control may be as shown in fig. 8A and 8B.
If the user is detected to trigger the second control in the first popup window information, namely, the control is canceled, the user does not want to continuously edit the code in the code area, and the operation of generating the editing control is canceled.
In addition, if the user is detected to trigger the first control or the second control in the first popup information and the hooking item is also hooked, when the first popup information needs to be output to the user next time, corresponding processing is performed by default according to the first control or the second control triggered by the user last time, so that interference caused by outputting the first popup information for the user for multiple times is avoided.
According to the method for creating the quantized transaction strategy, the graphical interface supporting the user to create the graphical quantized transaction strategy is provided for the user, so that the user can simply and quickly create the quantized transaction strategy in the graphical interface, and the quantized strategy control of the editable code is arranged in the graphical interface, so that the user can edit code information corresponding to the quantized strategy control of at least one editable code in the process of creating the quantized transaction strategy, modify or expand executable operations of the quantized strategy control of the editable code on the basis of corresponding operations of the quantized strategy control of the editable code is realized, so that a self-coding control is generated, further, the quantized transaction strategy needed by the user is created based on the self-coding control, the requirements on the work of writing the program code by the user and the specialization are lower, the creation mode of the quantized transaction strategy can be simplified, the creation difficulty of the quantized transaction strategy is reduced, and accordingly, the investment enthusiasm of the user can be improved, and various investment demands of the user are met. In addition, by setting the editing control in the code area of the target quantization strategy control, a user can trigger the editing control, and at least one quantization strategy control in the strategy canvas is edited corresponding to the original code to generate the self-coding control, so that the problem of false editing of the code corresponding to the quantization strategy control by the user is avoided. And the first popup information is output to the user so as to remind the user whether to convert at least one quantization strategy control of the editable codes in the strategy canvas into a self-coding control, thereby helping the user to reduce the generation of useless self-coding controls and causing unnecessary resource waste.
In some optional implementation scenarios of the present application, when the user edits the original code information in the code region corresponding to the quantization policy control of any editable code in the policy canvas, there may be a problem of code editing errors. For this reason, when the user edits the original code information in the code area, the present application optionally detects the edited code in the code area to determine whether the user has an error in editing the code in the code area. The following describes a specific description of the process of detecting codes in a code region provided by the present application with reference to fig. 9. As shown in fig. 9, the method may include the steps of:
s301, determining a target quantized strategy control selected by a user in response to control selection operation triggered on a graphical interface, wherein the graphical interface is used for creating quantized transaction strategies.
S302, original code information of the target quantization strategy control is displayed in a code area corresponding to the target quantization strategy control.
S303, in response to the code editing operation for the original code information, the original code information is adjusted to the target code information.
S304, detecting the object code information in the code area, if the object code information has an error, executing S305, otherwise executing S308.
It should be appreciated that after performing the code editing operation, the condition controls, event controls, self-encoding condition controls, and/or self-encoding event controls in the policy canvas are collectively referred to as self-encoding controls to facilitate the subsequent description of the detection portion.
In some optional implementation manners, the method and the device detect the target code information in the code area, and can perform corresponding detection operation according to the control type corresponding to the code area.
Specifically, if the target quantization strategy control is a self-coding condition control, detecting all executable path return value types and self-coding languages in a code area through a code detection process. If the target quantization strategy control is a self-coding event control, the self-coding grammar in the code region is detected through a code detection process.
The code detection process can be selected as a subprocess in the strategy execution process, and the main user detects whether the target code information in the code area has errors or not. Wherein a policy execution process may be understood as a system that executes policy canvas content.
In the application, the controls in the strategy canvas comprise three types, namely a condition control, an event control and a start control. Wherein, each control corresponding box corresponds to a function, and the function can be used as a small execution unit.
The function corresponding to each box can call the interface in the graphical interface corresponding platform to obtain the related information, for example: the last_price () interface may obtain the latest price of a stock, and the bar_open () interface may obtain the K-wire opening price of a stock.
And, the function corresponding to each block may also use global variables and local variables defined in the current block. Wherein, the functions corresponding to different boxes are local variables which can not call each other. Meanwhile, functions corresponding to different frames cannot be called mutually, and a policy execution process can construct an execution relationship of the frame function logic according to the connection relationship among the controls in the policy canvas.
In some implementations, the return value variable type that allows for the self-encoding condition control needs to be a boolean type variable, i.e., a BOOL type. Therefore, the application needs to detect all the executable path return value types in the code area corresponding to the self-coding condition control, and the detection process can analyze all the possible execution paths of the corresponding frame function of the condition control through the code detection process, so as to determine whether all the possible execution paths are BOOL types or not, thereby ensuring the accuracy of the connection execution of the logic judgment frame.
It should be understood that the values of boolean variables are only true (true) and false (false), and can be used for logical expressions, i.e., logical operations such as "or" and "not" and relational operations such as greater than or less than, with the logical expression operation result being either true or false.
Analyzing all possible execution paths of the self-coding condition control corresponding box function, and determining whether all possible execution paths are of a BOOL type or not can comprise the following situations:
case one
If the self-coding condition control corresponding box function lacks a bol return value of an else path, determining that at least one executable path of the self-coding condition control corresponding box function is not a bol type. At this point, an error may be reported.
Illustratively, if condition_code is output: when return True, if condition_code→this line reports errors, and the prompt only contains the return value of the if execution path; when the if path is not entered, the bool return value is not returned.
Case two
If the analysis self-coding condition control corresponding box function return path contains a non-bool return value, determining that at least one executable path of the self-coding condition control corresponding box function is not a bool type. At this point, an error may be reported.
Illustratively, output else: return "Hello" → this line reports an error because the return value of the path is not of the bol type.
In some alternative implementations, detection of the self-encoding language may be desirable in view of the code editing operations that may exist when the self-encoding control is a self-encoding condition control and/or a self-encoding event control. Optionally, the detecting, by the code detection process, the self-coding grammar in the code region in the present application may include: detecting whether the self-coding in the code area accords with the code writing specification of the programming language, and whether member variables used in the self-coding are defined in a contract function of a start control, wherein the start control is preset in a strategy canvas, and the strategy canvas is positioned in a graphical interface.
Wherein, the contract function of the start control at least comprises: the definition function trigger_symbols of the running object and the definition function global_variables of the global variables.
Optionally, the present application may also perform self-coding grammar detection on the code information in the code area corresponding to the start control, where the specific detection process is the same as or similar to the foregoing self-coding grammar detection method for detecting the self-coding event control and the self-coding condition control, and will not be repeated herein.
In addition, the application can also detect the contract function displayed in the code area of the start control. The method specifically comprises the following cases:
In the first case, it is detected whether the declaration of the operation target in the definition function trigger_symbols of the operation target is repeated. If the method is repeated, reporting errors, otherwise, not reporting errors.
In the second case, detecting the number of operation targets in the defined function trigger_symbols function of the operation targets, if the number of operation targets exceeds the allowable number, reporting errors, otherwise, not reporting errors.
Third, detecting whether a definition function trigger_symbols of an operation target and a definition function global_variables of a global variable are missing; if the defect exists, reporting an error; if no loss exists, the number of the operation targets defined in the operation target definition function can be further detected, if the number exceeds a preset number value, errors are reported, and otherwise, no errors are reported.
S305, when there is an error in the object code information, displaying the identification information of the error-corresponding self-encoding control, the identification information of the error-corresponding code line, and the error detailed information in the detection area.
The identification information of the self-coding control is used for uniquely identifying the corresponding self-coding control, and the identification information of the code row is used for uniquely identifying the corresponding code row. The identification information of the self-coding control can be selected as the serial number or the name of the self-coding control. The identification information of the code line may be selected as the number of lines of the code line, etc.
In the present application, the graphical interface further includes a detection area, and the detection area is optionally located below the code area, or located beside the code area, such as on the right side, the left side, or the like, which is not limited in any way.
Alternatively, when it is determined that there is an error in the object code information in the code area, the present application eliminates the error by displaying specific error information in the detection area so that the user can perform a modification operation based on the error information.
For example, assuming that there is an error in the object code information in the code region corresponding to any of the self-encoding controls, the details of the error may be displayed in the detection region, as shown in fig. 10. In fig. 10, the identification information of the self-coding condition control is self-coding condition 1, the identification information of the error corresponding code line is 1 st line, 9 th line and 24 th line, and the error detailed information is: expression expected.
S306, in response to the modification operation for the error code, the modified code is detected, if the modified code has an error, S305 is executed, otherwise S307 is executed.
S307, when the edited code in the code area has no error, the target quantization strategy control is converted into a self-coding control based on the latest code in the code area.
S308, based on the self-coding control, creating a quantized transaction strategy.
Alternatively, the user may modify the error information for the error information displayed in the detection area. In addition, when the modification operation of the user is detected, the present application may also detect the modified code, and the detection process is the same as or similar to the implementation manner in the foregoing S304, and the detailed reference is made to the foregoing S304, which is not repeated here.
If the modified self-coding grammar is detected to have errors again, or any executable path return value type has errors, the errors are continuously reported, so that the user continuously adjusts the codes based on the errors, and the adjusted codes are continuously detected until the errors in the code area are eliminated. Further, a self-encoding control is generated based on the error-free code information. A quantized transaction policy is then created based on the self-encoding control.
According to the method for creating the quantized transaction strategy, the graphical interface supporting the user to create the graphical quantized transaction strategy is provided for the user, so that the user can simply and quickly create the quantized transaction strategy in the graphical interface, the quantized strategy control capable of editing codes is arranged in the graphical interface, the user can edit code information corresponding to at least one quantized strategy control capable of editing codes in the process of creating the quantized transaction strategy, the executable operation of the quantized strategy control capable of editing codes is modified or expanded on the basis of the corresponding operation of the quantized strategy control capable of editing codes, the self-coding control is generated, the quantized transaction strategy needed by the user is created on the basis of the self-coding control, the requirements on the work of writing program codes by the user and the speciality are low, the creation mode of the quantized transaction strategy can be simplified, and the creation difficulty of the quantized transaction strategy is reduced. In addition, the code region is detected with target code information to eliminate possible errors, and when errors are detected, the user is enabled to modify the codes with errors in the code region based on the error reporting information by reporting errors to the user, so that the modified codes are free of errors, and conditions are provided for normal operation of the follow-up quantitative transaction strategy.
The creation of a quantized transaction policy based on self-coded controls in the present application is described in detail below with reference to FIG. 11. As shown in fig. 11, the method may include the steps of:
s401, determining a target quantized strategy control selected by a user in response to control selection operation triggered on a graphical interface, wherein the graphical interface is used for creating quantized transaction strategies.
S402, displaying original code information of the target quantization strategy control in a code area corresponding to the target quantization strategy control.
S403, in response to the code editing operation for the original code information, the original code information is adjusted to target code information, and the target quantization strategy control is converted into a self-coding control based on the target code information.
S404, creating a graphical quantized transaction strategy based on the self-coding control.
It should be appreciated that the graphical interface also includes a start control, and that the start control is set by default in the policy canvas of the graphical interface.
Therefore, the application creates a graphical quantized transaction strategy, and an optional user can connect a self-coding control and a start control in a strategy canvas through connecting wires to create the graphical quantized transaction strategy. That is, the present application may create a graphical quantized transaction policy by connecting the self-encoding control and the start control over a connection line in response to a connection operation of the self-encoding control and the start control.
S405, based on the graphical quantized transaction policy, a quantized transaction policy code of the quantized transaction policy is obtained.
In some alternative implementations, at least one execution path may first be determined based on a graphical quantized transaction policy, wherein the execution path includes at least one self-encoding control and a connection line connecting the self-encoding control and an adjacent control. And further, the self-coding control is packaged to obtain a self-coding control function, and the execution path is packaged based on a connecting wire connecting the self-coding control and the adjacent control to obtain an execution path function. The execution path function calls a self-coding control function corresponding to the self-coding control in the execution path. Then, based on the execution path function, a quantized transaction policy code of the quantized transaction policy is obtained.
The control adjacent to the self-coding control can be a start control, a self-coding control, a condition control or an event control. Wherein the self-encoding control comprises: a self-encoding condition control and/or a self-encoding event control.
Illustratively, as shown in FIG. 12, in the graphical quantized transaction policy, one circle represents one control, and one control may be represented as a node. The leftmost node is a start control, and the remaining nodes can be at least one of a self-coding condition control, a self-coding event control, a condition control and an event control. And, each execution path in the graphical quantization transaction strategy can comprise at least one self-coding control and a connecting line between the controls adjacent to the self-coding control.
In the application, if the self-coding control is a self-coding condition control, the process of packaging the self-coding condition control can be that a packaging function condition_invoke is executed on a corresponding frame of the self-coding condition control in a policy execution process to carry out one-layer call packaging. And, the condition_invoke function will process the abnormal situation in the executing process of the box function according to the abnormal processing strategy. Meanwhile, the encapsulation also processes the execution of the connection line call. Illustratively, the encapsulation process for the self-encoding condition control may be as shown in FIG. 13A.
If the self-coding control is a self-coding event control, the process of packaging the self-coding event control can be one-layer call packaging by executing a packaging function event_invoke through a corresponding box in the policy execution process. And, the event_invoke function handles abnormal situations in the executing process of the box function according to the abnormal handling strategy. At the same time, the encapsulation also handles the execution of the connection line call. Illustratively, the encapsulation process for the self-encoding event control may be as shown in FIG. 13B.
Furthermore, in the method, the execution paths are packaged, specifically, the execution paths triggered by the corresponding boxes of the starting controls are registered in the path registration contract function_init_invoke_chain, so that the policy execution process can sequentially execute the connection line execution paths starting from the starting boxes according to the sequence from front to back of the coordinates of each control in the policy canvas. Wherein each execution path is registered using a path content registration contract function registerfunc.
Note that, the registration order of the execution paths specifically refers to an execution order of the paths when the policy is triggered to be executed.
In addition, the strategy executing process can process abnormal conditions in the executing process of the box function according to the abnormal processing strategy in the executing process of the quantized transaction strategy. Illustratively, the process of encapsulating an execution path according to the present application may be as shown in FIG. 13C.
And packaging the self-coding control and the execution path, and after obtaining the corresponding function, clicking a strategy canvas by a user to increase options of newly built code copies. So that the graphical quantized transaction policy may be saved as a quantized transaction policy code. When the user newly builds the code copies, if the upper limit of the number of the strategies is exceeded, the copy is not created, and second popup window information is output, so that the user can re-build the code copies after deleting some existing strategies.
The second popup information may include: title portion, body portion, and operation controls. For example, as shown in fig. 14, the header portion in the second popup information may be a prompt message; the body part may be: at most 50 strategies can be created, the number of the current strategies reaches the upper limit, and the strategies are retried after deleting some strategies; the operation control is a determination control.
In the application, when the graphical quantized transaction strategy is stored as a pure code copy, the pure code copy content is a strategy class which comprises four contracted functions of a function initialization (), a defined function trigger_symbols of an operation target, a defined function global_ vatiables, handle _data of a global variable and various control functions for initializing call. Notes, such as control names and remark information, are added in the control functions. The handle_data can be triggered by events such as K line pushing, tick pushing, fixed time interval, appointed time and the like.
Illustratively, the pure code quantized transaction policy copy of the present application may include the following: the function for initializing call corresponding to the start control: running a definition function trigger_symbols () of the object and a definition function global_variables () of the global variable, and a definition function of the custom index; the method comprises the steps of executing the contract function declaration of a target, the contract function declaration of a global variable, the contract function declaration of a custom index, the registration contract function of an execution path, the realization of each box of a strategy, invoke encapsulation and the like.
It should be noted that, the whole implementation logic of the pure code quantized transaction policy may be that a policy execution process adds a basic segment for a policy executor, and further obtains a complete quantized transaction policy code based on a function obtained by the basic segment and encapsulation. Wherein the complete quantized transaction policy code may be as shown in fig. 15.
The basic segment comprises the following parts: an import portion, a class portion, and a main portion.
Specifically, the import section: before policy execution, some fixed dependencies need to be imported, such as import of some function libraries, etc. And, these contents are automatically handled at the time of policy creation, simply at the time of code generation.
class section: the whole strategy canvas is converted into a strategy class, and all frame functions and contract functions inherited from the strategyBase basic type are member functions of the strategy class. That is, the created quantized transaction policy must inherit from the underlying type to indicate itself as a policy.
main part: is the entry where the policy class is identified by the policy executor and instantiation of the execution policy and trigger execution.
S406, operating the quantized transaction strategy codes to obtain an operation result.
After obtaining the quantized transaction policy code, the user may run the quantized transaction policy code to obtain a running result of the quantized transaction policy.
Optionally, when the quantized transaction policy code is executed, different operation modes, such as a historical back test operation mode or a real disk operation mode, are selected. Therefore, the user can select any target operation mode from different operation modes, so that the electronic equipment responds to the selected operation of any target operation mode in the strategy canvas to operate the quantized transaction strategy code based on the target operation mode so as to acquire an operation result. The target operation mode is history back measurement or real disc operation.
In the process of running the quantized transaction policy codes, conditions controls, event controls, self-coding conditions controls and/or self-coding event controls can be abnormal, so that a request fails or data acquisition is abnormal. Therefore, before the quantized transaction policy code is operated, the corresponding exception handling policy is set for the quantized transaction policy, so that if an exception occurs in the operation process of the quantized transaction policy, the exception can be handled according to the preset exception handling policy, and the quantized transaction policy code can be ensured to operate normally.
In some optional implementations, the preset exception handling policy may be set by user for the whole quantized transaction policy code, or may be based on a control included in the quantized transaction policy code, and an exception handling policy is set for each control, which is not specifically limited in the present application.
That is, in the present application, the exception handling policy is set based on the quantized transaction policy code or based on the type of control in the quantized transaction policy code, wherein the control includes: a start control, a condition control, an event control, a self-encoding condition control, and/or a self-encoding event control.
Assuming that the exception handling policy is custom set for the entire quantized transaction policy code, the exception handling policy may include the following information: abnormal quotation rights and message reminding. Wherein the ticker-weight exception may be set to continue running and attempt to reconnect the ticker. The message reminder may be set to not accept the system message reminder when the real disk is running abnormally, etc.
Assuming that the exception handling policy is set for each control in the quantized transaction policy code, the quantized transaction policy code includes a start control, a self-coding condition control and a self-coding event control, then a corresponding exception handling policy 1 may be set for the start control, an exception handling policy 2 may be set for the self-coding condition control, and an exception handling policy 3 may be set for the self-coding event control.
After setting the exception handling policy for the quantized transaction policy code, a user can obtain the operation parameter information and the exception handling policy of the target operation mode, and operate the quantized transaction policy code based on the operation parameter and the exception handling policy of the target operation mode to obtain an operation result.
And when the starting frame function corresponding to the starting control is detected to have an abnormality after the starting frame function execution strategy initialization, calling an abnormality processing strategy corresponding to the starting frame, and controlling an abnormality processor to process the abnormality based on the abnormality processing strategy and output a related daily log. And then, the strategy executing process records initialization exception information to provide basis for corresponding processing of the same exception occurring later, and the strategy executing process exits the executing operation. If the event frame function is abnormal in the execution process of the self-coding event control or the event frame function corresponding to the event control, capturing the abnormality through the execution encapsulation function event_invoke of the event frame, and then acquiring an abnormality processing strategy preset by the event frame. And determining whether the exception is processed in the event frame execution unit, and if so, outputting a related exception log and continuing to execute the exception. If not, the exception is processed by an exception handler in the policy execution process, and the relevant exception log is output and the execution is continued. If the condition control or the condition frame function corresponding to the condition control is determined to be abnormal in the execution process of the condition frame function, capturing the abnormality through the condition_invoke of the condition frame, executing the abnormality through an abnormality processor in the strategy execution process, outputting a related abnormality log, and continuing to execute the abnormality.
In some implementations, considering that there may be an error in the obtained quantized transaction policy code, the present application may optionally also perform error detection on the quantized transaction policy code before running the quantized transaction policy code to obtain a running result, so as to determine whether the policy configuration is correct. If the quantized transaction strategy code has error information, outputting error information in a detection area, wherein the error information comprises identification information and error detailed information of a code row corresponding to the error, and the identification information of the code row is used for uniquely identifying the corresponding code row. If the quantized transaction strategy code does not have error information, continuing to operate the quantized transaction strategy code to acquire an operation result of the quantized transaction strategy.
When the quantized transaction policy code has error information, the user can modify the error existing in the quantized transaction policy code based on the error information displayed in the detection area. Meanwhile, after modification, the user can perform error detection on the quantized transaction strategy code again until no error exists in the quantized transaction strategy code after the latest modification.
According to the method for creating the quantized transaction strategy, the graphical interface supporting the user to create the graphical quantized transaction strategy is provided for the user, so that the user can simply and quickly create the quantized transaction strategy in the graphical interface, the quantized strategy control capable of editing codes is arranged in the graphical interface, the user can edit code information corresponding to at least one quantized strategy control capable of editing codes in the process of creating the quantized transaction strategy, the executable operation of the quantized strategy control capable of editing codes is modified or expanded on the basis of the corresponding operation of the quantized strategy control capable of editing codes, the self-coding control is generated, the quantized transaction strategy needed by the user is created on the basis of the self-coding control, the requirements on the work of writing program codes by the user and the speciality are low, the creation mode of the quantized transaction strategy can be simplified, and the creation difficulty of the quantized transaction strategy is reduced.
A device for creating a quantized transaction policy according to an embodiment of the present application will be described below with reference to fig. 16. Fig. 16 is a schematic block diagram of a creation device for a quantized transaction policy provided by an embodiment of the application. As shown in fig. 16, the quantized transaction policy creation device 500 includes: a control determination module 510, a code display module 520, a code editing module 530, and a policy creation module 540.
The control determining module 510 is configured to determine a target quantization policy control selected by a user in response to a control selection operation triggered on a graphical interface, where the graphical interface is used to create a quantization transaction policy;
the code display module 520 is configured to display original code information of the target quantization policy control in a code area corresponding to the target quantization policy control;
a code editing module 530 for adjusting the original code information to target code information in response to a code editing operation for the original code information, and converting the target quantization strategy control to a self-coding control based on the target code information;
a policy creation module 540 for creating a quantized transaction policy based on the self-coded control.
An optional implementation manner of the embodiment of the present application, the code display module 520 is specifically configured to:
reading at least one attribute information of the target quantization strategy control;
acquiring an interface function corresponding to each attribute information;
and generating original code information of the target quantization strategy control according to the interface function and the attribute value corresponding to each attribute information, and displaying the original code information of the target quantization strategy control in a code area corresponding to the target quantization strategy control.
An optional implementation manner of the embodiment of the present application, the code editing module 530 includes:
the control unit is used for responding to the selected operation of the editing control in the code area and controlling the original code information in the code area to be converted from a preview state to an editing state;
and the adjusting unit is used for responding to the code editing operation of the original code information in an editing state and adjusting the original code information into target code information.
An optional implementation manner of the embodiment of the present application, the control unit is specifically configured to:
responding to the selected operation of the editing control in the code area, displaying first popup information, wherein the first popup information at least comprises a first control;
And in response to the selected operation of the first control, controlling the original code information displayed in the code area to be converted from a preview state to an editing state.
An optional implementation manner of the embodiment of the present application, the graphical interface includes: a control bar, the control bar comprising: a self-coding control;
correspondingly, the control determining module 510 is specifically configured to:
and responding to the self-coding control selection operation triggered in the control column, and determining the target self-coding control selected by the user.
An optional implementation manner of the embodiment of the present application, the graphical interface includes: a detection region; the creation device 500 of the quantized transaction policy further includes:
a detection module for detecting the target code information in the code region;
the error display module is used for displaying the identification information of the error corresponding self-coding control, the identification information of the error corresponding code row and the error detailed information in the detection area when the error exists in the target code information; the identification information of the self-coding control is used for uniquely identifying the corresponding self-coding control, and the identification information of the code row is used for uniquely identifying the corresponding code row.
An optional implementation manner of the embodiment of the present application, the self-coding control includes: a self-encoding condition control and/or a self-encoding event control;
correspondingly, the detection module is specifically configured to:
if the self-coding control is a self-coding condition control, detecting all executable path return value types and self-coding grammar in the code area through a code detection process;
and if the self-coding control is a self-coding event control, detecting the self-coding grammar in the code region through a code detection process.
An optional implementation manner of the embodiment of the present application, the detection module is further configured to:
detecting whether the self-coding in the code area accords with the code writing specification of a programming language, and whether member variables used in the self-coding are defined in a convention function of a starting control, wherein the starting control is preset in a strategy canvas, and the strategy canvas is positioned in a graphical interface.
An optional implementation of an embodiment of the present application, the policy creation module 540 includes:
the creation unit is used for creating a graphical quantization transaction strategy based on the self-coding control;
and the acquisition unit is used for acquiring the quantized transaction strategy code of the quantized transaction strategy based on the graphical quantized transaction strategy.
In an optional implementation manner of the embodiment of the present application, the graphical interface further includes a start control; the creation unit is specifically used for:
and responding to the connection operation of the self-coding control and the starting control, connecting the self-coding control and the starting control through a connecting wire, and creating the graphical quantitative transaction strategy.
An optional implementation manner of the embodiment of the present application, the obtaining unit is specifically configured to:
determining at least one execution path based on the graphical quantized transaction policy, wherein the execution path comprises at least one self-coding control and a connecting line for connecting the self-coding control and an adjacent control;
packaging the self-coding control to obtain a self-coding control function;
based on a connecting line connecting the self-coding control and the adjacent control, encapsulating the execution path to obtain an execution path function, wherein the execution path function calls a self-coding control function corresponding to the self-coding control in the execution path;
and acquiring a quantized transaction policy code of the quantized transaction policy based on the execution path function.
According to the creation device of the quantized transaction strategy, provided by the application, the graphical interface supporting the user to create the graphical quantized transaction strategy is provided for the user, so that the user can simply and quickly create the quantized transaction strategy in the graphical interface, and the quantized strategy control of the editable code is arranged in the graphical interface, so that the user can edit code information corresponding to at least one quantized strategy control of the editable code in the process of creating the quantized transaction strategy, modify or expand executable operations of the quantized strategy control of the editable code on the basis of corresponding operations of the quantized strategy control of the editable code is realized, so that a self-coding control is generated, further, the quantized transaction strategy required by the user is created based on the self-coding control, the creation mode of the quantized transaction strategy is simplified, the creation difficulty of the quantized transaction strategy is reduced, and accordingly, the investment enthusiasm of the user can be improved, and various investment demands of the user are met.
It should be understood that apparatus embodiments and method embodiments may correspond with each other and that similar descriptions may refer to the method embodiments. To avoid repetition, no further description is provided here. Specifically, the apparatus 500 shown in fig. 16 may perform the method embodiment corresponding to fig. 1, and the foregoing and other operations and/or functions of each module in the apparatus 500 are respectively for implementing the corresponding flow in each method in fig. 1, and are not further described herein for brevity.
The apparatus 500 of the embodiment of the present application is described above in terms of functional modules in conjunction with the accompanying drawings. It should be understood that the functional module may be implemented in hardware, or may be implemented by instructions in software, or may be implemented by a combination of hardware and software modules. Specifically, each step of the method embodiment in the embodiment of the present application may be implemented by an integrated logic circuit of hardware in a processor and/or an instruction in a software form, and the steps of the method disclosed in connection with the embodiment of the present application may be directly implemented as a hardware decoding processor or implemented by a combination of hardware and software modules in the decoding processor. Alternatively, the software modules may be located in a well-established storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, and the like. The storage medium is located in the memory, and the processor reads the information in the memory, and combines the hardware to complete the steps in the method embodiment.
Fig. 17 is a schematic block diagram of an electronic device according to an embodiment of the present application.
As shown in fig. 17, the electronic device 600 may include:
a memory 610 and a processor 620, the memory 610 being adapted to store a computer program and to transfer the program code to the processor 520. In other words, the processor 620 may call and run a computer program from the memory 610 to implement the methods of embodiments of the present application.
For example, the processor 620 may be configured to perform the method embodiments described above in accordance with instructions in the computer program.
In some embodiments of the application, the processor 620 may include, but is not limited to:
a general purpose processor, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like.
In some embodiments of the application, the memory 610 includes, but is not limited to:
volatile memory and/or nonvolatile memory. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM) which acts as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (Double Data Rate SDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), and Direct memory bus RAM (DR RAM).
In some embodiments of the present application, the computer program may be divided into one or more modules that are stored in the memory 610 and executed by the processor 620 to perform the methods provided by the present application. The one or more modules may be a series of computer program instruction segments capable of performing the specified functions, which are used to describe the execution of the computer program in the electronic device.
As shown in fig. 17, the electronic device may further include:
a transceiver 630, the transceiver 630 being connectable to the processor 620 or the memory 610.
The processor 620 may control the transceiver 630 to communicate with other devices, and in particular, may send information or data to other devices or receive information or data sent by other devices. Transceiver 630 may include a transmitter and a receiver. Transceiver 630 may further include antennas, the number of which may be one or more.
It will be appreciated that the various components in the electronic device are connected by a bus system that includes, in addition to a data bus, a power bus, a control bus, and a status signal bus.
The present application also provides a computer storage medium having stored thereon a computer program which, when executed by a computer, enables the computer to perform the method of the above-described method embodiments.
The present application also provides a computer program product comprising instructions which, when run on an electronic device, cause the electronic device to perform the method of the above-described method embodiment.
When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). 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, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
Those of ordinary skill in the art will appreciate that the various illustrative modules and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
The modules illustrated as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. For example, functional modules in various embodiments of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
It will be appreciated that in particular embodiments of the present application, related data used in connection with the creation of quantitative transaction policies is concerned, and that when the above embodiments of the present application are applied to particular products or technologies, user permissions, consents or authorizations need to be obtained, and the collection, use and processing of related data is required to comply with the relevant laws and regulations and standards of the relevant country and region.

Claims (14)

1. A method of creating a quantized transaction policy, comprising:
determining a target quantization strategy control selected by a user in response to control selection operation triggered on a graphical interface, wherein the graphical interface is used for creating a quantization transaction strategy;
displaying original code information of the target quantization strategy control in a code area corresponding to the target quantization strategy control;
in response to a code editing operation for the original code information, adjusting the original code information to target code information, and converting the target quantization strategy control to a self-coding control based on the target code information;
based on the self-encoding control, a quantized transaction policy is created.
2. The method of claim 1, wherein displaying the original code information of the target quantization strategy control in the code region corresponding to the target quantization strategy control comprises:
reading at least one attribute information of the target quantization strategy control;
acquiring an interface function corresponding to each attribute information;
and generating original code information of the target quantization strategy control according to the interface function and the attribute value corresponding to each attribute information, and displaying the original code information of the target quantization strategy control in a code area corresponding to the target quantization strategy control.
3. The method of claim 1, wherein said adjusting said original code information to target code information in response to a code editing operation for said original code information comprises:
responding to the selected operation of the editing control in the code area, and controlling the original code information in the code area to be converted from a preview state to an editing state;
in response to a code editing operation for original code information in an edited state, the original code information is adjusted to target code information.
4. A method according to claim 3, wherein said controlling the conversion of original code information in the code region from a preview state to an edit state in response to a selected operation of an edit control in the code region comprises:
responding to the selected operation of the editing control in the code area, displaying first popup information, wherein the first popup information at least comprises a first control;
and in response to the selected operation of the first control, controlling the original code information displayed in the code area to be converted from a preview state to an editing state.
5. The method of claim 1, wherein the graphical interface comprises: a control bar, the control bar comprising: a self-coding control;
Correspondingly, the determining the target quantization strategy control selected by the user in response to the control selection operation triggered on the graphical interface comprises the following steps:
and responding to the self-coding control selection operation triggered in the control column, and determining the target self-coding control selected by the user.
6. The method of any one of claims 1-5, wherein the graphical interface comprises: a detection region; the method further comprises the steps of:
detecting the target code information in the code region;
when the target code information has errors, displaying the identification information of the error corresponding self-coding control, the identification information of the error corresponding code row and the error detailed information in the detection area;
the identification information of the self-coding control is used for uniquely identifying the corresponding self-coding control, and the identification information of the code row is used for uniquely identifying the corresponding code row.
7. The method of claim 6, wherein the self-encoding control comprises: a self-encoding condition control and/or a self-encoding event control;
accordingly, the detecting the target code information in the code region includes:
If the self-coding control is a self-coding condition control, detecting all executable path return value types and self-coding grammar in the code area through a code detection process;
and if the self-coding control is a self-coding event control, detecting the self-coding grammar in the code region through a code detection process.
8. The method of claim 7, wherein the detecting, by a code detection process, the self-coded syntax in the code region comprises:
detecting whether the self-coding in the code area accords with the code writing specification of a programming language, and whether member variables used in the self-coding are defined in a convention function of a starting control, wherein the starting control is preset in a strategy canvas, and the strategy canvas is positioned in a graphical interface.
9. The method of claim 1, wherein creating a quantized transaction policy based on the self-coded control comprises:
creating a graphical quantized transaction policy based on the self-coding control;
and based on the graphical quantized transaction strategy, obtaining a quantized transaction strategy code of the quantized transaction strategy.
10. The method of claim 9, wherein the graphical interface further comprises a start control; the creating a graphical quantized transaction policy based on the self-encoding control comprises:
And responding to the connection operation of the self-coding control and the starting control, connecting the self-coding control and the starting control through a connecting wire, and creating the graphical quantitative transaction strategy.
11. The method of claim 9, wherein the obtaining a quantized transaction policy code for a quantized transaction policy based on the graphical quantized transaction policy comprises:
determining at least one execution path based on the graphical quantized transaction policy, wherein the execution path comprises at least one self-coding control and a connecting line for connecting the self-coding control and an adjacent control;
packaging the self-coding control to obtain a self-coding control function;
based on a connecting line connecting the self-coding control and the adjacent control, encapsulating the execution path to obtain an execution path function, wherein the execution path function calls a self-coding control function corresponding to the self-coding control in the execution path;
and acquiring a quantized transaction policy code of the quantized transaction policy based on the execution path function.
12. A quantized transaction policy creation device, comprising:
the control determining module is used for determining a target quantization strategy control selected by a user in response to control selection operation triggered on a graphical interface, wherein the graphical interface is used for creating a quantization transaction strategy;
The code display module is used for displaying the original code information of the target quantization strategy control in a code area corresponding to the target quantization strategy control;
the code editing module is used for responding to code editing operation aiming at the original code information, adjusting the original code information into target code information and converting the target quantization strategy control into a self-coding control based on the target code information;
and the strategy creation module is used for creating a quantized transaction strategy based on the self-coding control.
13. An electronic device, comprising:
a processor and a memory for storing a computer program, the processor being for invoking and running the computer program stored in the memory to perform the method of any of claims 1 to 11.
14. A computer readable storage medium storing a computer program for causing a computer to perform the method of any one of claims 1 to 11.
CN202311017124.6A 2023-08-11 2023-08-11 Method, device, equipment and medium for creating quantitative transaction strategy Pending CN117111936A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311017124.6A CN117111936A (en) 2023-08-11 2023-08-11 Method, device, equipment and medium for creating quantitative transaction strategy

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311017124.6A CN117111936A (en) 2023-08-11 2023-08-11 Method, device, equipment and medium for creating quantitative transaction strategy

Publications (1)

Publication Number Publication Date
CN117111936A true CN117111936A (en) 2023-11-24

Family

ID=88793368

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311017124.6A Pending CN117111936A (en) 2023-08-11 2023-08-11 Method, device, equipment and medium for creating quantitative transaction strategy

Country Status (1)

Country Link
CN (1) CN117111936A (en)

Similar Documents

Publication Publication Date Title
US8340995B2 (en) Method and system of using artifacts to identify elements of a component business model
US9152996B2 (en) Methods and system for visually designing trading strategies and execution thereof
US20140122377A1 (en) System and method for applying a business rule management system to a customer relationship management system
CN104106066A (en) System to view and manipulate artifacts at temporal reference point
US12079748B2 (en) Co-operative resource pooling system
US20130067305A1 (en) Complex function generator
US8396869B2 (en) Method and system for analyzing capabilities of an entity
US11216761B2 (en) System and method for supply chain optimization
CN109118371B (en) Supervision method and device
US20230386663A1 (en) System and method for improving clinical effectiveness using a query reasoning engine
US20230101521A1 (en) Method and apparatus for creating quantitative trading strategy
US11226797B2 (en) Representation and analysis of workflows using abstract syntax trees
CN114091684A (en) Method and device for enhancing interpretability of service result
CN108733558A (en) Computing device influences output system, influences determination method
CN117111936A (en) Method, device, equipment and medium for creating quantitative transaction strategy
WO2022240856A1 (en) Customizable automated machine learning systems and methods
US20210109894A1 (en) Automated customized modeling of datasets with intuitive user interfaces
US20140149186A1 (en) Method and system of using artifacts to identify elements of a component business model
CN111949271A (en) Method for customizing transaction strategy, transaction system, equipment and storage medium
Satapathy et al. Automated software engineering: a deep learning-based approach
US20240289726A1 (en) Apparatus and a method for load tracking
US11907881B1 (en) Apparatus and methods for generating a process enhancement
CN107608690A (en) The method and device of configuration management
US12062093B2 (en) Method and apparatus for executing quantitative trading strategy
US12014427B1 (en) Apparatus and methods for customization and utilization of target profiles

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination