Calculates the number of days until expiration. This implementation assumes the option expires on the third Friday of the month, but this can be overridden in a derived class.

Namespace: RightEdge.Common
Assembly: Common (in Common.dll) Version: 2010.1.0.0 (2010.1.0.0)

Syntax

C#
protected virtual int CalculateDaysUntilExpiration(
	DateTime currentDate,
	int expMonth,
	int expYear
)
Visual Basic
Protected Overridable Function CalculateDaysUntilExpiration ( 
	currentDate As DateTime,
	expMonth As Integer,
	expYear As Integer
) As Integer
Visual C++
protected:
virtual int CalculateDaysUntilExpiration(
	DateTime currentDate, 
	int expMonth, 
	int expYear
)
F#
abstract CalculateDaysUntilExpiration : 
        currentDate : DateTime * 
        expMonth : int * 
        expYear : int -> int 
override CalculateDaysUntilExpiration : 
        currentDate : DateTime * 
        expMonth : int * 
        expYear : int -> int 

Parameters

currentDate
Type: System..::..DateTime
Sets the "current" date.
expMonth
Type: System..::..Int32
expiration month.
expYear
Type: System..::..Int32
expiration year.

Return Value

Type: Int32
Number of days until expiration.

Remarks

The currentDate parameter can be set to any value as long as it's less than the expMonth and expYear parameters. This is useful in cases where the option price needs to be simulated on a date other than the actual current date.

See Also