WO2012136627A1 - A method and a system for communicating trade orders for a financial instrument, a method for generating a trading strategy for a financial instrument and a trading strategy system for providing trade decisions for a financial instrument - Google Patents

A method and a system for communicating trade orders for a financial instrument, a method for generating a trading strategy for a financial instrument and a trading strategy system for providing trade decisions for a financial instrument Download PDF

Info

Publication number
WO2012136627A1
WO2012136627A1 PCT/EP2012/055966 EP2012055966W WO2012136627A1 WO 2012136627 A1 WO2012136627 A1 WO 2012136627A1 EP 2012055966 W EP2012055966 W EP 2012055966W WO 2012136627 A1 WO2012136627 A1 WO 2012136627A1
Authority
WO
WIPO (PCT)
Prior art keywords
trade
strategy
trading
values
market price
Prior art date
Application number
PCT/EP2012/055966
Other languages
French (fr)
Inventor
Erik Damgaard
Original Assignee
Straticator 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 Straticator Ltd filed Critical Straticator Ltd
Publication of WO2012136627A1 publication Critical patent/WO2012136627A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/06Asset management; Financial planning or analysis

Definitions

  • the present invention relates generally to the trading of financial instruments, and more particularly to a method and a system for communicating trade orders for a financial instrument to an on-line trading account at a trading exchange.
  • the present invention further relates to a method for generating a trading strategy for a financial instrument and a trading strategy system for providing trade decisions for a financial instrument.
  • a computerized method for automatically communicating trade orders for a financial instrument in response to re- ceived market price data said trade orders being communicated via a trading robot server to an on-line trading account at a trading exchange
  • said method comprising: providing a trading robot for a selected financial instrument at a robot server, said trading robot comprising a trading strategy, data for a volume of the selected financial instrument to be traded, and the trading account to trade from, said trading strategy holding trade trigger criteria for the selected instrument and being configured to generate trade decisions in response to the trade trigger criteria being met, said trade trigger criteria being related to changes in market price data for one or more financial instruments, and said trading robot being configured to communicate trade orders to the trading account at the trading exchange based at least partly upon trade decisions generated from the trading strategy;
  • one or more of the trade trigger criteria may be related to the market price data for the selected financial instrument, and the received market price data may include the market price data for the financial instrument.
  • the method of the first aspect of the may further comprise the step of initializing the trading robot and the trading strategy before the step of starting the trading robot.
  • the trading robot holds one or more trading termination criteria.
  • the trading strategy may be stored in a database server and the step of providing the trading robot at the robot server may comprise loading the trading strategy from the database server into the trading robot.
  • the trading strategy is configured for generating trade decisions corresponding to shifts between a neutral trade position and a long trade position and between the neutral trade position and a short trade position.
  • the trade decisions being output/generated by the trading strategy may be based on inputs of sets of market price values determined from market price data within succeeding periods of time or time frames, which time frames may be of equal or different length, with one set of market price values being collected for each time frame.
  • a set of market price values for a financial instrument may comprise opening and closing prices and highest and lowest prices of the financial instrument within the corresponding time frame, also referred to as open-high-low-close or OHLC prices.
  • the step of providing real market price data as a function of time for the financial instrument(s) related to the trade trigger criteria comprises:
  • the calculation of the trading strategy is at least partly based on one of more of the sets of complete time-frame OHLC values and the set of obtained partial time-frame OHLC values.
  • the complete time-frame OHLC values and partial timeframe OHLC values may be determined from the market price data for the selected financial instrument being traded.
  • the trading robot When starting the trading robot, it may be started at a start time frame, and the step of initializing the trading robot and the trading strategy may comprise providing sets of market price values collected within a number of time frames preceding the starting time frame and computing the trading strategy for these generated sets of market price values thereby bringing the trading strategy to at state representing the current market for the selected financial instrument.
  • the trading strategy comprises one or more technical indicators for one or more of the financial instruments related to the trade trigger criteria, where an indicator for a financial instrument provides data results obtained by calculating one or more corresponding mathematical formulas having one or more parameters and having as input one or more values of the set of market price values corresponding to the instrument.
  • the market price values being input to the formula of an indicator may be a combination of one or more of the opening, closing, highest and lowest price val- ues collected within the time frames.
  • the data output of an indicator is calculated based on market price values received within a predetermined number of succeeding time frames. Such predetermined number may be defined by a parameter of the indicator formula, and the indicator may have an averaging formula to be calculated for the predetermined number of succeeding time frames.
  • the trading strategy comprises a number of predefined trade expressions being logic functions each defining one or more trade trigger criteria for the selected financial instrument, which trade expressions are at least partly based on calculated indicator values and/or one or more values of the sets of market price values. It is preferred that the trading strategy comprises a number of strategy position functions defining a number of strategy positions based on output values of the trade expressions, wherein a shift between strategy positions is at least partly determined by a shift in a trade expression output corresponding to a trade trigger criteria being met, and wherein a shift in strategy position corresponds to a trade decision.
  • the strategy position function(s) define at least two trade strategy positions corresponding to a neutral and a long trade strategy position, or to a neutral and a short trade strategy position, or define three strategy positions corresponding to a neutral, a long, and a short trade strategy posi- tion.
  • the outputs of the trade expressions may be used for generating trade decisions corresponding to shifts between a neutral trade position and a long trade position and/or between the neutral trade position and a short trade position. It is also within embodiments of the invention that one or more of the trade expression comprise one or more parameters.
  • a first set of trade expressions are used for generating trade decisions corresponding to shifts between the neutral trade position and the long trade position
  • a second set of trade expressions are used for generating trade decisions corresponding to shifts between the neu- tral trade position and the short trade position
  • the first set of trade expressions may comprise a first and a second trade expression, Expression Open Long (EOL) and Expression Close Long (ECL)
  • the second set of trade expressions may comprise a third and a fourth trade expression, Expression Open Short (EOS) and Expression Close Short (ECS). It is preferred that the trade orders forwarded by the trading robot are buying and/or selling orders for a selected volume of the selected financial instrument.
  • a buying order for a volume of the selected financial instrument may be forwarded by the trading robot to the trading exchange upon the trading strategy generating a trade decision corre- sponding to a shift from neutral to long position, and a selling order for a volume may be forwarded by the trading robot upon the trading strategy generating a trade decision corresponding to a shift from long to neutral position.
  • a selling order for a volume of the selected financial instrument may be forwarded by the trading robot to the trading exchange upon the trading strategy generating a trade decision corresponding to a shift from neutral to short position, and a buying order for a volume may be forwarded by the trading robot upon the trading strategy generating a trade decision corresponding to a shift from short to neutral position.
  • the trading robot when the trading robot has forwarded a buying order for a volume of the selected financial instrument and moved to a position of holding the bought volume, then the trading robot based on the received real time market price data eval uates the trade result of the bought volume and compares this trade result with a pre- stored take-profit-trade-limit and a pre-stored stop-loss-trade-limit, and if this trade result is larger than or equal to the take-profit-trade-limit or smaller than or equal to the stop-loss-trade-limit, then
  • the trading robot forwards a selling order for the bought volume.
  • the trade result of a bought volume may be found by taking the difference between the last offered sales price and the price given for the bought volume.
  • the trading robot based on the received real time market price data eval uates the trade result of the sold volume and compares this trade result with a pre- stored take-profit-trade-limit and a pre-stored stop-loss-trade-limit, and if this trade result is larger than or equal to the take-profit-trade-limit or smaller than or equal to the take-loss-trade-limit, then
  • the trading robot forwards a buy order for the sold volume.
  • the trade result of a sold volume may be found by taking the difference between the actual sales price and the last offered buy price.
  • the trading robot has forwarded a sell or a buy order due to one of the pre-stored stop-loss or take-profit value being met, then it is preferred that the trading robot awaits the trading strategy generating a trade decision corresponding to going back to neutral position before forwarding further trade orders.
  • the method of the first aspect of the invention further comprises the step of monitoring and storing the trade result, being profit or loss or neutral, of each trade order, and determining an accumulated trading result being the sum of the results of each trade order.
  • the result of a trade order may be determined as the result of a trade order cycle, where a trade order cycle is when a selling order has followed a buying order or when a buying order has followed a selling order.
  • the trading robot may be configured to determine the accumulated trading result.
  • the termination criteria of the trading robot comprises a stop-loss and a take-profit criterion
  • the method further comprises stopping forwarding of trade orders from the trading robot if the accumulated profit is larger than or equal to the take-profit value or the accumulated loss is larger than or equal to the stop-loss value.
  • the method of the first aspect of the invention may further comprise changing the volume to be traded based on the determined accumulated trading result.
  • the trading volume may be increased when the accumulated trading result has increased for each trading cycle in a prede- termined number of succeeding trading cycles.
  • the trading volume may decreased when the accumulated trading result has decreased for each trading cycle in a predetermined number of succeeding trading cycles.
  • the trading robot is configured to perform such change of the trading volume. It is also within an embodiment of the first aspect of the invention that the method further comprises stopping forwarding of trade orders after forwarding a first trade order, being a buy or sell order, or after forwarding a trade order cycle, being a buy order followed by a sell order or being a sell order followed by a buy order. The method may also comprise stopping forwarding of trade orders when a predetermined date and time occurs.
  • a trading system for automatically communicating trade orders for a financial instrument in response to market price data/values, said trade orders being communicated to an on-line trading account at a trading exchange, said system comprising:
  • a trading robot server having a market price value memory for storing one or more sets of market price data/values for financial instruments
  • said trading robot server storing data for a volume of a financial instrument to be traded, the trading account to trade from, and a trading strategy;
  • the trading strategy holds trade trigger criteria for the instrument to be traded, said trade trigger criteria being related to changes in market price values for one or more financial instruments, and wherein the trading strategy is configured to generate strategy trade positions, with a shift between strategy positions being at least partly determined by a trade trigger criteria being met;
  • the trading robot server further comprises one or more processing units for calculating the trading strategy and determining strategy position;
  • the trading robot server is configured to communicate trade orders to the trading account at the trading exchange based at least partly upon shifts between strategy positions obtained from calculating the trading strategy
  • the trading strategy comprises:
  • a number of trade expressions being logic functions each defining one or more trade trigger criteria for a financial instrument to be traded and being based at least partly on calculated indicator values and/or one or more values from the set(s) of market price values;
  • the first aspect of the invention also provides a trading system for automatically communicating trade orders for a financial instrument in response to market price data/values, said trade orders being communicated to an on-line trading account at a trading exchange, said system comprising:
  • a trading robot server having a market price value memory for storing one or more sets of market price values for financial instruments
  • said trading robot server storing data for a volume of a financial instrument to be traded, the trading account to trade from, and a trading strategy, wherein the trading strategy comprises:
  • a number of trade expressions being logic functions each defining one or more trade trigger criteria for a financial instrument to be traded and being based at least partly on calculated indicator values and/or one or more values from the set(s) of market price values;
  • a number of strategy position functions defining a number of strategy positions based on output values of the trade expressions, wherein a shift between strategy posi- tions is at least partly determined by a shift in a trade expression output corresponding to a trade trigger criteria being met;
  • the trading robot server further comprises one or more processing units for calculating the trading strategy by calculating the indicator formula(s), the trade expressions, the strategy position functions and by determining the strategy posi- tion;
  • the trading robot is configured to communicate trade orders to the trading account at the trading exchange based at least partly upon shifts between strategy positions obtained from calculating the trading strategy.
  • the systems of the first aspect of the invention further comprises: a display unit providing a graphical presentation of one or more sets of stored market price values;
  • a display unit providing a graphical presentation of the calculated indicator results
  • a display unit providing a graphical presentation of the determined strategy positions.
  • system further comprises a display unit providing a graphical presentation of the com- municated trade orders.
  • a set or sets of market price values corresponding to a selected financial instrument is/are determined from market price data received for the instrument within succeeding periods of time or time frames, which may be of equal length or different length, and wherein a set of market price values comprises opening and closing prices and highest and lowest prices for the financial instrument within the corresponding time frame, also referred to as open-high-low-close or OHLC prices.
  • the sets of market price values determined within time frames of different length may be determined from the market price data for the selected financial instrument being traded.
  • the systems of the first aspect of the invention also covers embodiments, wherein the trading strategy or the strategy position function(s) define at least two trade strategy positions corresponding to a neutral and a long trade strategy position, or to a neutral and a short trade strategy position, or define three strategy positions corresponding to a neutral, a long, and a short trade strategy position.
  • the trading strategy may comprise a first set of trade expressions for generating trade decisions corresponding to shifts between the neutral trade position and the long trade position, and may further comprise a second set of trade expressions for generating trade decisions correspond- ing to shifts between the neutral trade position and the short trade position.
  • the first set of trade expressions may comprise a first and a second trade expression, Expression Open Long (EOL) and Expression Close Long (ECL), and the second set of trade expressions may comprise a third and a fourth trade expression, Expression Open Short (EOS) and Expression Close Short (ECS).
  • EOL Expression Open Long
  • ECL Expression Close Long
  • EOS Expression Open Short
  • ECS Expression Close Short
  • the stored strategy position function(s) is/are configured so that a shift from neutral to long posi- tion is allowed only when the criteria defined by EOL is fulfilled and the criteria defined by ECL is not fulfilled.
  • the strategy position function(s) may further be configured so that a shift from long to neutral position is allowed when the criteria defined by ECL is fulfilled.
  • the strategy position function(s) is/are configured so that a shift from neutral to short position is allowed only when the criteria defined by EOS is fulfilled and the criteria defined by ECS is not fulfilled.
  • the strategy position function(s) may further be configured so that a shift from short to neutral position is allowed when the criteria defined by ECS is fulfilled.
  • the first aspect of the invention also cover embodiments, wherein the strategy position function(s) is/are configured so that when EOL is fulfilled while ECL is not fulfilled indicating a shift to the long position, and EOS is fulfilled while ECS is not fulfilled indicating a shift to short position, then if the strategy is in the neutral position, it stays in the neutral position, or if the strategy is in the long or the short position, it shifts to neutral position.
  • one or more of the trade expressions may comprise one or more parameters. It is also within embodiments of the systems of the first aspect of the invention that the trade orders are buy and sell orders given in accordance with the shifts in strategy positions.
  • the robot server further comprises a processing unit for monitoring and storing the trade rsult, being profit or loss or neutral, of each trade order, and for determining an accumulated trading result being the sum of the result of each trade order.
  • the system may comprise a display unit for providing a graphical presentation thereof.
  • the trading robot server stores one or more trading termination criteria.
  • the termination criteria of the trading robot may comprise a stop-loss and a take-profit criterion, and the trading robot server may be configured to stop forwarding of trade orders if the accumulated profit is larger than or equal to the take-profit value or the accumulated loss is larger than or equal to the stop-loss value.
  • each instrument having a corresponding set or sets of market price values being determined from market price data for the instrument;
  • an indicator provides data results obtained by calculating one or more corresponding mathematical formulas having one or more parameters and having as input one or more values of the set(s) of market price values corresponding to the instrument;
  • the method of the second aspect of the invention may further comprise providing the set(s) of market price values for the selected financial instrument(s) and providing a graphical presentation thereof; and calculating the indicator formula(s) to obtain indicator results as a function of at least part of the selected market price values and providing a graphical presentation thereof.
  • the method may also comprise calculating the trade expression functions as a function of the calculated indicator output values and/or one or more values from the set(s) of market price values; and determining the strategy positions based on the calculated trade expression output values and providing a graphical presentation thereof.
  • the second aspect of the invention also comprise a computer-assisted method for generating a trading strategy providing trade decisions /advices for trade orders for a financial instrument in response to market price data, said method comprising: selecting one or more financial instruments, one of which is to be traded, each instrument having a corresponding set or sets of market price values being determined from market price data for the instrument;
  • an indicator provides data results obtained by calculating one or more corresponding mathematical formulas having one or more parameters and having as input one or more values of the set(s) of market price values corresponding to the instrument;
  • trade expressions being logic functions each defining one or more trade trigger criteria for the instrument to be traded, which trade expressions are at least partly based on calculated indicator values and/or one or more values from the set(s) of market price values;
  • sets of market price values are determined from market price data received for the corresponding financial instrument within succeeding periods of time or time frames, which may be of equal length or different length.
  • the sets of market price values may be updated for each time frame.
  • a set of market price values comprises opening and closing prices and highest and lowest prices for the financial instrument within the cor- responding time frame, also referred to as open-high-low-close or OHLC prices.
  • the strategy position function(s) define at least two trade strategy positions corresponding to a neutral and a long trade strategy position, or to a neutral and a short trade strategy position, or define three strategy positions corresponding to a neutral, a long, and a short trade strategy position.
  • a shift from neutral to long position may generate a trade decision/advice corresponding to a "buy” order
  • a shift from long to neutral position may generate a trade decision/advice corresponding to a "sell” order
  • a shift from neutral to short position may generate a trade decision/advice corresponding to a "sell” order
  • a shift from short to neutral position may generate a trade decision/advice corresponding to a "buy” order.
  • a first set of trade expressions are used for generating trade decisions corresponding to shifts between the neutral trade position and the long trade position
  • a second set of trade expressions are used for generating trade decisions corresponding to shifts between the neutral trade posi- tion and the short trade position.
  • the first set of trade expressions may comprise a first and a second trade expression, Expression Open Long (EOL) and Expression Close Long (ECL).
  • the second set of trade expressions may comprise a third and a fourth trade expression, Expression Open Short (EOS) and Expression Close Short (ECS).
  • EOS Expression Open Short
  • ECS Expression Close Short
  • the strategy position function(s) is/are configured so that a shift from neutral to long position is allowed only when the criteria defined by EOL is fulfilled and the criteria defined by ECL is not fulfilled.
  • the strategy position function(s) may further be configured so that when the strategy is in the long position and the criteria defined by ECL is fulfilled, then the strategy shifts from long to neutral position.
  • the strategy position function(s) is/are configured so that a shift from neutral to short position is allowed only when the criteria defined by EOS is fulfilled and the criteria defined by ECS is not fulfilled.
  • the strategy position function(s) may further be configured so that when the strategy is in the short position and the criteria defined by ECS is fulfilled, then the strategy shifts from short to neutral position.
  • the second aspect of the invention also cover embodiments, wherein the strategy position function(s) is/are configured so that when EOL is fulfilled while ECL is not fulfilled indicating a shift to the long position, and EOS is fulfilled while ECS is not fulfilled indi- eating a shift to short position, then if the strategy is in the neutral position, it stays in the neutral position, or if the strategy is in the long or the short position, it shifts to neutral position.
  • the methods of the second aspect of the invention may further comprise calculating the result of a simulated trading process corresponding to giving trade orders for the financial instrument to be traded, said trade orders following the trade decisions/advices generated with the shifts in the determined strategy positions, and providing a graphical presentation thereof.
  • the trade orders may be buy and sell orders given in accordance with the shifts in strategy positions.
  • one or more of the trade expressions may comprise one or more parameters.
  • a back-testing process or step may comprise:
  • the step of evaluating the result of the simulated back-test trading orders may comprise evaluating the trade result, being profit or loss or neutral, of each buy and sell trade order, and determining an accumulated trading result being the sum of the results of each trade order within the number of succeeding time frames. It is preferred that the result of a trade order is evaluated based at least partly on one or more of the selected market price values belonging to the time frame corresponding to the shift in strategy position resulting in the trade order.
  • the methods of the second aspect of the invention may further comprise an optimization of the obtained trading strategy, said optimization comprising:
  • steps b-e may be repeated a number of times, and a set of parameters for the indicators and/or trade expressions giving the best back-test result may be selected and stored to thereby define the optimized trading strategy.
  • steps b-e may be repeated a number of times determined by the number of parameters being back-tested and the number of values being back-tested for each combination of parameters.
  • the selected parameters may be the parameters for the strategy having the best accumulated trade result.
  • the present invention also covers one or more embodiments, wherein a trading strategy generated according to a method selected from the methods of the second aspect of the invention may be used in one or more of the methods and systems of the first aspect of the invention.
  • a trading strategy system for providing trade decisions /advices for trade orders for a financial instrument in response to market price data, said system comprising:
  • a market price value memory for storing one or more sets of market price val- ues, where each set of market price values correspond to a selected financial instru- ment, and where each set of market price values is determined from market prices for the corresponding instrument;
  • an indicator memory storing one or more technical indicators for at least part of the selected instrument(s), where an indicator provides data results obtained by cal- culating one or more corresponding mathematical formulas having one or more parameters and having as input one or more values of the set or sets of market price values corresponding to the instrument;
  • a processing unit for calculating the indicator formula(s);
  • a trade expression memory storing a number of trade expressions being logic functions each defining one or more trade trigger criteria for a financial instrument to be traded, which trade expressions are at least partly based on calculated indicator values and/or one or more values from the set(s) of market price values;
  • a strategy position memory storing a number of strategy position functions de- fining a number of strategy positions based on output values of the trade expressions, wherein a shift between strategy positions is at least partly determined by a shift in a trade expression output corresponding to a trade trigger criteria being met, and wherein a shift in strategy position corresponds to a trade decision/advice;
  • a processing unit for calculating the strategy position functions and determine the strategy positions.
  • the system of the second aspect of the invention may further comprise: a display unit providing a graphical presentation of one or more sets of stored market price values; and a display unit providing a graphical presentation of the calculated indicator results.
  • the system may also comprise a display unit providing a graphical presentation of the determined strategy positions.
  • sets of market price values are determined from market price data received for the corre- sponding financial instrument within succeeding periods of time or time frames, which may be of equal length or of different lenght.
  • a set of market price values may comprise opening and closing prices and highest and lowest prices for the financial instrument within the corresponding time frame, also referred to as open-high-low-close or OHLC prices.
  • the strategy position function(s) define at least two trade strategy positions corresponding to a neutral and a long trade strategy position, or to a neutral and a short trade strategy position, or define three strategy positions corresponding to a neu- tral, a long, and a short trade strategy position.
  • a shift from neutral to long position may generate a trade decision/advice corresponding to a "buy” order
  • a shift from long to neutral position may generate a trade decision/advice corresponding to a "sell” order
  • a shift from neutral to short position may generate a trade decision/advice corresponding to a "sell” order
  • a shift from short to neutral position generates a trade decision/advice corresponding to a "buy” order.
  • the system of the second aspect of the invention may store a first set of trade expressions for generating trade decisions corresponding to shifts between the neutral trade position and the long trade position.
  • the system may also store a second set of trade expressions for generating trade decisions corresponding to shifts between the neutral trade position and the short trade position.
  • the first set of trade expressions may comprise a first and a second trade expression, Expression Open Long (EOL) and Expression Close Long (ECL).
  • the second set of trade expressions may comprise a third and a fourth trade expression, Expression Open Short (EOS) and Expression Close Short (ECS).
  • the stored strategy position function(s) may be configured so that a shift from neutral to long position is allowed only when the criteria defined by EOL is fulfilled and the criteria defined by ECL is not fulfilled.
  • the strategy position function may further be configured so that a shift from long to neutral position is allowed when the criteria defined by ECL is fulfilled.
  • the stored strategy position function(s) may also be configured so that a shift from neutral to short position is allowed only when the criteria defined by EOS is fulfilled and the criteria defined by ECS is not fulfilled.
  • the strategy position function may also be configured so that a shift from short to neutral position is allowed when the criteria defined by ECS is fulfilled.
  • the systems of the second aspect of the invention also cover embodiments, wherein the strategy position function(s) is/are configured so that when EOL is fulfilled while
  • one or more embodiments of the system of the second aspect of the invention further comprise a processing unit for calculating the result of a simulated trading process corresponding to giving trade orders for the financial instrument to be traded, said trade orders following the trade decisions/advices generated with the shifts in the determined strategy positions, and further comprising a display unit for providing a graphical presentation thereof.
  • the trade orders may be buy and sell orders given in accordance with the shifts in strategy positions.
  • one or more of the trade expressions comprise one or more parameters.
  • one or more embodiments of the system of the second aspect of the invention further comprise a processing unit for performing a back-test of the stored indicators and trade expressions.
  • the back-test processing unit may be adapted to:
  • the back-test processing unit is adapted to:
  • the back-step processing unit may be adapted to repeat steps a-d a number of times determined by the number of parameters being back-tested and the number of values being back-tested for each combination of parameters.
  • a technical indicator is a function providing data output values based on several succeeding sets of Open-High-Low-Close, OHLC, market price values for the instrument, said method comprising:
  • a new set of partial time-frame OHLC values may be determined when a predetermined fixed update period of time has lapsed, whereby the partial time-frame periods increase in steps equal to said predetermined update period of time.
  • the length of a complete time-frame peri- od may equal the length of multiple update periods.
  • a technical indicator provides data output values obtained by calculating one or more mathematical formulas based on several succeeding sets of OHLC market price values for the instru- ment.
  • a computer system for calculating output values of a technical indicator for a selected financial instrument where a technical indicator is a function providing data output values based on several succeeding sets of Open-High-Low-Close, OHLC, market price values for the instrument, said system comprising:
  • an indicator memory for storing the technical indicator
  • a market price memory for storing received market price values for the selected instrument
  • a processing unit for determining and storing a set of complete time-frame
  • a processing unit for determining and storing a set of partial time-frame OHLC values for the instrument for a partial time-frame period following the last completed time-frame period with stored complete time-frame OHLC values, said partial timeframe period being shorter than a complete time-frame period and said partial timeframe OHLC values being determined from the received market price values;
  • a processing unit for calculating and storing the indicator output values based on one or more of the sets of complete time-frame OHLC values and the set of obtained partial time-frame OHLC values.
  • the processing unit for determining a set of partial time-frame OHLC values may be adapted for determining and storing several succeeding sets of partial time-frame OHLC values for increasing partial timeframe periods, with each partial time-frame period being shorter than the complete time-frame period, and with each new partial time-frame period including the previous partial time-frame period, and the processing unit for calculating the indicator output values may be adapted for calculating indicator output values for each new determined set of partial time-frame OHLC values.
  • the processing unit for determining a set of partial time-frame OHLC values may also be adapted for determining a new set of partial time-frame OHLC values when a predetermined fixed update period of time has lapsed, whereby the partial time-frame periods increase in steps equal to said predetermined update period of time.
  • the length of a complete time-frame period may equal the length of multiple update periods.
  • a technical indicator provides data output values obtained by calculating one or more mathematical formulas based on several succeeding sets of OHLC market price values for the instrument.
  • Fig. 1 is a block diagram illustrating a trading system according to an embodiment of the first aspect of the invention
  • Figs. 2a, b are flow charts illustrating processes of feeding market prices to a trading system according to the invention
  • Figs. 3a, b show a flow chart illustrating a method of communicating trade orders for a financial instrument according to an embodiment of the first aspect of the invention
  • Figs. 4a, b are screen shots showing an example of executed trade orders for a financial instrument according to a method of the present invention
  • Fig. 5 is a symbolic diagram illustrating a strategy system for providing trade decisions according to an embodiment of the second aspect of the invention
  • Fig. 6 is a flow chart illustrating a back-test process for a trading strategy according to an embodiment of the second aspect of the invention
  • Figs. 7a-z are screen shots illustrating a method of generating a trading strategy according to an embodiment of the second aspect of the invention.
  • Fig. 1 is a block diagram illustrating a preferred system for implementing a method and a system 100 for communicating financial instrument trade orders according to the first aspect of the invention.
  • the system 100 comprises a User Terminal 101 , a Host Server 102, a trading Robot Server 103, a Back-Test Server 104, a Database Server 105, an OHLC Price (Open High Low Close) Database 106, a Price Feed Server 107, and a Trading Exchange 108.
  • OHLC Price Open High Low Close
  • the user can connect to the trading system 100 via the public Internet using his browser on his Pc, Mac of Smartphone.
  • the browser is responsible for all presentations to the user, and the browser takes the user inputs and forwards these to the Host Server 102.
  • the Host Server 102 is connected to the public Internet, and authenticates the user and handles user authorization.
  • the Host Server 102 is connected to the public Internet, and authenticates the user and handles user authorization.
  • the Host Server 102 handles all communication with the User Terminal 101 and is responsible for feeding data to the User Terminal 101.
  • the Host Server 102 takes the user inputs and either handles the input itself or redirects the inputs to the appropriate server.
  • the trading Robot Server 103 is connected to the internal servers.
  • the Robot Server 103 is connected to the internal servers.
  • the Robot Server 103 is connected to the internal servers.
  • the Robot Server 103 is responsible for running one or more trading robots and thereby communicating trade orders for one or more financial instruments.
  • the Robot Server 103 loads the trading robots from the Database Server 105, where the trading robots have been stored by the Host Server 102. After loading a trading robot, the Robot Server 103 loads historic OHLC prices (Open High Low Close) from the OHLC Database 106 and brings the state of the robot "up to date”.
  • the Robot Server 103 is fed with financial instrument prices for corresponding time frames from the Price Feed Server 107 and upon each new set of prices for a time frame, a new OHLC price set is updat- ed/calculated. For each new OHLC price set being generated, the Robot Server 103 activates the appropriate loaded robots.
  • the Robot Server 103 sends this order to the Trading Exchange 108 and handles all communication with the Trading Exchange 108.
  • the communication between the Robot Server 103 and the Trading Exchange 108 may take place by use of a Virtual Private Network (VPN) connection on the Internet.
  • the Robot Server 103 is also responsible for storing the new generated OH LC's in the OHLC Database 106.
  • the Robot Server 103 returns status information for the individual trading robots.
  • a trading robot being stored in the Database Server 105 is defined by a user on the User Terminal 101. The user may build a trading strategy from data delivered from the Host Server 102.
  • the trading strategy When a trading strategy is developed by the user, the trading strategy is stored in the Database Server 105.
  • the trading strategy holds trade trigger criteria for a selected financial instrument to be traded via the Robot Server 103, and is configured to generate trade decisions in response to the trade trigger criteria being met, where the trade trigger criteria are related to changes in market price data for one or more financial instruments.
  • the changes in market price data may be given by the new generated OHLC's.
  • trading information may be a trading volume for the financial instrument to be traded, the trading account and trading termination criteria, such as stop/loss and take-profit termination criteria.
  • a termination criteria may also be a predetermined date and time.
  • the trading strategy and the trading information are saved as a trading robot at the Database Server 105.
  • a user wants to start trading by use of the obtained trading robot, he may forward a "start trading" command to the Host Server 102, which then forwards this command to the Robot Server 103, and the Robot Server 103 then loads the trading robot from the Database Server 105, and starts a trading process.
  • Robot Server 103 When the Robot Server 103 is running the loaded trading robot and trade orders are executed, data for the trading transactions may be stored in the Database Server 105. If the user wants to know how a running trading robot is performing or the status of the trading robot, a command may be send from the user to the Host Server 102, which will then collect the answer from the Robot Server 103.
  • the Back-Test Server 104 need not to be connected to the public Internet but shall be connected to the internal servers.
  • the Back-Test Server 104 is responsible for running the back-tests, where back-tests may be performed for trading strategies in order to optimize these and/or for trading robots.
  • the Back-Test Server 104 may load the trading strategy or trading robot from the Database Server 105 via the Host Server 102, then load historic OHLC's from the OHLC database and then simulate a trading strategy or trading robot with these historic OHLC.
  • the Back-Test Server 104 On request from the Host Server 102, the Back-Test Server 104 returns status information for running back-tests and results from completed back-tests. On request from the Host Server 102, the Back-Test Server 104 will start a new back-test or termi- nate a running back-test. The main reason for implementing the Back-Test Server 104 as a separate server is that overloading of back-tests, only will slow down the running back-tests, but not in any way impact the performance of the Host- and Robot Servers 102, 103.
  • the Database Server 105 is a standard Microsoft SQL-Server. Here all strategies, robots, transactions, logs, user preferences and system parameters are stored.
  • the Database Server is not connected to the public internet but only connected to the internal servers.
  • the OHLC Price Database 106 is a set of binary files, which holds historic and resent OHLC (Open High Low Close) prices or value. For time frames, which preferably have of a predetermined equal length, but which may also have different lengths, the OHLC prices/values for a financial instrument are generated from the financial instrument prices monitored within the corresponding time frame.
  • the Price Feed Server 107 is connected to the Trading Exchange 108 through the public Internet, and is responsible for collecting all price updates for the financial instruments being part of a trading strategy and/or trading robot. The financial instrument price updates are collected from the Trading Exchange 108. After collecting the prices, the Price Feed Server 107 forwards the prices to the Robot Server 103 and to the Host Server 102.
  • the Robot Server 103 calculates/generates the OHLC values from the received price updates and stores the generated OHLC values in the OHLC Price Database 106.
  • the present invention also covers embodiments where the OHLC values are generated and received from an external source.
  • the OHLC values may be received by the Price Feed Server 107, and forwarded to the Host Server 102 and the Robot Server 103, which stored the OHLC values in the OHLC Price Database 106.
  • Figs. 2a and 2b are flow charts illustrating processes of feeding market prices for financial instruments to a trading system 100 according to the invention.
  • the first step of the price feed process is forwarding of prices 201 from the Trading Exchange 108 to the Price Feed Server 107.
  • the Trading Exchange 108 is connected to the Price Feed Server 107, which is responsible for collecting all price updates from the Exchange 108 and further is responsible for keeping the connection to the Trading Exchange 108 alive and reconnects in case connection is broken.
  • This connection is an "open connection" and when the Trading Exchange 108 has a new Bid- or Ask-price on any of the financial instruments, which is subscribed to, the Trading Exchange 108 will post the new price to the Price Feed Server 107.
  • the Price Feed Server 107 sends 202 the prices to the Robot Server 103.
  • the Bid- and Ask prices are collected 203 at the Robot Server 103.
  • a list of Stop-Loss and Take-Profit order limits from the loaded Trading Robot is checked 204 and OHLC prices are being assembled/generated 205.
  • the trading robot When the trading robot is running and an order has been issued 206 from the Robot Server 103 and been confirmed 206 by the Trading Exchange 108, the trading robot might insert Stop-loss and/or a Take-profit limits in the Robot Server 103. These limits are checked 204 against the newest prices and in case a limit is met, an order 207 may be sent to the Trading Exchange 108.
  • a set of OHLC price values are generated over a timeframe period 205, where the timeframe periods are of equal length.
  • the generated set of OHLC price values are stored 209 at the OHLC Database 106 and an event 210 is sent to the trading robot process within the Robot Server 103. If the timeframe is not completed 21 1 a, the process ends 212 and no event signal is sent to the trading robot.
  • a set of OHLC price values are generated over a timeframe period 205, but here the timeframe periods may vary in length.
  • a timeframe period may be a so-called complete time-frame period with a corresponding set of complete time-frame OHLC values, where the complete time-frame periods are of equal length, and a time-frame period may be a so-called partial time-frame period with a corresponding set of partial time-frame OHLC values, where a partial time-frame pe- riod may follow the last completed time-frame period, and the partial time-frame period is shorter than a complete time-frame period.
  • the generated set of complete time-frame OHLC price values are stored 209 at the OHLC Database 106 and an event 210 is sent to the trading robot process within the Robot Server 103.
  • the process checks to see if a partial time-frame period is completed 208c, and if a partial time-frame period is completed 208c, the generated set of partial timeframe OHLC price values are stored 209 at the OHLC Database 106 and an event 210 is sent to the trading robot process within the Robot Server 103. If a partial time-frame period is not completed 211 c, the process ends 212 and no event signal is sent to the trading robot.
  • the appropriate trading robot or robots are activated and loaded with the new OHLC values 213, and the running trading robot process or processes may result in a trading order being sent 206 to from the Robot Server 103 to the Trading Exchange 108.
  • the trading result of the running trading robot process or processes may be based on one or more of the stored sets of complete time-frame OHLC values and the last stored set of obtained partial time- frame OHLC values.
  • the trading robot may comprise a trading strategy for the financial instrument to be traded, and the trading strategy may comprise one or more technical indicators for one or more financial instruments.
  • the cal- culation of the technical indicator output values may be based on one or more of the stored sets of complete time-frame OHLC values and the last stored set of obtained partial time-frame OHLC values.
  • each new partial time-frame period may include the previous partial time-frame period
  • the trading robot and/or the technical indicator output values may be calculated for each new determined set of partial time-frame OHLC values using the last determined set of obtained partial time-frame OHLC values and one or more of the stored sets of complete time-frame OHLC values.
  • every time a new set of partial time-frame OHLC values is determined it may replace the previous determined partial time-frame OHLC values.
  • a new set of partial time-frame OHLC values may be determined when a predetermined fixed update period of time has lapsed, whereby the par- tial time-frame periods increase in steps equal to said predetermined update period of time.
  • the length of a complete time-frame period may equal the length of multiple update periods.
  • the complete time-frame period may be set to 15 minutes, whereas the partial time-frame period may be set to one minute.
  • the trading robot and/or the technical indicator output values may be updated or calculated every one minute based on the last stored sets of complete time-frame OHLC values and the last determined set of partial time- frame OHLC values.
  • Fig. 3 is a flow chart illustrating a method of communicating trade orders for a financial instrument by use of a Robot Trading Process according to an embodiment of the invention.
  • the method is preferably implemented by use of the system 100 of Fig. 1.
  • the first step is initiation of the Robot Trading Process 301 , where a user activates a trad- ing robot by forwarding a trading command to the Robot Server 103.
  • the Robot Server 103 then loads the corresponding trading robot 302 from the Database Server 105, which stores generated trading robots and which may also store generated trading strategies.
  • the uploaded trading robot comprises a trading strategy, which defines trading positions or trading states for the financial instrument to be traded.
  • the trading strategy may comprise a number of technical indicators for one or more financial instruments and further may comprise a number of trade expressions defining trade trigger criteria and being at least partly based on calculated technical indicator values.
  • the trading position or state of the trading strategy may be based on the output values of the trade expressions.
  • the technical indicators have as input at least part of the OHLC values for the corresponding financial instruments, and in order to initialize the trading robot, historic OHLC data are loaded from the OHLC Price Database 106 to the trading strategy being part of the trading robot, and the trading robot runs or calculates the trading strategy holding the technical indicators based on the received historic OHLC price data, to thereby initialize the trading robot and strategy by bringing the indicators and the state of trading strategy "up to date" 304.
  • the Robot Server 103 may hold several trading robots and the newly uploaded trading robot may be inserted into a list of trading robots, which gets activated on every new OHLC.
  • the Robot Server 103 When a new price update for prices of a financial instrument within a time frame is re- ceived by the Robot Server 103 from the Price Feed Server 107, the corresponding OHLC values are created or generated, preferably at the Robot Server 103, and the new price event containing the name of financial instrument, the timeframe and the newly created OHLC values is stored at the OHLC Price Database 106.
  • the trading robots having trading strategies including the financial instrument of the given timeframe are activated. Indicators are updated, expressions are evaluated and the state or position of the trading strategy is updated and stored 306.
  • the trading strategy may define three trading positions or states: long, short, and neutral, 307.
  • the trading advice/decision given from the strategy to the trading robot is to go "neutral" meaning sell a bought volume of buy a sold volume of the financial instrument to be traded, and when the strategy shifts from neutral to long position, the advice to the trading robot is to buy a volume of the financial instrument, and a shift from neutral to short position is an advice to sell a volume of the financial instrument.
  • the trading robot will be in a neutral, a long or a short state/position, corresponding to the trading robot holding no traded volume, holding a bought volume, or holding a sold volume of the financial instrument.
  • the newly updated state or position of the trading strategy is compared with the current state or position of the trading robot 308. If the states/positions are different, the trading robot may issue a buy or a sell order via the Robot Server 103 to the Trading Ex- change 108 and bring the state/position of the trading robot equal to the state/position of the trading strategy 309. Thus, when the trading strategy shifts from one
  • a buy or sell advice/decision is given to the trading robot, which may issue a corresponding buy or sell order.
  • the trading robot For each price update, the trading robot checks its termination criteria 310 and checks for Stop-Loss and Take-Profit limits 204. If no termination criterion or Stop-Loss and Take-Profit limit is met, the trading robot will continue 311 and await any changes in trading strategy state/position in order to issue new trading orders. If a termination cri- terion is met, the trading robot will stop and may remove itself from the internal list of active robots 312. The trading robot will update its own status in the database to "stopped" 313. A log may be in inserted in the database of the Database Server 105, which log may contain reason(s) for termination, parameters for indicators and expressions, performance of the trading robot and other statistical information.
  • the Stop-Loss and Take-Profit limits may be Stop- Loss-Trade and Take-Profit-Trade limits for a single trade position.
  • the trading robot based on the received real time market price data, 203, evaluates the trade result of the bought volume and compares this trade result with a pre-stored Take-Profit-Trade limit and a pre-stored Stop- Loss-Trade limit, 204, and if this trade result is larger than or equal to the Take-Profit- Trade limit or smaller than or equal to the Stop-Loss-Trade limit, then the trading robot forwards a selling order 207 for the bought volume in order to go to the neutral posi- tion/state.
  • the order When selling due to meeting the Take-Profit-Trade limit, the order may be named a Take- Profit-Trade order, and when the sell order is due to meeting the Stop- Loss-Trade limit, the order may be named a Stop- Loss-Trade order.
  • the trading robot when the trading robot has forwarded a selling order for a volume of the selected financial instrument and moved to a position of holding the sold volume, short position, then the trading robot based on the received real time market price data, 203, evaluates the trade result of the sold volume and compares this trade result with a pre-stored Take- Profit-Trade limit and a pre-stored Stop-Loss-Trade limit, 204, and if this trade result is smaller than or equal to the Take-Profit-Trade limit or larger than or equal to the Take- Loss-Trade limit, then the trading robot forwards a buy order 207 for the sold volume in order to go to the neutral position/state.
  • the order When buying due to meeting the Take- Profit-Trade limit, the order may be named a Take- Profit-Trade order, and when the buy order is due to meeting the Stop- Loss-Trade limit, the order may be named a Stop- Loss-Trade order.
  • the trading robot may also be configured to determine the accumulated trading result of all executed trades and hold termination criteria for stopping the trading robot from further trading based on the accumulated trading result.
  • the termination criteria of the trading robot may hold a Stop- Loss- Robot limit and a Take- Profit- Robot limit, 204, 310, and if the accumulated trading profit is larger than or equal to the Take-Profit- Robot limit or the accumulated loss is larger than or equal to the Stop- Loss- Robot limit, the trading robot will be terminated.
  • the trading robot holds a bought volume when meeting a limit, being in the long position, a sell order is forwarded 207 for the bought volume, going back to neutral position, before terminating the trading robot.
  • Figs. 4a and 4b are screen shots showing an example of executed trade orders for a financial instrument, where trade orders are issued by a trading robot based on changes in trading strategy positions and based on Stop-Loss-Trade and Take-Profit-Trade limits being met.
  • the financial instrument being traded by the trading robot is the exchange rate between EURO and US Dollars, EUR/USD, and the maximum volume to be traded is 28.000 EURO.
  • the time frame for collecting OHLC values for the instrument to be traded is set to 5 minutes, and the trading robot is activated each time a new OHCL price set is received.
  • the Take- Profit-Trade limit is set to 20 pips, and the Stop- Loss-Trade limit is set to 10 pips, defining trade exit criteria.
  • the trading robot holds no robot exit criteria.
  • the screen shot of Fig. 4a shows the performed transactions with the execution date and time of the trade orders, the order volume, the exchange rate of the orders, the status of the trading robot and the trading action.
  • the trading strategy for the trading robot of Figs. 4a and 4b is set to define two trading positions, a neutral position and a long position. The first trading action is shown at the bottom of the screen in Fig.
  • the trading robot receives a signal from the trading strategy to go from the long position to the neutral position and issues a "sell" trading order of the volume of 28.000 EUR.
  • the next order is generated by the strategy going from neutral to long, and the trading robot issues a "buy” order of the volume of 28.000 EUR.
  • the next trade order is generated by the Take-Profit-Trade limit being met, and the trading robot issues a "sell" order of the volume of 28.000 EUR and the trading robot moves from the long to the neutral position.
  • Fig. 4a The performance of the transactions of Fig. 4a is illustrated in the screen shot of Fig. 4b.
  • one line corresponds to the performance of a full trading cycle, where column 1 shows the date and time of opening the position, that is going from neutral to long and issuing a "buy" order; column 2 shows the date and time of closing the position, that is going from long to neutral and issuing a "sell” order; column 3 shows the time in the market, that is the time in the long position; column 4 shows the opening price, that is the price given when buying; column 5 shows the close price, that is the price paid when selling; column 6 shows the price difference, Delta Price, between buying and selling; column 7 shows the price difference in pips; column 8 shows the volume being traded; column 9 shows the profit or loss for the trade order cycle being the Delta Price multiplied by the traded volume; column 10 shows the accumulated profit being the sum of the profit or loss of each trade order cycle; column 11 shows the profit of each trade order cycle (from column 9) in pet of the total profit of all
  • the preferred trading system 100 of the present invention holds a Robot Server 103, which uploads a trading robot for a financial instrument in order to forward trade orders for such instrument.
  • the trading robot may be built around a trading strategy, which may be a pre-defined trading strategy for the financial instrument.
  • a trading strategy has on or more built in variables, whereby a trading strategy used by a robot may be optimized or changed by changing the values of the one or more variables.
  • the first step in creating a trading strategy is to select a financial instrument to be traded and the timeframe or period for which updated prices of the instrument is to be received.
  • the trading strategy for an instrument to be traded may hold technical indicators based on other financial instruments than the instrument to be traded. In this case, the financial instruments for such indicators have to be selected together with their timeframes/periods.
  • Examples of financial instruments which can be selected for a trading strategy according to the present invention, include: EURUSD, EURGPB, EURJPY, EURCHF, USDCHF, USDJPY, USDCAD, CADJPY, CHFJPY.
  • timeframes for the financial instruments may include timeframes such as:
  • a trading strategy When generating a trading strategy, it is preferred that the user generates the strategy by use of a computer, which again may be connected to a trading system 100 via a Host Server 102, as described in connection with Fig. 1.
  • Market price data and generated OHLC values for a selected instrument may be received at the user terminal 101 , and it is preferred that the user terminal has display software and a display unit for providing a graphical presentation of received market price data and/or OHLC values as a function of time for a selected financial instrument. Such a graphical presentation may help the user in deciding how to build a trading strategy.
  • a successful trading of the financial instrument may require that the trading strategy is developed based on the knowledge provided by the so-called “technical indicators”, and it is within embodiments of the present invention that a trading strategy is devel- oped based on one or more technical indicators, thereby associating such indicators with the financial instrument to be traded.
  • technical indicators which may be available for building a trading strategy:
  • a technical indicator for a financial instrument is based on one or more mathematical formulas and provides data results obtained by calculating these mathematical formulas, which may have one or more parameters, and which have as input or are based on one or more values of the set of market price values corresponding to the instrument.
  • a trading strategy may comprise one or several technical indicators, and may include one or more indicators for other financial instruments than the financial instrument to be traded. While it will often be preferred to have at least one indicator for the instrument to be traded, it is also possible to build a strategy having no indicators for the instrument to be traded.
  • the Commondity Channel Index (CCI) indicator is an example of a technical indicator which can be used for building a trading strategy.
  • CCI Commondity Channel Index
  • Lambert originally developed CCI to identify cyclical turns in commodities, but the indicator can successfully applied to indices, ETFs, stocks and other securities.
  • CCI measures the current price level relative to an average price level over a giv- en period of time. CCI is relatively high when prices are far above their average. CCI is relatively low when prices are far below their average. In this manner, CCI can be used to identify overbought and oversold levels.
  • CCI indicator is based on a 20-period Commodity Channel Index (CCI) calculation.
  • CCI Commodity Channel Index
  • SMA Simple Moving Average
  • Mean Deviation Mean Deviation
  • CCI (Typical Price - 20-period SMA of TP) / (0.015 x Mean Deviation) (1)
  • the inputs will be taken from the generated OHLC values of the financial instrument, for which the indicator is to be used.
  • TP Typical Price
  • a CCI indicator uses a "moving average", which can be selected from a number of moving averages such as SMA, EMA, LWMA, LMA, AMA, and in the formula (1) the Simple Moving Average, SMA, has been selected. Furthermore, it is necessary to define the number of time frames or time periods, for which the calculated Typical Price, TP, shall be averaged. In formula (1) the number of time periods is selected to 20.
  • the CCI indicator allows the Mean Deviation to be multiplied with a constant, and in formula (1) the constant is set to 0.015.
  • the inputs are selected as the High, Low, and Close values of the generated OHLC values within the time frames or periods of predetermined length.
  • four parameters shall be set: The price, the moving average to be used, the num- ber of time periods for which the price is to be averaged, and the constant to be multiplied with the calculated Mean Deviation.
  • the Typical prices and hence the HLC values for the 20 most recent time frames or periods shall be available. Every time a new set of HLC values are input to the indicator, a new value or result of the CCI indicator can be calculated.
  • an averaging function which may be a moving averaging function, which again may be selected from the functions: SMA, EMA, LWMA, LMA, and AMA.
  • an indicator with an averaging function in a trading strategy then in order to start or initialize the trading strategy or a trading robot using such trading strategy, the selected values of the OHLC values of a number of most recent time frames or periods need to be entered into the indicator of the trading strategy in order to calculate the indicator for the most recent time frame, thereby bringing the indicator and the trading strategy up to date.
  • indicators may be stored and calculated at a Host Server, such as Host Server 102 of system 100, and also here it is preferred that the user terminal has dis- play software for providing a graphical presentation via the display unit of the calculated indicators as a function of time. It is furthermore preferred that the calculated indicator values are displayed on the same display as the received market price data and/or OHLC values. Such a graphical presentation may help the user in deciding which indicators shall be used and to determine values of indicator variables.
  • trade trigger criteria are defined by one or more trade expressions.
  • a trade expression is a logic function, which defines one or more trade trigger criteria for the financial instrument to be traded, and which is at least partly based on calculated indicator values and/or one or more OHLC values.
  • a logic function of a trade expression may be a compare-expression, which again may be two or more compare-expressions being AND'ed or OR'ed together. The output of a trade expression will be true, when the expression if fulfilled, and false when not fulfilled,
  • An analogue value may be a fixed value, a variable, a function value, or the result of a series of mathematical operations.
  • a fixed value may be a hardcoded value entered at design time. For example 25, -1.25, 0, 32.765
  • a variable may be an input value made by the user at runtime, where the input value may be a fixed value.
  • a function value is a value returned by a built in function, which functions may be selected from a series of functions such as:
  • Price function Returns the selected price for the selected time frame/period for the selected instrument, eg. High Price for the period two time frames ago for the first instrument.
  • Indicator function Returns the selected indicator value for the selected period for the selected instrument, eg. 'Signal' value from the indicator MACD for the period two time frames ago for the first instrument.
  • Date/Time function Returns a value corresponding to any of the elements in a date, TimeOfDay, DayOfYear, DaylnWeek,
  • System function Returns a value of system stored values, eg. current trade position of a trading strategy or trading robot, OpenPositionTime (time when trading strate- gy or trading robot moves from neutral to long (buy) or short (sell) position), OpenPrice (opening price for the traded instrument of the most recent OHLC values), Profit-Of- Current-Position.
  • Math Function Returns a value of a system built math function, eg. min of two values, max of two values, square root of a value, ... .
  • a mathematical operation is a fixed value, a variable, or a function being added, subtracted, multiplied, divided with another fixed value, a variable, or a function.
  • a series of mathematical operations is one mathematical operation being added, sub- tracted, multiplied, or divided with another mathematical operation.
  • a trading strategy defines trading positions or states based on output values of the trade expressions. It is preferred that a trading strategy defines the three trading positions: neutral, long and short, as dis- cussed in connection with the Trading Robot. Thus a number of trade expressions shall be defined for moving the trading strategy between those three positions.
  • a first trade expression Expression Open Long, EOL may be defined for moving the strategy from neutral to long position, meaning that the strategy can only move from neutral to long when EOL if true.
  • a second expression Expression Close Long, ECL may be defined for moving the strategy from long back to neutral position, meaning that the strategy may move from long to neutral when ECL is true.
  • ECL may be equal to NOT EOL, meaning that ECL is true when EOL is false.
  • a third trade expression Expression Open Short, EOS may be defined for moving the strategy from neutral to short position, meaning that the strategy can only move from neutral to short when EOS if true.
  • a fourth expression Expression Close Short, ECS may be defined for moving the strategy from short back to neutral position, meaning that strategy may move from short to neutral when ECS is true. In a simple embodiment of the invention then ECS may be equal to NOT EOS, meaning that ECS is true when EOS is false.
  • a trading strategy comprises extra trade expressions for buying extra volume and for selling the extra volume when being in the long position.
  • a trading strategy comprises extra trade expressions for selling and extra volume and for buying the extra volume when being in the short position.
  • a user building a trading strategy has defined and stored two technical indicators.
  • The- se two indicators can be called and calculated for a first financial instrument to be traded, meaning that these indicators will be calculated based on generated OHLC values for the first instrument and within the time frame selected for this first instrument.
  • Both these two stored indicators can also be called and calculated for a second financial instrument, meaning that a called indicator is calculated based on generated OHLC values for the second instrument using the time frame selected for the second instrument.
  • the first indicator is named Exponential Moving Average, EMA
  • the second indicator is named Simple Moving Average, SMA.
  • the first instrument is named SymboH , and may be EURUSD
  • the second instrument is named Symbol2, and may be EURGBP.
  • the time frames for the first and second instruments may be set to 5 minutes.
  • first instruments first indicator is compared to first instruments second indicator.
  • the expression evaluates to TRUE if first indicators most resent calculated value is greater than second indicators most resent calculated value.
  • This expression may be extended to two compare expressions being AND'ed together: SymboH .EMA.EMA(O) > Symbol! SMA.SMA(O) and
  • the second compare expression means that second instruments first indicator is compared to second instruments first indicator.
  • the expression (4) evaluates to TRUE if the first compare expression is true, AND second instruments first indicator most resent calculated value is greater than second instruments first indicator next most resent calculated value.
  • the expression (4) may be changed by adding a fixed margin to the first compare expression: Symbol 1.EMA. EM A(0) > Symbol! SMA.SMA(O) + 0.0001 and
  • Var1 a parameter that influences the trading strategy:
  • the expression (7) evaluates to TRUE if first instruments first indicators most resent calculated value is smaller than first instruments second indicators most resent calculated value.
  • EOS The trade expression used for moving from neutral to short position, EOS, may be: Symbol! EMA. EMA(0) ⁇ Symbol! SMA.SMA(O) - Var1 and
  • the EOS expression (8) is similar to the EOL expression (6), but > has been replaced by ⁇ and Var1 is subtracted.
  • the trade expression used for moving back from short to neutral, ECS, may be:
  • FIG. 5 is a symbolic diagram illustrating the workflow of a strategy system for providing trade decisions according to an embodiment of the invention.
  • the operation of the strategy starts by an update 501 , where an instrument X having timeframe Y and being part of the strategy is updated 502, meaning that new prices for the instrument X are received from a Price Feed Engine 503, which may be stored at a Price Feed Server 107.
  • the instrument X for which new prices are received may be the instrument to be traded or any instrument being associated with an indicator being part of the strategy.
  • a new set of OHLC values are determined 504 from the new prices and stored in an OHLC Price Database 505, the indicators associated with the updated instrument X (if any) are calculated 504 and the obtained indicator values are stored 506.
  • the next step is to calculate the trade expressions EOL, ECL and EOS, ECS, boxes 507 and 508, taking into account the new OHCL values and indicator values.
  • the rules set up for determining the strategy position has three workflow branches: a first branch working on the results for the trade decisions operating on shifts between neutral and long; a second branch working on the results for the trade decisions operating on shifts between neutral and short; and a third branch operating on the results from the first and second branch.
  • the current strategy position/state of the first branch which can only be neutral (0) or long (1), is determined, 509. If state of first branch is 1 (long), then determine whether the expression
  • ECL True (10) is True or False, 510. If (10) is True, then the suggested state is 0 (neutral, go from long to neutral) 511 , and if (10) is False, then the suggested state is 1 (long, keep the current state) 512.
  • the current position/state of the second branch which can only be neutral (0) or short (1) is determined, 516. If state is 1 (short), then determine whether the expression
  • ECS True (12) is True or False, 517. If (12) is True, then the suggested state is 0 (neutral, go from short to neutral) 518, and if (12) is False, then the suggested state is 1 (short, keep the current state) 519.
  • the third branch operates to define the new position/state of the trading strategy based on the results of the first and the second branches.
  • the comparison equals a subtraction 525 of the two suggested state values, where the result for the strategy position/state is either 1 , 0, or -1 , 526, with the value 1 corresponding to the strategy position long, the value 0 corresponding to the strategy position neutral, and the value -1 corresponding to the strategy position short.
  • a timeframe of an instrument X being part of a stored trading strategy is ended, and new prices are fed to the strategy, 503.
  • a new set of OHLC values are generated and stored, 504 and 505, and the associated indicators are calculated and stored, 504 and 506.
  • the trade expressions are calculated, 507 and 508, and the strategy position functions are calculated, 509-526, thereby defining the updated trade position/state of the trading strategy as a result of the updated new prices for instrument X. If the result is a shift in strategy position/state, this equals either a buy or a sell trade deci- sion/advice.
  • the trade expressions may be stored and calculated at the Host Server 102 of system 100, and the Host Server 102 may comprise software to run the Strategy position func- tions based on the received trade expressions.
  • the obtained strategy positions/states may be returned to the user terminal 101 , and it is preferred that the user terminal has display software for providing a graphical presentation via the display unit of the calculated strategy positions/states as a function of time. It is furthermore preferred that the calculated strategy positions/states are displayed on the same display as the received market price data and/or OHLC values. Such a graphical presentation may help the user in determining whether his trade expressions give the anticipated decisions/advice or not at to determine values of trade expression variables.
  • Fig. 6 is a flow chart illustrating a back-test process for a trading strategy according to an embodiment of the second aspect of the invention.
  • the trading strategy may comprise technical indicators, which may include one or more parameters, and the trade expressions may also comprise one or more parameter, where the parameter values can be changed in order to optimize the trading strategy.
  • a Back-Test Server 104 may be responsible for running the back-tests.
  • Fig. 6 the user selects which parameters for the indicators and trade expressions he wants to optimize 601. For each parameter he selects a start value, an end value and an increment value 602, Assign initial Values into Parameters. The start date and end date for the testing period are also entered 603, Set Start Date: Start date is assigned into "Current" date.
  • Next step is to load OHLC for "Current" date for all instruments, update all indicators for the loaded OHLC values, and to calculate the trade expressions, 604.
  • the OHLC values may be loaded from the OHLC Price Database 106.
  • the new calculation is better, 610, the values of the new performance and the corresponding parameters are stored, 611. More Combination of Parameters, 612. If there are more combinations of parameter values to be tested, one of the parameter values is incremented by the "increment value" and assigned into the parameter 613 and a new test cycle can begin. Once all combinations of parameter values have been tested, the best overall combination of parameters will be presented for the user, 614, and the back-test ends.
  • Figs. 7a-z are screen shots illustrating a method of generating a trading strategy ac- cording to an embodiment of the second aspect of the invention.
  • a first financial instrument to be traded Fig. 7a
  • Fig. 7a which is this case is the exchange rate between EURO and US Dollars, EURUSD.
  • a timeframe for update of OHLC values for the instrument which in this case is 5 minutes, Fig. 7b.
  • a snapshot of the OHLC values for the instrument is displayed in Fig. 7c for a period of 24 hours.
  • Fig. 7d shows a list of indicators, and the user selects an indicator to be added to the instrument with the Exponential Moving Average, EMA, indicator being selected. Next, the parameters for the indicator are edited, see Fig. 7e. A snapshot of the instrument OHLC values together with the calculated indicator values is displayed in Fig. 7f for a period of 5 hours 30 minutes.
  • EMA Exponential Moving Average
  • the user decides to add a second indicator to the first selected instrument.
  • the second indicator is the Simple Moving Average, SMA, indicator, and a snapshot of the instrument OHLC values together with the calculated SMA indicator values is displayed in Fig. 7g for a period of 5 hours 30 minutes.
  • the user decides to use the two indicators, EMA and SMA, on a second financial in- strument, which here is the exchange rate between EURO and GBP, EURGPB, also with a timeframe of 5 minutes. It is the first instrument EURUDS, that is to be traded, whereas the indicators based on the second instrument is only used for building the strategy.
  • a snapshot of the instrument OHLC values together with the calculated indicator values for both the first and second instrument is displayed in Fig. 7h for a period of 5 hours 30 minutes.
  • the visual graph of Fig. 7h may be converted to a schematic format shown in Fig. 7i, which shows the instruments with corresponding timeframes and indicators.
  • the EURUSD instrument is displayed with the timeframe of 5 minutes and the EMA and SMA indicators.
  • the first trade expression EOL, Expression Open Long or neutral to long expression, see expression (3) is added as shown in Fig. 7j.
  • first instruments first indicator is compared to first instruments second indicator.
  • the expression evaluates to TRUE if the first indicators most resent calculated value is greater than second indicators most resent calculated value.
  • the trade expression (3) is extended to expression (4) as shown in Fig. 7k.
  • a second expression part is added to the first expression part (3), with the second instruments first indicator being compared to second instruments first indicator.
  • the expression (4) evaluates to TRUE if first part (3) of expression is true, AND second instruments first indicator most resent calculated value is greater than second instru- ments first indicator next most resent calculated value, second expression part.
  • the expression (4) may be changed by adding a fixed margin to the first part of the expression, se expression (5), which is illustrated in Fig. 7I.
  • the fixed margin may be replaced by a parameter
  • Fig. 7m shows the creation of a parameter, Varl
  • Var1 is added to the expression (5) instead of the fixed value, se expression (6) and Fig. 7n.
  • EOL neutral to long expression
  • ECL Expression Close Long
  • FIG. 7p is a screen shot illustrating the trade decision/advice, which can be obtained by the current strategy having only the EOL and ECL trade expressions.
  • Graph 1 of Fig. 7p shows OHLC values of the first instrument with calculated indicator values.
  • Graph 2 of Fig. 7p shows the output of the strategy position functions based on the expressions EOL and ECL. The ⁇ ' value signals 'go neutral and stay neutral' and the value signals 'go Long and stay Long'.
  • Graph 3 shows the estimated profit in pips based on buy orders given when changing position from 0 to 1 and sell orders given when changing position from 1 to 0.
  • the user also wants to include trade expressions for moving between the neutral and short positions, EOS and ECS.
  • EOS Expression Open Short
  • the strategy positions resulting from these expressions can be determined using the rules defined by the second branch of Fig. 5, steps 516-522.
  • the final strategy position is calculated by adding the rules defined by the third branch of Fig. 5, steps 523-526, to the results of the first and second branches.
  • Fig. 7s is a screen shot illustrating the trade decision/advice, which can be obtained by the strategy when using all four trade expressions EOL, ECL, EOS, ECS.
  • Graph 1 of Fig. 7s shows OHLC values of the first instrument with calculated indicator values.
  • Graph 2 of Fig. 7s shows the output of the strategy position functions. The ⁇ ' value signals 'go neutral and stay neutral', the '1 ' value signals 'go Long and stay Long', and the '-V value signals 'go Short and stay Short'.
  • Graph 3 shows the estimated profit in pips based on buy orders given when changing position from 0 to 1 or from position -1 to 0, and sell orders given when changing position from 1 to 0 or from 0 to -1.
  • Graph 4 of Fig. 7s shows the OHLC values of the second instrument together with the calculat- ed indicator values.
  • the strategy may be optimized further than what can be obtained from look- ing at the screen shots or displays.
  • the user may conduct a back-test of the strategy in order to optimize parameters of the indicators and/or trade expressions.
  • values of the parameter Var1 for the margin in the expressions for EOL (6) and EOS (8) may be tested, and parameter values of the first indicator EMA, Exponential Moving Average, of the first instrument, EURUSD, may be tested.
  • the parameter to be tested for the EMA indicator is the number of periods or time frames for which the calculated price, which may be the Typical Price, is averaged.
  • a window may be displayed showing the status of the test.
  • a status window is shown in Fig. 7u, which shows that the selected test peri- od consist of 9217 candlesticks (OHLC), and that the number of unique combinations of "Margin” (Var1) and “Number of Periods” are 14040. Status so far is that 4215 combinations have been calculated, and the remaining calculation time is 22 seconds.
  • the back-test software may be adapted to suggest several solutions for selecting an optimized strategy, where the solutions are based on the obtained and stored results from running the back-test. This is illustrated in Fig. 7v which is a screen shot being shown when all combinations have been back-tested, and which displays 8 different ways to optimize the strategy.
  • the "Best iteration profit” is selected, and from this selection the back-test software suggests that Margin, Var1 , is set to 0.0004 and Number of Periods is set to 23.
  • Margin, Var1 is set to 0.0004
  • Number of Periods is set to 23.
  • the trading strategy is finally complete, and the components of the strategy can be displayed as shown in Fig. 7y, which shows the selected instruments with timeframes, the indicators, the trade expressions, and the parameter values.
  • the generated strategy may be given an Id, a Name and a Comment, as shown in Fig. 7z, and be stored in a database, which may be at the Database Server 105.
  • the obtained trading strategy can now be used in one or more trading robots, where the decision/advise from the strategy may result in buying and selling orders for the first instrument on the Trading Exchange 108.

