Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
CONDITIONAL PARAMETER OPTIMIZATION METHOD & SYSTEM
Document Type and Number:
WIPO Patent Application WO/2022/187946
Kind Code:
A1
Abstract:
A system for a machine learning architecture for predicting the value of an objective function dependent on a plurality of variables, wherein the variables comprise parameters, by associating each of the variables with first parameter values to form a feature vector, in a current iteration; inputting the feature vector as a training sample to a machine learning model; training the machine learning model with the feature vector and a previous objective function value to obtain a predicted objective function value; computing the predicted objective function value by inputting the variables with the first parameter into the machine learning model; and when the variables having the first parameter values result in the predicted objective function value, selecting the variables with the first parameter values, and adopting the variables with the first parameter values for use in the process; otherwise associating the variables with second parameter values for the next iteration.

Inventors:
CHAN ERNEST (CA)
BELOV SERGEI (CA)
CIOBANU RADU (CA)
Application Number:
PCT/CA2022/050330
Publication Date:
September 15, 2022
Filing Date:
March 08, 2022
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
PREDICTNOW AI INC (CA)
International Classes:
G06Q10/04; G06N3/02; G06N20/00; G06Q30/06; G06Q40/04
Foreign References:
US8380642B22013-02-19
Other References:
HERMES VALENCIANO, FARRÉ: "Machine-Learning-powered Algorithmic Trading ", BACHELOR DEGREE IN INFORMATICS ENGINEERING SCHOOL OF INFORMATICS OF BARCELONA – UPC BARCELONATECH, 24 January 2019 (2019-01-24), pages 1 - 62, XP055969851, Retrieved from the Internet [retrieved on 20221011]
Attorney, Agent or Firm:
SABETA, Anton C. et al. (CA)
Download PDF:
Claims:
CLAIMS:

1. A system for a machine learning architecture for predicting the value of an objective function which depends on its input values probabilistically, the system comprising: at least one memory comprising instructions stored thereon and at least one processor configured to provide the machine learning architecture for parameter optimization for solving a time-varying and/or stochastic optimization problem dependent on a plurality of control variables and environmental variables, wherein the control variables comprise parameters, the instructions executable by the at least one processor to at least: associate each of the plurality of variables with first parameter values to form a feature vector, in a current iteration; input the feature vector as a training sample to a machine learning model; train the machine learning model iteratively with the feature vector and a previous objective function value to obtain a predicted objective function value; compute the predicted objective function value by inputting the plurality of variables with the first parameter values into the machine learning model; and when the plurality of variables having the first parameter values result in the predicted objective function value, select the plurality of variables with the first parameter values, and adopt the plurality of variables with the first parameter values; otherwise dynamically associate each of the plurality of variables with second parameter values for the next iteration.

2. The system of claim 1, comprising a data ingestion module for receiving input data comprising historical or observed data, and real-time data.

3. The system of claim 1, comprising a machine learning module configured to perform and improve the assessments, simulations, forecasts, and predictions that form a condition output profile.

4. The system of claim 3, comprising an optimization module configured to test the condition output profile and determine whether the parameter values result in the optimal predicted outcome.

5. The system of claim 4, wherein the condition output profile may issue alerts associated with the parameter values.

6. The system of claim 5, wherein the machine learning architecture comprises at least one of fully connected neural networks (FCNNs), recurrent neural networks (RNNs), long short-term memory (LSTM) networks, deep belief networks, random forests, and support vector machines.

7. The system of claim 3, wherein the objective function is to optimize trading of financial instruments.

8. The system of claim 3, wherein the objective function is to determine optimal order placement of online ads on websites and/or social media platforms.

9. The system of claim 3, wherein the objective function is to optimize delivery of products or items.

10. The system of claim 3, wherein the objective function is to guide an autonomous vehicle while avoiding collisions.

11. The system of claim 3, wherein the objective function is to determine an work load scheduling system for divisible tasks.

12. The system of claim 3, wherein the objective function is to schedule operations of schedulable home appliances according to energy price, forecasted outdoor temperature and renewable power output, and user preferences to minimize associated energy cost.

13. The system of claim 3, wherein the objective function is to optimize traffic routing in a communication system.

14. A computer-implemented method for solving an optimization problem, the method being implemented in a computer system, the computer system comprising at least one processor and computer-readable medium comprising instructions executable by the at least one processor at least: ingest information pertaining to the optimization problem, and generate input data for a machine learning architecture; associate each of the plurality of variables with first parameter values, in a current iteration; model the input data to profile the impacts the plurality of variables; generate a machine learning method for parameter optimization of each of the plurality of variables; predict an outcome of the machine learning method; test the predicted outcome of the machine learning method to determine whether the plurality of variables with the first parameter values result in an optimal predicted outcome; and when the plurality of variables with having the first parameter values result in the optimal predicted outcome, select the plurality of variables with the first parameter values, and adopt the plurality of variables with the first parameter values for the methodology and the predicted outcome for a next iteration; otherwise dynamically associate each of the plurality of variables with second parameter values for the next iteration.

15. The method of claim 14, wherein the input data comprises at least one of historical data, observed data, and real-time data.

16. The method of claim 14, wherein the machine learning architecture comprises at least one of fully connected neural networks (FCNNs), recurrent neural networks (RNNs), long short-term memory (LSTM) networks, deep belief networks, random forests, and support vector machines.

