Class ProjectConfigHelper

java.lang.Object
com.strategyquant.tradinglib.project.ProjectConfigHelper

public class ProjectConfigHelper extends Object
The type Project config helper.
  • Constructor Details

    • ProjectConfigHelper

      public ProjectConfigHelper()
  • Method Details

    • getChartSetups

      public static com.strategyquant.tradinglib.engine.ChartSetups getChartSetups(org.jdom2.Element elData) throws Exception
      Gets 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 Exception
      Gets chart setup values.
      Parameters:
      elData - the el data
      attributeName - the attribute name
      Returns:
      the chart setup values
      Throws:
      Exception - the exception
    • getChartSetupCommissions

      public static ArrayList<CommissionsMethod> getChartSetupCommissions(org.jdom2.Element elData) throws Exception
      Gets chart setup commissions.
      Parameters:
      elData - the el data
      Returns:
      the chart setup commissions
      Throws:
      Exception - the exception
    • getChartSetupSwaps

      public static ArrayList<SwapMethod> getChartSetupSwaps(org.jdom2.Element elData) throws Exception
      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 Exception
      Gets chart setup main test values.
      Parameters:
      elData - the el data
      attributeName - the attribute name
      Returns:
      the chart setup main test values
      Throws:
      Exception - the exception
    • getMoneyManagement

      public static MoneyManagementMethod getMoneyManagement(org.jdom2.Element elMoneyManagement) throws Exception
      Gets 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 Exception
      Gets 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 Exception
      Gets 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 Exception
      Gets monte carlo retest methods.
      Parameters:
      elMethods - the el methods
      Returns:
      the monte carlo retest methods
      Throws:
      Exception - the exception
    • getWhatIfMethods

      public static ArrayList<WhatIf> getWhatIfMethods(org.jdom2.Element elMethods) throws Exception
      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 Exception
      Gets 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 Exception
      Gets 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 Exception
      Gets 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 ParseException
      Gets 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 Exception
      Gets output databank.
      Parameters:
      projectName - the project name
      elSettings - the el settings
      Returns:
      the output databank
      Throws:
      Exception - the exception
    • getInputDatabank

      public static Databank getInputDatabank(String projectName, org.jdom2.Element elSettings) throws Exception
      Gets input databank.
      Parameters:
      projectName - the project name
      elSettings - 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 Exception
      Gets databank by type.
      Parameters:
      projectName - the project name
      databankType - the databank type
      elSettings - the el settings
      Returns:
      the databank by type
      Throws:
      Exception - the exception
    • createTask

      public static ISQTask createTask(String taskType, String taskName, String projectName) throws Exception
      Create task isq task.
      Parameters:
      taskType - the task type
      taskName - the task name
      projectName - the project name
      Returns:
      the isq task
      Throws:
      Exception - the exception
    • createTaskElement

      public static org.jdom2.Element createTaskElement(String taskType) throws Exception
      Create task element element.
      Parameters:
      taskType - the task type
      Returns:
      the element
      Throws:
      Exception - the exception
    • getTaskSettings

      public static String[] getTaskSettings(String taskType) throws Exception
      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 Exception
      Gets 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 Exception
      Gets task config by name.
      Parameters:
      projectConfig - the project config
      taskName - 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 Exception
      Gets task config by xml file.
      Parameters:
      projectConfig - the project config
      taskXMLFile - the task xml file
      Returns:
      the task config by xml file
      Throws:
      Exception - the exception
    • getOutputDatabank

      public static Databank getOutputDatabank(String projectName, String taskName) throws Exception
      Gets output databank.
      Parameters:
      projectName - the project name
      taskName - 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.TaskException
      Check additional charts and c indys expected.
      Parameters:
      projectName - the project name
      databank - the databank
      mainSetup - the main setup
      strategies - 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.TaskException
      Check additional charts and c indys expected.
      Parameters:
      projectName - the project name
      rg - the rg
      mainSetup - the main setup
      Throws:
      com.strategyquant.tradinglib.taskImpl.TaskException - the task exception
    • checkCustDataIndys

      public static void checkCustDataIndys(ResultsGroup rg) throws com.strategyquant.tradinglib.taskImpl.TaskException
      Check 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 Exception
      Delete.
      Parameters:
      project - the project
      databank - the databank
      stgs - the stgs
      lockingTask - the locking task
      Throws:
      Exception - the exception
    • getOptimizationStrategies

      public static ArrayList<File> getOptimizationStrategies(SQProject project, Databank databank)
      Returns optimization strategy files from all tasks with simple optimization selected
      Parameters:
      project - the project
      databank - the databank
      Returns:
      array list
    • getChartValue

      public static double getChartValue(String valueName, org.jdom2.Element elData)
      Gets chart value.
      Parameters:
      valueName - the value name
      elData - the el data
      Returns:
      the chart value
    • getBuildSettings

      public static SettingsMap getBuildSettings(org.jdom2.Element elOptions)
      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 databank
      strategyName - the strategy name
      maxFileSize - the max file size
      lockingTask - the locking task
      Returns:
      the strategy file
    • getCommissionsMethod

      public static CommissionsMethod getCommissionsMethod(org.jdom2.Element elSetup) throws Exception
      Gets commissions method.
      Parameters:
      elSetup - the el setup
      Returns:
      the commissions method
      Throws:
      Exception - the exception
    • getSwapMethod

      public static SwapMethod getSwapMethod(org.jdom2.Element elSetup) throws Exception
      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.JDOMException
      Gets el commission.
      Parameters:
      sCommission - the s commission
      includingSetup - the including setup
      Returns:
      the el commission
      Throws:
      IOException - the io exception
      org.jdom2.JDOMException - the jdom exception
    • getFitnessFunction

      public static com.strategyquant.tradinglib.fitnessfunction.IFitnessFunction getFitnessFunction(org.jdom2.Element elRankings) throws Exception
      Gets 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 Exception
      Gets fitness function.
      Parameters:
      existingFF - the existing ff
      rf - 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