Abstract

There is provided a computerized method and system for automatically communicating trade orders for a financial instrument in response to received market price data, where the trade orders are communicated via a trading robot server to an on-line trading account at a trading exchange. The method comprises providing a trading robot for a selected financial instrument at a robot server, where the trading robot comprises a trading strategy, data for a volume of the selected financial instrument to be traded, and the trading account to trade from. The trading strategy holds trade trigger criteria for the selected instrument and is configured to generate trade decisions in response to the trade trigger criteria being met. The trade trigger criteria are related to changes in market price data for one or more financial instruments, and the trading robot is configured to communicate trade orders to the trading account at the trading exchange based at least partly upon trade decisions generated from the trading strategy. The method further comprises providing real time market price data as a function of time for the financial instruments related to the trade trigger criteria, and starting the trading robot and calculating the trading strategy to thereby start automatically forwarding of trade orders in response to the received real time market price data. There is also provided a method for generating a trading strategy for a financial instrument, and a system for providing trade decisions or advices for trade orders for a financial instrument.

Description

A METHOD AND A SYSTEM FOR COMMUNICATING TRADE ORDERS FOR A FINANCIAL INSTRUMENT, A METHOD FOR GENERATING A TRADING STRATEGY FOR A FINANCIAL INSTRUMENT AND A TRADING STRATEGY SYSTEM FOR PROVIDING TRADE DECISIONS FOR A FINANCIAL INSTRUMENT
FIELD OF THE INVENTION
The present invention relates generally to the trading of financial instruments, and more particularly to a method and a system for communicating trade orders for a financial instrument to an on-line trading account at a trading exchange. The present invention further relates to a method for generating a trading strategy for a financial instrument and a trading strategy system for providing trade decisions for a financial instrument.
BACKGROUND OF THE INVENTION
Over recent years, two particular topics have been given substantial attention. One of these topics is the trading of various types of financial instruments, such as securities, stocks, bonds, currencies, options, futures and derivatives thereof. As used herein the terms trade and/or trading generally refers to transactions such as buying and/or sell- ing. The successful trading of such financial instruments often involves the research, development and historical testing of a system or methodology, a "Trading Strategy". Such a Trading Strategy may be used by a trader for exploiting anticipated price change opportunities, and also for controlling risk because prices often move contrary to the direction anticipated by the trader. Thus, the trader's function is to attempt to develop a Trading Strategy, which strikes a fine balance between profit seeking and risk control, for creating risk-adjusted profits in excess of the return on market indexes.
A great amount of knowledge based on research, development and historical testing of trading of financial instruments is available through the so-called "technical indicators". Thus, there is a need for an efficient method and system for generating a Trading Strategy making use of the knowledge provided through the technical indicators.
Once the trader has developed an objective Trading Strategy, the actual execution of the Strategy requires market price monitoring and responsive order entry/cancellation activity. It is known that even brief lapses in trader attentiveness and immediate reac- tion to market changes will often result in violation of the Trading Strategy's fine balance between profit seeking and risk control. In this regard, active traders often have limited opportunities to invest their time in other important activities, such as research. The other topic is the rapid growth in the use of the Internet to facilitate the trading of financial instruments on-line. In this regard, the financial institutions, including brokerages, which make up and/or provide access to the various financial instruments marketplaces, have implemented "on-line" services, which allow customers to engage in trading over data communications networks, including the Internet. As a result, nearly any investor having access to the Internet may more directly engage in trading activity without being forced to speak to a broker to enter their orders in the marketplace for execution.
While that development has significantly reduced order entry labor for the on-line bro- kerages, their trader/customers' order entry labor burden remains largely unchanged, merely converted from dialing the telephone to tapping the computer keyboard keys can clicking the mouse. Therefore, those who are not ready or able to make themselves constantly available to monitor the markets and immediately manually enter their orders in response to changes in market conditions, are still precluded from the benefits to be derived from the consistent and disciplined conformance with an objective Trading Strategy.
Thus, there is a need for a more efficient method and system for trade order entry in comparison to the prior art.
SUMMARY OF THE INVENTION
According to a first aspect of the invention there is provided a computerized method for automatically communicating trade orders for a financial instrument in response to re- ceived market price data, said trade orders being communicated via a trading robot server to an on-line trading account at a trading exchange, said method comprising: providing a trading robot for a selected financial instrument at a robot server, said trading robot comprising a trading strategy, data for a volume of the selected financial instrument to be traded, and the trading account to trade from, said trading strategy holding trade trigger criteria for the selected instrument and being configured to generate trade decisions in response to the trade trigger criteria being met, said trade trigger criteria being related to changes in market price data for one or more financial instruments, and said trading robot being configured to communicate trade orders to the trading account at the trading exchange based at least partly upon trade decisions generated from the trading strategy;
providing at the trading robot real time market price data as a function of time for the financial instruments related to the trade trigger criteria; and
starting the trading robot and calculation of the trading strategy and thereby starting automatically forwarding of trade orders in response to the received real time market price data.
Here, one or more of the trade trigger criteria may be related to the market price data for the selected financial instrument, and the received market price data may include the market price data for the financial instrument.
The method of the first aspect of the may further comprise the step of initializing the trading robot and the trading strategy before the step of starting the trading robot.
It is within an embodiment of the first aspect of the invention that the trading robot holds one or more trading termination criteria.
For the first aspect of the invention, the trading strategy may be stored in a database server and the step of providing the trading robot at the robot server may comprise loading the trading strategy from the database server into the trading robot.
For the first aspect of the invention it is preferred that the trading strategy is configured for generating trade decisions corresponding to shifts between a neutral trade position and a long trade position and between the neutral trade position and a short trade position. Preferably, the trade decisions being output/generated by the trading strategy may be based on inputs of sets of market price values determined from market price data within succeeding periods of time or time frames, which time frames may be of equal or different length, with one set of market price values being collected for each time frame. Here, a set of market price values for a financial instrument may comprise opening and closing prices and highest and lowest prices of the financial instrument within the corresponding time frame, also referred to as open-high-low-close or OHLC prices. It is within an embodiment of the first aspect of the invention that the step of providing real market price data as a function of time for the financial instrument(s) related to the trade trigger criteria comprises:
determining and storing sets of complete time-frame Open- High-Low-Close, OHLC, market price values for at least one of the financial instruments related to the trade trigger criteria, with a set of complete time-frame OHLC values being determined and store for each of a number of succeeding complete time-frame periods of equal length; and
determining and storing a set of partial time-frame OHLC values for said at least one financial instrument for a partial time-frame period following the last completed time frame period with stored complete time-frame OHLC values, said partial timeframe period being shorter than a complete time-frame period; and
wherein the calculation of the trading strategy is at least partly based on one of more of the sets of complete time-frame OHLC values and the set of obtained partial time-frame OHLC values. The complete time-frame OHLC values and partial timeframe OHLC values may be determined from the market price data for the selected financial instrument being traded.
When starting the trading robot, it may be started at a start time frame, and the step of initializing the trading robot and the trading strategy may comprise providing sets of market price values collected within a number of time frames preceding the starting time frame and computing the trading strategy for these generated sets of market price values thereby bringing the trading strategy to at state representing the current market for the selected financial instrument.
It is preferred that the trading strategy comprises one or more technical indicators for one or more of the financial instruments related to the trade trigger criteria, where an indicator for a financial instrument provides data results obtained by calculating one or more corresponding mathematical formulas having one or more parameters and having as input one or more values of the set of market price values corresponding to the instrument. Here, the market price values being input to the formula of an indicator may be a combination of one or more of the opening, closing, highest and lowest price val- ues collected within the time frames. It is within an embodiment of the invention that the data output of an indicator is calculated based on market price values received within a predetermined number of succeeding time frames. Such predetermined number may be defined by a parameter of the indicator formula, and the indicator may have an averaging formula to be calculated for the predetermined number of succeeding time frames.
It is within one or more embodiments of the first aspect of the invention that the trading strategy comprises a number of predefined trade expressions being logic functions each defining one or more trade trigger criteria for the selected financial instrument, which trade expressions are at least partly based on calculated indicator values and/or one or more values of the sets of market price values. It is preferred that the trading strategy comprises a number of strategy position functions defining a number of strategy positions based on output values of the trade expressions, wherein a shift between strategy positions is at least partly determined by a shift in a trade expression output corresponding to a trade trigger criteria being met, and wherein a shift in strategy position corresponds to a trade decision. It is preferred that the strategy position function(s) define at least two trade strategy positions corresponding to a neutral and a long trade strategy position, or to a neutral and a short trade strategy position, or define three strategy positions corresponding to a neutral, a long, and a short trade strategy posi- tion. The outputs of the trade expressions may be used for generating trade decisions corresponding to shifts between a neutral trade position and a long trade position and/or between the neutral trade position and a short trade position. It is also within embodiments of the invention that one or more of the trade expression comprise one or more parameters.
According to an embodiment of the first aspect of the invention, a first set of trade expressions are used for generating trade decisions corresponding to shifts between the neutral trade position and the long trade position, and a second set of trade expressions are used for generating trade decisions corresponding to shifts between the neu- tral trade position and the short trade position. Here, the first set of trade expressions may comprise a first and a second trade expression, Expression Open Long (EOL) and Expression Close Long (ECL), and the second set of trade expressions may comprise a third and a fourth trade expression, Expression Open Short (EOS) and Expression Close Short (ECS). It is preferred that the trade orders forwarded by the trading robot are buying and/or selling orders for a selected volume of the selected financial instrument. A buying order for a volume of the selected financial instrument may be forwarded by the trading robot to the trading exchange upon the trading strategy generating a trade decision corre- sponding to a shift from neutral to long position, and a selling order for a volume may be forwarded by the trading robot upon the trading strategy generating a trade decision corresponding to a shift from long to neutral position. A selling order for a volume of the selected financial instrument may be forwarded by the trading robot to the trading exchange upon the trading strategy generating a trade decision corresponding to a shift from neutral to short position, and a buying order for a volume may be forwarded by the trading robot upon the trading strategy generating a trade decision corresponding to a shift from short to neutral position.
It is within an embodiment of the first aspect of the invention that
when the trading robot has forwarded a buying order for a volume of the selected financial instrument and moved to a position of holding the bought volume, then the trading robot based on the received real time market price data eval uates the trade result of the bought volume and compares this trade result with a pre- stored take-profit-trade-limit and a pre-stored stop-loss-trade-limit, and if this trade result is larger than or equal to the take-profit-trade-limit or smaller than or equal to the stop-loss-trade-limit, then
the trading robot forwards a selling order for the bought volume.
Here, the trade result of a bought volume may be found by taking the difference between the last offered sales price and the price given for the bought volume.
It is also within an embodiment of the first aspect of the invention that
when the trading robot has forwarded a selling order for a volume of the selected financial instrument and moved to a position of holding the sold volume,
then the trading robot based on the received real time market price data eval uates the trade result of the sold volume and compares this trade result with a pre- stored take-profit-trade-limit and a pre-stored stop-loss-trade-limit, and if this trade result is larger than or equal to the take-profit-trade-limit or smaller than or equal to the take-loss-trade-limit, then
the trading robot forwards a buy order for the sold volume. Here, the trade result of a sold volume may be found by taking the difference between the actual sales price and the last offered buy price.
It the trading robot has forwarded a sell or a buy order due to one of the pre-stored stop-loss or take-profit value being met, then it is preferred that the trading robot awaits the trading strategy generating a trade decision corresponding to going back to neutral position before forwarding further trade orders.
It is preferred that the method of the first aspect of the invention further comprises the step of monitoring and storing the trade result, being profit or loss or neutral, of each trade order, and determining an accumulated trading result being the sum of the results of each trade order. The result of a trade order may be determined as the result of a trade order cycle, where a trade order cycle is when a selling order has followed a buying order or when a buying order has followed a selling order. The trading robot may be configured to determine the accumulated trading result.
It is also within an embodiment of the first aspect of the invention that the termination criteria of the trading robot comprises a stop-loss and a take-profit criterion, and that the method further comprises stopping forwarding of trade orders from the trading robot if the accumulated profit is larger than or equal to the take-profit value or the accumulated loss is larger than or equal to the stop-loss value. The method of the first aspect of the invention may further comprise changing the volume to be traded based on the determined accumulated trading result. Here, the trading volume may be increased when the accumulated trading result has increased for each trading cycle in a prede- termined number of succeeding trading cycles. Also, the trading volume may decreased when the accumulated trading result has decreased for each trading cycle in a predetermined number of succeeding trading cycles. It is preferred that the trading robot is configured to perform such change of the trading volume. It is also within an embodiment of the first aspect of the invention that the method further comprises stopping forwarding of trade orders after forwarding a first trade order, being a buy or sell order, or after forwarding a trade order cycle, being a buy order followed by a sell order or being a sell order followed by a buy order. The method may also comprise stopping forwarding of trade orders when a predetermined date and time occurs. According to the first aspect of the invention there is also provided a trading system for automatically communicating trade orders for a financial instrument in response to market price data/values, said trade orders being communicated to an on-line trading account at a trading exchange, said system comprising:
a trading robot server having a market price value memory for storing one or more sets of market price data/values for financial instruments;
said trading robot server storing data for a volume of a financial instrument to be traded, the trading account to trade from, and a trading strategy;
wherein the trading strategy holds trade trigger criteria for the instrument to be traded, said trade trigger criteria being related to changes in market price values for one or more financial instruments, and wherein the trading strategy is configured to generate strategy trade positions, with a shift between strategy positions being at least partly determined by a trade trigger criteria being met;
wherein the trading robot server further comprises one or more processing units for calculating the trading strategy and determining strategy position; and
wherein the trading robot server is configured to communicate trade orders to the trading account at the trading exchange based at least partly upon shifts between strategy positions obtained from calculating the trading strategy
For the system of the first aspect of the invention it is preferred that the trading strategy comprises:
one or more technical indicators for at number of financial instrument(s), where an indicator provides data results obtained by calculating one or more corre- sponding mathematical formulas having one or more parameters and having as input one or more values of a set or sets of market price values corresponding to the instrument;
a number of trade expressions being logic functions each defining one or more trade trigger criteria for a financial instrument to be traded and being based at least partly on calculated indicator values and/or one or more values from the set(s) of market price values;
a number of strategy position functions defining a number of strategy positions based on output values of the trade expressions, wherein a shift between strategy positions is at least partly determined by a shift in a trade expression output corresponding to a trade trigger criteria being met; and that the trading robot server further comprises one or more processing units for calculating the trading strategy by calculating the indicator formula(s), the trade expressions, the strategy position functions and by determining the strategy positions. Thus the first aspect of the invention also provides a trading system for automatically communicating trade orders for a financial instrument in response to market price data/values, said trade orders being communicated to an on-line trading account at a trading exchange, said system comprising:
a trading robot server having a market price value memory for storing one or more sets of market price values for financial instruments;
said trading robot server storing data for a volume of a financial instrument to be traded, the trading account to trade from, and a trading strategy, wherein the trading strategy comprises:
one or more technical indicators for at number of financial instrument(s), where an indicator provides data results obtained by calculating one or more corresponding mathematical formulas having one or more parameters and having as input one or more values of a set or sets of market price values corresponding to the instrument;
a number of trade expressions being logic functions each defining one or more trade trigger criteria for a financial instrument to be traded and being based at least partly on calculated indicator values and/or one or more values from the set(s) of market price values;
a number of strategy position functions defining a number of strategy positions based on output values of the trade expressions, wherein a shift between strategy posi- tions is at least partly determined by a shift in a trade expression output corresponding to a trade trigger criteria being met;
wherein the trading robot server further comprises one or more processing units for calculating the trading strategy by calculating the indicator formula(s), the trade expressions, the strategy position functions and by determining the strategy posi- tion; and
wherein the trading robot is configured to communicate trade orders to the trading account at the trading exchange based at least partly upon shifts between strategy positions obtained from calculating the trading strategy. It is preferred that the systems of the first aspect of the invention further comprises: a display unit providing a graphical presentation of one or more sets of stored market price values;
a display unit providing a graphical presentation of the calculated indicator results; and/or
a display unit providing a graphical presentation of the determined strategy positions.
It is also within embodiments of the systems of the first aspect of the invention that the system further comprises a display unit providing a graphical presentation of the com- municated trade orders.
Also for the systems of the first aspect of the invention is it preferred that a set or sets of market price values corresponding to a selected financial instrument is/are determined from market price data received for the instrument within succeeding periods of time or time frames, which may be of equal length or different length, and wherein a set of market price values comprises opening and closing prices and highest and lowest prices for the financial instrument within the corresponding time frame, also referred to as open-high-low-close or OHLC prices. The sets of market price values determined within time frames of different length may be determined from the market price data for the selected financial instrument being traded.
The systems of the first aspect of the invention also covers embodiments, wherein the trading strategy or the strategy position function(s) define at least two trade strategy positions corresponding to a neutral and a long trade strategy position, or to a neutral and a short trade strategy position, or define three strategy positions corresponding to a neutral, a long, and a short trade strategy position. The trading strategy may comprise a first set of trade expressions for generating trade decisions corresponding to shifts between the neutral trade position and the long trade position, and may further comprise a second set of trade expressions for generating trade decisions correspond- ing to shifts between the neutral trade position and the short trade position. Here, the first set of trade expressions may comprise a first and a second trade expression, Expression Open Long (EOL) and Expression Close Long (ECL), and the second set of trade expressions may comprise a third and a fourth trade expression, Expression Open Short (EOS) and Expression Close Short (ECS). It is preferred that the stored strategy position function(s) is/are configured so that a shift from neutral to long posi- tion is allowed only when the criteria defined by EOL is fulfilled and the criteria defined by ECL is not fulfilled. The strategy position function(s) may further be configured so that a shift from long to neutral position is allowed when the criteria defined by ECL is fulfilled. It is also preferred that the strategy position function(s) is/are configured so that a shift from neutral to short position is allowed only when the criteria defined by EOS is fulfilled and the criteria defined by ECS is not fulfilled. The strategy position function(s) may further be configured so that a shift from short to neutral position is allowed when the criteria defined by ECS is fulfilled. The first aspect of the invention also cover embodiments, wherein the strategy position function(s) is/are configured so that when EOL is fulfilled while ECL is not fulfilled indicating a shift to the long position, and EOS is fulfilled while ECS is not fulfilled indicating a shift to short position, then if the strategy is in the neutral position, it stays in the neutral position, or if the strategy is in the long or the short position, it shifts to neutral position.
Also for the systems of the first aspect of the invention, one or more of the trade expressions may comprise one or more parameters. It is also within embodiments of the systems of the first aspect of the invention that the trade orders are buy and sell orders given in accordance with the shifts in strategy positions.
It is within one or more embodiments of the system of the first aspect of the invention that the robot server further comprises a processing unit for monitoring and storing the trade rsult, being profit or loss or neutral, of each trade order, and for determining an accumulated trading result being the sum of the result of each trade order. Furthermore, the system may comprise a display unit for providing a graphical presentation thereof.
It is also within one or more embodiments of the systems of the first aspect of the in- vention that the trading robot server stores one or more trading termination criteria. The termination criteria of the trading robot may comprise a stop-loss and a take-profit criterion, and the trading robot server may be configured to stop forwarding of trade orders if the accumulated profit is larger than or equal to the take-profit value or the accumulated loss is larger than or equal to the stop-loss value. According to a second aspect of the present invention there is provided a computer- assisted method for generating a trading strategy providing trade decisions /advices for trade orders for a financial instrument in response to market price data, said method comprising:
selecting one or more financial instruments, one of which is to be traded, each instrument having a corresponding set or sets of market price values being determined from market price data for the instrument;
providing and storing one or more technical indicators for at least part of the selected instrument(s), where an indicator provides data results obtained by calculating one or more corresponding mathematical formulas having one or more parameters and having as input one or more values of the set(s) of market price values corresponding to the instrument;
defining and storing a number of trade expressions being logic functions each defining one or more trade trigger criteria for the financial instrument to be traded, which trade expressions are at least partly based on calculated indicator values and/or one or more values from the set(s) of market price values; and
providing and storing a number of strategy position functions defining a number of strategy positions based on output values of the trade expressions, wherein a shift between strategy positions is at least partly determined by a shift in a trade ex- pression output corresponding to a trade trigger criteria being met, and wherein a shift in strategy position corresponds to a trade decision/advice.
The method of the second aspect of the invention may further comprise providing the set(s) of market price values for the selected financial instrument(s) and providing a graphical presentation thereof; and calculating the indicator formula(s) to obtain indicator results as a function of at least part of the selected market price values and providing a graphical presentation thereof. The method may also comprise calculating the trade expression functions as a function of the calculated indicator output values and/or one or more values from the set(s) of market price values; and determining the strategy positions based on the calculated trade expression output values and providing a graphical presentation thereof.
The second aspect of the invention also comprise a computer-assisted method for generating a trading strategy providing trade decisions /advices for trade orders for a financial instrument in response to market price data, said method comprising: selecting one or more financial instruments, one of which is to be traded, each instrument having a corresponding set or sets of market price values being determined from market price data for the instrument;
providing and storing one or more technical indicators for at least part of the selected instrument(s), where an indicator provides data results obtained by calculating one or more corresponding mathematical formulas having one or more parameters and having as input one or more values of the set(s) of market price values corresponding to the instrument;
providing the set(s) of market price values for the selected financial instru- ment(s) and providing a graphical presentation thereof;
calculating the indicator formula(s) to obtain indicator results as a function of at least part of the selected market price values and providing a graphical presentation thereof;
defining and storing a number of trade expressions being logic functions each defining one or more trade trigger criteria for the instrument to be traded, which trade expressions are at least partly based on calculated indicator values and/or one or more values from the set(s) of market price values;
providing and storing a number of strategy position functions defining a number of strategy positions based on output values of the trade expressions, wherein a shift between strategy positions is at least partly determined by a shift in a trade expression output corresponding to a trade trigger criteria being met, and wherein a shift in strategy position corresponds to a trade decision/advice;
calculating the trade expression functions as a function of the calculated indicator output values and/or one or more values from the set(s) of market price values; and
determining the strategy positions based on the calculated trade expression output values and providing a graphical presentation thereof.
For the methods of the second aspect of the invention it is preferred that sets of market price values are determined from market price data received for the corresponding financial instrument within succeeding periods of time or time frames, which may be of equal length or different length. Here, the sets of market price values may be updated for each time frame. Preferably, a set of market price values comprises opening and closing prices and highest and lowest prices for the financial instrument within the cor- responding time frame, also referred to as open-high-low-close or OHLC prices. It is within embodiments of the second aspect of the invention that the strategy position function(s) define at least two trade strategy positions corresponding to a neutral and a long trade strategy position, or to a neutral and a short trade strategy position, or define three strategy positions corresponding to a neutral, a long, and a short trade strategy position. Here, a shift from neutral to long position may generate a trade decision/advice corresponding to a "buy" order, a shift from long to neutral position may generate a trade decision/advice corresponding to a "sell" order, a shift from neutral to short position may generate a trade decision/advice corresponding to a "sell" order, and a shift from short to neutral position may generate a trade decision/advice corresponding to a "buy" order. It is preferred that a first set of trade expressions are used for generating trade decisions corresponding to shifts between the neutral trade position and the long trade position, and that a second set of trade expressions are used for generating trade decisions corresponding to shifts between the neutral trade posi- tion and the short trade position. The first set of trade expressions may comprise a first and a second trade expression, Expression Open Long (EOL) and Expression Close Long (ECL). The second set of trade expressions may comprise a third and a fourth trade expression, Expression Open Short (EOS) and Expression Close Short (ECS). Also for the methods of the second aspect of the invention is it preferred that the strategy position function(s) is/are configured so that a shift from neutral to long position is allowed only when the criteria defined by EOL is fulfilled and the criteria defined by ECL is not fulfilled. The strategy position function(s) may further be configured so that when the strategy is in the long position and the criteria defined by ECL is fulfilled, then the strategy shifts from long to neutral position. It is also preferred that the strategy position function(s) is/are configured so that a shift from neutral to short position is allowed only when the criteria defined by EOS is fulfilled and the criteria defined by ECS is not fulfilled. The strategy position function(s) may further be configured so that when the strategy is in the short position and the criteria defined by ECS is fulfilled, then the strategy shifts from short to neutral position.
The second aspect of the invention also cover embodiments, wherein the strategy position function(s) is/are configured so that when EOL is fulfilled while ECL is not fulfilled indicating a shift to the long position, and EOS is fulfilled while ECS is not fulfilled indi- eating a shift to short position, then if the strategy is in the neutral position, it stays in the neutral position, or if the strategy is in the long or the short position, it shifts to neutral position.
The methods of the second aspect of the invention may further comprise calculating the result of a simulated trading process corresponding to giving trade orders for the financial instrument to be traded, said trade orders following the trade decisions/advices generated with the shifts in the determined strategy positions, and providing a graphical presentation thereof. The trade orders may be buy and sell orders given in accordance with the shifts in strategy positions.
Also for the second aspect of the invention one or more of the trade expressions may comprise one or more parameters.
The methods of the second aspect of the invention also cover embodiments further comprising the step of back-testing the generated strategy. Here, a back-testing process or step may comprise:
providing and storing the selected market price values for a number of succeeding historic time frames, said market price values being determined from market price data obtained within the number of historic time frames;
computing the indicator(s), the trade expressions and the shifts in trading strategy based on the provided market price values to thereby obtain a set of back-test strategy positions for a number of succeeding historic time frames;
storing the set of back-test strategy positions;
simulating buy and sell trade orders for the financial instrument to be traded, said buy and sell orders corresponding to shifts in the stored strategy positions; and evaluating the trade result of the simulated back-test trading orders.
The step of evaluating the result of the simulated back-test trading orders may comprise evaluating the trade result, being profit or loss or neutral, of each buy and sell trade order, and determining an accumulated trading result being the sum of the results of each trade order within the number of succeeding time frames. It is preferred that the result of a trade order is evaluated based at least partly on one or more of the selected market price values belonging to the time frame corresponding to the shift in strategy position resulting in the trade order. The methods of the second aspect of the invention may further comprise an optimization of the obtained trading strategy, said optimization comprising:
a) performing a back-test for the trading strategy with a selected set of indicator and/or trade expression parameter values;
b) changing the value of one or more of the parameters of the indicators and/or the trade expressions;
c) performing a back-test for the trading strategy with the new parameters; d) comparing the back-test results for the strategy with the stored results of a previous back-test; and
e) storing the best of the two back-test results.
Here, steps b-e may be repeated a number of times, and a set of parameters for the indicators and/or trade expressions giving the best back-test result may be selected and stored to thereby define the optimized trading strategy. Steps b-e may be repeated a number of times determined by the number of parameters being back-tested and the number of values being back-tested for each combination of parameters. The selected parameters may be the parameters for the strategy having the best accumulated trade result. When a trading strategy has been generated according to the methods of the second aspect of the invention, such a method may further comprise storing in a database server the generated trading strategy for the selected financial instrument, said trading strategy including the technical indicators with parameters, the trade expressions with parameters, and the strategy position functions.
It should be understood that the present invention also covers one or more embodiments, wherein a trading strategy generated according to a method selected from the methods of the second aspect of the invention may be used in one or more of the methods and systems of the first aspect of the invention.
According to the second aspect of the invention there is also provided a trading strategy system for providing trade decisions /advices for trade orders for a financial instrument in response to market price data, said system comprising:
a market price value memory for storing one or more sets of market price val- ues, where each set of market price values correspond to a selected financial instru- ment, and where each set of market price values is determined from market prices for the corresponding instrument;
an indicator memory storing one or more technical indicators for at least part of the selected instrument(s), where an indicator provides data results obtained by cal- culating one or more corresponding mathematical formulas having one or more parameters and having as input one or more values of the set or sets of market price values corresponding to the instrument;
a processing unit for calculating the indicator formula(s);
a trade expression memory storing a number of trade expressions being logic functions each defining one or more trade trigger criteria for a financial instrument to be traded, which trade expressions are at least partly based on calculated indicator values and/or one or more values from the set(s) of market price values;
a processing unit for calculating the trade expressions;
a strategy position memory storing a number of strategy position functions de- fining a number of strategy positions based on output values of the trade expressions, wherein a shift between strategy positions is at least partly determined by a shift in a trade expression output corresponding to a trade trigger criteria being met, and wherein a shift in strategy position corresponds to a trade decision/advice; and
a processing unit for calculating the strategy position functions and determine the strategy positions.
The system of the second aspect of the invention may further comprise: a display unit providing a graphical presentation of one or more sets of stored market price values; and a display unit providing a graphical presentation of the calculated indicator results. The system may also comprise a display unit providing a graphical presentation of the determined strategy positions.
Also for the system of the second aspect of the invention it is preferred that sets of market price values are determined from market price data received for the corre- sponding financial instrument within succeeding periods of time or time frames, which may be of equal length or of different lenght. Here, a set of market price values may comprise opening and closing prices and highest and lowest prices for the financial instrument within the corresponding time frame, also referred to as open-high-low-close or OHLC prices. It is within one or more embodiments of the system of the second aspect of the invention that the strategy position function(s) define at least two trade strategy positions corresponding to a neutral and a long trade strategy position, or to a neutral and a short trade strategy position, or define three strategy positions corresponding to a neu- tral, a long, and a short trade strategy position. Here, a shift from neutral to long position may generate a trade decision/advice corresponding to a "buy" order, a shift from long to neutral position may generate a trade decision/advice corresponding to a "sell" order, a shift from neutral to short position may generate a trade decision/advice corresponding to a "sell" order, and a shift from short to neutral position generates a trade decision/advice corresponding to a "buy" order. It is preferred that the system of the second aspect of the invention may store a first set of trade expressions for generating trade decisions corresponding to shifts between the neutral trade position and the long trade position. The system may also store a second set of trade expressions for generating trade decisions corresponding to shifts between the neutral trade position and the short trade position. Here, the first set of trade expressions may comprise a first and a second trade expression, Expression Open Long (EOL) and Expression Close Long (ECL). The second set of trade expressions may comprise a third and a fourth trade expression, Expression Open Short (EOS) and Expression Close Short (ECS). The stored strategy position function(s) may be configured so that a shift from neutral to long position is allowed only when the criteria defined by EOL is fulfilled and the criteria defined by ECL is not fulfilled. The strategy position function may further be configured so that a shift from long to neutral position is allowed when the criteria defined by ECL is fulfilled. The stored strategy position function(s) may also be configured so that a shift from neutral to short position is allowed only when the criteria defined by EOS is fulfilled and the criteria defined by ECS is not fulfilled. The strategy position function may also be configured so that a shift from short to neutral position is allowed when the criteria defined by ECS is fulfilled.
The systems of the second aspect of the invention also cover embodiments, wherein the strategy position function(s) is/are configured so that when EOL is fulfilled while
ECL is not fulfilled indicating a shift to the long position, and EOS is fulfilled while ECS is not fulfilled indicating a shift to short position, then if the strategy is in the neutral position, it stays in the neutral position, or if the strategy is in the long or the short position, it shifts to neutral position. It is preferred that one or more embodiments of the system of the second aspect of the invention further comprise a processing unit for calculating the result of a simulated trading process corresponding to giving trade orders for the financial instrument to be traded, said trade orders following the trade decisions/advices generated with the shifts in the determined strategy positions, and further comprising a display unit for providing a graphical presentation thereof. The trade orders may be buy and sell orders given in accordance with the shifts in strategy positions.
Also for the systems of the second aspect of the invention it is preferred that one or more of the trade expressions comprise one or more parameters.
It is preferred that one or more embodiments of the system of the second aspect of the invention further comprise a processing unit for performing a back-test of the stored indicators and trade expressions. Here, the back-test processing unit may be adapted to:
store the sets of market price values for a number of succeeding historic time frames, said market price values being determined from market price data obtained within the number of historic time frames;
compute the indicator(s), the trade expressions and the shifts in trading strat- egy based on the provided market price values to thereby obtain a set of back-test strategy positions for a number of succeeding historic time frames;
store the set of back-test strategy positions;
simulate buy and sell trade orders for the financial instrument to be traded, said buy and sell orders corresponding to shifts in the stored strategy positions; and evaluate the trade result of the simulated back-test trading orders.
It is preferred that the back-test processing unit is adapted to:
a) change the value of one or more of the parameters of the indicators and/or the trade expressions;
b) perform a back-test for the trading strategy with the new parameters;
c) compare the back-test results for the strategy with the stored results of a previous back-test, and
d) storing the best of the two back-test results. The back-step processing unit may be adapted to repeat steps a-d a number of times determined by the number of parameters being back-tested and the number of values being back-tested for each combination of parameters. According to a third aspect of the invention there is provided a computerized method for calculating output values of a technical indicator for a selected financial instrument, where a technical indicator is a function providing data output values based on several succeeding sets of Open-High-Low-Close, OHLC, market price values for the instrument, said method comprising:
determining and storing a set of complete time-frame OHLC values for the instrument for each of a number of succeeding complete time-frame periods of equal length;
determining and storing a set of partial time-frame OHLC values for the instrument for a partial time-frame period following the last completed time-frame period with stored complete time-frame OHLC values, said partial time-frame period being shorter than a complete time-frame period;
calculating the indicator output values based on one or more of the sets of complete time-frame OHLC values and the set of obtained partial time-frame OHLC values.
For the method of the third aspect of the invention it is preferred that several succeeding sets of partial time-frame OHLC values are determined for increasing partial timeframe periods, with each partial time-frame period being shorter than the complete time-frame period, and with each new partial time-frame period including the previous partial time-frame period, and wherein the indicator output values are calculated for each new determined set of partial time-frame OHLC values. Here, a new set of partial time-frame OHLC values may be determined when a predetermined fixed update period of time has lapsed, whereby the partial time-frame periods increase in steps equal to said predetermined update period of time. The length of a complete time-frame peri- od may equal the length of multiple update periods.
For the method of the third aspect of the invention it is preferred that a technical indicator provides data output values obtained by calculating one or more mathematical formulas based on several succeeding sets of OHLC market price values for the instru- ment. According to the third aspect of the invention there is also provided a computer system for calculating output values of a technical indicator for a selected financial instrument, where a technical indicator is a function providing data output values based on several succeeding sets of Open-High-Low-Close, OHLC, market price values for the instrument, said system comprising:
an indicator memory for storing the technical indicator;
a market price memory for storing received market price values for the selected instrument;
a processing unit for determining and storing a set of complete time-frame
OHLC values for the instrument for each of a number of succeeding complete timeframe periods of equal length, said complete time-frame OHLC values being determined from the received market price values;
a processing unit for determining and storing a set of partial time-frame OHLC values for the instrument for a partial time-frame period following the last completed time-frame period with stored complete time-frame OHLC values, said partial timeframe period being shorter than a complete time-frame period and said partial timeframe OHLC values being determined from the received market price values; and
a processing unit for calculating and storing the indicator output values based on one or more of the sets of complete time-frame OHLC values and the set of obtained partial time-frame OHLC values.
For the system of the third aspect of the invention, the processing unit for determining a set of partial time-frame OHLC values may be adapted for determining and storing several succeeding sets of partial time-frame OHLC values for increasing partial timeframe periods, with each partial time-frame period being shorter than the complete time-frame period, and with each new partial time-frame period including the previous partial time-frame period, and the processing unit for calculating the indicator output values may be adapted for calculating indicator output values for each new determined set of partial time-frame OHLC values. The processing unit for determining a set of partial time-frame OHLC values may also be adapted for determining a new set of partial time-frame OHLC values when a predetermined fixed update period of time has lapsed, whereby the partial time-frame periods increase in steps equal to said predetermined update period of time. The length of a complete time-frame period may equal the length of multiple update periods. For the system of the third aspect of the invention it is preferred that a technical indicator provides data output values obtained by calculating one or more mathematical formulas based on several succeeding sets of OHLC market price values for the instrument. BRIEF DESCTIPTION OF THE DRAWINGS
Fig. 1 is a block diagram illustrating a trading system according to an embodiment of the first aspect of the invention, Figs. 2a, b are flow charts illustrating processes of feeding market prices to a trading system according to the invention,
Figs. 3a, b show a flow chart illustrating a method of communicating trade orders for a financial instrument according to an embodiment of the first aspect of the invention,
Figs. 4a, b are screen shots showing an example of executed trade orders for a financial instrument according to a method of the present invention,
Fig. 5 is a symbolic diagram illustrating a strategy system for providing trade decisions according to an embodiment of the second aspect of the invention,
Fig. 6 is a flow chart illustrating a back-test process for a trading strategy according to an embodiment of the second aspect of the invention, and Figs. 7a-z are screen shots illustrating a method of generating a trading strategy according to an embodiment of the second aspect of the invention.
DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS Trading Robot
Fig. 1 is a block diagram illustrating a preferred system for implementing a method and a system 100 for communicating financial instrument trade orders according to the first aspect of the invention. The system 100 comprises a User Terminal 101 , a Host Server 102, a trading Robot Server 103, a Back-Test Server 104, a Database Server 105, an OHLC Price (Open High Low Close) Database 106, a Price Feed Server 107, and a Trading Exchange 108. It should be understood that several User Terminals 101 may be connected to the Host Sever 102, thereby allowing several users to trade via the trading system 100.
From the User Terminal 101 , the user can connect to the trading system 100 via the public Internet using his browser on his Pc, Mac of Smartphone. The browser is responsible for all presentations to the user, and the browser takes the user inputs and forwards these to the Host Server 102. The Host Server 102 is connected to the public Internet, and authenticates the user and handles user authorization. The Host Server
102 handles all communication with the User Terminal 101 and is responsible for feeding data to the User Terminal 101. The Host Server 102 takes the user inputs and either handles the input itself or redirects the inputs to the appropriate server.
The trading Robot Server 103 is connected to the internal servers. The Robot Server
103 is responsible for running one or more trading robots and thereby communicating trade orders for one or more financial instruments. The Robot Server 103 loads the trading robots from the Database Server 105, where the trading robots have been stored by the Host Server 102. After loading a trading robot, the Robot Server 103 loads historic OHLC prices (Open High Low Close) from the OHLC Database 106 and brings the state of the robot "up to date". The Robot Server 103 is fed with financial instrument prices for corresponding time frames from the Price Feed Server 107 and upon each new set of prices for a time frame, a new OHLC price set is updat- ed/calculated. For each new OHLC price set being generated, the Robot Server 103 activates the appropriate loaded robots. If the action from a loaded trading robot results in a trading order being generated, the Robot Server 103 sends this order to the Trading Exchange 108 and handles all communication with the Trading Exchange 108. The communication between the Robot Server 103 and the Trading Exchange 108 may take place by use of a Virtual Private Network (VPN) connection on the Internet. The Robot Server 103 is also responsible for storing the new generated OH LC's in the OHLC Database 106. On request from the Host Server 102, the Robot Server 103 returns status information for the individual trading robots. In a preferred embodiment, a trading robot being stored in the Database Server 105 is defined by a user on the User Terminal 101. The user may build a trading strategy from data delivered from the Host Server 102. When a trading strategy is developed by the user, the trading strategy is stored in the Database Server 105. The trading strategy holds trade trigger criteria for a selected financial instrument to be traded via the Robot Server 103, and is configured to generate trade decisions in response to the trade trigger criteria being met, where the trade trigger criteria are related to changes in market price data for one or more financial instruments. The changes in market price data may be given by the new generated OHLC's.
In order to obtain a trading robot, the user will have to add a number of trading information to the strategy. Such trading information may be a trading volume for the financial instrument to be traded, the trading account and trading termination criteria, such as stop/loss and take-profit termination criteria. A termination criteria may also be a predetermined date and time. The trading strategy and the trading information are saved as a trading robot at the Database Server 105. When a user wants to start trading by use of the obtained trading robot, he may forward a "start trading" command to the Host Server 102, which then forwards this command to the Robot Server 103, and the Robot Server 103 then loads the trading robot from the Database Server 105, and starts a trading process. When the Robot Server 103 is running the loaded trading robot and trade orders are executed, data for the trading transactions may be stored in the Database Server 105. If the user wants to know how a running trading robot is performing or the status of the trading robot, a command may be send from the user to the Host Server 102, which will then collect the answer from the Robot Server 103.
It should be understood that several trading robots can be stored at the Database Server 105, and the Robot Server 103 may be instructed to upload and run several of such trading robots. The Back-Test Server 104 need not to be connected to the public Internet but shall be connected to the internal servers. The Back-Test Server 104 is responsible for running the back-tests, where back-tests may be performed for trading strategies in order to optimize these and/or for trading robots. When back-testing a trading strategy or a trading robot, the Back-Test Server 104 may load the trading strategy or trading robot from the Database Server 105 via the Host Server 102, then load historic OHLC's from the OHLC database and then simulate a trading strategy or trading robot with these historic OHLC. On request from the Host Server 102, the Back-Test Server 104 returns status information for running back-tests and results from completed back-tests. On request from the Host Server 102, the Back-Test Server 104 will start a new back-test or termi- nate a running back-test. The main reason for implementing the Back-Test Server 104 as a separate server is that overloading of back-tests, only will slow down the running back-tests, but not in any way impact the performance of the Host- and Robot Servers 102, 103. The Database Server 105 is a standard Microsoft SQL-Server. Here all strategies, robots, transactions, logs, user preferences and system parameters are stored. The Database Server is not connected to the public internet but only connected to the internal servers. The OHLC Price Database 106 is a set of binary files, which holds historic and resent OHLC (Open High Low Close) prices or value. For time frames, which preferably have of a predetermined equal length, but which may also have different lengths, the OHLC prices/values for a financial instrument are generated from the financial instrument prices monitored within the corresponding time frame.
The Price Feed Server 107 is connected to the Trading Exchange 108 through the public Internet, and is responsible for collecting all price updates for the financial instruments being part of a trading strategy and/or trading robot. The financial instrument price updates are collected from the Trading Exchange 108. After collecting the prices, the Price Feed Server 107 forwards the prices to the Robot Server 103 and to the Host Server 102.
In the preferred embodiment the Robot Server 103 calculates/generates the OHLC values from the received price updates and stores the generated OHLC values in the OHLC Price Database 106. However, the present invention also covers embodiments where the OHLC values are generated and received from an external source. Here, the OHLC values may be received by the Price Feed Server 107, and forwarded to the Host Server 102 and the Robot Server 103, which stored the OHLC values in the OHLC Price Database 106. Figs. 2a and 2b are flow charts illustrating processes of feeding market prices for financial instruments to a trading system 100 according to the invention. The first step of the price feed process is forwarding of prices 201 from the Trading Exchange 108 to the Price Feed Server 107. The Trading Exchange 108 is connected to the Price Feed Server 107, which is responsible for collecting all price updates from the Exchange 108 and further is responsible for keeping the connection to the Trading Exchange 108 alive and reconnects in case connection is broken. This connection is an "open connection" and when the Trading Exchange 108 has a new Bid- or Ask-price on any of the financial instruments, which is subscribed to, the Trading Exchange 108 will post the new price to the Price Feed Server 107. After collecting the prices, the Price Feed Server 107 sends 202 the prices to the Robot Server 103.
The Bid- and Ask Prices are collected 203 at the Robot Server 103. A list of Stop-Loss and Take-Profit order limits from the loaded Trading Robot is checked 204 and OHLC prices are being assembled/generated 205.
When the trading robot is running and an order has been issued 206 from the Robot Server 103 and been confirmed 206 by the Trading Exchange 108, the trading robot might insert Stop-loss and/or a Take-profit limits in the Robot Server 103. These limits are checked 204 against the newest prices and in case a limit is met, an order 207 may be sent to the Trading Exchange 108.
For the process illustrated in Fig. 2a a set of OHLC price values are generated over a timeframe period 205, where the timeframe periods are of equal length. When a timeframe period is completed 208a, the generated set of OHLC price values are stored 209 at the OHLC Database 106 and an event 210 is sent to the trading robot process within the Robot Server 103. If the timeframe is not completed 21 1 a, the process ends 212 and no event signal is sent to the trading robot. For the process illustrated in Fig. 2b a set of OHLC price values are generated over a timeframe period 205, but here the timeframe periods may vary in length. A timeframe period may be a so-called complete time-frame period with a corresponding set of complete time-frame OHLC values, where the complete time-frame periods are of equal length, and a time-frame period may be a so-called partial time-frame period with a corresponding set of partial time-frame OHLC values, where a partial time-frame pe- riod may follow the last completed time-frame period, and the partial time-frame period is shorter than a complete time-frame period. When a complete time-frame period is completed 208b, the generated set of complete time-frame OHLC price values are stored 209 at the OHLC Database 106 and an event 210 is sent to the trading robot process within the Robot Server 103. If the complete time-frame period is not completed 21 1 b, the process checks to see if a partial time-frame period is completed 208c, and if a partial time-frame period is completed 208c, the generated set of partial timeframe OHLC price values are stored 209 at the OHLC Database 106 and an event 210 is sent to the trading robot process within the Robot Server 103. If a partial time-frame period is not completed 211 c, the process ends 212 and no event signal is sent to the trading robot.
When an event is received 210 from the OHLC generation engine 205, the appropriate trading robot or robots are activated and loaded with the new OHLC values 213, and the running trading robot process or processes may result in a trading order being sent 206 to from the Robot Server 103 to the Trading Exchange 108. When the last stored set of OHCL values are partial time-frame values, the trading result of the running trading robot process or processes may be based on one or more of the stored sets of complete time-frame OHLC values and the last stored set of obtained partial time- frame OHLC values.
The trading robot may comprise a trading strategy for the financial instrument to be traded, and the trading strategy may comprise one or more technical indicators for one or more financial instruments. Here, for at least one of the technical indicators, the cal- culation of the technical indicator output values may be based on one or more of the stored sets of complete time-frame OHLC values and the last stored set of obtained partial time-frame OHLC values.
It is within an embodiment of the invention that several succeeding sets of partial time- frame OHLC values are determined 208c for increasing partial time-frame periods, with each partial time-frame period being shorter than the complete time-frame period. Here, each new partial time-frame period may include the previous partial time-frame period, and the trading robot and/or the technical indicator output values may be calculated for each new determined set of partial time-frame OHLC values using the last determined set of obtained partial time-frame OHLC values and one or more of the stored sets of complete time-frame OHLC values. Thus, every time a new set of partial time-frame OHLC values is determined, it may replace the previous determined partial time-frame OHLC values. A new set of partial time-frame OHLC values may be determined when a predetermined fixed update period of time has lapsed, whereby the par- tial time-frame periods increase in steps equal to said predetermined update period of time. The length of a complete time-frame period may equal the length of multiple update periods.
As an example, the complete time-frame period may be set to 15 minutes, whereas the partial time-frame period may be set to one minute. Thus, at new set of partial timeframe OHLC values may be determined every one minute replacing the previous set of partial time-frame OHLC values, and the trading robot and/or the technical indicator output values may be updated or calculated every one minute based on the last stored sets of complete time-frame OHLC values and the last determined set of partial time- frame OHLC values. After 14 minutes, a new set of partial time-frame OHLC values is determined, but one minute later, that is after 15 minutes, the partial time-frame OHLC values being determined will replace the previous 14 minutes set of partial time-frame OHLC values, but the 15 minutes partial time-frame OHLC values will now be stored as a new set of complete time-frame OHLC values.
Fig. 3 is a flow chart illustrating a method of communicating trade orders for a financial instrument by use of a Robot Trading Process according to an embodiment of the invention. The method is preferably implemented by use of the system 100 of Fig. 1. The first step is initiation of the Robot Trading Process 301 , where a user activates a trad- ing robot by forwarding a trading command to the Robot Server 103. The Robot Server 103 then loads the corresponding trading robot 302 from the Database Server 105, which stores generated trading robots and which may also store generated trading strategies. The uploaded trading robot comprises a trading strategy, which defines trading positions or trading states for the financial instrument to be traded. The trading strategy may comprise a number of technical indicators for one or more financial instruments and further may comprise a number of trade expressions defining trade trigger criteria and being at least partly based on calculated technical indicator values. The trading position or state of the trading strategy may be based on the output values of the trade expressions. The technical indicators have as input at least part of the OHLC values for the corresponding financial instruments, and in order to initialize the trading robot, historic OHLC data are loaded from the OHLC Price Database 106 to the trading strategy being part of the trading robot, and the trading robot runs or calculates the trading strategy holding the technical indicators based on the received historic OHLC price data, to thereby initialize the trading robot and strategy by bringing the indicators and the state of trading strategy "up to date" 304.
Now the trading strategy is up to date and the trading robot is started and being acti- vated on every new OHLC, 305. The Robot Server 103 may hold several trading robots and the newly uploaded trading robot may be inserted into a list of trading robots, which gets activated on every new OHLC.
When a new price update for prices of a financial instrument within a time frame is re- ceived by the Robot Server 103 from the Price Feed Server 107, the corresponding OHLC values are created or generated, preferably at the Robot Server 103, and the new price event containing the name of financial instrument, the timeframe and the newly created OHLC values is stored at the OHLC Price Database 106. The trading robots having trading strategies including the financial instrument of the given timeframe are activated. Indicators are updated, expressions are evaluated and the state or position of the trading strategy is updated and stored 306. The trading strategy may define three trading positions or states: long, short, and neutral, 307.
When the trading strategy is in the neutral state/position, the trading advice/decision given from the strategy to the trading robot is to go "neutral" meaning sell a bought volume of buy a sold volume of the financial instrument to be traded, and when the strategy shifts from neutral to long position, the advice to the trading robot is to buy a volume of the financial instrument, and a shift from neutral to short position is an advice to sell a volume of the financial instrument. Similarly, the trading robot will be in a neutral, a long or a short state/position, corresponding to the trading robot holding no traded volume, holding a bought volume, or holding a sold volume of the financial instrument.
The newly updated state or position of the trading strategy is compared with the current state or position of the trading robot 308. If the states/positions are different, the trading robot may issue a buy or a sell order via the Robot Server 103 to the Trading Ex- change 108 and bring the state/position of the trading robot equal to the state/position of the trading strategy 309. Thus, when the trading strategy shifts from one
state/position to another, a buy or sell advice/decision is given to the trading robot, which may issue a corresponding buy or sell order.
For each price update, the trading robot checks its termination criteria 310 and checks for Stop-Loss and Take-Profit limits 204. If no termination criterion or Stop-Loss and Take-Profit limit is met, the trading robot will continue 311 and await any changes in trading strategy state/position in order to issue new trading orders. If a termination cri- terion is met, the trading robot will stop and may remove itself from the internal list of active robots 312. The trading robot will update its own status in the database to "stopped" 313. A log may be in inserted in the database of the Database Server 105, which log may contain reason(s) for termination, parameters for indicators and expressions, performance of the trading robot and other statistical information.
The Stop-Loss and Take-Profit limits may be Stop- Loss-Trade and Take-Profit-Trade limits for a single trade position. Thus, when the trading robot has forwarded a buying order for a volume of the selected financial instrument and moved to a position of holding the bought volume, long position, then the trading robot based on the received real time market price data, 203, evaluates the trade result of the bought volume and compares this trade result with a pre-stored Take-Profit-Trade limit and a pre-stored Stop- Loss-Trade limit, 204, and if this trade result is larger than or equal to the Take-Profit- Trade limit or smaller than or equal to the Stop-Loss-Trade limit, then the trading robot forwards a selling order 207 for the bought volume in order to go to the neutral posi- tion/state. When selling due to meeting the Take-Profit-Trade limit, the order may be named a Take- Profit-Trade order, and when the sell order is due to meeting the Stop- Loss-Trade limit, the order may be named a Stop- Loss-Trade order.
In the same way, when the trading robot has forwarded a selling order for a volume of the selected financial instrument and moved to a position of holding the sold volume, short position, then the trading robot based on the received real time market price data, 203, evaluates the trade result of the sold volume and compares this trade result with a pre-stored Take- Profit-Trade limit and a pre-stored Stop-Loss-Trade limit, 204, and if this trade result is smaller than or equal to the Take-Profit-Trade limit or larger than or equal to the Take- Loss-Trade limit, then the trading robot forwards a buy order 207 for the sold volume in order to go to the neutral position/state. When buying due to meeting the Take- Profit-Trade limit, the order may be named a Take- Profit-Trade order, and when the buy order is due to meeting the Stop- Loss-Trade limit, the order may be named a Stop- Loss-Trade order.
When a Stop- Loss-Trade or Take-Profit-Trade order has been issued, the trading robot is going to the neutral position/state, but the trading strategy may not have changed position and may therefore be in another position, short or long. Here, the trading robot will await the trading strategy going back to the neutral position before forwarding fur- ther trade orders and entering the normal Robot Trading Process steps 308 and 309.
The trading robot may also be configured to determine the accumulated trading result of all executed trades and hold termination criteria for stopping the trading robot from further trading based on the accumulated trading result. Thus, the termination criteria of the trading robot may hold a Stop- Loss- Robot limit and a Take- Profit- Robot limit, 204, 310, and if the accumulated trading profit is larger than or equal to the Take-Profit- Robot limit or the accumulated loss is larger than or equal to the Stop- Loss- Robot limit, the trading robot will be terminated. Here, if the trading robot holds a bought volume when meeting a limit, being in the long position, a sell order is forwarded 207 for the bought volume, going back to neutral position, before terminating the trading robot. If the trading robot holds a sold volume when meeting a limit, being in the short position, a buy order is forwarded 207 for the sold volume, going back to neutral position, before terminating the trading robot. Figs. 4a and 4b are screen shots showing an example of executed trade orders for a financial instrument, where trade orders are issued by a trading robot based on changes in trading strategy positions and based on Stop-Loss-Trade and Take-Profit-Trade limits being met. The financial instrument being traded by the trading robot is the exchange rate between EURO and US Dollars, EUR/USD, and the maximum volume to be traded is 28.000 EURO. The time frame for collecting OHLC values for the instrument to be traded is set to 5 minutes, and the trading robot is activated each time a new OHCL price set is received. The Take- Profit-Trade limit is set to 20 pips, and the Stop- Loss-Trade limit is set to 10 pips, defining trade exit criteria. The trading robot holds no robot exit criteria. The screen shot of Fig. 4a shows the performed transactions with the execution date and time of the trade orders, the order volume, the exchange rate of the orders, the status of the trading robot and the trading action. The trading strategy for the trading robot of Figs. 4a and 4b is set to define two trading positions, a neutral position and a long position. The first trading action is shown at the bottom of the screen in Fig. 4a, where the trading robot receives a signal from the trading strategy to go from the long position to the neutral position and issues a "sell" trading order of the volume of 28.000 EUR. The next order is generated by the strategy going from neutral to long, and the trading robot issues a "buy" order of the volume of 28.000 EUR. The next trade order is generated by the Take-Profit-Trade limit being met, and the trading robot issues a "sell" order of the volume of 28.000 EUR and the trading robot moves from the long to the neutral position. Then follows a "buy" order generated by the trading strategy shifting from neutral to long position, and the next trade order is then generated by the Stop- Loss-Trade limit being met, and the trading robot issues a "sell" order of the volume of 28.000 EUR and moves from long to neutral position. Then follows a "buy" order generated from the trading strategy, and a "sell" order generated from the trading stratey; then follows a number of "buy" and "sell" orders generated by the trading strategy shifting state/position. Finally a "sell" order is generated from the Take-Profit-Trade limit being met.
The performance of the transactions of Fig. 4a is illustrated in the screen shot of Fig. 4b. Here, one line corresponds to the performance of a full trading cycle, where column 1 shows the date and time of opening the position, that is going from neutral to long and issuing a "buy" order; column 2 shows the date and time of closing the position, that is going from long to neutral and issuing a "sell" order; column 3 shows the time in the market, that is the time in the long position; column 4 shows the opening price, that is the price given when buying; column 5 shows the close price, that is the price paid when selling; column 6 shows the price difference, Delta Price, between buying and selling; column 7 shows the price difference in pips; column 8 shows the volume being traded; column 9 shows the profit or loss for the trade order cycle being the Delta Price multiplied by the traded volume; column 10 shows the accumulated profit being the sum of the profit or loss of each trade order cycle; column 11 shows the profit of each trade order cycle (from column 9) in pet of the total profit of all the transactions (not shown here, as Fig. 4b does not include all transactions); and column 12 shows order type which is long. When comparing the screen shots of Fig. 4a and 4b, then the two lines in Fig. 4a showing a "buy" order followed by a "sell" order correspond to one line in Fig. 4b, where the opening date and time in column 1 correspond to the date and time of a "buy" order in Fig. 4a, and the closing date and time in column 2 correspond to the date and time of a "sell" order in Fig. 4a. Thus, the uppermost line in Fig. 4b shows the performance of the transactions of the last "buy" and "sell" orders in the two upper most lines of Fig. 4a.
Trading Strategy
As discussed above the preferred trading system 100 of the present invention holds a Robot Server 103, which uploads a trading robot for a financial instrument in order to forward trade orders for such instrument. The trading robot may be built around a trading strategy, which may be a pre-defined trading strategy for the financial instrument. However, it is also within embodiments of the invention, that a trading strategy has on or more built in variables, whereby a trading strategy used by a robot may be optimized or changed by changing the values of the one or more variables.
Financial instrument to be traded
The first step in creating a trading strategy is to select a financial instrument to be traded and the timeframe or period for which updated prices of the instrument is to be received. Furthermore, the trading strategy for an instrument to be traded may hold technical indicators based on other financial instruments than the instrument to be traded. In this case, the financial instruments for such indicators have to be selected together with their timeframes/periods.
Examples of financial instruments, which can be selected for a trading strategy according to the present invention, include: EURUSD, EURGPB, EURJPY, EURCHF, USDCHF, USDJPY, USDCAD, CADJPY, CHFJPY.
Examples of timeframes for the financial instruments may include timeframes such as:
1 second, 10 seconds, 1 minute, 2 minutes, 5 minutes, 15 minutes, 30 minutes, 1 hour,
2 hours, 4 hours, 8 hours, 1 day. When generating a trading strategy, it is preferred that the user generates the strategy by use of a computer, which again may be connected to a trading system 100 via a Host Server 102, as described in connection with Fig. 1. Market price data and generated OHLC values for a selected instrument may be received at the user terminal 101 , and it is preferred that the user terminal has display software and a display unit for providing a graphical presentation of received market price data and/or OHLC values as a function of time for a selected financial instrument. Such a graphical presentation may help the user in deciding how to build a trading strategy. Technical indicators
A successful trading of the financial instrument may require that the trading strategy is developed based on the knowledge provided by the so-called "technical indicators", and it is within embodiments of the present invention that a trading strategy is devel- oped based on one or more technical indicators, thereby associating such indicators with the financial instrument to be traded. In the following is listed a number of technical indicators, which may be available for building a trading strategy:
Simple Moving Average
Exponential Moving Average
Smooth Moving Average
Linear Weighted Moving Average
Adaptive Moving Average
Awesome Oscillator
Acceleration/Deceleration
Average True Range
Bill Williams' Alligator
DeMarker
Relativ Vigor Index
Relativ Strengh Index
Efficiency Ratio
Bollinger Bands
Bollingers %B
Stare Bands
Keltner Channel ATR Trailing Stops
Bulls/Bears Power Oscillator
Standard Deviation
Commodity Channel Index
Price Channel
Price Watch Oscillator
Rate of Change
Moving Averages Convergence/Divergence
Moving Average of Oscillator
Average Directional Movement Index
Stochastic Oscilliator
Parabolic Sell And Reverse System
Super Trend Oscilliator
Aroon
Accumulation Swing Index
A technical indicator for a financial instrument is based on one or more mathematical formulas and provides data results obtained by calculating these mathematical formulas, which may have one or more parameters, and which have as input or are based on one or more values of the set of market price values corresponding to the instrument.
It is to be noted that according to the present invention a trading strategy may comprise one or several technical indicators, and may include one or more indicators for other financial instruments than the financial instrument to be traded. While it will often be preferred to have at least one indicator for the instrument to be traded, it is also possible to build a strategy having no indicators for the instrument to be traded.
The Commondity Channel Index (CCI) indicator is an example of a technical indicator which can be used for building a trading strategy. Developed by Donald Lambert and featured in Commodities magazine in 1980, the Commodity Channel Index (CCI) is a versatile indicator that can be used to identify a new trend or warn of extreme conditions. Lambert originally developed CCI to identify cyclical turns in commodities, but the indicator can successfully applied to indices, ETFs, stocks and other securities. In general, CCI measures the current price level relative to an average price level over a giv- en period of time. CCI is relatively high when prices are far above their average. CCI is relatively low when prices are far below their average. In this manner, CCI can be used to identify overbought and oversold levels.
The example given here of the CCI indicator is based on a 20-period Commodity Channel Index (CCI) calculation. The number of CCI periods is also used for the calculations of the Simple Moving Average, SMA, and Mean Deviation.
CCI = (Typical Price - 20-period SMA of TP) / (0.015 x Mean Deviation) (1) When defining the mathematical formula (1) for the CCI indicator, the inputs will be taken from the generated OHLC values of the financial instrument, for which the indicator is to be used.
The values used her is this example is the High, Low, and Close values for each time frame or time period, and the Typical Price (TP) is defined as
Typical Price (TP) = (High + Low + Close)/3 (2)
A CCI indicator uses a "moving average", which can be selected from a number of moving averages such as SMA, EMA, LWMA, LMA, AMA, and in the formula (1) the Simple Moving Average, SMA, has been selected. Furthermore, it is necessary to define the number of time frames or time periods, for which the calculated Typical Price, TP, shall be averaged. In formula (1) the number of time periods is selected to 20.
The CCI indicator allows the Mean Deviation to be multiplied with a constant, and in formula (1) the constant is set to 0.015.
There are four steps to calculating the Mean Deviation of formula (1). First, subtract the most recent 20-period average of the Typical Price from each period's Typical Price. Second, take the absolute values of these numbers. Third, sum the absolute values. Fourth, divide by the total number of periods, 20.
When providing the above CCI indicator given by formula (1) the inputs are selected as the High, Low, and Close values of the generated OHLC values within the time frames or periods of predetermined length. In order to define the CCI indicator from these in- puts, four parameters shall be set: The price, the moving average to be used, the num- ber of time periods for which the price is to be averaged, and the constant to be multiplied with the calculated Mean Deviation.
It should be understood that in order to optimize a trading strategy using an indicator having parameters such as for example the CCI of formula (1), these parameters may be changed in order to obtain an optimized trading strategy.
In order to calculate the CCI of formula (1), the Typical Prices and hence the HLC values for the 20 most recent time frames or periods shall be available. Every time a new set of HLC values are input to the indicator, a new value or result of the CCI indicator can be calculated.
The most widely used technical indicators make use of an averaging function, which may be a moving averaging function, which again may be selected from the functions: SMA, EMA, LWMA, LMA, and AMA. When using an indicator with an averaging function in a trading strategy, then in order to start or initialize the trading strategy or a trading robot using such trading strategy, the selected values of the OHLC values of a number of most recent time frames or periods need to be entered into the indicator of the trading strategy in order to calculate the indicator for the most recent time frame, thereby bringing the indicator and the trading strategy up to date.
When the user has generated or provided one or more indicators for a financial instrument, then indicators may be stored and calculated at a Host Server, such as Host Server 102 of system 100, and also here it is preferred that the user terminal has dis- play software for providing a graphical presentation via the display unit of the calculated indicators as a function of time. It is furthermore preferred that the calculated indicator values are displayed on the same display as the received market price data and/or OHLC values. Such a graphical presentation may help the user in deciding which indicators shall be used and to determine values of indicator variables.
Trade expressions
In order to get an output or decision from a trading strategy in response to received market price data, it is necessary that the trading strategy comprises a number of trade trigger criteria. According to one or more embodiments of the present invention, such trade trigger criteria are defined by one or more trade expressions. A trade expression is a logic function, which defines one or more trade trigger criteria for the financial instrument to be traded, and which is at least partly based on calculated indicator values and/or one or more OHLC values.
A logic function of a trade expression may be a compare-expression, which again may be two or more compare-expressions being AND'ed or OR'ed together. The output of a trade expression will be true, when the expression if fulfilled, and false when not fulfilled,
A compare-expression may consist of one or two compare operations comparing two analogue values, eg. A > B, A <= 5, A != B (A is not equal to B), A==B (A is set equal to the value og B). An analogue value may be a fixed value, a variable, a function value, or the result of a series of mathematical operations.
A fixed value may be a hardcoded value entered at design time. For example 25, -1.25, 0, 32.765
A variable may be an input value made by the user at runtime, where the input value may be a fixed value.
A function value is a value returned by a built in function, which functions may be selected from a series of functions such as:
1. Price function: Returns the selected price for the selected time frame/period for the selected instrument, eg. High Price for the period two time frames ago for the first instrument.
2. Indicator function: Returns the selected indicator value for the selected period for the selected instrument, eg. 'Signal' value from the indicator MACD for the period two time frames ago for the first instrument.
3. Date/Time function: Returns a value corresponding to any of the elements in a date, TimeOfDay, DayOfYear, DaylnWeek,
4. System function: Returns a value of system stored values, eg. current trade position of a trading strategy or trading robot, OpenPositionTime (time when trading strate- gy or trading robot moves from neutral to long (buy) or short (sell) position), OpenPrice (opening price for the traded instrument of the most recent OHLC values), Profit-Of- Current-Position.
5. Math Function: Returns a value of a system built math function, eg. min of two values, max of two values, square root of a value, ... .
A mathematical operation is a fixed value, a variable, or a function being added, subtracted, multiplied, divided with another fixed value, a variable, or a function.
A series of mathematical operations is one mathematical operation being added, sub- tracted, multiplied, or divided with another mathematical operation.
A trading strategy according to embodiments of the present invention defines trading positions or states based on output values of the trade expressions. It is preferred that a trading strategy defines the three trading positions: neutral, long and short, as dis- cussed in connection with the Trading Robot. Thus a number of trade expressions shall be defined for moving the trading strategy between those three positions.
A first trade expression Expression Open Long, EOL, may be defined for moving the strategy from neutral to long position, meaning that the strategy can only move from neutral to long when EOL if true. A second expression Expression Close Long, ECL, may be defined for moving the strategy from long back to neutral position, meaning that the strategy may move from long to neutral when ECL is true. In a simple embodiment of the invention then ECL may be equal to NOT EOL, meaning that ECL is true when EOL is false.
Similarly, a third trade expression Expression Open Short, EOS, may be defined for moving the strategy from neutral to short position, meaning that the strategy can only move from neutral to short when EOS if true. A fourth expression Expression Close Short, ECS, may be defined for moving the strategy from short back to neutral position, meaning that strategy may move from short to neutral when ECS is true. In a simple embodiment of the invention then ECS may be equal to NOT EOS, meaning that ECS is true when EOS is false.
When being in the long position, the strategy or trading robot is holding a bought vol- ume, but is also within embodiments of the invention that a trading strategy comprises extra trade expressions for buying extra volume and for selling the extra volume when being in the long position. Similarly, when being in the short position, the strategy or trading robot is holding a sold volume, but is also within embodiments of the invention that a trading strategy comprises extra trade expressions for selling and extra volume and for buying the extra volume when being in the short position.
Examples of trade expressions:
A user building a trading strategy has defined and stored two technical indicators. The- se two indicators can be called and calculated for a first financial instrument to be traded, meaning that these indicators will be calculated based on generated OHLC values for the first instrument and within the time frame selected for this first instrument. Both these two stored indicators can also be called and calculated for a second financial instrument, meaning that a called indicator is calculated based on generated OHLC values for the second instrument using the time frame selected for the second instrument.
The first indicator is named Exponential Moving Average, EMA, and the second indicator is named Simple Moving Average, SMA. The first instrument is named SymboH , and may be EURUSD, and the second instrument is named Symbol2, and may be EURGBP. The time frames for the first and second instruments may be set to 5 minutes. An example of a trade expression for moving from neutral to long, or open long, EOLjs the following compare expression: SymboH .EMA.EMA(O) > Symbol! SMA.SMA(O) (3)
Meaning that first instruments first indicator is compared to first instruments second indicator. The expression evaluates to TRUE if first indicators most resent calculated value is greater than second indicators most resent calculated value.
This expression may be extended to two compare expressions being AND'ed together: SymboH .EMA.EMA(O) > Symbol! SMA.SMA(O) and
Symbol2. EMA. EM A(0) > Symbol2.EMA.EMA(1) (4) In expression (4) the second compare expression means that second instruments first indicator is compared to second instruments first indicator. The expression (4) evaluates to TRUE if the first compare expression is true, AND second instruments first indicator most resent calculated value is greater than second instruments first indicator next most resent calculated value.
The expression (4) may be changed by adding a fixed margin to the first compare expression: Symbol 1.EMA. EM A(0) > Symbol! SMA.SMA(O) + 0.0001 and
Symbol2. EMA. EM A(0) > Symbol2.EMA.EMA(1) (5)
However the fixed margin may be replaced by a parameter, Var1 , where the value of Var1 can be changed in order to optimize the trading strategy:
Symbol! EMA. EM A(0) > Symbol! SMA.SMA(O) + Var1 and
Symbol2. EMA. EM A(0) > Symbol2. EMA. EMA(1 ) (6)
A more simple trade expression may be used for moving back from long to neutral, ECL:
Symbol! EMA. EMA(0) < Symbol! SMA.SMA(O) (7)
The expression (7) evaluates to TRUE if first instruments first indicators most resent calculated value is smaller than first instruments second indicators most resent calculated value.
The trade expression used for moving from neutral to short position, EOS, may be: Symbol! EMA. EMA(0) < Symbol! SMA.SMA(O) - Var1 and
Symbol2.EMA.EMA(0) < Symbol2.EMA.EMA(1) (8)
The EOS expression (8) is similar to the EOL expression (6), but > has been replaced by < and Var1 is subtracted. The trade expression used for moving back from short to neutral, ECS, may be:
Symbol LEMA.EMA(O) > Symbol! SMA.SMA(O) (9) Strategy position functions
It should be understood that having defined a series of trade expressions for moving the trading strategy between several strategy positions/states, such as EOL, ECL, EOS, ECS, there is a possibility that several expressions may be true at the same time. Thus, there is a need to set up rules, which define when shifts between the strategy positions or states shall take place depending on the fulfilment of the trade expressions. Such as set of rules are herein referred to as "Strategy position functions".
A preferred set of strategy position functions is illustrated in Fig. 5, which is a symbolic diagram illustrating the workflow of a strategy system for providing trade decisions according to an embodiment of the invention. The operation of the strategy starts by an update 501 , where an instrument X having timeframe Y and being part of the strategy is updated 502, meaning that new prices for the instrument X are received from a Price Feed Engine 503, which may be stored at a Price Feed Server 107. The instrument X for which new prices are received may be the instrument to be traded or any instrument being associated with an indicator being part of the strategy. A new set of OHLC values are determined 504 from the new prices and stored in an OHLC Price Database 505, the indicators associated with the updated instrument X (if any) are calculated 504 and the obtained indicator values are stored 506. The next step is to calculate the trade expressions EOL, ECL and EOS, ECS, boxes 507 and 508, taking into account the new OHCL values and indicator values.
Once the trade expressions have been calculated, the strategy position/state has to be determined. The rules set up for determining the strategy position has three workflow branches: a first branch working on the results for the trade decisions operating on shifts between neutral and long; a second branch working on the results for the trade decisions operating on shifts between neutral and short; and a third branch operating on the results from the first and second branch. First branch, trade decisions operating on shifts between neutral and long, here EOL and ECL:
First, the current strategy position/state of the first branch, which can only be neutral (0) or long (1), is determined, 509. If state of first branch is 1 (long), then determine whether the expression
ECL = True (10) is True or False, 510. If (10) is True, then the suggested state is 0 (neutral, go from long to neutral) 511 , and if (10) is False, then the suggested state is 1 (long, keep the current state) 512.
If current state of the first branch is 0 (neutral), then determine whether the expression
(EOL= True and ECL = False) (1 1) is True or False, 513. If (11) is True, then the suggested state is 1 (long, go from neutral to long) 514, and if (1 1) is False, then the suggested state is 0 (neutral, keep the current state) 515.
Second branch, trade decisions operating on shifts between neutral and short, here EOS and ECS (for the second branch the state value 0 is used for neutral state and the state value 1 is used for short state):
First, the current position/state of the second branch, which can only be neutral (0) or short (1) is determined, 516. If state is 1 (short), then determine whether the expression
ECS = True (12) is True or False, 517. If (12) is True, then the suggested state is 0 (neutral, go from short to neutral) 518, and if (12) is False, then the suggested state is 1 (short, keep the current state) 519.
If current state of second branch is 0 (neutral), then determine whether the expression (EOS= True and ECS = False) (13) is True or False, 520. If (13) is True, then the suggested state is 1 (short, go from neu- tral to short) 521 , and if (13) is False, then the suggested state is 0 (neutral, keep the current state) 522.
The third branch operates to define the new position/state of the trading strategy based on the results of the first and the second branches.
The position/state values suggested by the trade decisions of the first branch operating on shifts between neutral and long, 523, which will be either 0 or 1 , are compared to the position/state values suggested by the trade decisions of the second branch operating on shifts between neutral and short, 524, which values will be either 0 or 1. The comparison equals a subtraction 525 of the two suggested state values, where the result for the strategy position/state is either 1 , 0, or -1 , 526, with the value 1 corresponding to the strategy position long, the value 0 corresponding to the strategy position neutral, and the value -1 corresponding to the strategy position short. Thus:
1. If the suggested state from the first branch is 1 (long) and the suggested state from the second branch 0 (neutral), the output of the strategy position functions is 1 (long).
2. If the suggested state from the first branch is 0 (long) and the suggested state from the second branch 0 (neutral), the output of the strategy position functions is 0 (neutral).
3. If the suggested state from the first branch is 0 (neutral) and the suggested state from the second branch 1 (short), the output of the strategy position functions is -1 (short).
4. And if the suggested state from the first branch is 1 (long) and the suggested state from the second branch 1 (short), the output of the strategy position functions is 0 (neutral). If a shift in strategy position/state is the result of running the trading strategy of Fig. 5, then such shifts equals a trade decision/advice being issued by the trading strategy. A shift from neutral to long equals a buy decision/advice, a shift from long to neutral equals a sell decision/advice, a shift from neutral to short equals a sell decision/advice, and a shift from short to neutral equals a buy decision/advice.
In short the workflow of the trading strategy of Fig. 5 can be described as:
A timeframe of an instrument X being part of a stored trading strategy is ended, and new prices are fed to the strategy, 503. A new set of OHLC values are generated and stored, 504 and 505, and the associated indicators are calculated and stored, 504 and 506. The trade expressions are calculated, 507 and 508, and the strategy position functions are calculated, 509-526, thereby defining the updated trade position/state of the trading strategy as a result of the updated new prices for instrument X. If the result is a shift in strategy position/state, this equals either a buy or a sell trade deci- sion/advice.
When the user has defined or provided the trade expressions for a financial instrument, the trade expressions may be stored and calculated at the Host Server 102 of system 100, and the Host Server 102 may comprise software to run the Strategy position func- tions based on the received trade expressions. The obtained strategy positions/states may be returned to the user terminal 101 , and it is preferred that the user terminal has display software for providing a graphical presentation via the display unit of the calculated strategy positions/states as a function of time. It is furthermore preferred that the calculated strategy positions/states are displayed on the same display as the received market price data and/or OHLC values. Such a graphical presentation may help the user in determining whether his trade expressions give the anticipated decisions/advice or not at to determine values of trade expression variables.
Storage of trading strategy
When a user has gone through the above mentioned steps of selecting financial instruments, selecting and defining technical indicators, and defining trade expressions, where the trade expressions are connected to strategy position functions, which may be provided at the Host Server 102, all the components for a trading strategy are pro- vided, and this trading strategy may be stored in a server, which may be a Database Server 105 of a system 100 of Fig. 1.
Back- Test of trading strategy
Fig. 6 is a flow chart illustrating a back-test process for a trading strategy according to an embodiment of the second aspect of the invention. The trading strategy may comprise technical indicators, which may include one or more parameters, and the trade expressions may also comprise one or more parameter, where the parameter values can be changed in order to optimize the trading strategy. A Back-Test Server 104 may be responsible for running the back-tests.
In Fig. 6, the user selects which parameters for the indicators and trade expressions he wants to optimize 601. For each parameter he selects a start value, an end value and an increment value 602, Assign initial Values into Parameters. The start date and end date for the testing period are also entered 603, Set Start Date: Start date is assigned into "Current" date.
Next step is to load OHLC for "Current" date for all instruments, update all indicators for the loaded OHLC values, and to calculate the trade expressions, 604. The OHLC values may be loaded from the OHLC Price Database 106.
Simulate Trading according to Expressions, 605. The output of the trade expressions gives the strategy position/state of the trading strategy. If the new state is different from the previous state, we simulate a buy or a sell trade order. The latest Closing Price in OHLC is used and commission is added for the bank, which may be the spread divided by 2. If the trade order results in going neutral, we calculate the profit and accumulate the profit from the new position to the overall profit. End Date Reached, 606. If the end date is not reached the date is incremented, 607, and a new set of OHLC is loaded and the simulation continues, 604. If the end date is reached, the final performance (Profit, best Profit/downturn ratio,... ) is calculated and compared to the Stored Best Result, 608, 609. If the new calculation is better, 610, the values of the new performance and the corresponding parameters are stored, 611. More Combination of Parameters, 612. If there are more combinations of parameter values to be tested, one of the parameter values is incremented by the "increment value" and assigned into the parameter 613 and a new test cycle can begin. Once all combinations of parameter values have been tested, the best overall combination of parameters will be presented for the user, 614, and the back-test ends.
Example of building a trading strategy
Figs. 7a-z are screen shots illustrating a method of generating a trading strategy ac- cording to an embodiment of the second aspect of the invention.
First, the user selects a first financial instrument to be traded, Fig. 7a, which is this case is the exchange rate between EURO and US Dollars, EURUSD. Then he selects a timeframe for update of OHLC values for the instrument, which in this case is 5 minutes, Fig. 7b. A snapshot of the OHLC values for the instrument is displayed in Fig. 7c for a period of 24 hours.
Fig. 7d shows a list of indicators, and the user selects an indicator to be added to the instrument with the Exponential Moving Average, EMA, indicator being selected. Next, the parameters for the indicator are edited, see Fig. 7e. A snapshot of the instrument OHLC values together with the calculated indicator values is displayed in Fig. 7f for a period of 5 hours 30 minutes.
The user decides to add a second indicator to the first selected instrument. The second indicator is the Simple Moving Average, SMA, indicator, and a snapshot of the instrument OHLC values together with the calculated SMA indicator values is displayed in Fig. 7g for a period of 5 hours 30 minutes.
The user decides to use the two indicators, EMA and SMA, on a second financial in- strument, which here is the exchange rate between EURO and GBP, EURGPB, also with a timeframe of 5 minutes. It is the first instrument EURUDS, that is to be traded, whereas the indicators based on the second instrument is only used for building the strategy. A snapshot of the instrument OHLC values together with the calculated indicator values for both the first and second instrument is displayed in Fig. 7h for a period of 5 hours 30 minutes. The visual graph of Fig. 7h may be converted to a schematic format shown in Fig. 7i, which shows the instruments with corresponding timeframes and indicators. In Fig. 7i the EURUSD instrument is displayed with the timeframe of 5 minutes and the EMA and SMA indicators.
Having selected instruments with timeframes and indicators, the trade expressions need to be defined. Here, the route described in connection with Fig. 5 is followed, and the four trade expressions EOL, ECL and EOS, ECS are defined. The four trade ex- pressions are the same as discussed in connection with expressions (3)-(9), where the first instrument EURUSD is named SymboH and the second instrument EURGBP is named Symbol2.
The first trade expression EOL, Expression Open Long or neutral to long expression, see expression (3) is added as shown in Fig. 7j. Here, first instruments first indicator is compared to first instruments second indicator. The expression evaluates to TRUE if the first indicators most resent calculated value is greater than second indicators most resent calculated value. The trade expression (3) is extended to expression (4) as shown in Fig. 7k. Here, a second expression part is added to the first expression part (3), with the second instruments first indicator being compared to second instruments first indicator. The expression (4) evaluates to TRUE if first part (3) of expression is true, AND second instruments first indicator most resent calculated value is greater than second instru- ments first indicator next most resent calculated value, second expression part.
The expression (4) may be changed by adding a fixed margin to the first part of the expression, se expression (5), which is illustrated in Fig. 7I. The fixed margin may be replaced by a parameter, and Fig. 7m shows the creation of a parameter, Varl The parameter Var1 is added to the expression (5) instead of the fixed value, se expression (6) and Fig. 7n. Thus, the neutral to long expression, EOL, is defined by expression (6). Next, the long to neutral expression or Expression Close Long, ECL, is defined by the expression (7) and shown in Fig. 7o. When having calculated the trade expressions EOL and ECL, the strategy positions resulting from these expressions can be determined using the rules defined by the first branch of Fig. 5, steps 509-515. Fig. 7p is a screen shot illustrating the trade decision/advice, which can be obtained by the current strategy having only the EOL and ECL trade expressions. Graph 1 of Fig. 7p shows OHLC values of the first instrument with calculated indicator values. Graph 2 of Fig. 7p shows the output of the strategy position functions based on the expressions EOL and ECL. The Ό' value signals 'go neutral and stay neutral' and the value signals 'go Long and stay Long'. Graph 3 shows the estimated profit in pips based on buy orders given when changing position from 0 to 1 and sell orders given when changing position from 1 to 0. A fourth graph, Graph 4, which is not shown in Fig. 7p, could be shown if scrolled, and Graph 4 could show the OHLC values of the second instrument together with the calculated indicator values. Thus, by looking at the screen shot of Fig. 7p, the user can get a good indication of the how the strategy works so far.
For the current trading strategy, the user also wants to include trade expressions for moving between the neutral and short positions, EOS and ECS. The EOS, Expression Open Short, is given by expression (8) and shown in Fig. 7q, while the ECS, Expression Close Short, is given by expression (9) and shown in Fig. 7r. When having calcu- lated the trade expressions EOS and ECS, the strategy positions resulting from these expressions can be determined using the rules defined by the second branch of Fig. 5, steps 516-522. The final strategy position is calculated by adding the rules defined by the third branch of Fig. 5, steps 523-526, to the results of the first and second branches.
Fig. 7s is a screen shot illustrating the trade decision/advice, which can be obtained by the strategy when using all four trade expressions EOL, ECL, EOS, ECS. Graph 1 of Fig. 7s shows OHLC values of the first instrument with calculated indicator values. Graph 2 of Fig. 7s shows the output of the strategy position functions. The Ό' value signals 'go neutral and stay neutral', the '1 ' value signals 'go Long and stay Long', and the '-V value signals 'go Short and stay Short'. Graph 3 shows the estimated profit in pips based on buy orders given when changing position from 0 to 1 or from position -1 to 0, and sell orders given when changing position from 1 to 0 or from 0 to -1. Graph 4 of Fig. 7s shows the OHLC values of the second instrument together with the calculat- ed indicator values. Thus, by looking at the screen shot of Fig. 7s, the user can get a good indication of the how the finished strategy works.
However, the strategy may be optimized further than what can be obtained from look- ing at the screen shots or displays. Thus, the user may conduct a back-test of the strategy in order to optimize parameters of the indicators and/or trade expressions. Here, values of the parameter Var1 for the margin in the expressions for EOL (6) and EOS (8) may be tested, and parameter values of the first indicator EMA, Exponential Moving Average, of the first instrument, EURUSD, may be tested. The parameter to be tested for the EMA indicator is the number of periods or time frames for which the calculated price, which may be the Typical Price, is averaged. The screen shot of Fig. 7t shows that the margin parameter, Var1 , is given a start value of 0, an end value of 0,0005, and an increment value of 0,0001 , while the number of periods for the EMA indicator, EURUSD instrument, is given a start value of 1 , an end value of 65, and an increment value of 1. The back-test is selected to run for a time period of one month from 1.10.2010 to 1.1 1.2010.
When the back-test is running, a window may be displayed showing the status of the test. Such a status window is shown in Fig. 7u, which shows that the selected test peri- od consist of 9217 candlesticks (OHLC), and that the number of unique combinations of "Margin" (Var1) and "Number of Periods" are 14040. Status so far is that 4215 combinations have been calculated, and the remaining calculation time is 22 seconds.
The back-test software may be adapted to suggest several solutions for selecting an optimized strategy, where the solutions are based on the obtained and stored results from running the back-test. This is illustrated in Fig. 7v which is a screen shot being shown when all combinations have been back-tested, and which displays 8 different ways to optimize the strategy. The "Best iteration profit" is selected, and from this selection the back-test software suggests that Margin, Var1 , is set to 0.0004 and Number of Periods is set to 23. When pressing the button "Paste Value Into Trader", these values are inserted into the trade expressions and the indicator and stored, see Figs. 7w and 7x.
Having selected the parameter values, the trading strategy is finally complete, and the components of the strategy can be displayed as shown in Fig. 7y, which shows the selected instruments with timeframes, the indicators, the trade expressions, and the parameter values. The generated strategy may be given an Id, a Name and a Comment, as shown in Fig. 7z, and be stored in a database, which may be at the Database Server 105.
The obtained trading strategy can now be used in one or more trading robots, where the decision/advise from the strategy may result in buying and selling orders for the first instrument on the Trading Exchange 108.