17. A computer implemented system for placing marketplace orders, the system comprising: an optimization module configured to iteratively: retrieve information from a plurality of sources; generate a plurality of data sets from the information, the plurality of data sets comprising at least one of financial market data and marketplace data; generate a model with a machine learning module; apply the machine learning model to leam from the data sets and specific values of the trading parameters; generate a first trading strategy comprising trading parameters having first parameter values; and predict an outcome of the first trading strategy; test the predicted outcome of the first trading strategy; and determine whether the trading parameters having first parameter values result in an optimal predicted outcome based on predetermined conditions; and when the trading parameters having first parameter values result in the optimal predicted outcome, select those trading parameters having first parameter values and the predicted outcome as optimal parameters, and adopt the optimal parameters for the trading strategy for a next period; otherwise dynamically adjust the first trading strategy with the trading parameters having second parameter values to form a second trading strategy.

18. The system of claim 17, wherein the first parameter values and the second parameter values are dependent on prevailing and dynamic market conditions.

19. The system of claim 17, wherein the marketplace comprises at least one of a stock market, online advertising auction market, or retail products auction market.

20. The system of claim 17, wherein the machine learning architecture comprises at least one of fully connected neural networks (FCNNs), recurrent neural networks (RNNs), long short-term memory (LSTM) networks, deep belief networks, random forests, and support vector machines.

21. The system of claim 17, wherein the plurality of trading parameters comprises at least one of an entry threshold, a moving lookback window and a hedge ratio.

22. The system of claim 20, wherein a machine learning model receives technical indicators as inputs.

23. The system of claim 22, wherein the technical indicators are selected to capture the market conditions.

24. The system of claim 23, wherein the technical indicators comprise at least one of Bollinger Bands Z-score, Money Flow, Force Index, Donchian Channel, Average True Range, Awesome Oscillator and Average Directional Index.

25. A computer implemented method for placing financial instrument and securities market orders, the method comprising instructions stored in a computer readable medium, wherein the instructions are executable by a processor to at least:

(a) retrieve information from a plurality of sources;

(b) generate a plurality of data sets from the plurality of sources, the plurality of data sets comprising at least one of financial market data and marketplace data;

(c) generate a model with a machine learning module; generate a plurality of data sets comprising at least one of financial market data and marketplace data;

(d) generate a model with a machine learning module;

(e) train the machine learning model to learn from the plurality of data sets and specific values of a set of trading parameters;

(f) apply the machine learning model to live trading by feeding in the features that represent the latest market conditions as well as various combinations of the trading parameters;

(g) generate a first trading strategy comprising trading parameters having first parameter values; and

(h) predict an outcome of the first trading strategy;

(i) test the predicted outcome of the first trading strategy; and

(j) determine whether the trading parameters having first parameter values result in an optimal predicted outcome based on predetermined conditions; and

(k) when the trading parameters having first parameter values result in the optimal predicted outcome, select those the trading parameters having first parameter values as optimal parameters, and adopt the optimal parameters and the predicted outcome for the trading strategy for a next period; otherwise dynamically adjust the first trading strategy with the trading parameters having second values to form a second trading strategy.

26. The computer implemented method of claim 25, wherein the computer readable medium memory stores one or more rules for automated trading.

27. The computer implemented system of claim 25, wherein the machine learning architecture comprises at least one of fully connected neural networks (FCNNs), recurrent neural networks (RNNs), long short-term memory (LSTM) networks, deep belief networks, random forests, and support vector machines.

28. A system for a machine learning architecture for predicting the value of an objective function which depends on its input values probabilistically, the system comprising: at least one memory and at least one processor configured to provide the machine learning architecture for parameter optimization for solving a time-varying and/or stochastic optimization problem dependent on at least one variable, wherein the at least one variable comprises at least one parameter, by at least: associating the at least one variable with at least one first parameter value to form a feature vector, in a current iteration; inputting the feature vector as a training sample to a machine learning model; training the machine learning model iteratively with the feature vector and a previous objective function value to obtain a predicted objective function value; computing the predicted objective function value by inputting the at least one variable with the at least one first parameter value into the machine learning model; and when the at least one variable having the at least one first parameter value results in the predicted objective function value, selecting the at least one variable with the first parameter values, and adopting the the at least one variable with the at least one first parameter value; otherwise dynamically associating the at least one variable with at least one second parameter value for the next iteration.

29. The system of claim 28, wherein the machine learning architecture comprises at least one of fully connected neural networks (FCNNs), recurrent neural networks (RNNs), long short-term memory (LSTM) networks, deep belief networks, random forests, and support vector machines.

30. A system for a machine learning architecture, the system comprising: at least one memory and at least one processor configured to provide the machine learning architecture for parameter optimization for solving an optimization problem dependent on a plurality of variables by at least: ingesting information pertaining to the optimization problem, and generating input data for machine learning architecture; associating each of the plurality of variables with first parameter values, in a current iteration; modeling the input data in a plurality of data processing modules within the system in which the plurality of data processing modules are executed in conjunction with the at least one processor, the data processing modules configured to profile the impacts of a plurality of the plurality of variables; generating a machine learning method for parameter optimization each of the plurality of variables; predicting an outcome of the machine learning method; testing the predicted outcome of the machine learning method to determine whether the plurality of variables with the first parameter values result in an optimal predicted outcome; and when the plurality of variables with having the first parameter values result in the optimal predicted outcome, selecting the plurality of variables with the first parameter values, and adopting the plurality of variables with the first parameter values and the predicted outcome for the methodology for a next iteration; otherwise dynamically associating each of the plurality of variables with second parameter values for the next iteration.

31. The system of claim 30, wherein the machine learning architecture comprises at least one of fully connected neural networks (FCNNs), recurrent neural networks (RNNs), long short-term memory (LSTM) networks, deep belief networks, random forests, and support vector machines.

Description:
CONDITIONAL PARAMETER OPTIMIZATION METHOD & SYSTEM

FIELD

[0001] The present disclosure relates to optimization methods and systems, more specifically it relates to parameter optimization based on time-varying and/or stochastic environmental conditions.

BACKGROUND

