Package com.opttek.optquest
Class COptQuestPortfolioRequirement
java.lang.Object
com.opttek.optquest.COptQuestRequirement
com.opttek.optquest.COptQuestPortfolioRequirement
- Direct Known Subclasses:
COptQuestPortfolioLowerRequirement
,COptQuestPortfolioUpperRequirement
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the portfolio measure set by the SetPortfolioMeasure() method.int
Returns the portfolio statistic defined by the SetPortfolioStatistic() method.double
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) Used for portfolio optimizations which can define a requirement based on a measure and a statistic.Methods inherited from class com.opttek.optquest.COptQuestRequirement
equals, GetLowerBound, GetName, GetReplicationConfidenceErrorPercent, GetReplicationConfidenceLevel, GetReplicationStatistic, GetReplicationStatisticValue, GetUpperBound, hashCode, hasUserVariables, IsGoal, SetGoal, setHasUserVariables, SetLowerBound, SetName, SetReplicationConfidence, SetReplicationStatistic, SetTolerance, SetUpperBound
-
Method Details
-
SetPortfolioStatistic
public void SetPortfolioStatistic(int statistic, double statisticValue) Used for portfolio optimizations which can define a requirement based on a measure and a statistic. 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
-
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
- Throws:
COptQuestException
- id a portfolio statistic is not defined
-
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
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
-