com.opttek.optquest
Class COptQuestDiscountRateVariable

java.lang.Object
  extended bycom.opttek.optquest.COptQuestVariable
      extended bycom.opttek.optquest.COptQuestDiscountRateVariable

public class COptQuestDiscountRateVariable
extends COptQuestVariable

The COptQuestDiscountRateVariable class defines a discount rate for portfolio optimizations. Only one COptQuestDiscountRateVariable can be defined per optmization.

The discount rate is used to calculate the Net Present Value (NPV) or Payback Period(PBP) from the cash flow per period observations. The discount rate can be set as a constant discount rate for all periods/observations or it can be set per period/observation. Setting the discount rate per period/observation allows the user to use simulation to simulate the discount rate when it is unknown. If the discount rate does not change per observation, but does change per period, set all of the observations for that period to the same discount rate.

The SetCurrentValue() method is used to define the fixed rate discount rate.

If you are using observations you must call the SetNumberOfPeriods() method to set the number of periods in the portfolio and then call the SetPeriodObservations() method is used to set the observations by period.


Constructor Summary
COptQuestDiscountRateVariable()
          Default constructor
COptQuestDiscountRateVariable(java.lang.String name)
          Constructor that assigns a name to the discount rate variable.
 
Method Summary
 java.lang.String GetType()
           
 void SetExclusiveRange(double low, double high)
          Invalid method for COptQuestDiscountRateVariable
 void SetLowerBound(double val)
          Invalid method for COptQuestDiscountRateVariable
 void SetStepSize(double val)
          Invalid method for COptQuestDiscountRateVariable
 void SetUpperBound(double val)
          Invalid method for COptQuestDiscountRateVariable
 
Methods inherited from class com.opttek.optquest.COptQuestVariable
GetBestValue, GetCurrentValue, GetCurrentValue, GetExclusiveLowerBoundAt, GetExclusiveUpperBoundAt, GetLowerBound, GetName, GetNthBestValue, GetNumberOfExclusiveRanges, GetNumberOfObservations, GetNumberOfPeriods, GetObservationAt, GetObservations, GetPeriodObservationAt, GetPeriodObservations, GetStepSize, GetSuggestedValue, GetUpperBound, SetCurrentValue, SetCurrentValue, SetName, SetNumberOfPeriods, SetObservations, SetPeriodObservations, SetSuggestedValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

COptQuestDiscountRateVariable

public COptQuestDiscountRateVariable(java.lang.String name)
Constructor that assigns a name to the discount rate variable.

Parameters:
name - alphanumeric name. Note: the name can contain blanks or special characters. If the variable name is used in a COptQuestStringConstraint equation, the name should be enclosed in square brackets [] in the COptQuestStringConstraint string equation.

COptQuestDiscountRateVariable

public COptQuestDiscountRateVariable()
Default constructor

Method Detail

SetStepSize

public void SetStepSize(double val)
                 throws COptQuestException
Invalid method for COptQuestDiscountRateVariable

Overrides:
SetStepSize in class COptQuestVariable
Throws:
COptQuestException

SetLowerBound

public void SetLowerBound(double val)
                   throws COptQuestException
Invalid method for COptQuestDiscountRateVariable

Overrides:
SetLowerBound in class COptQuestVariable
Parameters:
val - a value between -pow(2,31) and +pow(2,31)-1
Throws:
COptQuestException

SetUpperBound

public void SetUpperBound(double val)
                   throws COptQuestException
Invalid method for COptQuestDiscountRateVariable

Overrides:
SetUpperBound in class COptQuestVariable
Parameters:
val - a value between -pow(2,31) and +pow(2,31)-1
Throws:
COptQuestException

SetExclusiveRange

public void SetExclusiveRange(double low,
                              double high)
                       throws COptQuestException
Invalid method for COptQuestDiscountRateVariable

Overrides:
SetExclusiveRange in class COptQuestVariable
Parameters:
low - - any value > low will be excluded
high - - any value < high will be exluded
Throws:
COptQuestException

GetType

public java.lang.String GetType()
Overrides:
GetType in class COptQuestVariable