[0002] Optimization is a challenging problem of finding an input that results in the minimum or maximum of a given objective function, and there is an abundance of models and algorithms to choose from to meet this objective, as long as the objective function is deterministic and not time-varying or “stochastic” (subject to random noise or variations). In order to obtain satisfactory performance, an appropriate model and/or algorithm with optimized parameter settings has to be carefully selected based on the given dataset, and therefore solving this high dimensional optimization problem is a challenging task even for a deterministic objective function. When the function is stochastic and/or time-varying, there is no generally accepted method to find a solution.

[0003] One example application is placing orders and trading in the financial markets. Algorithmic traders in these markets typically use simple algorithms to decide the timing, pricing, type, and/or size of buy and sell orders, i.e. a “trading strategy”. This trading strategy typically includes a small number of adjustable parameters (“trading parameters”) that are often optimized based on historical data (“train set”) and fixed once and for all. Current state-of-the-art methods generally find the optimal parameters by looking at what worked best on average in the past. The trading parameters may also be periodically re-optimized using an expanding train set. However, with this method the trading parameters cannot respond to rapidly changing market conditions because the additional data is but a small fraction of the existing train set. The trading parameters may also be periodically re-optimized using a rolling train set (often called “Walk Forward Optimization”). However, there is no evidence that the most recent rolling train set gives better out-of-sample performance in the test set. A too-small rolling train set will also give unstable and unreliable predictive results given the lack of statistical significance. These conventional state- of-the-art optimization procedures may be called “unconditional parameter optimization”, and they have significant drawbacks as stated above. One overarching drawback is that even though the trading parameters may be optimal on average (i.e. the average is taken over the historical train set), the trading parameters may not be optimal under every market condition.

[0004] It is an object of the disclosure to mitigate or obviate at least one of the above-mentioned disadvantages.

SUMMARY

[0005] In one aspect of the disclosure, there is provided a method of applying machine learning techniques to parameter optimization under time-varying and/or stochastic environmental conditions.

[0006] In another aspect, there is provided a conditional parameter optimization system comprising a machine learning architecture for solving a time-varying and/or stochastic optimization problem by optimizing a plurality of control variables, environmental variables, parameters, and parameter values.

[0007] In another aspect, there is provided a system for a machine learning architecture for predicting the value of an objective function which depends on its input values probabilistically, the system comprising: at least one memory and at least one processor configured to provide the machine learning architecture for parameter optimization for solving a time-varying and/or stochastic optimization problem dependent on a plurality of control variables and environmental variables, wherein the control variables comprise parameters, by at least: associating each of the plurality of variables with first parameter values to form a feature vector, in a current iteration; inputting the feature vector as a first part of a training sample obtained from a historical train set to a machine learning model; inputting a previous objective function value obtained from the historical train set related to the above feature vector as a second and a last part of the training sample to a machine learning model; training the machine learning model iteratively with the complete training sample to obtain a predicted objective function value; computing the predicted objective function value by inputting the plurality of variables with the first parameter values into the machine learning model; and when the plurality of variables having the first parameter values result in the predicted objective function value, selecting the plurality of variables with the first parameter values, and adopting the plurality of variables with the first parameter values and the predicted objective function value for input into the machine learning model in a next iteration; otherwise dynamically associating each of the plurality of variables with second parameter values for the next iteration.

[0008] In another aspect, there is provided a system a computer-implemented method for solving an optimization problem, the method being implemented in a computer system, the computer system comprising at least one processor and computer-readable medium comprising instructions executable by the at least one processor at least: ingest information pertaining to the optimization problem, and generate input data for a machine learning architecture; associate each of the plurality of variables with first parameter values, in a current iteration; model the input data to profile the impacts the plurality of variables; generate a machine learning method for parameter optimization of each of the plurality of variables; predict an outcome of the machine learning method; test the predicted outcome of the machine learning method to determine whether the plurality of variables with the first parameter values result in an optimal predicted outcome; and when the plurality of variables with having the first parameter values result in the optimal predicted outcome, select the plurality of variables with the first parameter values, and adopt the plurality of variables with the first parameter values for the methodology and the predicted outcome for a next iteration; otherwise dynamically associate each of the plurality of variables with second parameter values for the next iteration.

[0009] In another aspect, there is provided a system for a machine learning architecture, the system comprising: at least one memory and at least one processor configured to provide the machine learning architecture for parameter optimization for solving an optimization problem dependent on a plurality of variables by at least: ingesting information pertaining to the optimization problem, and generating input data for machine learning architecture; associating each of the plurality of variables with a first parameter values, in a current iteration; modeling the input data in a plurality of data processing modules within the system in which the plurality of data processing modules are executed in conjunction with the at least one processor, the data processing modules configured to profile the impacts of a plurality of the plurality of variables; generating a machine learning method for parameter optimization each of the plurality of variables; predicting an outcome of the machine learning method; testing the predicted outcome of the machine learning method to determine whether the plurality of variables with the first parameter values result in an optimal predicted outcome; and when the plurality of variables with having the first parameter values result in the optimal predicted outcome, selecting the plurality of variables with the first parameter values, and adopting the plurality of variables with the first parameter values and the predicted outcome for the methodology for a next iteration; otherwise dynamically associating each of the plurality of variables with second parameter values for the next iteration.

[0010] In another aspect, there is provided a computer implemented system for placing orders in a financial market, the system comprising: an optimization module configured to iteratively: retrieve information from a plurality of sources; generate a plurality of data sets comprising at least one of financial market data and the outcome of an algorithmic trading strategy such as its profit or loss data; generate a model with a machine learning module; apply the machine learning model to leam from the data sets and specific values of the trading parameters; generate a first trading strategy comprising trading parameters having first parameter values; and predict an outcome of the first trading strategy; determine whether the trading parameters having first parameter values result in an optimal predicted outcome based on predetermined conditions; and when the trading parameters having the first parameter values result in the optimal predicted outcome, select those the trading parameters having first parameter values and an outcome of the first trading strategy as optimal parameters, and adopt the optimal parameters for the trading strategy for a next period; otherwise dynamically adjust the first trading strategy with the trading parameters having second parameter values to form a second trading strategy.

