OS_DaysToExp (Function)

image\trumpet2.gif Disclaimer

The OS_DaysToExp function calculates the days to expiration in whole or fractional days.  This function is designed primarily for use in OptionStation.

Syntax

OS_DaysToExp(TargetExpDate, TargetCalcDate, TargetCalcTime, UseFractionalDays);

Returns (Double)

A numeric value representing the days to expiration in whole or fractional days for a position.  

Parameters

Name

Type

Description

TargetExpDate

Numeric

Sets the expiration date of the option in Julian Date format.

TargetCalcDate

Numeric

Sets the modeled or today’s date in Julian date format.

TargetCalcTime

Numeric

Sets the current time in minutes from midnight.

UseFractionalDays

Numeric

Sets whether the function will return the days to expiration in whole or fractional days.  True = results to be displayed in fractional days; False = results to be in whole days.

Remarks

The input parameters TargetExpDate can also use the reserved word value such as ExpirationDate.
The input parameters TargetCalcDate can also use the reserved word value such as LastCalcJDate.

Example

Assigns to Value1 the days to expiration of an option, in fractional portions, from today, at the current time

Value1 = OS_DaysToExp(ExpirationDate of Option, LastCalcJDate, LastCalcMMTime, True);