Claims

1. A computerized method for automatically communicating trade orders for a financial instrument in response to received market price data, said trade orders being communicated via a trading robot server to an on-line trading account at a trading exchange, said method comprising:
providing a trading robot for a selected financial instrument at a robot server, said trading robot comprising a trading strategy, data for a volume of the selected financial instrument to be traded, and the trading account to trade from, said trading strategy holding trade trigger criteria for the selected instrument and being configured to generate trade decisions in response to the trade trigger criteria being met, said trade trigger criteria being related to changes in market price data for one or more financial instruments, and said trading robot being configured to communicate trade orders to the trading account at the trading exchange based at least partly upon trade decisions generated from the trading strategy;
providing at the trading robot real time market price data as a function of time for the financial instruments related to the trade trigger criteria; and
starting the trading robot and calculation of the trading strategy and thereby starting automatically forwarding of trade orders in response to the received real time market price data.
2. A method according to claim 1 , wherein one or more of the trade trigger criteria is related to the market price data for the selected financial instrument, and the received market price data includes the market price data for the financial instrument.
3. A method according to claim 1 or 2, further comprising the step of initializing the trading robot and the trading strategy before the step of starting the trading robot.
4. A method according to any one of the claims 1-3, wherein the trading robot holds one or more trading termination criteria.
5. A method according to any one of the claims 1-4, wherein the trading strategy is stored in a database server and the step of providing the trading robot at the robot server comprises loading the trading strategy from the database server into the trading robot.
6. A method according to any one of the claims 1-5, wherein the trading strategy is configured for generating trade decisions corresponding to shifts between a neutral trade position and a long trade position and between the neutral trade position and a short trade position.
7. A method according to any one of the claims 1-6, wherein the trade decisions being output/generated by the trading strategy is based on inputs of sets of market price values determined from market price data within succeeding periods of time or time frames, with one set of market price values being collected for each time frame.
8. A method according to any one of the claims 1-7, wherein the trade decisions being output/generated by the trading strategy is based on inputs of sets of market price values determined from market price data within succeeding periods of time or time frames of equal length, with one set of market price values being collected for each time frame.
9. A method according to claim 7 or 8, wherein a set of market price values for a financial instrument comprises opening and closing prices and highest and lowest pric- es of the financial instrument within the corresponding time frame, also referred to as open-high-low-close or OHLC prices.
10. A method according to any one of the claims 1-7, wherein the step of providing real market price data as a function of time for the financial instrument(s) related to the trade trigger criteria comprises:
determining and storing sets of complete timeframe Open- High-Low-Close, OHLC, market price values for at least one of the financial instruments related to the trade trigger criteria, with a set of complete timeframe OHLC values being determined and store for each of a number of succeeding complete timeframe periods of equal length; and
determining and storing a set of partial timeframe OHLC values for said at least one financial instrument for a partial timeframe period following the last completed timeframe period with stored complete timeframe OHLC values, said partial timeframe period being shorter than a complete timeframe period; and wherein the calculation of the trading strategy is at least partly based on one of more of the sets of complete timeframe OHLC values and the set of obtained partial timeframe OHLC values.
11. A method according to claim 10, wherein the complete timeframe OHLC values and partial timeframe OHLC values are determined from the market price data for the selected financial instrument being traded.
12. A method according to claim 3 and any one of claims 7-1 1 , wherein the trad- ing robot is started at a start time frame, and the step of initializing the trading robot and the trading strategy comprises providing sets of market price values collected within a number of time frames preceding the starting time frame and computing the trading strategy for these generated sets of market price values thereby bringing the trading strategy to at state representing the current market for the selected financial instru- ment.
13. A method according to any one of the claims 7-12, wherein the trading strategy comprises one or more technical indicators for one or more of the financial instruments related to the trade trigger criteria, where an indicator for a financial instrument provides data results obtained by calculating one or more corresponding mathematical formulas having one or more parameters and having as input one or more values of the sets of market price values corresponding to the instrument.
14. A method according to claims 9, 10 or 1 1 and 13, wherein the market price values being input for each time frame to the formula of an indicator is a combination of one or more of the opening, closing, highest and lowest price values.
15. A method according to claim 13 or 14,
wherein the data output of the indicator is calculated based on market price values received within a predetermined number of succeeding time frames.
16. A method according to claim 15, wherein said predetermined number is defined by a parameter of the indicator formula.
17. A method according to claim 15 or 16, wherein the indicator has an averaging formula to be calculated for the predetermined number of succeeding time frames.
18. A method according to claim 7-17, wherein the trading strategy comprises a number of predefined trade expressions being logic functions each defining one or more trade trigger criteria for the selected financial instrument, which trade expressions are at least partly based on calculated indicator values and/or one or more values of the sets of market price values.
19. A method according to claim 18, wherein the trading strategy comprises a number of strategy position functions defining a number of strategy positions based on output values of the trade expressions, wherein a shift between strategy positions is at least partly determined by a shift in a trade expression output corresponding to a trade trigger criteria being met, and wherein a shift in strategy position corresponds to a trade decision.
20. A method according to claim 19, wherein the strategy position function(s) define at least two trade strategy positions corresponding to a neutral and a long trade strategy position, or to a neutral and a short trade strategy position, or define three strategy positions corresponding to a neutral, a long, and a short trade strategy position.
21. A method according to claim 18, 19 or 20, wherein the outputs of the trade expressions are used for generating trade decisions corresponding to shifts between a neutral trade position and a long trade position and/or between the neutral trade position and a short trade position.
22. A method according to any one of the claims 18-21 , wherein one or more of the trade expression comprise one or more parameters.
23. A method according to any one of the claims 18-22, wherein a first set of trade expressions are used for generating trade decisions corresponding to shifts between the neutral trade position and the long trade position, and a second set of trade expressions are used for generating trade decisions corresponding to shifts between the neutral trade position and the short trade position.
24. A method according to claim 23, wherein the first set of trade expressions comprises a first and a second trade expression, Expression Open Long (EOL) and Expression Close Long (ECL), and the second set of trade expressions comprises a third and a fourth trade expression, Expression Open Short (EOS) and Expression Close Short (ECS).
25. A method according to any one of the claims 1-24, wherein the trade orders forwarded by the trading robot are buying and/or selling orders for a selected volume of the selected financial instrument.
26. A method according to any one of the claims 6-25, wherein a buying order for a volume of the selected financial instrument is forwarded by the trading robot to the trading exchange upon the trading strategy generating a trade decision corresponding to a shift from neutral to long position, and a selling order for a volume is forwarded by the trading robot upon the trading strategy generating a trade decision corresponding to a shift from long to neutral position.
27. A method according to any one of the claims 6-26, wherein a selling order for a volume of the selected financial instrument is forwarded by the trading robot to the trading exchange upon the trading strategy generating a trade decision corresponding to a shift from neutral to short position, and a buying order for a volume is forwarded by the trading robot upon the trading strategy generating a trade decision corresponding to a shift from short to neutral position.
28. A method according to any one of the claims 25-27, wherein
when the trading robot has forwarded a buying order for a volume of the selected financial instrument and moved to a position of holding the bought volume, then the trading robot based on the received real time market price data eval- uates the trade result of the bought volume and compares this trade result with a pre- stored take-profit-trade-limit and a pre-stored stop-loss-trade-limit, and if this trade result is larger than or equal to the take-profit-trade-limit or smaller than or equal to the stop-loss-trade-limit, then
the trading robot forwards a selling order for the bought volume.
29. A method according to any one of the claims 25-28, wherein
when the trading robot has forwarded a selling order for a volume of the selected financial instrument and moved to a position of holding the sold volume,
then the trading robot based on the received real time market price data eval- uates the trade result of the sold volume and compares this trade result with a pre- stored take-profit-trade-limit and a pre-stored stop-loss-trade-limit, and if this trade result is larger than or equal to the take-profit-trade-limit or smaller than or equal to the take-loss-trade-limit, then
the trading robot forwards a buy order for the sold volume.
30. A method according to claim 6 and claim 28 or 29, wherein the trading robot awaits the trading strategy generating a trade decision corresponding to going back to neutral position before forwarding further trade orders.
31. A method according to any one of the claims 25-30, further comprising monitoring and storing the trade result, being profit or loss or neutral, of each trade order, and determining an accumulated trading result being the sum of the results of each trade order.
32. A method according to claim 31 , wherein the result of a trade order is determined as the result of a trade order cycle, where a trade order cycle is when a selling order has followed a buying order or when a buying order has followed a selling order.
33. A method according to claim 31 or 32, wherein the trading robot is configured to determine the accumulated trading result.
34. A method according to claim 4 and any one of the claims 31-33, wherein the termination criteria of the trading robot comprises a stop-loss and a take-profit criterion, and wherein the method further comprises stopping forwarding of trade orders from the trading robot if the accumulated profit is larger than or equal to the take-profit value or the accumulated loss is larger than or equal to the stop-loss value.
35. A method according to any one of the claims 31-34, further comprising changing the volume to be traded based on the determined accumulated trading result.
36. A method according to claim 35, wherein the trading volume is increased when the accumulated trading result has increased for each trading cycle in a predetermined number of succeeding trading cycles.
37. A method according to claim 35 or 36, wherein the trading volume is decreased when the accumulated trading result has decreased for each trading cycle in a predetermined number of succeeding trading cycles.
38. A method according to any one of the claims 35-37, wherein the trading robot is configured to change the trading volume.
39. A method according to any one of the claims 1-38, wherein the method further comprises stopping forwarding of trade orders after forwarding a first trade order, being a buy or sell order, or after forwarding a trade order cycle, being a buy order followed by a sell order or being a sell order followed by a buy order.
40. A method according to any one of the claims 1-39, wherein the method further comprises stopping forwarding of trade orders when a predetermined date and time occurs.
41. A trading system for automatically communicating trade orders for a financial instrument in response to market price data/values, said trade orders being communicated to an on-line trading account at a trading exchange, said system comprising: a trading robot server having a market price value memory for storing one or more sets of market price data/values for financial instruments;
said trading robot server storing data for a volume of a financial instrument to be traded, the trading account to trade from, and a trading strategy;
wherein the trading strategy holds trade trigger criteria for the instrument to be traded, said trade trigger criteria being related to changes in market price values for one or more financial instruments, and wherein the trading strategy is configured to generate strategy trade positions, with a shift between strategy positions being at least partly determined by a trade trigger criteria being met;
wherein the trading robot server further comprises one or more processing units for calculating the trading strategy and determining strategy position; and wherein the trading robot server is configured to communicate trade orders to the trading account at the trading exchange based at least partly upon shifts between strategy positions obtained from calculating the trading strategy
42. A system according to claim 41 , wherein the trading strategy comprises: one or more technical indicators for at number of financial instrument(s), where an indicator provides data results obtained by calculating one or more corresponding mathematical formulas having one or more parameters and having as input one or more values of a set or sets of market price values corresponding to the instru- ment;
a number of trade expressions being logic functions each defining one or more trade trigger criteria for a financial instrument to be traded and being based at least partly on calculated indicator values and/or one or more values from the set(s) of market price values;
a number of strategy position functions defining a number of strategy positions based on output values of the trade expressions, wherein a shift between strategy positions is at least partly determined by a shift in a trade expression output corresponding to a trade trigger criteria being met; and
wherein the trading robot server further comprises one or more processing units for calculating the trading strategy by calculating the indicator formula(s), the trade expressions, the strategy position functions and by determining the strategy positions.
43. A trading system for automatically communicating trade orders for a financial instrument in response to market price data/values, said trade orders being communicated to an on-line trading account at a trading exchange, said system comprising: a trading robot server having a market price value memory for storing one or more sets of market price values for financial instruments;
said trading robot server storing data for a volume of a financial instrument to be traded, the trading account to trade from, and a trading strategy, wherein the trading strategy comprises:
one or more technical indicators for at number of financial instrument(s), where an indicator provides data results obtained by calculating one or more corresponding mathematical formulas having one or more parameters and having as input one or more values of a set or sets of market price values corresponding to the instrument;
a number of trade expressions being logic functions each defining one or more trade trigger criteria for a financial instrument to be traded and being based at least partly on calculated indicator values and/or one or more values from the set(s) of market price values;
a number of strategy position functions defining a number of strategy positions based on output values of the trade expressions, wherein a shift between strategy positions is at least partly determined by a shift in a trade expression output corresponding to a trade trigger criteria being met;
wherein the trading robot server further comprises one or more processing units for calculating the trading strategy by calculating the indicator formula(s), the trade expressions, the strategy position functions and by determining the strategy position; and
wherein the trading robot is configured to communicate trade orders to the trading account at the trading exchange based at least partly upon shifts between strategy positions obtained from calculating the trading strategy.
44. A system according to claim 42 or 43, further comprising:
a display unit providing a graphical presentation of one or more sets of stored market price values;
a display unit providing a graphical presentation of the calculated indicator results;
a display unit providing a graphical presentation of the determined strategy positions; and
a display unit providing a graphical presentation of the communicated trade orders.
45. A system according to any one of the claims 41-44, wherein sets of market price values corresponding to a selected financial instrument are determined from market price data received for the instrument within succeeding periods of time or time frames, and wherein a set of market price values comprises opening and closing prices and highest and lowest prices for the financial instrument within the corresponding time frame, also referred to as open-high-low-close or OHLC prices.
46. A system according to claim 45, wherein sets of market price values corresponding to a selected financial instrument is determined from market price data received for the instrument within succeeding periods of time or time frames of equal length.
47. A system according to claim 45, wherein sets of market price values corresponding to a selected financial instrument is determined from market price data received for the instrument within succeeding periods of time or time frames of different length.
48. A system according to claim 47, wherein the sets of market price values determined within timeframes of different length are determined from the market price data for the selected financial instrument being traded.
49. A system according to any one of the claims 41-48, wherein the trading strategy or the strategy position function(s) define at least two trade strategy positions corresponding to a neutral and a long trade strategy position, or to a neutral and a short trade strategy position, or define three strategy positions corresponding to a neutral, a long, and a short trade strategy position.
50. A system according to claim 49, wherein the trading strategy comprises a first set of trade expressions for generating trade decisions corresponding to shifts between the neutral trade position and the long trade position, and further comprises a second set of trade expressions for generating trade decisions corresponding to shifts between the neutral trade position and the short trade position.
51. A system according to claim 50, wherein the first set of trade expressions comprises a first and a second trade expression, Expression Open Long (EOL) and Expression Close Long (ECL), and the second set of trade expressions comprises a third and a fourth trade expression, Expression Open Short (EOS) and Expression Close Short (ECS).
52. A system according to claim 51 , wherein the stored strategy position function^) is/are configured so that a shift from neutral to long position is allowed only when the criteria defined by EOL is fulfilled and the criteria defined by ECL is not ful- filled, and further configured so that so that a shift from long to neutral position is allowed when the criteria defined by ECL is fulfilled.
53. A system according to claim 51 or 52, wherein the strategy position function(s) is/are configured so that a shift from neutral to short position is allowed only when the criteria defined by EOS is fulfilled and the criteria defined by ECS is not fulfilled, and further configured so that a shift from short to neutral position is allowed when the criteria defined by ECS is fulfilled.
54. A system according to claims 52 and 53, wherein the strategy position function^) is/are configured so that when EOL is fulfilled while ECL is not fulfilled indicating a shift to the long position, and EOS is fulfilled while ECS is not fulfilled indicating a shift to short position, then if the strategy is in the neutral position, it stays in the neutral position, or if the strategy is in the long or the short position, it shifts to neutral position.
55. A system according to any one of the claims 42-54, wherein one or more of the trade expressions comprise one or more parameters.
56. A system according to any one of the claims 41-55, wherein the trade orders are buy and sell orders given in accordance with the shifts in strategy positions.
57. A system according to any one of the claims 41 -56, wherein the robot server further comprises a processing unit for monitoring and storing the trade result, being profit or loss or neutral, of each trade order, and for determining an accumulated trad- ing result being the sum of the result of each trade order, and wherein the system further comprises a display unit for providing a graphical presentation thereof.
58. A system according to any one of the claims 41-57, wherein the trading robot server stores one or more trading termination criteria.
59. A method according to claims 57 and 58, wherein the termination criteria of the trading robot comprises a stop-loss and a take-profit criterion, and wherein the trading robot server is configured to stop forwarding of trade orders if the accumulated profit is larger than or equal to the take-profit value or the accumulated loss is larger than or equal to the stop-loss value.
60. A computer-assisted method for generating a trading strategy providing trade decisions /advices for trade orders for a financial instrument in response to market price data, said method comprising:
selecting one or more financial instruments, one of which is to be traded, each instrument having corresponding sets of market price values being determined from market price data for the instrument;
providing and storing one or more technical indicators for at least part of the selected instrument(s), where an indicator provides data results obtained by calculating one or more corresponding mathematical formulas having one or more parameters and having as input one or more values of the set(s) of market price values corresponding to the instrument;
defining and storing a number of trade expressions being logic functions each defining one or more trade trigger criteria for the financial instrument to be traded, which trade expressions are at least partly based on calculated indicator values and/or one or more values from the set(s) of market price values; and
providing and storing a number of strategy position functions defining a number of strategy positions based on output values of the trade expressions, wherein a shift between strategy positions is at least partly determined by a shift in a trade ex- pression output corresponding to a trade trigger criteria being met, and wherein a shift in strategy position corresponds to a trade decision/advice.
61. A method according to claim 60, further comprising:
providing the set(s) of market price values for the selected financial instru- ment(s) and providing a graphical presentation thereof; and
calculating the indicator formula(s) to obtain indicator results as a function of at least part of the selected market price values and providing a graphical presentation thereof.
62. A method according to claim 61 , further comprising:
calculating the trade expression functions as a function of the calculated indicator output values and/or one or more values from the set(s) of market price values; and
determining the strategy positions based on the calculated trade expression output values and providing a graphical presentation thereof.
63. A method according to any one of the claims 60-62, wherein sets of market price values is determined from market price data received for the corresponding financial instrument within succeeding periods of time or time frames.
64. A method according to any one of the claims 60-63, wherein sets of market price values is determined from market price data received for the corresponding financial instrument within succeeding periods of time or time frames of equal length.
65. A method according to any one of the claims 60-63, wherein sets of market price values is determined from market price data received for the corresponding financial instrument within succeeding periods of time or time frames of different length.
66. A method according to any one of the claims 63-65, wherein a set of market price values comprises opening and closing prices and highest and lowest prices for the financial instrument within the corresponding time frame, also referred to as open- high-low-close or OHLC prices.
67. A method according to any one of the claims 60-66, wherein the strategy posi- tion function(s) define at least two trade strategy positions corresponding to a neutral and long a trade strategy position, or to a neutral and a short trade strategy position, or define three strategy positions corresponding to a neutral, a long, and a short trade strategy position.
68. A method according to claim 67, wherein
a shift from neutral to long position generates a trade decision/advice corresponding to a "buy" order,
a shift from long to neutral position generates a trade decision/advice corresponding to a "sell" order,
a shift from neutral to short position generates a trade decision/advice corresponding to a "sell" order, and
a shift from short to neutral position generates a trade decision/advice corresponding to a "buy" order.
69. A method according to claim 67 or 68, wherein a first set of trade expressions are used for generating trade decisions corresponding to shifts between the neutral trade position and the long trade position, and a second set of trade expressions are used for generating trade decisions corresponding to shifts between the neutral trade position and the short trade position.
70. A method according to claim 69, wherein the first set of trade expressions comprises a first and a second trade expression, Expression Open Long (EOL) and Expression Close Long (ECL), and the second set of trade expressions comprises a third and a fourth trade expression, Expression Open Short (EOS) and Expression Close Short (ECS).
71. A method according to claim 70, wherein the strategy position function(s) is/are configured so that a shift from neutral to long position is allowed only when the criteria defined by EOL is fulfilled and the criteria defined by ECL is not fulfilled, and so that when the strategy is in the long position and the criteria defined by ECL is fulfilled, then the strategy shifts from long to neutral position.
72. A method according to claim 70 or 71 , wherein the strategy position func- tion(s) is/are configured so that a shift from neutral to short position is allowed only when the criteria defined by EOS is fulfilled and the criteria defined by ECS is not fulfilled, and so that when the strategy is in the short position and the criteria defined by ECS is fulfilled, then the strategy shifts from short to neutral position.
73. A method according to claims 71 and 72, wherein the strategy position function^) is/are configured so that when EOL is fulfilled while ECL is not fulfilled indicating a shift to the long position, and EOS is fulfilled while ECS is not fulfilled indicating a shift to short position, then if the strategy is in the neutral position, it stays in the neutral position, or if the strategy is in the long or the short position, it shifts to neutral position.
74. A method according to any one of the claims 62-73, further comprising calculating the result of a simulated trading process corresponding to giving trade orders for the financial instrument to be traded, said trade orders following the trade decisions/advices generated with the shifts in the determined strategy positions, and providing a graphical presentation thereof.
75. A method according to claims 68 and 74, wherein the trade orders are buy and sell orders given in accordance with the shifts in strategy positions.
76. A method according to any one of the claims 60-75, wherein one or more of the trade expressions comprise one or more parameters.
77. A method according to any one of the claims 68-76, further comprising the step of back-testing the generated strategy.
79. A method according to claims 68 and 77, wherein the step of back-testing comprises:
providing and storing the selected market price values for a number of succeeding historic time frames, said market price values being determined from market price data obtained within the number of historic time frames;
computing the indicator(s), the trade expressions and the shifts in trading strategy based on the provided market price values to thereby obtain a set of back-test strategy positions for a number of succeeding historic time frames;
storing the set of back-test strategy positions;
simulating buy and sell trade orders for the financial instrument to be traded, said buy and sell orders corresponding to shifts in the stored strategy positions; and evaluating the trade result of the simulated back-test trading orders.
79. A method according to claim 78, wherein the step of evaluating the result of the simulated back-test trading orders comprises evaluating the trade result, being profit or loss or neutral, of each buy and sell trade order, and determining an accumulated trading result being the sum of the result of each trade order within the number of succeeding time frames.
80. A method according to claim 79, wherein the result of a trade order is evaluated based at least partly on one or more of the selected market price values belonging to the time frame corresponding to the shift in strategy position resulting in the trade order.
81. A method according to any one of the claims 78-80, further comprising an optimization of the obtained trading strategy, said optimization comprising:
a) changing the value of one or more of the parameters of the indicators and/or the trade expressions;
b) performing a back-test for the trading strategy with the new parameters; c) comparing the back-test results for the strategy with the stored results of a previous back-test; and
d) storing the best of the two back-test results.
82. A method according to claim 81 , wherein steps a-d are repeated a number of times, and a set of parameters for the indicators and/or trade expressions giving the best back-test result are selected and stored to thereby define the optimized trading strategy.
83. A method according to claim 82, wherein steps a-d are repeated a number of times determined by the number of parameters being back-tested and the number of values being back-tested for each combination of parameters.
84. A method according to claim 81 and 83, wherein the selected parameters are the parameters for the strategy having the best trade result.
85. A method according to any one of the claims 60-84, further comprising storing in a database server the generated trading strategy for the selected financial instrument, said trading strategy including
the technical indicators with parameters, the trade expressions with parameters, and the strategy position functions.
86. A trading strategy system for providing trade decisions /advices for trade orders for a financial instrument in response to market price data, said system compris- ing:
a market price value memory for storing one or more sets of market price values, where each set of market price values correspond to a selected financial instrument, and where each set of market price values is determined from market prices for the corresponding instrument; an indicator memory storing one or more technical indicators for at least part of the selected instrument(s), where an indicator provides data results obtained by calculating one or more corresponding mathematical formulas having one or more parameters and having as input one or more values of the set or sets of market price values corresponding to the instrument;
a processing unit for calculating the indicator formula(s);
a trade expression memory storing a number of trade expressions being logic functions each defining one or more trade trigger criteria for a financial instrument to be traded, which trade expressions are at least partly based on calculated indicator values and/or one or more values from the set(s) of market price values;
a processing unit for calculating the trade expressions;
a strategy position memory storing a number of strategy position functions defining a number of strategy positions based on output values of the trade expressions, wherein a shift between strategy positions is at least partly determined by a shift in a trade expression output corresponding to a trade trigger criteria being met, and wherein a shift in strategy position corresponds to a trade decision/advice; and
a processing unit for calculating the strategy position functions and determine the strategy positions.
87. A system according to claim 86, further comprising:
a display unit providing a graphical presentation of one or more sets of stored market price values;
a display unit providing a graphical presentation of the calculated indicator results; and
a display unit providing a graphical presentation of the determined strategy positions.
88. A system according to claim 86 or 87, wherein sets of market price values is determined from market price data received for the corresponding financial instrument within succeeding periods of time or time frames, and wherein a set of market price values comprises opening and closing prices and highest and lowest prices for the financial instrument within the corresponding time frame, also referred to as open-high- low-close or OHLC prices.
89. A system according to claim 88, wherein sets of market price values corresponding to a selected financial instrument is determined from market price data received for the instrument within succeeding periods of time or time frames of equal length.
90. A system according to claim 8, wherein sets of market price values corresponding to a selected financial instrument is determined from market price data received for the instrument within succeeding periods of time or time frames of different length.
91. A system according to any one of the claims 86-90, wherein the strategy position function(s) define at least two trade strategy positions corresponding to a neutral and a long trade strategy position, or to a neutral and a short trade strategy position, or define three strategy positions corresponding to a neutral, a long, and a short trade strategy position.
92. A system according to claim 91 , storing a first set of trade expressions for generating trade decisions corresponding to shifts between the neutral trade position and the long trade position, and further storing a second set of trade expressions for generating trade decisions corresponding to shifts between the neutral trade position and the short trade position.
93. A system according to claim 92, wherein the first set of trade expressions comprises a first and a second trade expression, Expression Open Long (EOL) and
Expression Close Long (ECL), and the second set of trade expressions comprises a third and a fourth trade expression, Expression Open Short (EOS) and Expression Close Short (ECS).
94. A system according to claim 93, wherein the stored strategy position function^) is/are configured so that a shift from neutral to long position is allowed only when the criteria defined by EOL is fulfilled and the criteria defined by ECL is not fulfilled, and so that when the strategy is in the long position and the criteria defined by ECL is fulfilled, then the strategy shifts from long to neutral position.
95. A system according to claim 93 or 94, wherein the strategy position function(s) is/are configured so that a shift from neutral to short position is allowed only when the criteria defined by EOS is fulfilled and the criteria defined by ECS is not fulfilled, and so that when the strategy is in the short position and the criteria defined by ECS is ful- filled, then the strategy shifts from short to neutral position.
96. A system according to claims 94 and 95, wherein the strategy position function^) is/are configured so that when EOL is fulfilled while ECL is not fulfilled indicating a shift to the long position, and EOS is fulfilled while ECS is not fulfilled indicating a shift to short position, then if the strategy is in the neutral position, it stays in the neutral position, or if the strategy is in the long or the short position, it shifts to neutral position.
97. A system according to any one of the claims 86-96, further comprising a processing unit for calculating the result of a simulated trading process corresponding to giving trade orders for the financial instrument to be traded, said trade orders following the trade decisions/advices generated with the shifts in the determined strategy positions, and further comprising a display unit for providing a graphical presentation thereof.
98. A system according to claim 97, wherein the trade orders are buy and sell orders given in accordance with the shifts in strategy positions.
99. A system according to any one of the claims 86-98, wherein one or more of the trade expressions comprise one or more parameters.
100. A system according to any one of the claims 86-99, further comprising a processing unit for performing a back-test of the stored indicators and trade expressions.
101. A system according to claim 100, wherein the back-test processing unit is adapted to:
store the sets of market price values for a number of succeeding historic time frames, said market price values being determined from market price data obtained within the number of historic time frames; compute the indicator(s), the trade expressions and the shifts in trading strategy based on the provided market price values to thereby obtain a set of back-test strategy positions for a number of succeeding historic time frames;
store the set of back-test strategy positions;
simulate buy and sell trade orders for the financial instrument to be traded, said buy and sell orders corresponding to shifts in the stored strategy positions; and evaluate the trade result of the simulated back-test trading orders.
102. A system according to claim 100 or 101 , wherein the back-test processing unit is adapted to:
a) change the value of one or more of the parameters of the indicators and/or the trade expressions;
b) perform a back-test for the trading strategy with the new parameters;
c) compare the back-test results for the strategy with the stored results of a pre- vious back-test; and
d) store the best of the two back-test results.
103. A system according to claim 102, wherein the back-step processing unit is adapted to repeat steps a-d a number of times determined by the number of parame- ters being back-tested and the number of values being back-tested for each combination of parameters.
104. A computerized method for calculating output values of a technical indicator for a selected financial instrument, where a technical indicator is a function providing data output values based on several succeeding sets of Open-High-Low-Close, OHLC, market price values for the instrument, said method comprising:
determining and storing a set of complete time-frame OHLC values for the instrument for each of a number of succeeding complete time-frame periods of equal length;
determining and storing a set of partial time-frame OHLC values for the instrument for a partial time-frame period following the last completed time-frame period with stored complete time-frame OHLC values, said partial time-frame period being shorter than a complete time-frame period; calculating the indicator output values based on one or more of the sets of complete time-frame OHLC values and the set of obtained partial time-frame OHLC values.
105. A method according to claim 104, wherein several succeeding sets of partial time-frame OHLC values are determined for increasing partial time-frame periods, with each partial time-frame period being shorter than the complete time-frame period, and with each new partial time-frame period including the previous partial time-frame period, and wherein the indicator output values are calculated for each new determined set of partial time-frame OHLC values, and based on the last determined set of partial time-frame OHLC values.
106. A method according to claim 105, wherein a new set of partial time-frame OHLC values are determined when a predetermined fixed update period of time has lapsed, whereby the partial time-frame periods increase in steps equal to said predetermined update period of time.
107. A method according to claim 106, wherein the length of a complete time-frame period equals the length of multiple update periods.
108. A method according to any one of the claims 104-107, wherein a technical indicator provides data output values obtained by calculating one or more mathematical formulas based on several succeeding sets of OHLC market price values for the instrument.
109. A computer system for calculating output values of a technical indicator for a selected financial instrument, where a technical indicator is a function providing data output values based on several succeeding sets of Open-High-Low-Close, OHLC, market price values for the instrument, said system comprising:
an indicator memory for storing the technical indicator;
a market price memory for storing received market price values for the selected instrument;
a processing unit for determining and storing a set of complete time-frame OHLC values for the instrument for each of a number of succeeding complete time- frame periods of equal length, said complete time-frame OHLC values being determined from the received market price values;
a processing unit for determining and storing a set of partial time-frame OHLC values for the instrument for a partial time-frame period following the last completed time-frame period with stored complete time-frame OHLC values, said partial timeframe period being shorter than a complete time-frame period and said partial timeframe OHLC values being determined from the received market price values; and
a processing unit for calculating and storing the indicator output values based on one or more of the sets of complete time-frame OHLC values and the set of ob- tained partial time-frame OHLC values.
1 10. A system according to claim 109, wherein the processing unit for determining a set of partial time-frame OHLC values is adapted for determining and storing several succeeding sets of partial time-frame OHLC values for increasing partial time-frame periods, with each partial time-frame period being shorter than the complete time-frame period, and with each new partial time-frame period including the previous partial timeframe period, and wherein the processing unit for calculating the indicator output values is adapted for calculating indicator output values for each new determined set of partial time-frame OHLC values.
1 11. A system according to claim 1 10, wherein the processing unit for determining a set of partial time-frame OHLC values is adapted for determining a new set of partial time-frame OHLC values when a predetermined fixed update period of time has lapsed, whereby the partial time-frame periods increase in steps equal to said prede- termined update period of time.
1 12. A system according to claim 1 11 , wherein the length of a complete time-frame period equals the length of multiple update periods.
1 13. A system according to any one of the claims 109-1 12, wherein a technical indicator provides data output values obtained by calculating one or more mathematical formulas based on several succeeding sets of OHLC market price values for the instrument.
PCT/EP2012/055966 2011-04-03 2012-04-02 A method and a system for communicating trade orders for a financial instrument, a method for generating a trading strategy for a financial instrument and a trading strategy system for providing trade decisions for a financial instrument WO2012136627A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
DKPA201100252 2011-04-03
DKPA201100252 2011-04-03
DKPA201100796 2011-10-17
DKPA201100796 2011-10-17