[0011] In another aspect, there is provided a computer implemented method for placing financial instrument and securities orders, the method comprising instructions stored in a computer readable medium, wherein the instructions are executable by a processor to at least:

(a) retrieve information from a plurality of sources;

(b) generate a plurality of data sets from the plurality of sources, the plurality of data sets comprising at least one of financial market data and marketplace data;

(c) generate a model with a machine learning module; generate a plurality of data sets comprising at least one of financial market data and marketplace data;

(d) generate a model with a machine learning module;

(e) train the machine learning model to learn from the plurality of data sets and specific values of a set of trading parameters;

(f) apply the machine learning model to live trading by feeding in the features that represent the latest market conditions as well as various combinations of the trading parameters;

(g) generate a first trading strategy comprising trading parameters having first parameter values; and

(h) predict an outcome of the first trading strategy;

(i) test the predicted outcome of the first trading strategy; and

(j) determine whether the trading parameters having first parameter values result in an optimal predicted outcome based on predetermined conditions; and

(k) when the trading parameters having first parameter values result in the optimal predicted outcome, select those the trading parameters having first parameter values as optimal parameters, and adopt the optimal parameters and the predicted outcome for the trading strategy for a next period; otherwise dynamically adjust the first trading strategy with the trading parameters having second values to form a second trading strategy.

[0012] In another aspect, there is provided a system for a machine learning architecture for predicting the value of an objective function which depends on its input values probabilistically, the system comprising: at least one memory and at least one processor configured to provide the machine learning architecture for parameter optimization for solving a time-varying and/or stochastic optimization problem dependent on at least one variable, wherein the at least one variable comprises at least one parameter, by at least: associating the at least one variable with at least one first parameter value to form a feature vector, in a current iteration; inputting the feature vector as a training sample to a machine learning model; training the machine learning model iteratively with the feature vector and a previous objective function value to obtain a predicted objective function value; computing the predicted objective function value by inputting the at least one variable with the at least one first parameter value into the machine learning model; and when the at least one variable having the at least one first parameter value results in the predicted objective function value, selecting the at least one variable with the first parameter values, and adopting the the at least one variable with the at least one first parameter value; otherwise dynamically associating the at least one variable with at least one second parameter value for the next iteration.

[0013] Advantageously, the disclosure describes an instant conditional optimization method that uses machine learning to predict the return of a trading strategy applied given a set of trading parameters and uses those predictions to optimize these parameters at a predetermined frequency e.g. on a daily basis. Accordingly, orders may be place optimally based on the rapidly changing market conditions in any marketplace such as the stock market, online advertising auction market, or retail products auction market. As such, the trading parameters are substantially more sensitive to the market conditions and result in trading strategies with substantially better returns than prior art methods. As such, the conditional parameter optimization method and system_can be used to improve strategy performance in different market regimes by adapting a trading strategy’s parameters to fit those regimes; and or optimize allocations to different constituents of a portfolio in different market regimes. Rather than optimizing based only on the historical means and covariances of a portfolio’s constituents’ returns, the conditional parameter optimization method and system involves training a machine learning model with a vast number of external “big data” features to drive the optimization process.

BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Several exemplary embodiments of the present disclosure will now be described, by way of example only, with reference to the appended drawings in which: [0015] Figure 1 shows an operating environment for a conditional parameter optimization system;

[0016] Figure 2 shows a flowchart outlining exemplary steps for solving an optimization problem based on time-varying and/or stochastic environmental conditions; and

[0017] Figure 3 shows a flowchart outlining exemplary steps for optimizing trading parameters based on market conditions.

DETAILED DESCRIPTION

[0018] Figure 1 is a schematic block diagram of an example of a physical environment for a conditional parameter optimization system 10, according to some embodiments. System 10 configured for processing machine learning architectures such as neural networks, receiving a machine learning architecture (e.g., stored in the form of data sets) from a machine learning architecture source is provided. Data ingestion module 12 ingests, or receives, input data 14 that includes historical or observed data, real-time data. [0019] The input data 14 is applied to the one or more predictive module 16 in a plurality of data processing modules 18 within a computing environment 20 that also includes one or more processors 30 and a plurality of software and hardware components. The one or more processors 30 and plurality of software and hardware components are configured to execute program instructions to perform the functions of predictive module 16 described herein, and embodied in the one or more data processing modules 18. Conditional parameter optimization model is configured to profile the impacts of a plurality of time-varying variables and stochastic environmental conditions, or parameters associated with a parameter value.

[0020] The plurality of data processing modules 18 include, in addition to the data ingestion module 12, machine learning module 40 configured to apply a layer of artificial intelligence to conditional parameter optimization model to perform and improve the assessments, simulations, forecasts, and predictions that form the condition output profile 50. The plurality of data processing modules 18 also includes optimization module 60 configured to test the condition output profile 50 of predictive module 16; and determine whether the parameter values result in an optimal predicted outcome 52. Condition output profile 50 may also issue alerts 54 associated with the parameter values, including other related outputs 56.

[0021] Machine learning module 40 comprises model training engine 70, which may be software (e.g., code segments compiled into machine code), hardware, embedded firmware, or a combination of software and hardware, according to various embodiments. Model training engine 70 is configured to receive one or more data sets representative of a neural network model, random forest, or other machine learning models, and to train the machine learning model using a step-size value which varies over time. Generally, any other relevant data or hyperparameters are stored in data storage 80, which is configured to maintain one or more data sets, including data structures storing linkages and other data. Data storage 80 may be a relational database, a flat data storage, a non-relational database, among others. In some embodiments, data storage 80 may store data representative of a model distribution set including one or more modified models based on a machine learning model; including rule memory 82 and parameter memory 84.

