Optimizer
The optimizer is a plug-in that uses
artificial intelligence algorithms to optimize rules, ranking systems, trading
systems and prediction items.
The plug-in provides two algorithms:
- Genetic algorithm
- Population-based incremental learning
Example:
Take a list of rules with 1000 rules.
For
these rules, we have more than billions of combination which will take years to
back-test.
Optimization algorithms are used to
find good solutions among all the combinations in a short period.
These are the genetic algorithm
parameters:
- Number of generation
- Population size
- Selection method: Elite, Rank or Roulette
- Crossover rate
- Mutation rate
- Random selection portion
These are the PBIL algorithm
parameters:
- Number of generation
- Population size
- Learning rate
- Number of best solutions to use in learning
http://en.wikipedia.org/wiki/Population-based_incremental_learning
Search for the best combination of rules
among a list of rules.
- In the 'Optimizer' form, click on 'Create'
- Select the optimization algorithm and 'List of Rules' in the 'What
do you want to optimize?" list box
- Click on 'Next'
- Update the algorithm settings
- Click on 'Next'
- Select the number of rules
- Select a list of rules, by clicking on 'Select rules'.
- For list of rules, select whether to always include the current
rule or not by checking or un-checking 'Always visible' checkbox
- Select the output
- Define a fitness formula
- Click on 'Next'
- Select the number of items to keep in the report
- Select the symbols the optimizer will use
- Click on 'Next'
- The optimizer item will now appears in the optimize manager.
Example:
List of rules contains 100 rules, from rule1 to rule100.
The
optimizer will try to find good combination of rules.
The result will look
like this:
Formula |
Fitness |
Rule87 && rule3 |
0.9 |
Rule12 && rule2 |
0.76 |
Rule33 |
0.66 |
Rule67 && Rule32 &&
Rule2 |
0.5 |
Fitness could be the return of the
symbol or something else; it depends on the 'Fitness'
formula.
Try to find which combination of nodes and
nodes' weight gives the best fitness score for the ranking system.
- In the 'Optimizer' form, click on 'Create'
- Select the optimization algorithm and 'Ranking System' in the 'What
do you want to optimize?" list box
- Click on 'Next'
- Update the algorithm settings
- Click on 'Next'
- Select a ranking system by clicking on 'Select a ranking
system'
- Select the number of buckets and the rebalance period
- Choose whether to optimize nodes' weight by checking or un-checking
'Optimize node weights' checkbox
- Type a fixed rule if you want to use a fixed rule in the ranking
system evaluation
- Select the output
- Define a fitness formula
- Click on 'Next'
- Select the number of items to keep in the report
- Select the symbols the optimizer will use
- Click on 'Next'
- The optimizer item will now appears in the optimize manager.
Try to find which trading system works best
given a buy, sell, short and cover list of rules, money management
variables, and others settings.
- In the 'Optimizer' form, click on 'Create'
- Select the optimization algorithm and 'Trading System' in the 'What
do you want to optimize?" list box
- Click on 'Next'
- Update the algorithm settings
- Click on 'Next'
- Select the number of buy and sell rules
- For each buy and sell rule, select a list of rules by clicking on
'Select rules'
- For each buy and sell rule, select whether to always include this
rule or not by checking or un-checking 'Always visible' checkbox
- Define a fitness formula
- On the 'Settings' tab, type a fixed buy rule and a fixed sell rule
if you want to include fixed rules in your trading system
- Select 'Optimization', to include capital and stops optimizable
variables
- Click on 'Next'
- Select the number of items to keep in the report
- Select the symbols the optimizer will use
- Click on 'Next'
- The optimizer item will now appears in the optimize manager.
Try to find which prediction item leads to a
better prediction accuracy given a list of inputs.
- In the 'Optimizer' form, click on 'Create'
- Select the optimization algorithm and 'Prediction Model' in the
'What do you want to optimize?" list box
- Click on 'Next'
- Update the algorithm settings
- Click on 'Next'
- Select a prediction item then click on 'Load Inputs'
- Update the prediction item if necessary by clicking on 'Update
Item'
- Select the input that will always be used in iterations by checking
them (Fixed inputs)
- Define a fitness formula
- Click on 'Next'
- Select the number of items to keep in the report
- Select the symbols the optimizer will use
- Click on 'Next'
- The optimizer item will now appears in the optimize manager.
The 'Optimize manager' list all optimize
items (AI -> Optimizer)
To create an optimize item, click on
'Create'.
To remove an optimize item, click on 'Delete'.
To update an
optimize item, click on 'Update'.
To load the optimizer report, click on
'Report'.
To start an optimize item, click either on 'Run' or on
'Run...'
Running an optimize item indefinitely, using 'Run...', means that
when the optimizer reach the maximum number of generation or the fitness value
converge, the software re-run the optimize item and increase the value of 'Turn'
by one.
If you run an optimize item multiple times,
you may end up each time with different results.
This is because the
optimizer algorithms do not look for all combinations but instead try to find
good solutions in a short period.
This is why we introduced the concept of
'Turn'.
The optimizer report includes the best items for all the turns (not
only the last turn)..