Publications (1)

Publication Number Publication Date
WO2012136627A1 true WO2012136627A1 (en) 2012-10-11

Family

ID=45922699

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/EP2012/055966 WO2012136627A1 (en) 2011-04-03 2012-04-02 A method and a system for communicating trade orders for a financial instrument, a method for generating a trading strategy for a financial instrument and a trading strategy system for providing trade decisions for a financial instrument

Country Status (1)

Country Link
WO (1) WO2012136627A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016111904A1 (en) * 2015-01-06 2016-07-14 Morgan Stanley Trading anomaly kill switch
US9613109B2 (en) 2015-05-14 2017-04-04 Walleye Software, LLC Query task processing based on memory allocation and performance criteria
US10002154B1 (en) 2017-08-24 2018-06-19 Illumon Llc Computer data system data source having an update propagation graph with feedback cyclicality
CN110389752A (en) * 2019-07-26 2019-10-29 上海量锐信息科技有限公司 A kind of financial business logical code implementation method separated with mathematical logic
CN110955657A (en) * 2019-11-09 2020-04-03 上交所技术有限责任公司 Order book gear data processing method suitable for security trading system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"STATEMENT IN ACCORDANCE WITH THE NOTICE FROM THE EUROPEAN PATENT OFFICE DATED 1 OCTOBER 2007 CONCERNING BUSINESS METHODS - PCT / ERKLAERUNG GEMAESS DER MITTEILUNG DES EUROPAEISCHEN PATENTAMTS VOM 1.OKTOBER 2007 UEBER GESCHAEFTSMETHODEN - PCT / DECLARATION CONFORMEMENT AU COMMUNIQUE DE L'OFFICE EUROP", 20071101, 1 November 2007 (2007-11-01), XP002456414 *