[0022] Examples of machine learning model include Fully Connected Neural Networks (FCNNs), Recurrent Neural Networks (RNNs), Long Short-Term Memory (LSTM) networks, deep belief networks, random forests, or support vector machines. [0023] An example of machine learning module 40 is one or more relatively specialized hardware elements operating in conjunction with one or more software elements to train a neural network and/or perform inference with a neural network relatively more efficiently than using relatively less specialized hardware elements. Some implementations of the relatively specialized hardware elements include one or more hardware logic circuitry elements such as transistors, resistors, inductors, capacitors, wire interconnects, combinatorial logic (e.g., NAND, NOR) gates, latches, register files, memory arrays, tags for memory arrays, content-addressable memories, flash, ROM, DRAM, SRAM, Serializer/Deserializer (SerDes), I/O drivers, and the like, such as implemented via custom logic, synthesized logic, ASICs, and/or FPGAs. In one exemplary implementation, machine learning module 40 is enabled to process dataflow in accordance with computations performed for training of a neural network and/or inference with a neural network.

[0024] Figure 2 shows flow chart 100 outlining exemplary steps implemented by a conditional optimization system 10 executing a machine learning method for solving an optimization problem dependent on a plurality of control variables and environmental variables to obtain a predicted output value. Accordingly, any predicted output value is inherently stochastic and/or time-varying to the nature of environmental variables that are unpredictable, or random, and beyond the control of system 10. In step 102, system 10 ingests information pertaining to the optimization problem. Next, in step 104, data sets are derived from the ingested information, which may be related to one or more time-varying variables and/or one or more stochastic environmental conditions, and one or more previously obtained objective function’s output values. In step 106, each of the plurality of variables is associated with first parameter values, in a current iteration, to form a feature vector. Next, the feature vector is input into the machine learning architecture 10 to determine a suitable predictive model to be used (step 108). Next, in step 112, a predicted outcome of the machine learning method is tested to determine whether the plurality of variables with the first parameter values result in an optimal predicted outcome. In step, 114, when the plurality of variables with having the first parameter values result in the optimal predicted outcome, then the plurality of variables with the first parameter values are selected and adopted for input in the next iteration; otherwise each of the plurality of variables is dynamically associated with second parameter values for the next iteration, and so the process returns to step 106. Accordingly, the parameter values of the one or more are optimized iteratively.

[0025] Figure 3 shows flow chart 200 outlining exemplary steps implemented by a conditional parameter optimization system 10 for optimizing trading parameters. In step 202, information from a plurality of sources is retrieved and stored in data storage 80. In step 204, a plurality of data sets comprising at least one of financial market data and marketplace data are generated. Next, a model is generated by machine learning module (step 206). In step 208, a predefined set of variables with associated trading parameters values is selected to generate a trading strategy. Next, the machine learning model is trained to leam from the data sets and specific values of the trading parameters, in order to predict an outcome of the trading strategy (step 210). Next, in step 212, the machine learning model is applied to live trading by feeding in the features that represent the latest market conditions as well as various combinations of the trading parameters. For example, a supervised machine learning algorithm (e.g., random forest with boosting) is applied to leam from a large feature set that captures various aspects of the prevailing market conditions, together with specific values of the trading parameters, in order to predict the outcome of the trading strategy. An exemplary outcome when the trading strategy is applied to the stock market is the future 1-day return of a stock. In step 214, it is determined whether the set of trading parameters results in the optimal predicted outcome (e.g. the highest future 1-day return of a stock). In step 216, when the set of trading parameters results in the optimal predicted outcome, that set of trading parameters are selected as optimal parameters, and adopted as the parameters for the trading strategy for a next period; otherwise the trading strategy is adjusted to include another set of trading parameters for the next period, based on prevailing market conditions, and the process returns to step 208. Accordingly, a trader can make such predictions and adjust the trading strategy as frequently as possible to respond to rapidly changing market conditions. Advantageously, the frequency and magnitude of such adjustments is therefore not constrained by the large amount of legacy data required for robust optimization using current state-of-the-art unconditional optimization techniques. The step of learning may be at least partially performed utilizing a predictive optimal stochastic control algorithm.

[0026] In one example, an exemplary trading strategy with a set of trading parameters is employed on an exchange traded fund (ETF). For example, the strategy utilizes the lead-lag relationship between the SPDR Gold Shares (GLD) ETF and the Van Eck Market Vectors Gold Miners ETF (GDX) at 1 -minute frequency with data from January 1 2006 till December 31 2020, splitting it 80%/20% between train/test periods. The exemplary trading strategy comprises 3 trading parameters e.g. entry threshold {entry threshold), a moving lookback window {lookback), and the hedge ratio {GDX weight). The hedge ratio {GDX weight) for the spread is defined as: [0027]

Spread{t) = GLD_close{t) GDX_close{i) * GDX_weight. {Y)

[0028] Generally, the objective for an investor is to enter a trade (i.e. entering a buy or sell market order) for GLD at time t, and exit it at time t+l, with the hope of realizing a profit. Accordingly, the three trading parameters may be optimized on a grid, such as a 5x10x8 grid. The exemplary grid is defined as follows:

[0029]

GDX weight = {2, 2.5, 3, 3.5,4} entry threshold = {0.2, 0.3, 0.4, 0.5, 0.7, 1,1.25, 1.5, 2, 2, 5} lookback = {30, 60, 90, 120, 180, 240, 360, 720}

