Foreign exchange trading system and method for dynamic management based on economic indicator events
By introducing a dynamic triggering mechanism based on economic indicator events, the foreign exchange trading system has achieved automated adjustment of spreads and access control, solving the problems of high transaction costs, low efficiency, and poor stability in the existing system, and improving transaction efficiency and system stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CFETS FINANCIAL DATA CO LTD
- Filing Date
- 2026-02-28
- Publication Date
- 2026-06-12
AI Technical Summary
Existing foreign exchange trading systems lack dynamic triggering mechanisms based on economic indicator events, making it impossible to automatically adjust spreads. This results in high transaction costs, low efficiency, and a lack of risk control and access management, affecting system stability.
A dynamic triggering mechanism based on economic indicator events is introduced. Real-time data is subscribed to through the gateway layer, calendar events and spread adjustments are managed by the service layer, and an interactive interface is provided by the client layer to realize automatic spread adjustment and permission management.
It improves the efficiency of foreign exchange trading operations, reduces manual intervention, enhances batch configuration efficiency, ensures price quotes and system stability, and enables flexible exception scheduling management and hierarchical access control.
Smart Images

Figure CN122199144A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of financial trading system technology, and in particular to a foreign exchange trading system and method that dynamically manages economic indicator events. Background Technology
[0002] Forex traders need to pay attention to the release of international economic indicators, as the release of key economic indicators (or major economic indicators) can impact the market and affect market volatility. Traders need to adjust various trading parameters, such as spreads, based on market fluctuations. In forex trading, the spread is the difference between the bid and ask prices, usually measured in pips. The spread directly affects trading costs and profits. In some cases, standard spread settings may not be suitable for all types of trading strategies. Therefore, trading systems usually have spread adjustment functions so that traders can manually adjust the spread or it can be automatically adjusted according to preset rules (for example, automatically adjusting the spread based on the characteristics of the trading session: during non-prime trading sessions, when there are fewer market participants, the spread can be set relatively larger; during prime trading sessions, when there are more market participants and sufficient liquidity, the spread can be set relatively smaller; or, different spreads can be set based on the type of currency pair, with major currency pairs typically having lower spreads than less common currency pairs).
[0003] However, existing forex trading systems lack dynamic triggering mechanisms based on economic indicator events. They cannot automatically adjust spreads according to the difference between surveyed and actual values of indicators, forcing traders to manually adjust spreads based on discrepancies between market expectations and actual market data. This lack of automated support related to economic indicator events further exacerbates the problem. Firstly, the insufficient correlation between economic indicator events and market maker spread adjustments prevents automatic spread adjustments based on the release times of important economic indicators such as NFP (Non-Farm Payrolls), CPI (Consumer Price Index), and FOMC (Federal Open Market Committee), impacting trading costs and efficiency. Moreover, existing trading systems typically require users to manually set separate spread adjustment rules for each currency pair, leading to inefficient configuration. Furthermore, the lack of risk control in spread adjustments can result in excessively large or small adjustments during continuous adjustments, increasing pricing risk and affecting system stability. Secondly, while existing trading systems provide calendar tools to allow users to access economic data releases promptly, these tools typically only support basic event categorization and deletion, limiting the flexibility of adjusting parameters for specific events and resulting in insufficient calendar management flexibility. On the other hand, the system does not differentiate between the permission levels of management rules and subscription rules, failing to achieve rule isolation between institutional-level applications and user-level alerts. For example, ordinary traders might accidentally manipulate institutional-level rules, potentially affecting the system's stability. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of existing technologies and provide a foreign exchange trading system and method based on dynamic management of economic indicator events. The foreign exchange trading system provided by this invention introduces a dynamic triggering mechanism based on economic indicator events. It can access external data sources (such as Bloomberg BBG) related to the release of economic indicator data and subscribe to real-time data. It dynamically binds the economic indicator release calendar with spread adjustments, thereby automatically adjusting spreads or sending spread adjustment reminders to users based on the release time of key economic indicators, thus automating spread adjustments. Compared with existing technologies, the dynamic triggering mechanism of this invention reduces manual intervention and improves the efficiency of foreign exchange trading operations. Furthermore, it optimizes the configuration method of currency pair spread rules, risk control of spread adjustments, management of calendar events, and configuration of user permission levels.
[0005] To achieve the above objectives, the present invention provides the following technical solution: A foreign exchange trading system that dynamically manages economic indicator events, the system comprising a gateway layer, a service layer, a data layer, and a client layer; The gateway layer, acting as a service gateway, connects to external data sources related to the release of economic indicator data to subscribe to real-time data and cache data mirrors. The real-time data includes real-time economic indicator data. After parsing and escaping the data through the gateway layer, relevant information of key economic indicators is obtained. The data mirrors of the key economic indicator names and values are saved and sent to the service layer. The service layer is used to manage calendar events, execute the rule engine, and manage spreads. Spread management includes spread configuration and adjustment in forex trading. The service layer includes a spread adjustment unit for dynamically adjusting spreads based on the release time of key economic indicators and predefined spread adjustment trigger rules. These trigger rules define conditions for spread adjustment, including variable information related to economic indicator events. The variable information includes the trigger time range and the spread adjustment formula, and supports user-defined configuration. The data layer is used to store data, transmit data, and handle subscription requests; the stored data includes calendar events, user permissions, and currency pair configurations. The client layer is user-oriented, providing interface interaction for spread management and displaying and operating the calendar dashboard.
[0006] Furthermore, the service layer includes a spread management module, which includes a spread configuration unit and the aforementioned spread adjustment unit; The spread configuration unit is used to configure spread values for different types of maturities, where the maturities represent the value date of the foreign exchange transaction, including the spread between the bid price (Bid) and the ask price (Ask); and to configure upper and lower limit thresholds for spread adjustment, wherein the range of spread aggregation is limited by setting system parameters, and when the cumulative adjusted spread value under different rules exceeds the upper or lower limit threshold set in the system parameters, the spread is adjusted according to the corresponding upper or lower limit threshold; and to configure spread rules for currency pairs. When performing dynamic spread adjustment, the spread adjustment unit is configured to: after obtaining the variable information configured by the user, construct a timed task according to a preset frequency; when executing each timed task, first check whether the current time is within the configured trigger time range; if it is within the trigger time range, perform spread calculation and adjustment according to the configured spread adjustment formula; otherwise, cancel the spread adjustment operation executed by the timed task and delete the timed task.
[0007] Furthermore, the spread configuration unit supports automatically associating related currency pairs through fuzzy search and batch configuring the spread rules for multiple related currency pairs; At this time, the spread configuration unit is configured to: obtain the input currency pair keyword, obtain all currency pair information related to the currency pair keyword based on the currency pair keyword, and then apply the currently set spread rules to these currency pairs in batches, thereby completing the batch configuration of the spread rules for these related currency pairs.
[0008] Furthermore, the service layer includes a calendar management module, a rules engine module, and a custom variable management module; the calendar management module is used to manage calendar events; the rules engine module is used to parse and check user-configured trigger rules and execute corresponding actions; the variable management module is used to manage system default variables and user-configured custom variables; The rule engine module includes a trigger time acquisition unit, a trigger rule parsing unit, and an action execution unit. The trigger time acquisition unit is used to obtain the trigger time range before and / or after the occurrence of the economic indicator publication day event configured by the user. The trigger rule parsing unit is used to check and analyze the trigger conditions according to the set checkpoints to determine whether to trigger the corresponding action. The checkpoints are preset to be when the system service restarts or when the interface has data updates. The cases where the interface has data updates are divided into daily updates and real-time data updates. The action execution unit is used to perform corresponding reminders and / or automatic spread adjustment operations when the triggering conditions of the triggering rule are met, and to record logs.
[0009] Furthermore, when the system service restarts, the trigger rule parsing unit is configured to: compare the calendar data and corresponding indicator data codes loaded in the database by the calendar management module with the calendar trigger time range configuration one by one to determine whether the current time is within the trigger time range; if it is within the trigger time range, enter the inspection process to continue checking the trigger rules and determine whether to trigger the corresponding action; if it is not within the trigger time range, create a new scheduled task and configure the inspection process to be triggered at the start time before and / or after the event occurs; wherein, the latest variable result value is used to determine whether to trigger the corresponding action; When the interface has a release date update, the trigger rule parsing unit is configured to: obtain interface data, determine whether there are changes between the data of the previous release date and the current release date, and if there are changes, update the cached data of the indicator data code, delete the calendar scheduled task of the relevant indicator data code, re-compare the calendar trigger time range configuration, determine whether the current time is within the trigger time range, and if it is within the trigger time range, enter the inspection process to continue to check the trigger rules and determine whether to trigger the corresponding action; if it is not within the trigger time range, create a new scheduled task and configure the trigger inspection process at the start time before and / or after the event occurs. When the interface publishes real-time data, the trigger rule parsing unit is configured to: obtain the interface data, update the cached data of the indicator data code according to the published real-time data, check the calendar of the relevant indicator data code, compare the trigger time range configuration of the calendar, determine whether the current time is within the trigger time range, if it is within the trigger time range, enter the checking process, continue to check the trigger rule, and determine whether to trigger the corresponding action; if it is not within the trigger time range, ignore this real-time data change. Specifically, when a check is triggered by a timed task but fails, it is determined whether the action triggered by the triggering rule is a spread adjustment. If it is, the spread that has been adjusted by the triggering condition is rolled back.
[0010] Furthermore, the rules engine module also includes a performance optimization unit, which is configured to: Get the current date; Based on the current date, obtain the triggering conditions of the most recent N events before the current date and the most recent M events after the current date, and only judge the triggering conditions of the aforementioned N and M events; where N and M are integers greater than or equal to 1.
[0011] Furthermore, the gateway layer is configured with a data interface and a message route; a data interface module is set up corresponding to the data interface for connecting with external data sources and processing data; a real-time data processing module is set up corresponding to the message route for mirroring and caching real-time data and pushing data to the calendar dashboard module with subscriptions, so that the rule engine module of the service layer can compare them one by one to determine whether to trigger the spread adjustment. The data integration module includes a calendar data subscription unit and a data format conversion unit; The calendar data subscription unit is used to subscribe to calendar data of economic indicator events through an API interface. It supports parsing multiple message types, including: parsing the basic information in the acquired indicator data code to obtain basic calendar information; parsing the schedule information in the indicator data code to obtain the calendar's release date schedule information; parsing the predicted value information in the indicator data code to obtain the calendar's predicted value update information; parsing the published value information in the indicator data code to obtain the calendar's published value update information; and parsing the historical data information in the indicator data code to obtain the calendar's published data. The data format conversion unit is used to convert the data format of the external data source into the data format required by the system internally, so as to ensure the consistency of the data format.
[0012] Further, the client layer includes a calendar dashboard module, which includes a user interface for presenting information and enabling user interaction with the system; the calendar dashboard module includes a calendar addition unit, a calendar display unit, a calendar operation unit, an event details display unit, and a variable editor unit; The calendar addition unit is used to add a calendar according to user operations; wherein, a macro event monitoring method and a specific event monitoring method are configured in the calendar application; under the macro event monitoring method, the release time point of the key indicator data of the external data source is used as the checkpoint, and the effective time period and multiple trigger conditions of the calendar are set around the checkpoint; under the specific event monitoring method, a fixed trigger time point set internally is used as the checkpoint, and the effective time period, repetition frequency, and multiple trigger conditions of the calendar are set around the checkpoint; and, a management mode and a subscription mode are configured in the calendar application, and the user permission rules are different in different modes; under the management mode, custom configuration of reminding users, trigger condition configuration, and trigger action configuration are supported, and the trigger action at this time includes only reminder or trigger spread adjustment operation; under the subscription mode, custom configuration of reminding users is not supported, but trigger condition configuration and trigger action configuration are supported, and the trigger action at this time includes only reminder; The calendar display unit is used to display schedule events daily, weekly, or monthly; wherein, an important event marking operation item is configured, and the corresponding item position is置顶 according to the important events marked by the user; The calendar operation unit is used to modify and delete calendar events according to user operations; wherein, after modifying a calendar event, prompt the user to select whether the modification of only this period of calendar event takes effect, or all schedule calendar events are updated to the latest calendar event; for the modification of only this period of calendar event to take effect, a preset special identifier is configured to indicate that this calendar event is an exception event, and at this time, the data layer stores the exception event independently; The event details display unit is used to display the data details information published by the event through the interface according to the user's selection operation on a single event in the schedule event displayed daily, weekly, or monthly; wherein, the data details information includes the previous release date, announced value, surveyed value, previous value, and latest release date. When the announced value, surveyed value, and previous value are empty, collect the user's modification operations on these data in the interface, regard the modification as a real-time data change, and trigger corresponding checks and actions; The variable editor unit is used to allow users to set custom variables, and the custom variables and the default variables in the system can be used to set trigger rules and spread adjustment functions; when setting variables, preset logical operation functions, numbers, and default variables are provided for users to select and combine to form calculation formulas; and, a formula trial calculation operation is provided, and the formulas that pass the trial calculation can be saved to the system; and, operations for modifying and deleting variables are provided.
[0013] Furthermore, a permission management module is set up for corresponding user permissions, which is used for the control and verification of user permissions; the permission management module includes a role and permission configuration unit, a dynamic permission switching unit, and a data isolation unit; The role and permission configuration unit is used to define calendar event management roles and subscription roles, which correspond to the add permission, modify permission and visibility permission in management mode and subscription mode, respectively. The dynamic permission switching unit is used for dynamic switching of user roles, switching between subscription mode permissions and management mode permissions; The data isolation unit is used to isolate the access permissions of users with different permissions.
[0014] This invention also provides a method for dynamically adjusting spreads in a foreign exchange trading system, the method comprising the following steps: Obtain the spread adjustment trigger rules configured by the user at the client layer; The gateway layer obtains subscribed real-time data from external data sources and caches the data image; wherein, the real-time data includes real-time economic indicator data, and the gateway layer parses and escapes the data to obtain relevant information of key economic indicators, saves the data image of the key economic indicator name and indicator value, and sends it to the service layer. The spread adjustment unit in the service layer dynamically adjusts the spread based on the release time of key economic indicators and the set spread adjustment trigger rules. The spread adjustment trigger rules set the trigger conditions for spread adjustment, which include variable information related to economic indicator events. The variable information includes the trigger time range for triggering spread adjustment and the spread adjustment formula, and supports user-defined configuration. The data layer records the spread adjustment logs and caches relevant information.
[0015] Furthermore, spread management is performed through the service layer, which includes spread configuration and spread adjustment in forex quote trading; When configuring spreads, the process includes: configuring spread values for different types of maturities, where the maturities represent the value date of the foreign exchange transaction, including the spread between the bid price (Bid) and the ask price (Ask); configuring upper and lower limits for spread adjustments, wherein the range of spread aggregation is limited by setting system parameters, and when the cumulative adjustment value of different rules exceeds the upper or lower limit set in the system parameters, the corresponding upper or lower limit is used for spread adjustment; and configuring spread rules for currency pairs. When performing dynamic spread adjustment, the process includes: after obtaining the variable information configured by the user, constructing a scheduled task according to a preset frequency; when executing each scheduled task, first checking whether the current time is within the configured trigger time range; if it is within the trigger time range, performing spread calculation and adjustment according to the configured spread adjustment formula; otherwise, canceling the spread adjustment operation executed by the scheduled task and deleting the scheduled task.
[0016] By adopting the above technical solution, this invention, for example, has the following advantages and positive effects compared with the prior art: On the one hand, the foreign exchange trading system provided by this invention introduces a dynamic triggering mechanism based on economic indicator events. It can access external data sources (such as Bloomberg BBG) related to the release of economic indicator data and subscribe to real-time data. It dynamically binds the economic indicator release calendar with spread adjustments, thereby automatically adjusting spreads or sending reminders to users about spread adjustments based on the release time of key economic indicators, thus automating spread adjustments. Compared with existing technologies, this invention can link the calendar dashboard with spread adjustments, automatically adjusting customized spreads according to the release time of economic indicators and set rules, reducing manual intervention and improving the efficiency of foreign exchange trading operations.
[0017] On the other hand, it improves the efficiency of batch configuration of currency pairs: it supports fuzzy search to automatically associate related currency pairs, realizes batch configuration, and improves operational efficiency.
[0018] On the other hand, risk control for spread adjustment is configured: by setting upper and lower limits for spread adjustment, it prevents the spread from becoming too large or too small due to continuous adjustment, thus ensuring the stability of the quote and the system.
[0019] On the other hand, it enhances the flexibility of exception schedule management: allowing users to set independent rules for specific events and mark them as exceptions, avoiding conflicts from global modifications.
[0020] On the other hand, improve the hierarchical permission control mechanism: distinguish the permission levels of management rules and subscription rules, realize the isolation of rules at the institutional level and user level, and ensure data security. Attached Figure Description
[0021] Figure 1 This is a hierarchical architecture diagram of a foreign exchange trading system that dynamically manages economic indicator events, as provided in an embodiment of the present invention.
[0022] Figure 2 This is an example diagram of the user interface of the variable editor provided in an embodiment of the present invention.
[0023] Figure 3 This is a flowchart illustrating the logic of adjusting the spread based on trigger rules, as provided in an embodiment of the present invention. Detailed Implementation
[0024] The following detailed description, in conjunction with the accompanying drawings and specific embodiments, provides a more comprehensive overview of the foreign exchange trading system and method for dynamic management based on economic indicator events disclosed in this invention. It should be noted that techniques (including methods and apparatus) known to those skilled in the art may not be discussed in detail, but where appropriate, such known techniques are considered part of the specification. Furthermore, other examples of exemplary embodiments may have different values. The structures, proportions, sizes, etc., depicted in the accompanying drawings are merely illustrative of the content disclosed in this specification for the understanding and reading of those skilled in the art, and are not intended to limit the conditions under which the invention can be implemented.
[0025] In the description of the embodiments of this application, " / " means "or", and "and / or" is used to describe the relationship between related objects, indicating that there can be three relationships. For example, "A and / or B" means: A and B exist alone, B exists alone, and A and B exist simultaneously. In the description of the embodiments of this application, "multiple" refers to two or more.
[0026] The technical concept and solution of the present invention will be described below based on exemplary application scenarios.
[0027] The relevant technical terms are explained as follows: 1) Market maker: A financial institution recognized by the exchange that provides bilateral continuous quotes or bilateral response quotes for financial instruments in financial markets such as foreign exchange.
[0028] 2) Spread: In forex trading, the spread is the difference between the bid and ask prices, usually expressed in pips (the smallest unit of price in the forex market, typically 0.0001, or 1 / 10000). The spread fluctuates with exchange rate changes. Market makers accept both bids and asks because there is a difference between the bid and ask prices at any given moment. The spread protects the market maker's pricing costs. For example, if the EUR / USD bid price is 1.1050 and the ask price is 1.1053, the spread is the difference between 1.1053 and 1.1050, which is 3 pips.
[0029] 3) Survey value: The market's expected value of economic indicators, which is usually derived from the average of the forecasts of multiple analysts or institutions.
[0030] 4) Actual value: The actual published value of economic indicators.
[0031] 5) Exception Calendar: Unlike global rules, it has specific calendar events with independent configuration.
[0032] 6) Widen: Widen the spread, i.e. increase the price difference between Bid and Ask.
[0033] 7) Narrow: Narrowing the spread, i.e. reducing the price difference between Bid and Ask. Example
[0034] First, in response to the lack of dynamic triggering mechanisms based on economic indicator events in existing foreign exchange trading systems, this invention provides a foreign exchange trading system that dynamically manages transactions based on economic indicator events.
[0035] See Figure 1 As shown, the system adopts a layered architecture design, which includes at least a gateway layer (XGW), a service layer (FXSVR), a data layer, and a client layer.
[0036] The gateway layer (XGW) acts as a service gateway, connecting to external data sources (such as Bloomberg BBG) related to the release of economic indicator data to subscribe to real-time data and cache data mirrors. The real-time data includes real-time economic indicator data. After parsing and escaping the data through the gateway layer, relevant information of key economic indicators is obtained. Data mirrors of the key economic indicator names and values are saved to the database and sent to the service layer, which updates the data based on the received information.
[0037] In this way, through the gateway layer, the system can request real-time data from external data sources on a daily schedule. This data can include economic indicators such as the release date, previous value, latest release value, and forecast value. The requested data will be stored in a data table with a preset format for database insertion. After the database insertion is completed, the gateway layer can notify the service layer (FXSVR) to update the data.
[0038] The service layer (FXSVR), as the core layer of the system, is mainly used to manage calendar events, execute the rule engine, and manage spreads. Spread management includes spread configuration and adjustment in forex trading, primarily for calculating and triggering spread adjustments.
[0039] In specific implementation, the service layer is provided with a spread management module, which may include a spread configuration unit and the aforementioned spread adjustment unit.
[0040] The spread configuration unit is used to configure spread values for different types of maturities, including the spread between the bid price (Bid) and the ask price (Ask). The specific maturities can be TODAY (same-day settlement), ON (Overnight swap), TN (Tom-Next swap), SN (Spot-Next swap), etc., where the maturity represents the value date of the foreign exchange transaction.
[0041] The spread configuration unit is also used to configure upper and lower thresholds for spread adjustment. Specifically, the range of spread aggregation can be limited by setting system parameters. When the accumulated spread adjustment value under different rules exceeds the upper or lower threshold set in the system parameters, the spread is adjusted according to the corresponding upper or lower threshold.
[0042] In practice, the range of spread accumulation can be limited by setting system parameters (such as Wide tolerance, Narrow tolerance, etc.) (since the adjusted spreads corresponding to different rules can be accumulated). When the accumulated adjusted spread value of different rules exceeds the upper or lower limit value set in the system parameters, the corresponding upper or lower limit value is directly used for spread adjustment. In this way, risk accumulation can be effectively prevented.
[0043] Alternatively, the percentage tolerance value for spread adjustment can be set through system parameters, replacing the aforementioned spread adjustment control based on absolute values.
[0044] Preferably, the spread management module may further include a spread adjustment recommendation unit, which is configured to: acquire historical data related to the spread, determine a reference range for spread adjustment based on the historical data, and then push the reference range to the client layer. The client layer can display the reference range (as a recommended value) in the spread configuration area of the interactive interface, thus facilitating users to configure spread adjustment rules.
[0045] The spread configuration unit is also used to configure spread rules for currency pairs. In this embodiment, the system provides batch configuration of spread rules. Specifically, the spread configuration unit is configured to: obtain the input currency pair keyword; obtain all currency pair information related to the currency pair keyword based on the currency pair keyword; and then apply the currently set spread rules to these currency pairs in batches, thereby completing the batch configuration of spread rules for these related currency pairs.
[0046] As an example, and not a limitation, if a user enters the keyword "USD," they can obtain information on all currency pairs related to "USD," such as USD / CNY and USD / JPY. Then, USD / CNY and USD / JPY can be automatically selected, and the current spread rule configuration can be copied to all selected pairs. In this way, users can automatically configure spread rules for related currency pairs in batches through fuzzy search, improving the efficiency of spread rule configuration.
[0047] It should be noted that the above batch configuration methods are preferred rather than restrictive. For example, obtaining information on all currency pairs related to "USD" can be done using keyword matching or regular expression matching; there are no restrictions here. Another example is category-based batch configuration, where users can select categories based on currency types (such as major currency types or cross-currency types) to configure related currency pairs in batches. Yet another example is batch configuration based on intelligent semantic recognition. In this case, the system can translate user input into corresponding calendar configuration items, automatically configure calendar reminders and spreads, and display a preview dialog for confirmation.
[0048] The spread adjustment unit is used to dynamically adjust the spread based on the release time of key economic indicators and the set spread adjustment trigger rules, thereby realizing dynamic spread adjustment based on economic indicator events.
[0049] In this embodiment, the spread adjustment triggering rule is configured with a triggering condition for spread adjustment (i.e., the condition for triggering spread adjustment). The triggering condition includes variable information related to economic indicator events. The variable information includes the triggering time range for spread adjustment and the spread adjustment formula. The variables can be customized by the user.
[0050] As an example rather than a limitation, the spread adjustment formula can be "(10+10 / (current system date - next announcement date of the indicator))", which allows the spread to be adjusted linearly by the number of days, realizing dynamic spread adjustment based on economic indicator events.
[0051] Specifically, when dynamically adjusting the spread, after obtaining the user-configured variable information (which can consist of configured formulas), a scheduled task is constructed at a preset frequency. When executing each scheduled task, it first checks if the current time is within the configured trigger time range. If it is, the spread is calculated and adjusted according to the configured spread adjustment formula; otherwise, the spread adjustment operation executed by that scheduled task is canceled, restoring the spread to its state before the scheduled task was executed, and the scheduled task is deleted. In this way, the system can automatically adjust the spread based on the trigger conditions of economic indicator events, and cancel previous spread adjustment actions when the trigger conditions are not met.
[0052] The data layer is used for storing data, transmitting data, and handling subscription requests. The stored data includes calendar events, user permissions, and currency pair configurations. Furthermore, the data layer can also independently store exceptional events.
[0053] The client layer is user-oriented, providing interface interaction for spread management, as well as the display and operation of the calendar dashboard (such as favorites, double-click modification, and batch configuration).
[0054] In this embodiment, see Figure 1 As shown, the service layer also includes a calendar management module, a rules engine module, and a custom variable management module.
[0055] The calendar management module is used to manage calendar events.
[0056] The rule engine module is the core of the service layer and the core of the system. It is used to parse and check the trigger rules configured by the user and execute the corresponding actions (i.e., trigger actions), that is, to execute the rule engine.
[0057] The variable management module is used to manage the system's default variables and user-configured custom variables.
[0058] In practice, the rule engine module includes a trigger time acquisition unit, a trigger rule parsing unit, and an action execution unit.
[0059] The trigger time acquisition unit is used to obtain the trigger time range before and / or after the occurrence of the economic indicator publication day event configured by the user.
[0060] When setting the trigger time range, users can set it within a preset time range before or after the event on the indicator's publication date. For example, the trigger time range can be set to "[5, 0] before the event", which means 5 days before the publication date as the checkpoint to the publication date itself.
[0061] The trigger rule parsing unit is used to check and analyze the trigger conditions according to the set checkpoints (mainly to check and analyze the variables in the trigger conditions) in order to determine whether to trigger the corresponding action.
[0062] In this embodiment, the checkpoint is preset to two situations: when the system service restarts or when the interface has data updates. The situation where the interface has data updates is further divided into situations where the interface has daily updates and situations where the interface has real-time data updates.
[0063] Specifically, when the system service restarts, the trigger rule parsing unit is configured to: compare the calendar data and corresponding indicator data codes loaded in the database by the calendar management module with the trigger time range configuration of each calendar item to determine whether the current time is within the trigger time range; if it is within the trigger time range, the check process can be entered to continue checking the trigger rules and determine whether the corresponding action can be triggered; if it is not within the trigger time range, a new scheduled task needs to be created to configure the triggering of the check process at the start time before and / or after the event occurs.
[0064] Specifically, the latest value of a preset variable can be used to determine whether the check is within the effective range, and thus whether to trigger the corresponding action. For example, in the triggering rule, a variable 'a' related to the actual and surveyed values of an indicator is configured, where 'a' = (actual value - surveyed value) / surveyed value, and a point difference adjustment action is triggered when 'a' > 5%. Then, by checking the triggering rule, the latest value of variable 'a' is calculated to determine whether the corresponding action can be triggered. In this way, by configuring triggering rules, automatic point difference adjustment is achieved based on the difference between the surveyed and actual values of the indicator.
[0065] When the interface has a release date update, the trigger rule parsing unit is configured to: obtain interface data, determine if there are any changes between the data of the previous release date and the current release date; if there are changes, update the cached data of the indicator data code, delete the calendar scheduled task of the relevant indicator data code, re-compare the calendar trigger time range configuration, and determine if the current time is within the trigger time range; if it is within the trigger time range, enter the check process to continue checking the trigger rules and determine whether to trigger the corresponding action; if it is not within the trigger time range, create a new scheduled task and configure the trigger check process at the start time before and / or after the event. The method for checking the trigger rules to determine whether to trigger the corresponding action is the same as the system service restart scheme.
[0066] When the interface publishes real-time data, the trigger rule parsing unit is configured to: acquire the interface data; update the cached data of the indicator data code based on the published real-time data; check the calendar of the relevant indicator data code; compare the calendar's trigger time range configuration; determine whether the current time is within the trigger time range; if it is, proceed to the checking process to continue checking the trigger rules and determine whether to trigger the corresponding action; if it is not within the trigger time range, ignore the real-time data change. The method for checking the trigger rules to determine whether to trigger the corresponding action is the same as the system service restart scheme.
[0067] In this embodiment, further, when a scheduled task triggers a check but the check fails—for example, if the result value of the variable configured in the triggering rule is not within the specified effective range—if the execution action configured by the rule is a spread adjustment, then it is necessary to roll back (or pull back) the spread that has been adjusted under the triggering condition and restore it to the state before the adjustment. In other words, the spread adjustment is revoked when the check fails.
[0068] The action execution unit is used to perform corresponding reminders and / or automatic spread adjustment operations when the triggering conditions of the triggering rule are met, and to record logs.
[0069] In this embodiment, the rule engine module may further include a performance optimization unit, which is configured to: obtain the current date; obtain the triggering conditions of the most recent N events before the current date and the most recent M events after the current date, and only determine the triggering conditions of the aforementioned N events and M events; wherein, N and M are integers greater than or equal to 1.
[0070] As an example rather than a limitation, N and M can both be set to 1, which means that the rule only considers the most recent event before the current day and the most recent event after the current day. This can avoid the performance problems caused by traversing all events and improve processing efficiency.
[0071] In this embodiment, the gateway layer may be configured with data interfaces and message routing.
[0072] The data interface is used to connect to the interface of an external data source, obtain real-time data from the external source, and then parse and escape the data.
[0073] The message routing is used to obtain relevant information of key economic indicators based on the parsing and escaping results of the data interface, save the data image of the indicator name and indicator value of each key economic indicator, and send it to the service layer.
[0074] The data interface includes a data connection module for connecting to and processing data from external data sources (such as Bloomberg BBG).
[0075] The message routing is equipped with a real-time data processing module, which is used for mirroring and caching real-time data and pushing data to the calendar dashboard modules that have subscribed. The service layer's rule engine module compares each data item to determine whether a spread adjustment is triggered.
[0076] The data integration module may specifically include a calendar data subscription unit and a data format conversion unit.
[0077] The calendar data subscription unit is used to subscribe to calendar data of economic indicator events through an API interface. It supports parsing multiple message types, including: parsing the basic information in the acquired indicator data code to obtain basic calendar information; parsing the schedule information in the indicator data code to obtain the calendar's release date schedule information; parsing the predicted value information in the indicator data code to obtain the calendar's predicted value update information; parsing the published value information in the indicator data code to obtain the calendar's published value update information; and parsing the historical data information in the indicator data code to obtain the calendar's published data.
[0078] Specifically, the following fields in the indicator data code can be parsed to obtain basic calendar information, including: Storage fields—API message fields: Data code—Ticker, Country—Country, Source—Source, Description—Description, Frequency—Frequency—Currency—Units—Units—ScalingFactor—ScalingFactor, Event ID—EcoEventID—EcoEventID—ReleaseTime—Next release date—ReleaseTime—Previous value—Prior—Forecast value—AverageOfAllEstimates.
[0079] The following is a sample message: GetTickersResponse = { Ticker[] = { Ticker = { Ticker = "260YYC" FIGI = "BBG002SBTF05" Country = "US" Description = "US CNCPIYOY1 SA" Frequency = "Weekly" Relevance = 99.2537 Source = "Bureau of Labor Statistics" NextRelease = { ReleaseTime = { Datetime = 2025-03-16T12:30:00.000+08:00 } Prior = "262.0" Period = "Jun" QuantityOfType = "Thousands" EcoEventID = 25030651 } SurveyInfo = { NumberOfObservations = 3 LowOfAllEstimates = 190.0 AverageOfAllEstimates = 45 HighOfAllEstimates = 210.0 MedianOfAllEstimates = 200.0 StandardDeviationOfAllEstimates = 8.16496580927726 } Units = "Value" ScalingFactor = "Thousand" } } } The following fields in the indicator data code can be parsed to obtain the calendar release date schedule information, including: Database fields - API message fields: Data code - Ticker, Release date - ReleaseTime, Event ID - EcoEventID.
[0080] The following is a sample message: GetCalendarResponse = { TickerCalendar[] = { TickerCalendar = { Ticker = { Ticker = "260YYC" FIGI = "BBG002SBTF07" Country = "CNY" Description = "CNY CNCPIYOY SA" Frequency = "Monthly" Source = "Bureau of Labor Statistics" Currency = "Value" Units = "Thousand" } Release[] = { Release = { ReleaseTime = { Datetime = 2025-03-06T12:30:00.000+08:00 } Period = "Jun" EcoEventID = 25030650 } Release = { ReleaseTime = { Datetime = 2025-03-16T12:30:00.000+08:00 } Period = "Jul" EcoEventID = 25030651 } } } } } The following fields in the indicator data code can be parsed to obtain calendar forecast update information, including: Storage fields—API message fields: Data code—Ticker, Event ID—EcoEventID, Predicted value—AverageOfAllEstimates.
[0081] The following is a sample message: survey = { Ticker = "YYC5" FIGI = "BBG002SGTBC0" Release = { Datetime = 2024-10-18T17:30:00.000+08:00 } NumberOfObservations = 34 LowOfAllEstimates = 10.25 AverageOfAllEstimates = 15.485294 HighOfAllEstimates = 10.5 MedianOfAllEstimates = 10.5 ObservationPeriod = "Jun 19" EcoEventID = 24090651 } The following fields in the indicator data code can be parsed to obtain the calendar's published value update information, including: storage fields - API message fields: data code - Ticker, published value - Revised, Actual.
[0082] The following is a sample message: releases = { Release[] = { Release = { Ticker = "260YYC" FIGI = "BBG002T0DCF7" Actual = "4.5913" Revised = "2.59323" } } } The following fields in the indicator data code can be parsed to obtain the published data from the calendar, including: Database fields—API message fields: Data code—Ticker, Publication value—Revised, Actual, Event ID—EcoEventID.
[0083] The following is a sample message: releaserecord = { Ticker = "260YYC" FIGI = "BBG002T38DP3" ObservationPeriod = "2Q" ReleaseTime = { Datetime = 2025-03-07T17:40:00.000+08:00 } Actual = { NewValue = "-6.1" } Revised = { NewValue = "262.0" } EcoEventID = 25030650 } The data format conversion unit is used to convert the data format of the external data source into the data format required by the system internally, so as to ensure the consistency of the data format.
[0084] In this embodiment, the client layer includes a calendar dashboard module, which includes a user interface to display information and allow users to interact with the system.
[0085] In practice, the calendar dashboard module may include a calendar addition unit, a calendar display unit, a calendar operation unit, an event details display unit, and a variable editor unit.
[0086] The calendar addition unit is used to add calendar events to the calendar display interface according to the user's operation. This is an example and not a limitation. For example, the user adds a calendar event by clicking the "+" symbol output on the user's graphical interface, or the user imports a new calendar event through the schedule import interface on the interface.
[0087] In this embodiment, it supports setting calendars of "macro-event monitoring" and "specific event monitoring" types. In this case, macro-event monitoring and specific event monitoring methods can be configured in the calendar application. Under the macro-event monitoring method, the release time of key indicator data from an external data source is used as a checkpoint, and the effective time period of the calendar and multiple trigger conditions are set around the checkpoint. Under the specific event monitoring method, an internally set fixed trigger time point is used as a checkpoint, and the effective time period of the calendar, repetition frequency, and multiple trigger conditions are set around the checkpoint.
[0088] Additionally, the calendar application can be configured with management mode and subscription mode, with different user permission rules in different modes (i.e., calendar rules can include management rules and subscription rules).
[0089] Specifically, under this management mode, management rules are used, supporting customized configuration of user reminders, trigger conditions, and trigger actions. Trigger conditions include information such as trigger time and variable check conditions; the trigger time can be before and / or after the release of indicator data. The trigger action can include either simply reminding users or triggering a spread adjustment operation.
[0090] In the subscription mode, subscription rules are used. This mode does not support custom configuration of user reminders, but it does support configuration of trigger conditions and trigger actions. Trigger conditions include information such as trigger time and variable check conditions. The trigger time can be before and / or after the metric data is published. The trigger action in this mode is simply to remind the user.
[0091] The calendar display unit is used to display scheduled events by day, week, or month through a visual interface. It also supports marking important events with a checkbox; clicking the checkbox will pin the event to the top of the list. In practice, the calendar application can be configured with important event marking options (such as "favorite"), and the corresponding events will be pinned to the top based on the user's favorited / marked important events.
[0092] Preferably, when displaying data metrics in the calendar, information for each data metric can be displayed in the same row, with information for different data metrics displayed on separate lines. Furthermore, the visualization interface can also display calendar rules, point differences, and reminder messages.
[0093] The calendar operation unit is used to modify and delete calendar events based on user actions. After modifying a calendar event, the user is prompted to choose whether the modification applies only to events in the current period or updates all calendar events to the latest version. For modifications only affecting events in the current period, a preset special identifier (such as the FIS identifier) is configured to indicate that the calendar event is an exception. In this case, the data layer stores the exception event independently. The special identifier FIS cannot be modified or deleted.
[0094] The event details display unit is used to display data details of a single event from the daily, weekly, or monthly schedule events, based on the user's selection. These data details may include information such as the previous publication date, published value, survey value, previous value, and latest publication date. The interface style is consistent with the pop-up window displayed by the "+" button.
[0095] Preferably, when the published value, survey value, and previous value are empty, user modifications to these data on the interface can be collected, and these modifications are treated as real-time data changes, triggering corresponding checks and actions. That is, emergency manual modification is supported when the published value, survey value, and previous value are empty; when a user manually modifies the data, the backend treats it as a real-time data change and can trigger corresponding checks and actions. Other content on the interface cannot be modified.
[0096] The variable editor unit is used for users to set custom variables. These custom variables and the system's default variables can be used to set trigger rules and spread adjustment functions. When setting variables, preset logical operation functions (such as +-* / log(), minute(), hour(), day(), etc.), numbers, and default variables are provided for users to select and combine to form calculation formulas.
[0097] See Figure 2 As shown, the example demonstrates the specific operation interface of the variable editor, which includes two categories in the variable list: default variables and custom variables.
[0098] The default variables include, but are not limited to: Beijing time "current date", "previous value", "latest published value", "previous publication date", "latest publication date", "survey value", and "published value" from calendar indicator data. These default and custom variables can be applied to trigger rules and spread adjustment functions.
[0099] Meanwhile, the variable editor supports formula trial calculation; only formulas that pass the trial calculation will be saved into the system.
[0100] The variable editor also provides modification and deletion operations for variables. However, modification / deletion is only possible for variables that are not currently referenced. Variables that are already in use cannot be modified / deleted.
[0101] In this embodiment, a permission management module is also provided for corresponding user permissions, which is used for the control and verification of user permissions.
[0102] The permission management module may specifically include a role and permission configuration unit, a dynamic permission switching unit, and a data isolation unit.
[0103] The role and permission configuration unit is used to define calendar event management roles and subscription roles, which correspond to the add permission, modify permission and visibility permission in management mode and subscription mode, respectively.
[0104] The dynamic permission switching unit is used for dynamically switching user roles, switching between subscription mode permissions and management mode permissions. For example, it can switch a user's permissions from subscription-only to management-only.
[0105] The data isolation unit is used to isolate the access permissions of users with different privileges. This ensures that users with different privileges can only access and modify the data they are authorized to access.
[0106] In another embodiment of this example, the client layer can also provide users with a predefined trigger condition library or a trigger condition library from an external data model. The trigger condition library contains trigger conditions that users can refer to and select. Users can select the trigger condition that matches the current transaction and configure the parameters, thereby facilitating users to efficiently set trigger rules.
[0107] As an example, and not a limitation, taking spread adjustment based on NFP (Non-Farm Payrolls) indicator events as an example, this invention allows traders to create NFP calendar events in their calendar dashboards and set the trigger time to "[5,0] before the event" (i.e., 5 days prior to the event) and the reminder content to "Announcement Information". The system can automatically generate multiple calendar events based on the NFP announcement date. Five days before the NFP, after the server restarts, it checks whether the trigger conditions for spread adjustment are met based on the latest data from the BBG real-time interface. If so, a pop-up reminder appears in the lower right corner of the user's client. After the actual NFP value is published, the system checks again whether the trigger conditions are met. If so, a reminder pops up again, adding the published actual value to the content. If a trader needs to set different spread rules for a specific NFP event, they can double-click the event, select "This Schedule Only" to apply the rules, set independent rules, and mark it as an exception.
[0108] When traders need to configure spreads for USD-related currency pairs in bulk, they can click the "Bulk Set Currency Pairs" input box in the spread management interface on the client side, enter the keyword "USD," and press Enter. The system will then automatically associate USD-related currency pairs through a fuzzy search, such as USD / CNY, USD / JPY, USD / GBP, etc. Traders select the currency pairs to which they want to apply the spread rules, click the "Copy" button to apply the spread rule settings for the selected currency pairs to the bulk currency pairs. Clicking the "OK" button applies the spread settings to the selected currency pairs in bulk. If a spread has already been set for one of the currency pairs, the new changes will overwrite the original settings.
[0109] The solution provided by this invention, through the linkage between the calendar dashboard and spread adjustment, automatically adjusts customized spreads based on the release time of economic indicators and set rules, achieving dynamic binding between economic indicator events and spread adjustments, reducing manual intervention. Simultaneously, it supports fuzzy search to automatically associate relevant currency pairs, enabling batch configuration of currency pairs and improving operational efficiency. Furthermore, by setting upper and lower limits for spread adjustment, it prevents excessively large or small spreads caused by continuous adjustments, increasing risk control for spread adjustment and ensuring system stability.
[0110] On the other hand, it allows users to set independent rules for specific events and mark them as exceptions. Users can personalize the configuration of specific events as needed, avoid conflicts from global modifications, and enhance the flexibility of exception schedule management.
[0111] On the other hand, by differentiating the permission levels of management rules and subscription rules, the system achieves rule isolation between the organization level and the user level, improves the hierarchical permission control mechanism, and enhances the system's data security. Furthermore, it supports dynamic switching of user roles, allowing organizations to assign different permissions based on roles.
[0112] Compared with existing technologies, the dynamic triggering mechanism of this invention can automatically adjust the spread based on economic indicator data, helping traders to reasonably adjust the spread before and after the release of economic indicators, reducing manual intervention, improving the automation and dynamism of the system, reducing transaction costs, and improving transaction efficiency.
[0113] It should be noted that the modular design and scalable architecture of this invention support future business expansion, such as accessing new external indicator data sources and configuring new spread adjustment rules.
[0114] Another embodiment of the present invention provides a method for dynamically adjusting the spread of a foreign exchange trading system, the method comprising the following steps.
[0115] S100: Obtain the spread adjustment trigger rules configured by the user through the client layer.
[0116] S200: Obtain subscribed real-time data from external data sources through the gateway layer and cache the data image; wherein, the real-time data includes real-time economic indicator data, and after parsing and escaping the data through the gateway layer, obtain relevant information of key economic indicators, save the data image of the indicator name and indicator value of the key economic indicators and send it to the service layer.
[0117] S300, the spread adjustment unit in the service layer dynamically adjusts the spread based on the release time of key economic indicators and the set spread adjustment trigger rules; the spread adjustment trigger rules set the trigger conditions for spread adjustment, and the trigger conditions include variable information related to economic indicator events. The variable information includes the trigger time range for triggering spread adjustment and the spread adjustment formula, which supports user-defined configuration. S400, the data layer records the spread adjustment log and caches relevant information.
[0118] In this embodiment, spread management is performed through the service layer, which includes spread configuration and spread adjustment in foreign exchange quotation transactions.
[0119] When configuring spreads, the process includes: configuring spread values for different types of maturities, where the maturities represent the value date of the foreign exchange transaction, including the spread between the bid price (Bid) and the ask price (Ask); configuring upper and lower limits for spread adjustments, wherein the range of spread aggregation is limited by setting system parameters, and when the cumulative adjustment value of different rules exceeds the upper or lower limit set in the system parameters, the corresponding upper or lower limit is used for spread adjustment; and configuring spread rules for currency pairs. When performing dynamic spread adjustment, the process includes: after obtaining the variable information configured by the user, constructing a scheduled task according to a preset frequency; when executing each scheduled task, first checking whether the current time is within the configured trigger time range; if it is within the trigger time range, performing spread calculation and adjustment according to the configured spread adjustment formula; otherwise, canceling the spread adjustment operation executed by the scheduled task and deleting the scheduled task.
[0120] In this embodiment, the service layer may specifically include a calendar management module, a rules engine module, and a custom variable management module. The calendar management module manages calendar events. The rules engine module parses and checks user-configured trigger rules and executes corresponding actions. The variable management module manages system default variables and user-configured custom variables.
[0121] See Figure 3 As shown, the typical steps for adjusting the spread according to the triggering rules are as follows: The triggering rule information configured by the user through the client layer is obtained; the service layer initiates a subscription to indicator code data, and the gateway layer obtains the subscribed economic indicator data from an external data source; the rule engine module in the service layer determines the triggering conditions in the triggering rules; the data layer caches calendar data; the rule engine module executes corresponding actions based on the judgment structure, including automatically adjusting the spread or sending a spread adjustment reminder to the user; the data layer records the spread adjustment log and caches relevant information.
[0122] Other technical features are described in the preceding embodiments and will not be repeated here.
[0123] In the above description, the disclosure of this invention is not intended to limit itself to these aspects. Rather, within the scope of the objectives of this disclosure, components can be selectively and operationally combined in any number. Furthermore, terms such as “comprising,” “encompassing,” and “having” should be interpreted by default as inclusive or open-ended, rather than exclusive or closed, unless explicitly defined as such. All technical, scientific, or other terms are to be understood by those skilled in the art, unless defined as such. Public terms found in dictionaries should not be interpreted in the context of the relevant technical documents in an overly idealistic or impractical manner, unless explicitly defined as such in this disclosure. Any modifications or alterations made by those skilled in the art based on the foregoing disclosure are within the scope of the claims.
Claims
1. A foreign exchange trading system that dynamically manages economic indicator events, characterized in that, It includes the gateway layer, service layer, data layer, and client layer; The gateway layer, acting as a service gateway, connects to external data sources related to the release of economic indicator data to subscribe to real-time data and cache data mirrors. The real-time data includes real-time economic indicator data. After parsing and escaping the data through the gateway layer, relevant information of key economic indicators is obtained. The data mirrors of the key economic indicator names and values are saved and sent to the service layer. The service layer is used to manage calendar events, execute the rule engine, and manage spreads. Spread management includes spread configuration and adjustment in forex trading. The service layer includes a spread adjustment unit for dynamically adjusting spreads based on the release time of key economic indicators and predefined spread adjustment trigger rules. These trigger rules define conditions for spread adjustment, including variable information related to economic indicator events. The variable information includes the trigger time range and the spread adjustment formula, and supports user-defined configuration. The data layer is used to store data, transmit data, and handle subscription requests; the stored data includes calendar events, user permissions, and currency pair configurations. The client layer is user-oriented, providing interface interaction for spread management and displaying and operating the calendar dashboard.
2. The system according to claim 1, characterized in that, The service layer includes a spread management module, which includes a spread configuration unit and the aforementioned spread adjustment unit. The spread configuration unit is used to configure spread values for different types of terms, where the term represents the value date of the foreign exchange transaction and includes the spread between the bid price (Bid) and the ask price (Ask). In addition, the upper and lower thresholds for spread adjustment are configured, wherein the range of spread accumulation is limited by setting system parameters. When the cumulative adjusted spread value of different rules exceeds the upper or lower threshold set in the system parameters, the spread is adjusted according to the corresponding upper or lower threshold. In addition, the spread rules for currency pairs are configured. When performing dynamic spread adjustment, the spread adjustment unit is configured to: after obtaining the variable information configured by the user, construct a timed task according to a preset frequency; when executing each timed task, first check whether the current time is within the configured trigger time range; if it is within the trigger time range, perform spread calculation and adjustment according to the configured spread adjustment formula; otherwise, cancel the spread adjustment operation executed by the timed task and delete the timed task.
3. The system according to claim 2, characterized in that, The spread configuration unit supports automatically associating related currency pairs through fuzzy search and batch configuring spread rules for multiple related currency pairs. At this time, the spread configuration unit is configured to: obtain the input currency pair keyword, obtain all currency pair information related to the currency pair keyword based on the currency pair keyword, and then apply the currently set spread rules to these currency pairs in batches, thereby completing the batch configuration of the spread rules for these related currency pairs.
4. The system according to claim 1, characterized in that, The service layer includes a calendar management module, a rules engine module, and a custom variable management module; the calendar management module is used to manage calendar events; the rules engine module is used to parse and check user-configured trigger rules and execute corresponding actions; the variable management module is used to manage system default variables and user-configured custom variables; The rule engine module includes a trigger time acquisition unit, a trigger rule parsing unit, and an action execution unit. The trigger time acquisition unit is used to obtain the trigger time range before and / or after the occurrence of the economic indicator publication day event configured by the user. The trigger rule parsing unit is used to check and analyze the trigger conditions according to the set checkpoints to determine whether to trigger the corresponding action. The checkpoints are preset to be when the system service restarts or when the interface has data updates. The cases where the interface has data updates are divided into daily updates and real-time data updates. The action execution unit is used to perform corresponding reminders and / or automatic spread adjustment operations when the triggering conditions of the triggering rule are met, and to record logs.
5. The system according to claim 4, characterized in that, When the system service restarts, the trigger rule parsing unit is configured to: compare the calendar trigger time range configuration one by one with the calendar data and corresponding indicator data code loaded in the database by the calendar management module, and determine whether the current time is within the trigger time range; If it falls within the trigger time range, proceed with the inspection process to continue checking the trigger rules and determine whether the corresponding action has been triggered. If the event is outside the trigger time range, create a new timed task and configure it to trigger the check process at the start time before and / or after the event occurs; wherein, the latest variable result value is used to determine whether to trigger the corresponding action; When the interface has a release date update, the trigger rule parsing unit is configured to: obtain interface data, determine whether there are changes between the data of the previous release date and the current release date, and if there are changes, update the cached data of the indicator data code, delete the calendar scheduled task of the relevant indicator data code, re-compare the calendar trigger time range configuration, determine whether the current time is within the trigger time range, and if it is within the trigger time range, enter the inspection process to continue to check the trigger rules and determine whether to trigger the corresponding action; if it is not within the trigger time range, create a new scheduled task and configure the trigger inspection process at the start time before and / or after the event occurs. When the interface publishes real-time data, the trigger rule parsing unit is configured to: obtain the interface data, update the cached data of the indicator data code according to the published real-time data, check the calendar of the relevant indicator data code, compare the trigger time range configuration of the calendar, determine whether the current time is within the trigger time range, if it is within the trigger time range, enter the checking process, continue to check the trigger rule, and determine whether to trigger the corresponding action; if it is not within the trigger time range, ignore this real-time data change. Specifically, when a check is triggered by a timed task but fails, it is determined whether the action triggered by the triggering rule is a spread adjustment. If it is, the spread that has been adjusted by the triggering condition is rolled back.
6. The system according to claim 4, characterized in that, The rules engine module also includes a performance optimization unit, which is configured as follows: Get the current date; Based on the current date, obtain the triggering conditions of the most recent N events before the current date and the most recent M events after the current date, and only judge the triggering conditions of the aforementioned N and M events; where N and M are integers greater than or equal to 1.
7. The system according to any one of claims 4-6, characterized in that, The gateway layer is configured with a data interface and a message route; a data interface module is set up corresponding to the data interface for connecting with external data sources and processing data; a real-time data processing module is set up corresponding to the message route for mirroring and caching real-time data and pushing data to the calendar dashboard module with subscriptions, so that the rule engine module of the service layer can compare them one by one to determine whether to trigger the spread adjustment. The data integration module includes a calendar data subscription unit and a data format conversion unit; The calendar data subscription unit is used to subscribe to calendar data of economic indicator events through an API interface. It supports parsing multiple message types, including: parsing the basic information in the acquired indicator data code to obtain basic calendar information; parsing the schedule information in the indicator data code to obtain the calendar's release date schedule information; parsing the predicted value information in the indicator data code to obtain the calendar's predicted value update information; parsing the published value information in the indicator data code to obtain the calendar's published value update information; and parsing the historical data information in the indicator data code to obtain the calendar's published data. The data format conversion unit is used to convert the data format of the external data source into the data format required by the system internally, so as to ensure the consistency of the data format.
8. The system according to claim 4, characterized in that, The client layer includes a calendar dashboard module, which includes a user interface to display information and allow users to interact with the system; the calendar dashboard module includes a calendar addition unit, a calendar display unit, a calendar operation unit, an event details display unit, and a variable editor unit; The calendar addition unit is used to add calendar entries based on user actions. The calendar application is configured with both macro-event monitoring and specific event monitoring modes. In the macro-event monitoring mode, the release time of key indicator data from external data sources is used as a checkpoint, and the effective time period and multiple trigger conditions for the calendar are set around this checkpoint. In the specific event monitoring mode, a fixed internally set trigger time is used as a checkpoint, and the effective time period, repetition frequency, and multiple trigger conditions for the calendar are set around this checkpoint. Furthermore, the calendar application is configured with management mode and subscription mode, with different user permission rules in each mode. In management mode, custom configuration of user reminders, trigger condition configuration, and trigger action configuration is supported. Trigger actions include only reminders or triggering a point difference adjustment operation. In subscription mode, custom configuration of user reminders is not supported, but trigger condition configuration and trigger action configuration are supported. Trigger actions include only reminders. The calendar display unit is used to display scheduled events by day, week, or month; it includes an important event marking operation item, which pins the corresponding event to the top based on the important event marked by the user. The calendar operation unit is used to modify and delete calendar events according to the user's operation. After modifying a calendar event, the user is prompted to choose whether the modification only applies to the current calendar event or updates all calendar events to the latest calendar event. For modifications only apply to the current calendar event, a preset special identifier is configured to indicate that the calendar event is an exception event. In this case, the data layer stores the exception event independently. The event details display unit is used to display the data details of a single event in the daily, weekly, or monthly schedule events through the interface, based on the user's selection operation. The data details include the previous release date, the published value, the survey value, the previous value, and the latest release date. When the published value, the survey value, and the previous value are empty, the unit collects the user's modification operations on these data in the interface, treats the modifications as real-time data changes, and triggers corresponding checks and actions. The variable editor unit is used for users to set custom variables. These custom variables and the default variables in the system can be used to set trigger rules and spread adjustment functions. When setting variables, preset logical operation functions, numbers, and default variables are provided for users to select and combine to form calculation formulas. Formula trial calculation is provided, and formulas that pass the trial calculation can be saved to the system. Modification and deletion operations for variables are also provided.
9. The system according to claim 8, characterized in that, A permission management module is set up to correspond to user permissions, which is used to control and verify user permissions; the permission management module includes a role and permission configuration unit, a dynamic permission switching unit, and a data isolation unit. The role and permission configuration unit is used to define calendar event management roles and subscription roles, which correspond to the add permission, modify permission and visibility permission in management mode and subscription mode, respectively. The dynamic permission switching unit is used for dynamic switching of user roles, switching between subscription mode permissions and management mode permissions; The data isolation unit is used to isolate the access permissions of users with different permissions.
10. A method for dynamically adjusting spreads in a foreign exchange trading system, characterized in that... Including the following steps: Obtain the spread adjustment trigger rules configured by the user at the client layer; The gateway layer obtains subscribed real-time data from external data sources and caches the data image; wherein, the real-time data includes real-time economic indicator data, and the gateway layer parses and escapes the data to obtain relevant information of key economic indicators, saves the data image of the key economic indicator name and indicator value, and sends it to the service layer. The spread adjustment unit in the service layer dynamically adjusts the spread based on the release time of key economic indicators and the set spread adjustment trigger rules. The spread adjustment trigger rules set the trigger conditions for spread adjustment, which include variable information related to economic indicator events. The variable information includes the trigger time range for triggering spread adjustment and the spread adjustment formula, and supports user-defined configuration. The data layer records the spread adjustment logs and caches relevant information.
11. The method according to claim 10, characterized in that, Spread management is performed through the service layer, which includes spread configuration and spread adjustment in forex quote trading. When configuring spreads, the process includes: configuring spread values for different types of maturities, where the maturities represent the value date of the foreign exchange transaction, including the spread between the bid price (Bid) and the ask price (Ask); configuring upper and lower limits for spread adjustments, wherein the range of spread aggregation is limited by setting system parameters, and when the cumulative adjustment value of different rules exceeds the upper or lower limit set in the system parameters, the corresponding upper or lower limit is used for spread adjustment; and configuring spread rules for currency pairs. When performing dynamic spread adjustment, the process includes: after obtaining the variable information configured by the user, constructing a scheduled task according to a preset frequency; when executing each scheduled task, first checking whether the current time is within the configured trigger time range; if it is within the trigger time range, performing spread calculation and adjustment according to the configured spread adjustment formula; otherwise, canceling the spread adjustment operation executed by the scheduled task and deleting the scheduled task.