Cited By (72)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10169816B2 (en) 2015-01-06 2019-01-01 Morgan Stanley Services Group Inc. Trading anomaly kill switch
US10796366B2 (en) 2015-01-06 2020-10-06 Morgan Stanley Services Group Inc. Trading anomaly kill switch
WO2016111904A1 (en) * 2015-01-06 2016-07-14 Morgan Stanley Trading anomaly kill switch
US10452649B2 (en) 2015-05-14 2019-10-22 Deephaven Data Labs Llc Computer data distribution architecture
US9679006B2 (en) 2015-05-14 2017-06-13 Walleye Software, LLC Dynamic join processing using real time merged notification listener
US9633060B2 (en) 2015-05-14 2017-04-25 Walleye Software, LLC Computer data distribution architecture with table data cache proxy
US9639570B2 (en) 2015-05-14 2017-05-02 Walleye Software, LLC Data store access permission system with interleaved application of deferred access control filters
US9672238B2 (en) 2015-05-14 2017-06-06 Walleye Software, LLC Dynamic filter processing
US10496639B2 (en) 2015-05-14 2019-12-03 Deephaven Data Labs Llc Computer data distribution architecture
US9690821B2 (en) 2015-05-14 2017-06-27 Walleye Software, LLC Computer data system position-index mapping
US9710511B2 (en) 2015-05-14 2017-07-18 Walleye Software, LLC Dynamic table index mapping
US9760591B2 (en) 2015-05-14 2017-09-12 Walleye Software, LLC Dynamic code loading
US10540351B2 (en) 2015-05-14 2020-01-21 Deephaven Data Labs Llc Query dispatch and execution architecture
US9836495B2 (en) 2015-05-14 2017-12-05 Illumon Llc Computer assisted completion of hyperlink command segments
US9836494B2 (en) 2015-05-14 2017-12-05 Illumon Llc Importation, presentation, and persistent storage of data
US9886469B2 (en) 2015-05-14 2018-02-06 Walleye Software, LLC System performance logging of complex remote query processor query operations
US9898496B2 (en) 2015-05-14 2018-02-20 Illumon Llc Dynamic code loading
US9934266B2 (en) 2015-05-14 2018-04-03 Walleye Software, LLC Memory-efficient computer system for dynamic updating of join processing
US10002153B2 (en) 2015-05-14 2018-06-19 Illumon Llc Remote data object publishing/subscribing system having a multicast key-value protocol
US10002155B1 (en) 2015-05-14 2018-06-19 Illumon Llc Dynamic code loading
US10003673B2 (en) 2015-05-14 2018-06-19 Illumon Llc Computer data distribution architecture
US11687529B2 (en) 2015-05-14 2023-06-27 Deephaven Data Labs Llc Single input graphical user interface control element and method
US10019138B2 (en) 2015-05-14 2018-07-10 Illumon Llc Applying a GUI display effect formula in a hidden column to a section of data
US10069943B2 (en) 2015-05-14 2018-09-04 Illumon Llc Query dispatch and execution architecture
US9612959B2 (en) 2015-05-14 2017-04-04 Walleye Software, LLC Distributed and optimized garbage collection of remote and exported table handle links to update propagation graph nodes
US10176211B2 (en) 2015-05-14 2019-01-08 Deephaven Data Labs Llc Dynamic table index mapping
US10198465B2 (en) 2015-05-14 2019-02-05 Deephaven Data Labs Llc Computer data system current row position query language construct and array processing query language constructs
US11556528B2 (en) 2015-05-14 2023-01-17 Deephaven Data Labs Llc Dynamic updating of query result displays
US10198466B2 (en) 2015-05-14 2019-02-05 Deephaven Data Labs Llc Data store access permission system with interleaved application of deferred access control filters
US10212257B2 (en) 2015-05-14 2019-02-19 Deephaven Data Labs Llc Persistent query dispatch and execution architecture
US10242040B2 (en) 2015-05-14 2019-03-26 Deephaven Data Labs Llc Parsing and compiling data system queries
US10241960B2 (en) 2015-05-14 2019-03-26 Deephaven Data Labs Llc Historical data replay utilizing a computer system
US10242041B2 (en) 2015-05-14 2019-03-26 Deephaven Data Labs Llc Dynamic filter processing
US11514037B2 (en) 2015-05-14 2022-11-29 Deephaven Data Labs Llc Remote data object publishing/subscribing system having a multicast key-value protocol
US10346394B2 (en) 2015-05-14 2019-07-09 Deephaven Data Labs Llc Importation, presentation, and persistent storage of data
US10353893B2 (en) 2015-05-14 2019-07-16 Deephaven Data Labs Llc Data partitioning and ordering
US9613018B2 (en) 2015-05-14 2017-04-04 Walleye Software, LLC Applying a GUI display effect formula in a hidden column to a section of data
US11663208B2 (en) 2015-05-14 2023-05-30 Deephaven Data Labs Llc Computer data system current row position query language construct and array processing query language constructs
US9619210B2 (en) 2015-05-14 2017-04-11 Walleye Software, LLC Parsing and compiling data system queries
US9805084B2 (en) 2015-05-14 2017-10-31 Walleye Software, LLC Computer data system data source refreshing using an update propagation graph
US10552412B2 (en) 2015-05-14 2020-02-04 Deephaven Data Labs Llc Query task processing based on memory allocation and performance criteria
US10565194B2 (en) 2015-05-14 2020-02-18 Deephaven Data Labs Llc Computer system for join processing
US10565206B2 (en) 2015-05-14 2020-02-18 Deephaven Data Labs Llc Query task processing based on memory allocation and performance criteria
US10572474B2 (en) 2015-05-14 2020-02-25 Deephaven Data Labs Llc Computer data system data source refreshing using an update propagation graph
US11263211B2 (en) 2015-05-14 2022-03-01 Deephaven Data Labs, LLC Data partitioning and ordering
US10621168B2 (en) 2015-05-14 2020-04-14 Deephaven Data Labs Llc Dynamic join processing using real time merged notification listener
US10642829B2 (en) 2015-05-14 2020-05-05 Deephaven Data Labs Llc Distributed and optimized garbage collection of exported data objects
US11249994B2 (en) 2015-05-14 2022-02-15 Deephaven Data Labs Llc Query task processing based on memory allocation and performance criteria
US10678787B2 (en) 2015-05-14 2020-06-09 Deephaven Data Labs Llc Computer assisted completion of hyperlink command segments
US10691686B2 (en) 2015-05-14 2020-06-23 Deephaven Data Labs Llc Computer data system position-index mapping
US11238036B2 (en) 2015-05-14 2022-02-01 Deephaven Data Labs, LLC System performance logging of complex remote query processor query operations
US9613109B2 (en) 2015-05-14 2017-04-04 Walleye Software, LLC Query task processing based on memory allocation and performance criteria
US11151133B2 (en) 2015-05-14 2021-10-19 Deephaven Data Labs, LLC Computer data distribution architecture
US11023462B2 (en) 2015-05-14 2021-06-01 Deephaven Data Labs, LLC Single input graphical user interface control element and method
US10915526B2 (en) 2015-05-14 2021-02-09 Deephaven Data Labs Llc Historical data replay utilizing a computer system
US10922311B2 (en) 2015-05-14 2021-02-16 Deephaven Data Labs Llc Dynamic updating of query result displays
US10929394B2 (en) 2015-05-14 2021-02-23 Deephaven Data Labs Llc Persistent query dispatch and execution architecture
US11574018B2 (en) 2017-08-24 2023-02-07 Deephaven Data Labs Llc Computer data distribution architecture connecting an update propagation graph through multiple remote query processing
US10198469B1 (en) 2017-08-24 2019-02-05 Deephaven Data Labs Llc Computer data system data source refreshing using an update propagation graph having a merged join listener
US10866943B1 (en) 2017-08-24 2020-12-15 Deephaven Data Labs Llc Keyed row selection
US10241965B1 (en) 2017-08-24 2019-03-26 Deephaven Data Labs Llc Computer data distribution architecture connecting an update propagation graph through multiple remote query processors
US10657184B2 (en) 2017-08-24 2020-05-19 Deephaven Data Labs Llc Computer data system data source having an update propagation graph with feedback cyclicality
US10909183B2 (en) 2017-08-24 2021-02-02 Deephaven Data Labs Llc Computer data system data source refreshing using an update propagation graph having a merged join listener
US11126662B2 (en) 2017-08-24 2021-09-21 Deephaven Data Labs Llc Computer data distribution architecture connecting an update propagation graph through multiple remote query processors
US10783191B1 (en) 2017-08-24 2020-09-22 Deephaven Data Labs Llc Computer data distribution architecture for efficient distribution and synchronization of plotting processing and data
US11941060B2 (en) 2017-08-24 2024-03-26 Deephaven Data Labs Llc Computer data distribution architecture for efficient distribution and synchronization of plotting processing and data
US11449557B2 (en) 2017-08-24 2022-09-20 Deephaven Data Labs Llc Computer data distribution architecture for efficient distribution and synchronization of plotting processing and data
US11860948B2 (en) 2017-08-24 2024-01-02 Deephaven Data Labs Llc Keyed row selection
US10002154B1 (en) 2017-08-24 2018-06-19 Illumon Llc Computer data system data source having an update propagation graph with feedback cyclicality
CN110389752A (en) * 2019-07-26 2019-10-29 上海量锐信息科技有限公司 A kind of financial business logical code implementation method separated with mathematical logic
CN110955657B (en) * 2019-11-09 2023-05-16 上交所技术有限责任公司 Processing method of order book gear data suitable for securities trading system
CN110955657A (en) * 2019-11-09 2020-04-03 上交所技术有限责任公司 Order book gear data processing method suitable for security trading system