[0030] Although both GLD and GDX prices and functions of these prices are being considered here to make trading decisions, only trade the first leg (GLD) of

GLD/GDX pair is traded, unlike the typical long-short pair trading setup. [0031] Next, the Spread)/) in equation 1 is computed periodically e.g. every minute, and the Bollinger Bands ® are computed from the Spread)/). The Bollinger Bands, developed by developed by John Bollinger, are conventionally defined as:

[0032]

[0033] where Spread EMA is the exponential moving average of the Spread, and Spread VAR is its exponential moving variance.

[0034] In the next step, similar to a typical mean-reverting strategy using Bollinger Bands, new GLD positions are entered into based on these rules:

[0035]

Buy GLD if Z score < -entry threshold (resulting in long position), Short GLD if Z score > entry threshold (resulting in short position), Liquidate long position if Z score > exit threshold,

Liquidate short position if Z score < -exit threshold.

[0036] where the exit threshold can be anywhere between entry threshold and - entry Jhrehold.

[0037] After optimization in the train set the exit threshold is set, where exit threshold = -0.6* entry threshold, and that relationship remains fixed as the entry threshold is varied in future unconditional or conditional parameter optimizations. For example, computations are performed only on 1 -minute data, positions only between 9:30 and 15:59 ET are entered, while any position at 16:00 ET is liquidated. For each combination of the trading parameters e.g. the daily return of the resulting intraday strategy is recorded to form a time series of daily strategy returns.

[0038] In current state-of-the-art, unconditional, parameter optimization, three trading parameters ( GDX weight , entry threshold, and lookback) that maximize cumulative in-sample return over the 3-dimensional parameter grid using exhaustive search are considered. (Gradient-based optimization did not work due to multiple local maxima). The fixed set of 3 optimal trading parameters is used to specify the strategy out-of-sample on the test set. [0039] In the conditional, parameter optimization of the instant application, the set of trading parameters used each day depends on a predictive machine-learning model trained on the train set. This model predicts the future 1-day return of the generated trading strategy given the trading parameters and other market conditions. Since the trading parameters can be varied at will i.e. control variables, the trading strategy can predict different future return for many sets of trading parameters each day, and select the optimal set that predicts the highest future return. Accordingly, that optimal parameter set will be used for the trading strategy for the next day. This step is taken after the current day’s market close and before the market open of the next day.

[0040] In addition to the three trading parameters, various predictors, or “features”, selected to capture the market conditions are inputted to the machine learning model. For example, these technical indicators may be obtained from the Technical Analysis Python library: Bollinger Bands Z-score, Money Flow, Force Index, Donchian Channel, Average True Range, Awesome Oscillator and Average Directional Index. Each indicator actually produces 2x7 features since these indicators are applied to each of the ETFs GLD and GDX price series, and each is computed using 7 different lookback windows: 50, 100, 200, 400, 800, 1600, and 3200 minutes. Accordingly, in this example a total of 11 features ((3+8) x (2x7)) are used in predicting the future 1-day return of the strategy. However, since there are 400 combinations (5x10x8) of the 3 trading parameters, each trading day comes with 400 rows of training data resembling the table below:

[0041] Table 1

[0042] The trading strategy may execute multiple round trips per day before forced liquidation at the market close, and this 1-day return is the sum of such round- trip returns and is used as the objective function value or target variable or label.

After the machine learning model is trained, the model may be used for live predictions and trading. Each trading day after the market closes, an input vector with a similar structure to any one row of the table above is prepared, and populated with one particular set of the trading parameters and the current values of the technical indicators, and the machine learning model is used to repeatedly predict the trading strategy’s return on the next day. This step is performed a plurality of times e.g. 400 times, varying the trading parameters, while the technical indicators’ values remain unchanged, to determine a trading parameter set that predicts the highest return. The particular optimal trading parameter set is then selected for the trading strategy next day. In mathematical terms:

[0043]

(GDX _w eight joptimal, entry _threshold_optimal, lookback_optimal ) = argmax ( GDX-weight , entry -threshold, lookback){... predict(GDX_weight, entry -threshold, lookback, technical indicators )}

(3)

[0044] where predict is the predictive function built from a supervised machine learning algorithm. The argmax function chooses the parameters ( GDX_weight , entry -threshold, lookback ) that maximizes the output of the predict function. In one example, Random Forest with boosting is selected for the results reported below, however, a neural network or a support vector machine or many other machine learning algorithms may be also be suitable.

[0045] Exemplary code fragment for training a model, and for making predictions is shown below.

