Class Result

java.lang.Object
com.strategyquant.lib.ValuesMap
com.strategyquant.tradinglib.Result
All Implemented Interfaces:
com.strategyquant.lib.settings.IXMLAble, Serializable

public class Result extends ValuesMap
The Class Result.
See Also:
Serialized Form
  • Field Details

    • Log

      public static final org.slf4j.Logger Log
      The Constant Log.
  • Constructor Details

    • Result

      public Result(ResultsGroup resultsGroup)
      This constructor is used when creating Result from XML.
      Parameters:
      resultsGroup - the results group
    • Result

      public Result(String resultKey, ResultsGroup resultsGroup, SettingsMap settings)
      Instantiates a new result.
      Parameters:
      resultKey - the result key
      resultsGroup - the results group
      settings - the settings
  • Method Details

    • clone

      public Result clone(ResultsGroup newRG)
      Clone.
      Parameters:
      newRG - the new RG
      Returns:
      the result
    • setFrom

      public void setFrom(Result result, String targetResultKey)
      Sets the from.
      Parameters:
      result - the result
      targetResultKey - the target result key
    • stats

      public SQStats stats(StatsTypeCombination combination) throws Exception
      Stats.
      Parameters:
      combination - the combination
      Returns:
      the SQ stats
      Throws:
      Exception - the exception
    • stats

      public SQStats stats(byte direction, byte plType, byte sampleType) throws StatsDontExistException
      Stats.
      Parameters:
      direction - the direction
      plType - the pl type
      sampleType - the sample type
      Returns:
      the SQ stats
      Throws:
      StatsDontExistException - the stats dont exist exception
    • statsOrNull

      public SQStats statsOrNull(byte direction, byte plType, byte sampleType)
      Stats or null.
      Parameters:
      direction - the direction
      plType - the pl type
      sampleType - the sample type
      Returns:
      the SQ stats
    • addStrategy

      public void addStrategy(StrategyBase strategy)
      Adds the strategy.
      Parameters:
      strategy - the strategy
    • getStrategy

      public StrategyBase getStrategy()
      Gets the strategy.
      Returns:
      the strategy
    • addStrategyXml

      public void addStrategyXml(org.jdom2.Element elStrategy)
      Adds the strategy xml.
      Parameters:
      elStrategy - the el strategy
    • getStrategyXml

      public org.jdom2.Element getStrategyXml()
      Gets the strategy xml.
      Returns:
      the strategy xml
    • getSettings

      public SettingsMap getSettings()
      Gets the settings.
      Returns:
      the settings
    • setSettings

      public void setSettings(SettingsMap settings)
      Sets the settings.
      Parameters:
      settings - the new settings
    • getResultKey

      public String getResultKey()
      Gets the result key.
      Returns:
      the resultKey
    • getXML

      public org.jdom2.Element getXML()
      Gets the xml.
      Specified by:
      getXML in interface com.strategyquant.lib.settings.IXMLAble
      Overrides:
      getXML in class ValuesMap
      Returns:
      the xml
    • setFromXML

      public void setFromXML(org.jdom2.Element element)
      Sets the from XML.
      Specified by:
      setFromXML in interface com.strategyquant.lib.settings.IXMLAble
      Overrides:
      setFromXML in class ValuesMap
      Parameters:
      element - the new from XML
    • computeAllStats

      public void computeAllStats(SettingsMap specialValues, com.strategyquant.tradinglib.strategy.OutOfSample oos) throws Exception
      computes stats for every possible combination.
      Parameters:
      specialValues - the special values
      oos - the oos
      Throws:
      Exception - the exception
    • addTradingChartsData

      public void addTradingChartsData(com.strategyquant.tradinglib.engine.TradingSetup ts, OrdersList orders, boolean algoWizard) throws Exception
      Adds the trading charts data.
      Parameters:
      ts - the ts
      orders - the orders
      Throws:
      Exception - the exception
    • addTradingChartsData

      public void addTradingChartsData(com.strategyquant.tradinglib.engine.stockpicker.data.LoadedPickerData pickerdata, com.strategyquant.tradinglib.engine.stockpicker.Stockpicker stockPicker, OrdersList orders, boolean algoWizard) throws Exception
      Throws:
      Exception
    • clear

      public void clear(boolean resetData, boolean removeStockChartsFile)
      Clear.
      Parameters:
      resetData - the reset data
      removeStockChartsFile - the remove stock charts file
    • freeMemory2

      public void freeMemory2()
      Free memory 2.
    • setStrategyProblems

      public void setStrategyProblems(int badChecks)
      Sets the strategy problems.
      Parameters:
      badChecks - the new strategy problems
    • getStrategyProblems

      public int getStrategyProblems()
      Gets the strategy problems.
      Returns:
      the strategy problems
    • copyStats

      public void copyStats(Result sourceResult)
      Copy stats.
      Parameters:
      sourceResult - the source result
    • getStockChartPath

      public String getStockChartPath()
      Gets the stock chart path.
      Returns:
      the stock chart path
    • setStockChartPath

      public void setStockChartPath(String stockChartPath)
      Sets the stock chart path.
      Parameters:
      stockChartPath - the new stock chart path
    • getWorstDailyEquity

      public it.unimi.dsi.fastutil.longs.Long2FloatRBTreeMap getWorstDailyEquity()
      Gets the worst daily equity.
      Returns:
      the worst daily equity
    • setWorstDailyEquity

      public void setWorstDailyEquity(it.unimi.dsi.fastutil.longs.Long2FloatRBTreeMap worstDailyEquity)
      Sets the worst daily equity.
      Parameters:
      worstDailyEquity - the new worst daily equity
    • isSpecial

      public boolean isSpecial()
      Checks if is special.
      Returns:
      true, if is special
    • setSpecial

      public void setSpecial(boolean special)
      Sets the special.
      Parameters:
      special - the new special
    • removeUnsavableSettings

      public void removeUnsavableSettings()
      Removes the unsavable settings.
    • addMCSimulation

      public void addMCSimulation(String mcMethod, com.strategyquant.tradinglib.robustnesstests.RobustnessResults rr)
      Adds the MC simulation.
      Parameters:
      mcMethod - the mc method
      rr - the rr
    • getMCSimulation

      public com.strategyquant.tradinglib.robustnesstests.RobustnessResults getMCSimulation(String mcMethod, int i)
      Gets the MC simulation.
      Parameters:
      mcMethod - the mc method
      i - the i
      Returns:
      the MC simulation
    • getFitness

      public double getFitness(byte sampleType)
      Gets the fitness.
      Parameters:
      sampleType - the sample type
      Returns:
      the fitness
    • setFitness

      public void setFitness(byte sampleType, double fitness)
      Sets the fitness.
      Parameters:
      sampleType - the sample type
      fitness - the fitness
    • getSequentialOptimizaionResults

      public com.strategyquant.tradinglib.robustnesstests.SequentialOptimizationResults getSequentialOptimizaionResults()
      Gets the ChainOptimizationResults.
      Returns:
      the ChainOptimizationResults
    • setSequentialOptimizationResults

      public void setSequentialOptimizationResults(com.strategyquant.tradinglib.robustnesstests.SequentialOptimizationResults results)
      Sets the ChainOptimizationResults.
      Parameters:
      results -
    • getResultsGroup

      public ResultsGroup getResultsGroup()