public class SQSettings extends FlexibleSettings
BYTE_MISSING, DOUBLE_MISSING, FLOAT_MISSING, INT_MISSING, LONG_MISSING
Constructor and Description |
---|
SQSettings()
Instantiates a new SQ settings.
|
Modifier and Type | Method and Description |
---|---|
void |
addActionBlock(com.strategyquant.futurelib.evo.block.action.ActionBlock actionBlock,
int weight)
Adds the action block.
|
void |
addActionBlock(com.strategyquant.futurelib.evo.block.action.ActionBlock actionBlock,
int weight,
boolean required)
Adds the action block.
|
void |
addChart(com.strategyquant.futurelib.backtester.ChartDefinition chart)
Adds the chart.
|
void |
addEvolutionOperator(com.strategyquant.futurelib.evo.EvolutionaryOperator evolutionaryOperator)
Adds the evolution operator.
|
void |
addExitBlock(com.strategyquant.futurelib.evo.block.exit.ExitBlock exitBlock,
int weight)
Adds the exit block.
|
void |
addExitBlock(com.strategyquant.futurelib.evo.block.exit.ExitBlock exitBlock,
int weight,
boolean required)
Adds the exit block.
|
void |
addTerminationCondition(com.strategyquant.futurelib.evo.termintion.TerminationCondition condition)
Adds the termination condition.
|
void |
addWatcher(com.strategyquant.futurelib.evo.watchers.EvolutionWatcher watcher)
Adds the watcher.
|
void |
checkCorrectness()
Check correctness.
|
void |
clearCharts()
Clear charts.
|
void |
clearOutOfSample()
Clear out of sample.
|
SQSettings |
clone() |
boolean |
generateLongRule()
Generate long rule.
|
boolean |
generateShortRule()
Generate short rule.
|
boolean |
generateSymmetricEntries()
Generate symmetric entries.
|
boolean |
generateSymmetricExits()
Generate symmetric exits.
|
com.strategyquant.futurelib.evo.block.BlockDefs |
getActionBlocks()
Gets the action blocks.
|
com.strategyquant.futurelib.backtester.ChartDefinitions |
getCharts()
Gets the charts.
|
int |
getElitismSize()
Gets the elitism size.
|
com.strategyquant.futurelib.evo.EvolutionOperators |
getEvolutionOperators()
Gets the evolution operators.
|
int |
getEvolutionType()
Gets the evolution type.
|
com.strategyquant.futurelib.evo.watchers.EvolutionWatchers |
getEvolutionWatchers()
Gets the evolution watchers.
|
com.strategyquant.futurelib.evo.block.BlockDefs |
getExitBlocks()
Gets the exit blocks.
|
com.strategyquant.futurelib.evo.strategy.StrategyFactory |
getFactory()
Gets the factory.
|
com.strategyquant.futurelib.evo.FitnessEvaluator |
getFitnessEvaluator()
Gets the fitness evaluator.
|
int |
getNumberOfIslands()
Gets the number of islands.
|
SQTime[] |
getOutOfSample1()
Gets the out of sample1.
|
SQTime[] |
getOutOfSample2()
Gets the out of sample2.
|
SQTime[] |
getOutOfSample3()
Gets the out of sample3.
|
java.lang.String |
getOutputDatabank()
Gets the output databank.
|
int |
getPopulationSize()
Gets the population size.
|
com.strategyquant.futurelib.evo.random.RandomGenerator |
getRandomNumberGenerator()
Gets the random number generator.
|
long |
getRandomSeed()
Gets the random seed.
|
int |
getReserveBars()
Gets the reserve bars.
|
com.strategyquant.core.stats.type.StatsTypeSample |
getSampleTypeRecognizer()
Gets the sample type recognizer.
|
com.strategyquant.futurelib.evo.selection.SelectionStrategy |
getSelectionStrategy()
Gets the selection strategy.
|
com.strategyquant.futurelib.evo.strategy.SlotConfigurations |
getSlotConfigurations()
Gets the slot configurations.
|
int |
getSlotsCount()
Gets the slots count.
|
int |
getStrategyLogic()
Gets the strategy logic.
|
com.strategyquant.futurelib.evo.termintion.TerminationCondition[] |
getTerminalConditions()
Gets the terminal conditions.
|
boolean |
getTradingOptionBoolean(java.lang.String key,
boolean defaultValue)
Gets the trading option boolean.
|
java.util.HashMap<java.lang.String,java.lang.Object> |
getTradingOptions()
Gets the trading options.
|
org.jdom2.Element |
getXml()
Gets the xml.
|
boolean |
hasLongRule()
Checks for long rule.
|
boolean |
hasShortRule()
Checks for short rule.
|
boolean |
isPTRequired()
Checks if is PT required.
|
boolean |
isSLRequired()
Checks if is SL required.
|
void |
parseFromXml(org.jdom2.Element elSettings)
Parses the from xml.
|
void |
setCharts(com.strategyquant.futurelib.backtester.ChartDefinitions charts)
Sets the charts.
|
void |
setElitismSize(int elitismSize)
Sets the elitism size.
|
void |
setEvolutionType(int evolutionType)
Sets the evolution type.
|
void |
setFactory(com.strategyquant.futurelib.evo.strategy.StrategyFactory factory)
Sets the factory.
|
void |
setFitnessEvaluator(com.strategyquant.futurelib.evo.TreeEvaluator fitnessEvaluator)
Sets the fitness evaluator.
|
void |
setIslands(int numberOfIslands)
Sets the islands.
|
void |
setOutOfSample(SQTime oosFrom,
SQTime oosTo)
Sets the out of sample.
|
void |
setOutOfSample1(SQTime oosFrom,
SQTime oosTo)
Sets the out of sample1.
|
void |
setOutOfSample2(SQTime oosFrom,
SQTime oosTo)
Sets the out of sample2.
|
void |
setOutOfSample3(SQTime oosFrom,
SQTime oosTo)
Sets the out of sample3.
|
void |
setOutputDatabank(java.lang.String name)
Sets the output databank.
|
void |
setPopulationSize(int populationSize)
Sets the population size.
|
void |
setPTRequired(boolean value)
Sets the PT required.
|
void |
setRandomNumberGenerator(com.strategyquant.futurelib.evo.random.RandomGenerator randomNumberGenerator)
Sets the random number generator.
|
void |
setRandomSeed(long randomSeed)
Sets the random seed.
|
void |
setReserveBars(int reserveBars)
Sets the reserve bars.
|
void |
setSelection(com.strategyquant.futurelib.evo.selection.SelectionStrategy selectionStrategy)
Sets the selection.
|
void |
setSlotConfig(int slotIndex,
com.strategyquant.futurelib.evo.strategy.SlotConfiguration slotConfig)
Sets the slot config.
|
void |
setSlotConfigurations(com.strategyquant.futurelib.evo.strategy.SlotConfigurations slotConfigurations)
Sets the slot configurations.
|
void |
setSlotsCount(int slotsCount)
Sets the slots count.
|
void |
setSLRequired(boolean value)
Sets the SL required.
|
void |
setStrategyLogic(int strategyLogic)
Sets the strategy logic.
|
void |
setTradingOption(java.lang.String key,
boolean value)
Sets the trading option.
|
void |
setTypeOfRules(boolean longRule,
boolean shortRule,
boolean symmetricEntries,
boolean symmetricExits)
Sets the type of rules.
|
clearAll, contains, get, get, getAll, getAllKeys, getBoolean, getBoolean, getByte, getByte, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getString, getString, hetKeyType, remove, set, set, setAll
public void setRandomSeed(long randomSeed)
randomSeed
- the new random seedpublic void setPopulationSize(int populationSize)
populationSize
- the new population sizepublic void setElitismSize(int elitismSize)
elitismSize
- the new elitism sizepublic void addEvolutionOperator(com.strategyquant.futurelib.evo.EvolutionaryOperator evolutionaryOperator)
evolutionaryOperator
- the evolutionary operatorpublic void setSelection(com.strategyquant.futurelib.evo.selection.SelectionStrategy selectionStrategy)
selectionStrategy
- the new selectionpublic long getRandomSeed()
public void setRandomNumberGenerator(com.strategyquant.futurelib.evo.random.RandomGenerator randomNumberGenerator)
randomNumberGenerator
- the new random number generatorpublic void setFactory(com.strategyquant.futurelib.evo.strategy.StrategyFactory factory)
factory
- the new factorypublic void setFitnessEvaluator(com.strategyquant.futurelib.evo.TreeEvaluator fitnessEvaluator)
fitnessEvaluator
- the new fitness evaluatorpublic void setIslands(int numberOfIslands)
numberOfIslands
- the new islandspublic com.strategyquant.futurelib.evo.EvolutionOperators getEvolutionOperators()
public com.strategyquant.futurelib.evo.selection.SelectionStrategy getSelectionStrategy()
public com.strategyquant.futurelib.evo.strategy.StrategyFactory getFactory()
public com.strategyquant.futurelib.evo.FitnessEvaluator getFitnessEvaluator()
public com.strategyquant.futurelib.evo.random.RandomGenerator getRandomNumberGenerator()
public int getPopulationSize()
public int getElitismSize()
public int getNumberOfIslands()
public void addTerminationCondition(com.strategyquant.futurelib.evo.termintion.TerminationCondition condition)
condition
- the conditionpublic void addWatcher(com.strategyquant.futurelib.evo.watchers.EvolutionWatcher watcher)
watcher
- the watcherpublic com.strategyquant.futurelib.evo.watchers.EvolutionWatchers getEvolutionWatchers()
public com.strategyquant.futurelib.evo.termintion.TerminationCondition[] getTerminalConditions()
public void setTypeOfRules(boolean longRule, boolean shortRule, boolean symmetricEntries, boolean symmetricExits)
longRule
- the long ruleshortRule
- the short rulesymmetricEntries
- the symmetric entriessymmetricExits
- the symmetric exitspublic void setSlotsCount(int slotsCount)
slotsCount
- the new slots countpublic int getSlotsCount()
public void setSlotConfig(int slotIndex, com.strategyquant.futurelib.evo.strategy.SlotConfiguration slotConfig)
slotIndex
- the slot indexslotConfig
- the slot configpublic void setSlotConfigurations(com.strategyquant.futurelib.evo.strategy.SlotConfigurations slotConfigurations)
slotConfigurations
- the new slot configurationspublic com.strategyquant.futurelib.evo.strategy.SlotConfigurations getSlotConfigurations()
public void setReserveBars(int reserveBars)
reserveBars
- the new reserve barspublic int getReserveBars()
public void addExitBlock(com.strategyquant.futurelib.evo.block.exit.ExitBlock exitBlock, int weight)
exitBlock
- the exit blockweight
- the weightpublic void addExitBlock(com.strategyquant.futurelib.evo.block.exit.ExitBlock exitBlock, int weight, boolean required)
exitBlock
- the exit blockweight
- the weightrequired
- the requiredpublic com.strategyquant.futurelib.evo.block.BlockDefs getExitBlocks()
public void addActionBlock(com.strategyquant.futurelib.evo.block.action.ActionBlock actionBlock, int weight, boolean required)
actionBlock
- the action blockweight
- the weightrequired
- the requiredpublic void addActionBlock(com.strategyquant.futurelib.evo.block.action.ActionBlock actionBlock, int weight)
actionBlock
- the action blockweight
- the weightpublic com.strategyquant.futurelib.evo.block.BlockDefs getActionBlocks()
public boolean generateLongRule()
public boolean generateShortRule()
public void setSLRequired(boolean value)
value
- the new SL requiredpublic void setPTRequired(boolean value)
value
- the new PT requiredpublic boolean isSLRequired()
public boolean isPTRequired()
public void checkCorrectness() throws IncorrectParamsException
IncorrectParamsException
- the incorrect params exceptionpublic void setTradingOption(java.lang.String key, boolean value)
key
- the keyvalue
- the valuepublic java.util.HashMap<java.lang.String,java.lang.Object> getTradingOptions()
public boolean getTradingOptionBoolean(java.lang.String key, boolean defaultValue)
key
- the keydefaultValue
- the default valuepublic void addChart(com.strategyquant.futurelib.backtester.ChartDefinition chart)
chart
- the chartpublic com.strategyquant.futurelib.backtester.ChartDefinitions getCharts()
public void setCharts(com.strategyquant.futurelib.backtester.ChartDefinitions charts)
charts
- the new chartspublic void setEvolutionType(int evolutionType)
evolutionType
- the new evolution typepublic int getEvolutionType()
public java.lang.String getOutputDatabank()
public void setOutputDatabank(java.lang.String name)
name
- the new output databankpublic void setStrategyLogic(int strategyLogic)
strategyLogic
- the new strategy logicpublic int getStrategyLogic()
public boolean generateSymmetricEntries()
public boolean generateSymmetricExits()
public boolean hasLongRule()
public boolean hasShortRule()
public void clearCharts()
public void clearOutOfSample()
public void setOutOfSample(SQTime oosFrom, SQTime oosTo)
oosFrom
- the oos fromoosTo
- the oos topublic void setOutOfSample1(SQTime oosFrom, SQTime oosTo)
oosFrom
- the oos fromoosTo
- the oos topublic void setOutOfSample2(SQTime oosFrom, SQTime oosTo)
oosFrom
- the oos fromoosTo
- the oos topublic void setOutOfSample3(SQTime oosFrom, SQTime oosTo)
oosFrom
- the oos fromoosTo
- the oos topublic SQTime[] getOutOfSample1()
public SQTime[] getOutOfSample2()
public SQTime[] getOutOfSample3()
public com.strategyquant.core.stats.type.StatsTypeSample getSampleTypeRecognizer()
public org.jdom2.Element getXml()
public void parseFromXml(org.jdom2.Element elSettings)
elSettings
- the el settingspublic SQSettings clone()
clone
in class FlexibleSettings