Similar Documents

Publication Publication Date Title
US20190172139A1 (en) Method and apparatus for automated trading of equity securities using a real time data analysis
JP5538582B2 (en) Method and system for pricing options
US7877312B2 (en) Apparatus and method for displaying trading trends
US20180315123A1 (en) Computing System that Generates Graphical Displays of Stock Options Trading Data
JP2005530232A5 (en)
US20160217526A1 (en) Methods and Systems for the Calculation and Presentation of Time Series Study Information
JP2005530232A (en) System and method for transaction cost assessment and optimization
WO2012136627A1 (en) A method and a system for communicating trade orders for a financial instrument, a method for generating a trading strategy for a financial instrument and a trading strategy system for providing trade decisions for a financial instrument
US20130304621A1 (en) Algorithmic Trading Management System and Method
JP4807735B2 (en) Power trading program and power trading system
Patel Optimizing market making using multi-agent reinforcement learning
US10453141B2 (en) Composite portfolio trading method, creation and analysis system
KR101195837B1 (en) Guide system for financial goods trading and method of the same
WO2004029765A2 (en) Dynamic computer software for trading securities
US20040078287A1 (en) Method and apparatus on stock price list and profit calculation in cyber stock trading system
US20120041862A1 (en) Computerized marketplace for ratio based derivatives
US20170372420A1 (en) Computer based system and methodology for identifying trading opportunities associated with optionable instruments
US8732060B2 (en) System and method for progressive transitions portfolio investment management
JP2003345987A (en) Securities trade system, program for securities trade system, recording medium of program for securities trade system, method of distributing program for securities trade system, and method of trading securities
JP5405239B2 (en) Order processing system and program
JP6861437B2 (en) Trading Market Forecasting System, Trading Market Forecasting Method, and Trading Market Forecasting Program
KR101478534B1 (en) Stock trading system by client for following coach trader and providing method thereof
JP2006053839A (en) Market analysis method and device
WO2021117125A1 (en) Transaction market prediction
Karahan et al. Cryptocurrency Trading based on Heuristic Guided Approach with Feature Engineering

Legal Events

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

Ref document number: 12711416

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12711416

Country of ref document: EP

Kind code of ref document: A1