com.opttek.optquest
Class COptQuestPortfolioObjective

java.lang.Object
  extended by com.opttek.optquest.COptQuestObjective
      extended by com.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
COptQuestPortfolioObjective(java.lang.String name)
          Constructor that assigns a name to the portfolio objective.
 
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.
 boolean IsLinear()
          Returns true if the objective is a linear function.
 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, GetName, GetNthBestFeasible, GetNthBestValue, GetReplicationConfidenceLevel, GetReplicationConfidencePercent, GetReplicationConfidenceType, IsMaximize, IsMinimize, SetCurrentValue, SetCurrentValue, SetMaximize, SetMinimize, SetName, SetReplicationConfidence
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

COptQuestPortfolioObjective

public COptQuestPortfolioObjective()
Default constructor


COptQuestPortfolioObjective

public COptQuestPortfolioObjective(java.lang.String name)
Constructor that assigns a name to the portfolio objective.

Parameters:
name -
Method Detail

IsLinear

public boolean IsLinear()
Description copied from class: COptQuestObjective
Returns true if the objective is a linear function. This is true if the user defined the objective as a COptQuestObjectiveFunction or if the user defined the objective as a COptQuestStringObjective and the string expression is a linear expression using decision variables and coefficients.

Overrides:
IsLinear in class COptQuestObjective
Returns:
true if the objective is a linear function of the decision variables.

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