[0046] from predictnow.pdapi import PredictNowClient import pandas as pd api_key = "%KeyProvidedToEachOftheSubscribers" apijiost = "http://12.34.567.890:1000" username = "helloWorld" email = "helloWorld@usermail.com" client = PredictNowClient(api_host j api_key) file_path = 'my_amazing_features.xlsx' labelname = 'Next_day_strategy_return' import os params = {'timeseries': 'yes', 'type': 'regression', 'feature_selec tion': 'none' j 'analysis': 'none', 'boost': 'gbdt', 'testsize': '0. 2' j 'weights': 'no', 'eda': 'yes', 'prob_calib': 'no', 'mode': 'tra in'} response = client.create_model( username=username j model_name="test1" } params=params j

) from pandas import read_csv from pandas import read_excel df = read_excel(file_path j engine="openpyxl") df.name = "testdataframe" response = client.train( model_name="test1 input_df=df j label=labelname j username=username j email=email j return_output=False j

) print("FIRST MODEL TRAINING AT PREDICTNOW.AI HAS BEEN COMPLETED!") print(response) if status["state"] == "COMPLETED": response = client.getresult( model_name="test1", username=username ,

) import pandas as pd predicted_targets_cv = pd.read_json(response.predicted_targets_ cv) print( "predicted_targets_cv") print(predicted_targets_cv) predicted_targets_test = pd.read_json(response.predicted_target s_test) print( "predicted_targets_test") print(predicted_targets_test) performance_metrics = pd.read_json(response.performance_metrics print( "performance_metrics") print(performance_metrics) if status["state"] == "COMPLETED": df = read_csv( "example_input_live.csv") # Input data for Live p rediction df.name = "myfirstpredictname" response = client.predict( model_name="testl" } input_df=df j username=username j eda="yes" } prob_calib=params[ "prob_calib"] } y_pred = pd.read_json(response.labels) print("THE LABELS") print(labels)

[0047] Table 2 shows an exemplary output labels file from the step above. [0048] Table 2

[0049] where 2.5_30_0.2 is one parameter combination, and 2.5_60_0.2 is another.

[0050] input_features= df['Date·’].values for i in nange(len(input_features)):

#/ split y_pred[‘ ' Date·’] into actual date and parameters string date_params =input_features[i].split(' ') params = date_params[1] if i==0:

#initiaLizing max_index and its parameters vaLue #E.g. (2.5, 60, 0.2) params_cond_optimized = params y_pred_max = y_pred[i].values else: if y_pred[i].values >= y_pred_max:

#updating max_index and its parameters vaLue params_cond_optimized = params y_pred_max = y_pred[i].values # params_cond_optimized is "conditionaLLy optimal" parameters for t he

# next day

[0051] The prior art methods employing machine learning to predict GLD’s (i.e. gold’s) returns e.g. GLD’s 1-day return using technical indicators, have met little success, and invite arbitrage activities. Unlike the application of machine learning in prior art methods, the conditional optimization method of the instant application uses machine learning to predict the return of a trading strategy applied to GLD given a set of trading parameters, and uses those predictions to optimize these parameters on a daily basis.

[0052] In one exemplary implementation, a comparison of out-of-sample test set performance of unconditional vs conditional parameter optimization on the last 3 years of data ending on December 31, 2020, is performed, and the cumulative 3-year return is found to be 73% and 83%, respectively. In addition, other metrics are generally improved using conditional parameter optimization. Table 3 shows out-of- sample performance comparisons between unconditional and conditional parameter optimizations:

[0053] Table 3

Unconditional Conditional

Optimization Optimization

Annual 17.29% 19.77%

Return

Sharpe Ratio 1.947 2.325 Calmar Ratio 0.984 1.454

[0054] The Sharpe Ratio is a financial metric often used by investors when assessing the performance of investment management products and professionals. The Calmar ratio is a gauge of the performance of investment funds such as hedge funds and commodity trading advisors (CTAs), it is a function of the fund's average compounded annual rate of return versus its maximum drawdown.

[0055] In another exemplary implementation, the conditional parameter optimization method is implemented for optimizing trading parameters and portfolios associated with cryptocurrencies and tokens by periodic adjustment of a trading strategy in response to live conditions.

[0056] In another exemplary implementation, the conditional parameter optimization method and system is useful in minimizing wait times. For example, wait times in a hospital emergency room may be minimized by optimizing various parameters, such as staffing level, equipment and supplies readiness, discharge rate, etc. Current state-of-the-art methods generally find the optimal parameters by looking at what worked best on average in the past. There is also no mathematical function that determines wait time based on these parameters in a deterministic manner. The conditional parameter optimization method and system of the instant application employs other variables such as time of day, day of week, season, weather, whether there are recent mass events, etc. to predict the wait time under various parameter combinations, and thereby find the optimal combination under the current conditions in order to achieve the shortest wait time.

[0057] In another exemplary implementation, the conditional parameter optimization method is implemented for optimal pricing of merchandises in online markets.

[0058] In another exemplary implementation, the conditional parameter optimization method is implemented for optimal order placement of online ads on websites and social media platforms.

[0059] In another exemplary implementation, the conditional parameter optimization method is useful in logistics, such as optimizing delivery of products or items. For example, the method may optimize the allocation of drivers and vehicles based on any number of variables, such as, weather, traffic, day of week, TV sports broadcast and special holiday events, and so forth. [0060] In another exemplary implementation, the conditional parameter optimization method is useful in autonomous vehicles employing neural network technology, such as real-time navigation and collision avoidance systems.

[0061] In another exemplary implementation, the conditional parameter optimization method is useful in a work load scheduling system for divisible tasks, for example, to find an optimal scheduling workload so that the processing time is a minimum.

[0062] In another exemplary implementation, the conditional parameter optimization method is useful in an energy distribution network.

[0063] In another exemplary implementation, the conditional parameter optimization method is useful in a home energy management system, for example, by scheduling the operations of schedulable home appliances according to electricity price, forecasted outdoor temperature and renewable power output, and user preferences to minimize user's electricity cost.

[0064] In another exemplary implementation, the conditional parameter optimization method is useful in a communication routing system.

[0065] In another exemplary implementation, the conditional parameter optimization method is useful in a call center management system.

[0066] In another exemplary implementation, the conditional parameter optimization method is useful in traffic control and management systems.

[0067] In one exemplary implementation, processor 30 may be embodied as a multi-core processor, a single core processor, or a combination of one or more multicore processors and one or more single core processors. For example, processor 14 may be embodied as one or more of various processing devices, such as a coprocessor, a microprocessor, a controller, a digital signal processor (DSP), a processing circuitry with or without an accompanying DSP, or various other processing devices including integrated circuits such as, for example, an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a microcontroller unit (MCU), a hardware accelerator, a special-purpose computer chip, Application-Specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), Programmable Logic Controllers (PLC), Graphics Processing Units (GPUs), and the like. For example, some or all of the device functionality or method sequences may be performed by one or more hardware logic components.

[0068] Data storage 80 may be embodied as one or more volatile memory devices, one or more non-volatile memory devices, and/or a combination of one or more volatile memory devices and non-volatile memory devices. For example, memory 16 may be embodied as magnetic storage devices (such as hard disk drives, floppy disks, magnetic tapes, etc.), optical magnetic storage devices (e.g., magneto -optical disks), CD-ROM (compact disc read only memory), CD-R (compact disc recordable), CD- R/W (compact disc rewritable), DVD (Digital Versatile Disc), BD (BLU-RAY™ Disc), and semiconductor memories (such as mask ROM, PROM (programmable ROM), EPROM (erasable PROM), flash ROM, RAM (random access memory), etc.). [0069] System 10 comprises I/O module configured to facilitate provisioning of an output to a user of computing system 12 and/or for receiving an input from the user of computing system, and send/receive communications to/from the various sensors, components, and actuators of system 10. I/O module is configured to be in communication with processor 30 and memory 80. Examples of the I/O module include, but are not limited to, an input interface and/or an output interface. Some examples of the input interface may include, but are not limited to, a keyboard, a mouse, a joystick, a keypad, a touch screen, soft keys, a microphone, and the like. Some examples of the output interface may include, but are not limited to, a microphone, a speaker, a ringer, a vibrator, a light emitting diode display, a thin-film transistor (TFT) display, a liquid crystal display, an active-matrix organic light- emitting diode (AMOLED) display, and the like. In an example embodiment, processor 30 may include I/O circuitry configured to control at least some functions of one or more elements of I/O module, such as, for example, a speaker, a microphone, a display, and/or the like. Processor 30 and/or the I/O circuitry may be configured to control one or more functions of the one or more elements of I/O module through computer program instructions, for example, software and/or firmware, stored on a memory, for example, data storage 80, and/or the like, accessible to processor 30. [0070] Examples of the I/O module include, but are not limited to, an input interface and/or an output interface. Some examples of the input interface may include, but are not limited to, a keyboard, a mouse, a joystick, a keypad, a touch screen, soft keys, a microphone, and the like. Some examples of the output interface may include, but are not limited to, a microphone, a speaker, a ringer, a vibrator, a light emitting diode display, a thin-film transistor (TFT) display, a liquid crystal display, an active-matrix organic light-emitting diode (AMOLED) display, and the like. In an example embodiment, processor 30 may include I/O circuitry configured to control at least some functions of one or more elements of I/O module, such as, for example, a speaker, a microphone, a display, and/or the like.

[0071] Communication interface enables system 10 to communicate with other entities over various types of wired, wireless or combinations of wired and wireless networks, such as for example, the Internet. In at least one example embodiment, communication interface includes a transceiver circuitry configured to enable transmission and reception of data signals over the various types of communication networks. In some embodiments, communication interface may include appropriate data compression and encoding mechanisms for securely transmitting and receiving data over the communication networks. Communication interface facilitates communication between computing system 10 and I/O peripherals.

[0072] It is noted that various example embodiments as described herein may be implemented in a wide variety of devices, network configurations and applications. [0073] Those of skill in the art will appreciate that other embodiments of the disclosure may be practiced in network computing environments with many types of computer system configurations, including personal computers (PCs), industrial PCs, desktop PCs), hand-held devices, multi-processor systems, microprocessor-based or programmable consumer electronics, network PCs, server computers, minicomputers, mainframe computers, and the like. Accordingly, system 10 may be coupled to these external devices via the communication, such that system 10 is controllable remotely. Embodiments may also be practiced in distributed computing environments where tasks are performed by local and remote processing devices that are linked (either by hardwired links, wireless links, or by a combination thereof) through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.

