Calculates the number of days until expiration assuming the option expires on the third Friday of the month.

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

Syntax

C#
public int CalculateDaysUntilExpiration(
	Nullable<DateTime> currentDate,
	int expMonth,
	int expYear
)
Visual Basic (Declaration)
Public Function CalculateDaysUntilExpiration ( _
	currentDate As Nullable(Of DateTime), _
	expMonth As Integer, _
	expYear As Integer _
) As Integer
Visual C++
public:
int CalculateDaysUntilExpiration(
	Nullable<DateTime> currentDate, 
	int expMonth, 
	int expYear
)

Parameters

currentDate
Type: System..::.Nullable<(Of <(DateTime>)>)
Sets the "current" date.
expMonth
Type: System..::.Int32
expiration month.
expYear
Type: System..::.Int32
expiration year.

Return Value

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