Class ProjectConfigHelper
java.lang.Object
com.strategyquant.tradinglib.project.ProjectConfigHelper
The type Project config helper.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckAdditionalChartsAndCIndysExpected(String projectName, Databank databank, ChartSetup mainSetup, ArrayList<String> strategies)Check additional charts and c indys expected.static voidcheckAdditionalChartsAndCIndysExpected(String projectName, ResultsGroup rg, ChartSetup mainSetup)Check additional charts and c indys expected.static voidCheck cust data indys.static com.strategyquant.tradinglib.engine.ChartSetupscloneChartSetups(com.strategyquant.tradinglib.engine.ChartSetups pChartSetups)Clone chart setups chart setups.static ArrayList<com.strategyquant.tradinglib.crosscheck.ICrossCheck>cloneCrossChecks(ArrayList<com.strategyquant.tradinglib.crosscheck.ICrossCheck> crossChecks)Clone cross checks array list.static ISQTaskcreateTask(String taskType, String taskName, String projectName)Create task isq task.static org.jdom2.ElementcreateTaskElement(String taskType)Create task element element.static voidDelete.static SettingsMapgetBuildSettings(org.jdom2.Element elOptions)Gets build settings.static ArrayList<CommissionsMethod>getChartSetupCommissions(org.jdom2.Element elData)Gets chart setup commissions.getChartSetupMainTestValues(org.jdom2.Element elData, String attributeName)Gets chart setup main test values.static com.strategyquant.tradinglib.engine.ChartSetupsgetChartSetups(org.jdom2.Element elData)Gets chart setups.static ArrayList<SwapMethod>getChartSetupSwaps(org.jdom2.Element elData)Gets chart setup swaps.getChartSetupValues(org.jdom2.Element elData, String attributeName)Gets chart setup values.static doublegetChartValue(String valueName, org.jdom2.Element elData)Gets chart value.static CommissionsMethodgetCommissionsMethod(org.jdom2.Element elSetup)Gets commissions method.static com.strategyquant.tradinglib.conditions.ConditiongetCondition(org.jdom2.Element conditionElem)Gets condition.static ArrayList<com.strategyquant.tradinglib.conditions.Condition>getConditions(org.jdom2.Element elConditions)Gets conditions.static com.strategyquant.tradinglib.conditions.IConditionValuegetConditionValue(org.jdom2.Element columnElem)Gets condition value.static DatabankgetDatabankByType(String projectName, String databankType, org.jdom2.Element elSettings)Gets databank by type.static intgetDismissBadStrategiesSettings(org.jdom2.Element elRankings)Gets dismiss bad strategies settings.static booleangetDismissBadStrategiesWarnings(org.jdom2.Element elRankings)Gets dismiss bad strategies warnings.static org.jdom2.ElementgetElCommission(String sCommission, boolean includingSetup)Gets el commission.static org.jdom2.ElementgetFitnessElement(com.strategyquant.lib.ranger.RangerFitness rf)Gets fitness element.static com.strategyquant.tradinglib.fitnessfunction.IFitnessFunctiongetFitnessFunction(com.strategyquant.tradinglib.fitnessfunction.IFitnessFunction existingFF, com.strategyquant.lib.ranger.RangerFitness rf)Gets fitness function.static com.strategyquant.tradinglib.fitnessfunction.IFitnessFunctiongetFitnessFunction(org.jdom2.Element elRankings)Gets fitness function.static DatabankgetInputDatabank(String projectName, org.jdom2.Element elSettings)Gets input databank.static MoneyManagementMethodgetMoneyManagement(org.jdom2.Element elMoneyManagement)Gets money management.static ArrayList<MonteCarloManipulation>getMonteCarloManipulationMethods(org.jdom2.Element elMethods)Gets monte carlo manipulation methods.static ArrayList<MonteCarloRetest>getMonteCarloRetestMethods(org.jdom2.Element elMethods)Gets monte carlo retest methods.static com.strategyquant.tradinglib.strategy.OutOfSamplegetOOS(org.jdom2.Element elOOS)Gets oos.getOptimizationStrategies(SQProject project, Databank databank)Returns optimization strategy files from all tasks with simple optimization selectedstatic com.strategyquant.tradinglib.options.TradingOptionsgetOptions(org.jdom2.Element elOptions)Gets options.static DatabankgetOutputDatabank(String projectName, String taskName)Gets output databank.static DatabankgetOutputDatabank(String projectName, org.jdom2.Element elSettings)Gets output databank.static RiskManagementMethodgetRiskManagement(org.jdom2.Element elRiskManagement)Gets risk management.static ArrayList<com.strategyquant.tradinglib.robustnesstests.RobustnessTestMethod>getRTMethods(org.jdom2.Element elMethods)Gets rt methods.static FilegetStrategyFile(Databank databank, String strategyName, int maxFileSize, String lockingTask)Gets strategy file.static SwapMethodgetSwapMethod(org.jdom2.Element elSetup)Gets swap method.static org.jdom2.ElementgetTaskConfigByName(org.jdom2.Element projectConfig, String taskName)Gets task config by name.static org.jdom2.ElementgetTaskConfigByXMLFile(org.jdom2.Element projectConfig, String taskXMLFile)Gets task config by xml file.static String[]getTaskSettings(String taskType)Get task settings string [ ].getWhatIfMethods(org.jdom2.Element elMethods)Gets what if methods.
-
Constructor Details
-
ProjectConfigHelper
public ProjectConfigHelper()
-
-
Method Details
-
getChartSetups
public static com.strategyquant.tradinglib.engine.ChartSetups getChartSetups(org.jdom2.Element elData) throws ExceptionGets chart setups.- Parameters:
elData- the el data- Returns:
- the chart setups
- Throws:
Exception- the exception
-
getChartSetupValues
public static ArrayList<String> getChartSetupValues(org.jdom2.Element elData, String attributeName) throws ExceptionGets chart setup values.- Parameters:
elData- the el dataattributeName- the attribute name- Returns:
- the chart setup values
- Throws:
Exception- the exception
-
getChartSetupCommissions
public static ArrayList<CommissionsMethod> getChartSetupCommissions(org.jdom2.Element elData) throws ExceptionGets chart setup commissions.- Parameters:
elData- the el data- Returns:
- the chart setup commissions
- Throws:
Exception- the exception
-
getChartSetupSwaps
Gets chart setup swaps.- Parameters:
elData- the el data- Returns:
- the chart setup swaps
- Throws:
Exception- the exception
-
getChartSetupMainTestValues
public static ArrayList<String> getChartSetupMainTestValues(org.jdom2.Element elData, String attributeName) throws ExceptionGets chart setup main test values.- Parameters:
elData- the el dataattributeName- the attribute name- Returns:
- the chart setup main test values
- Throws:
Exception- the exception
-
getMoneyManagement
public static MoneyManagementMethod getMoneyManagement(org.jdom2.Element elMoneyManagement) throws ExceptionGets money management.- Parameters:
elMoneyManagement- the el money management- Returns:
- the money management
- Throws:
Exception- the exception
-
getRiskManagement
public static RiskManagementMethod getRiskManagement(org.jdom2.Element elRiskManagement) throws ExceptionGets risk management.- Parameters:
elRiskManagement- the el risk management- Returns:
- the risk management
- Throws:
Exception- the exception
-
getMonteCarloManipulationMethods
public static ArrayList<MonteCarloManipulation> getMonteCarloManipulationMethods(org.jdom2.Element elMethods) throws ExceptionGets monte carlo manipulation methods.- Parameters:
elMethods- the el methods- Returns:
- the monte carlo manipulation methods
- Throws:
Exception- the exception
-
getMonteCarloRetestMethods
public static ArrayList<MonteCarloRetest> getMonteCarloRetestMethods(org.jdom2.Element elMethods) throws ExceptionGets monte carlo retest methods.- Parameters:
elMethods- the el methods- Returns:
- the monte carlo retest methods
- Throws:
Exception- the exception
-
getWhatIfMethods
Gets what if methods.- Parameters:
elMethods- the el methods- Returns:
- the what if methods
- Throws:
Exception- the exception
-
cloneChartSetups
public static com.strategyquant.tradinglib.engine.ChartSetups cloneChartSetups(com.strategyquant.tradinglib.engine.ChartSetups pChartSetups)Clone chart setups chart setups.- Parameters:
pChartSetups- the p chart setups- Returns:
- the chart setups
-
getConditions
public static ArrayList<com.strategyquant.tradinglib.conditions.Condition> getConditions(org.jdom2.Element elConditions) throws ExceptionGets conditions.- Parameters:
elConditions- the el conditions- Returns:
- the conditions
- Throws:
Exception- the exception
-
getCondition
public static com.strategyquant.tradinglib.conditions.Condition getCondition(org.jdom2.Element conditionElem) throws ExceptionGets condition.- Parameters:
conditionElem- the condition elem- Returns:
- the condition
- Throws:
Exception- the exception
-
getConditionValue
public static com.strategyquant.tradinglib.conditions.IConditionValue getConditionValue(org.jdom2.Element columnElem) throws ExceptionGets condition value.- Parameters:
columnElem- the column elem- Returns:
- the condition value
- Throws:
Exception- the exception
-
getOptions
public static com.strategyquant.tradinglib.options.TradingOptions getOptions(org.jdom2.Element elOptions)Gets options.- Parameters:
elOptions- the el options- Returns:
- the options
-
getOOS
public static com.strategyquant.tradinglib.strategy.OutOfSample getOOS(org.jdom2.Element elOOS) throws ParseExceptionGets oos.- Parameters:
elOOS- the el oos- Returns:
- the oos
- Throws:
ParseException- the parse exception
-
getOutputDatabank
public static Databank getOutputDatabank(String projectName, org.jdom2.Element elSettings) throws ExceptionGets output databank.- Parameters:
projectName- the project nameelSettings- the el settings- Returns:
- the output databank
- Throws:
Exception- the exception
-
getInputDatabank
public static Databank getInputDatabank(String projectName, org.jdom2.Element elSettings) throws ExceptionGets input databank.- Parameters:
projectName- the project nameelSettings- the el settings- Returns:
- the input databank
- Throws:
Exception- the exception
-
getDatabankByType
public static Databank getDatabankByType(String projectName, String databankType, org.jdom2.Element elSettings) throws ExceptionGets databank by type.- Parameters:
projectName- the project namedatabankType- the databank typeelSettings- the el settings- Returns:
- the databank by type
- Throws:
Exception- the exception
-
createTask
public static ISQTask createTask(String taskType, String taskName, String projectName) throws ExceptionCreate task isq task.- Parameters:
taskType- the task typetaskName- the task nameprojectName- the project name- Returns:
- the isq task
- Throws:
Exception- the exception
-
createTaskElement
Create task element element.- Parameters:
taskType- the task type- Returns:
- the element
- Throws:
Exception- the exception
-
getTaskSettings
Get task settings string [ ].- Parameters:
taskType- the task type- Returns:
- the string [ ]
- Throws:
Exception- the exception
-
getRTMethods
public static ArrayList<com.strategyquant.tradinglib.robustnesstests.RobustnessTestMethod> getRTMethods(org.jdom2.Element elMethods) throws ExceptionGets rt methods.- Parameters:
elMethods- the el methods- Returns:
- the rt methods
- Throws:
Exception- the exception
-
getTaskConfigByName
public static org.jdom2.Element getTaskConfigByName(org.jdom2.Element projectConfig, String taskName) throws ExceptionGets task config by name.- Parameters:
projectConfig- the project configtaskName- the task name- Returns:
- the task config by name
- Throws:
Exception- the exception
-
getTaskConfigByXMLFile
public static org.jdom2.Element getTaskConfigByXMLFile(org.jdom2.Element projectConfig, String taskXMLFile) throws ExceptionGets task config by xml file.- Parameters:
projectConfig- the project configtaskXMLFile- the task xml file- Returns:
- the task config by xml file
- Throws:
Exception- the exception
-
getOutputDatabank
Gets output databank.- Parameters:
projectName- the project nametaskName- the task name- Returns:
- the output databank
- Throws:
Exception- the exception
-
checkAdditionalChartsAndCIndysExpected
public static void checkAdditionalChartsAndCIndysExpected(String projectName, Databank databank, ChartSetup mainSetup, ArrayList<String> strategies) throws com.strategyquant.tradinglib.taskImpl.TaskExceptionCheck additional charts and c indys expected.- Parameters:
projectName- the project namedatabank- the databankmainSetup- the main setupstrategies- the strategies- Throws:
com.strategyquant.tradinglib.taskImpl.TaskException- the task exception
-
checkAdditionalChartsAndCIndysExpected
public static void checkAdditionalChartsAndCIndysExpected(String projectName, ResultsGroup rg, ChartSetup mainSetup) throws com.strategyquant.tradinglib.taskImpl.TaskExceptionCheck additional charts and c indys expected.- Parameters:
projectName- the project namerg- the rgmainSetup- the main setup- Throws:
com.strategyquant.tradinglib.taskImpl.TaskException- the task exception
-
checkCustDataIndys
public static void checkCustDataIndys(ResultsGroup rg) throws com.strategyquant.tradinglib.taskImpl.TaskExceptionCheck cust data indys.- Parameters:
rg- the rg- Throws:
com.strategyquant.tradinglib.taskImpl.TaskException- the task exception
-
delete
public static void delete(SQProject project, Databank databank, String[] stgs, String lockingTask) throws ExceptionDelete.- Parameters:
project- the projectdatabank- the databankstgs- the stgslockingTask- the locking task- Throws:
Exception- the exception
-
getOptimizationStrategies
Returns optimization strategy files from all tasks with simple optimization selected- Parameters:
project- the projectdatabank- the databank- Returns:
- array list
-
getChartValue
Gets chart value.- Parameters:
valueName- the value nameelData- the el data- Returns:
- the chart value
-
getBuildSettings
Gets build settings.- Parameters:
elOptions- the el options- Returns:
- the build settings
-
getDismissBadStrategiesSettings
public static int getDismissBadStrategiesSettings(org.jdom2.Element elRankings)Gets dismiss bad strategies settings.- Parameters:
elRankings- the el rankings- Returns:
- the dismiss bad strategies settings
-
getDismissBadStrategiesWarnings
public static boolean getDismissBadStrategiesWarnings(org.jdom2.Element elRankings)Gets dismiss bad strategies warnings.- Parameters:
elRankings- the el rankings- Returns:
- the dismiss bad strategies warnings
-
getStrategyFile
public static File getStrategyFile(Databank databank, String strategyName, int maxFileSize, String lockingTask)Gets strategy file.- Parameters:
databank- the databankstrategyName- the strategy namemaxFileSize- the max file sizelockingTask- the locking task- Returns:
- the strategy file
-
getCommissionsMethod
Gets commissions method.- Parameters:
elSetup- the el setup- Returns:
- the commissions method
- Throws:
Exception- the exception
-
getSwapMethod
Gets swap method.- Parameters:
elSetup- the el setup- Returns:
- the swap method
- Throws:
Exception- the exception
-
cloneCrossChecks
public static ArrayList<com.strategyquant.tradinglib.crosscheck.ICrossCheck> cloneCrossChecks(ArrayList<com.strategyquant.tradinglib.crosscheck.ICrossCheck> crossChecks)Clone cross checks array list.- Parameters:
crossChecks- the cross checks- Returns:
- the array list
-
getElCommission
public static org.jdom2.Element getElCommission(String sCommission, boolean includingSetup) throws IOException, org.jdom2.JDOMExceptionGets el commission.- Parameters:
sCommission- the s commissionincludingSetup- the including setup- Returns:
- the el commission
- Throws:
IOException- the io exceptionorg.jdom2.JDOMException- the jdom exception
-
getFitnessFunction
public static com.strategyquant.tradinglib.fitnessfunction.IFitnessFunction getFitnessFunction(org.jdom2.Element elRankings) throws ExceptionGets fitness function.- Parameters:
elRankings- the el rankings- Returns:
- the fitness function
- Throws:
Exception- the exception
-
getFitnessFunction
public static com.strategyquant.tradinglib.fitnessfunction.IFitnessFunction getFitnessFunction(com.strategyquant.tradinglib.fitnessfunction.IFitnessFunction existingFF, com.strategyquant.lib.ranger.RangerFitness rf) throws ExceptionGets fitness function.- Parameters:
existingFF- the existing ffrf- the rf- Returns:
- the fitness function
- Throws:
Exception- the exception
-
getFitnessElement
public static org.jdom2.Element getFitnessElement(com.strategyquant.lib.ranger.RangerFitness rf)Gets fitness element.- Parameters:
rf- the rf- Returns:
- the fitness element
-