[0074] In another implementation, system 10 follows a cloud computing model, by providing an on-demand network access to a shared pool of configurable computing resources (e.g., servers, storage, applications, and/or services) that can be rapidly provisioned and released with minimal or nor resource management effort, including interaction with a service provider, by a user (operator of a thin client). [0075] The benefits and advantages described above may relate to one embodiment or may relate to several embodiments. The embodiments are not limited to those that solve any or all of the stated problems or those that have any or all of the stated benefits and advantages. The operations of the methods described herein may be carried out in any suitable order, or simultaneously where appropriate. Additionally, individual blocks may be added or deleted from any of the methods without departing from the spirit and scope of the subject matter described herein. Aspects of any of the examples described above may be combined with aspects of any of the other examples described to form further examples without losing the effect sought.

[0076] Benefits, other advantages, and solutions to problems have been described above with regard to specific embodiments. However, the benefits, advantages, solutions to problems, and any element(s) that may cause any benefit, advantage, or solution to occur or become more pronounced are not to be construed as critical, required, or essential features or elements of any or all the claims. As used herein, the terms "comprises," "comprising," or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Further, no element described herein is required for the practice of the invention unless expressly described as "essential" or "critical."

[0077] The above description is given by way of example only and various modifications may be made by those skilled in the art. The above specification, examples and data provide a complete description of the structure and use of exemplary embodiments. Although various embodiments have been described above with a certain degree of particularity, or with reference to one or more individual embodiments, those skilled in the art could make numerous alterations to the disclosed embodiments without departing from the spirit or scope of this specification.

[0078] The preceding detailed description of exemplary embodiments of the invention makes reference to the accompanying drawings, which show the exemplary embodiment by way of illustration. While these exemplary embodiments are described in sufficient detail to enable those skilled in the art to practice the invention, it should be understood that other embodiments may be realized and that logical and mechanical changes may be made without departing from the spirit and scope of the invention. For example, the steps recited in any of the method or process claims may be executed in any order and are not limited to the order presented. Thus, the preceding detailed description is presented for purposes of illustration only and not of limitation, and the scope of the invention is defined by the preceding description, and with respect to the attached claims.