com.opttek.optquest
Class COptQuestPortfolioObjective

java.lang.Object
  extended bycom.opttek.optquest.COptQuestObjective
      extended bycom.opttek.optquest.COptQuestPortfolioObjective

public class COptQuestPortfolioObjective
extends COptQuestObjective

The COptQuestPortfolioObjective class defines the objective of an optimization as minimizing or maximizing a statistic on a measure. The user must define COptQuestProjectVariables with observations or period observations.


Constructor Summary
COptQuestPortfolioObjective()
          Default constructor
 
Method Summary
 int GetPortfolioMeasure()
          Returns the portfolio measure set by the SetPortfolioMeasure() method.
 int GetPortfolioStatistic()
          Returns the portfolio statistic defined by the SetPortfolioStatistic() method.
 double GetPortfolioStatisticValue()
          Returns the statistic value defined by the SetPortfolioStatistic() method.
 void SetPortfolioMeasure(int measure)
          Defines the measure for the portfolio objective.
 void SetPortfolioStatistic(int statistic, double statisticValue)
          Defines the statistic for the portfolio objective.
 
Methods inherited from class com.opttek.optquest.COptQuestObjective
GetBestFeasible, GetBestValue, GetCurrentFeasible, GetCurrentFeasible, GetCurrentValue, GetCurrentValue, GetNthBestFeasible, GetNthBestValue, IsLinear, IsMaximize, IsMinimize, SetCurrentValue, SetCurrentValue, SetMaximize, SetMinimize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

COptQuestPortfolioObjective

public COptQuestPortfolioObjective()
Default constructor

Method Detail

SetPortfolioStatistic

public void SetPortfolioStatistic(int statistic,
                                  double statisticValue)
                           throws COptQuestException
Defines the statistic for the portfolio objective. The statistics OCLP_PERCENTILE, OCLP_SEMI1STDDEV, OCLP_SEMI2STDDEV and OCLP_PROBABILITY require the statisticValue to be set. This value is ignored for all other statistics.

Parameters:
statistic -
  • OCLP_MEAN = 1
  • OCLP_MEDIAN = 2
  • OCLP_PERCENTILE = 3
  • OCLP_STDDEV = 4
  • OCLP_SEMI1STDDEV = 5
  • OCLP_VARIANCE = 6
  • OCLP_SEMI1VARIANCE = 7
  • OCLP_COEFFOFVAR = 8
  • OCLP_COEFFOFSEMI1VAR = 9
  • OCLP_PROBABILITY = 10
  • OCLP_SEMI2STDDEV = 11
  • OCLP_SEMI2VARIANCE = 12
  • OCLP_COEFFOFSEMI2VAR = 13
statisticValue - - target value for OCLP_PERCENTILE, OCLP_SEMI1STDDEV, OCLP_SEMI2STDDEV and OCLP_PROBABILITY
Throws:
COptQuestException - if the statistic or statistic value are invalid.

GetPortfolioStatistic

public int GetPortfolioStatistic()
Returns the portfolio statistic defined by the SetPortfolioStatistic() method.

Returns:
statistic
  • OCLP_MEAN = 1
  • OCLP_MEDIAN = 2
  • OCLP_PERCENTILE = 3
  • OCLP_STDDEV = 4
  • OCLP_SEMI1STDDEV = 5
  • OCLP_VARIANCE = 6
  • OCLP_SEMI1VARIANCE = 7
  • OCLP_COEFFOFVAR = 8
  • OCLP_COEFFOFSEMI1VAR = 9
  • OCLP_PROBABILITY = 10
  • OCLP_SEMI2STDDEV = 11
  • OCLP_SEMI2VARIANCE = 12
  • OCLP_COEFFOFSEMI2VAR = 13

GetPortfolioStatisticValue

public double GetPortfolioStatisticValue()
Returns the statistic value defined by the SetPortfolioStatistic() method. The statistics OCLP_PERCENTILE, OCLP_SEMI1STDDEV, OCLP_SEMI2STDDEV and OCLP_PROBABILITY require the statisticValue to be set.

Returns:
the target value for OCLP_PERCENTILE, OCLP_SEMI1STDDEV, OCLP_SEMI2STDDEV and OCLP_PROBABILITY. Returns 0 for all other statistics.

SetPortfolioMeasure

public void SetPortfolioMeasure(int measure)
                         throws COptQuestException
Defines the measure for the portfolio objective.

Parameters:
measure -
  • OCLP_NPV = 1
  • OCLP_IRR = 2
  • OCLP_PBP = 3
Throws:
COptQuestException - if the measure is invalid.

GetPortfolioMeasure

public int GetPortfolioMeasure()
Returns the portfolio measure set by the SetPortfolioMeasure() method.

Returns:
the integer value that identifies the portfolio measure
  • OCLP_NPV = 1
  • OCLP_IRR = 2
  • OCLP_PBP = 3