Documentation for smfGetOptionExpirations() function


Description

    Returns all expiration dates available for a specific equity.

Syntax

    =smfGetOptionExpirations( Ticker, [Source], [Put/Call], [Strike Price], [Rows], [Columns], [Type])

Parameters



     Ticker = Ticker symbol of underlying equity (e.g "MMM" or "SPY").
    Source= A parameter to indicate which data source the expiration dates should be retrieved from. Only Yahoo is now valid.
Optional as it will defauly to Yahoo if blank
Y = Yahoo

    Put/Call= An optional parameter that can allow you to create option ticker symbols for the smfGetOptionQuotes() function. If desired, both the Put/Call and Strike Price parameters should be passed. This parameter would be a literal value of "Put" or "Call" to indicate the type of ticker symbols that are desired. Can be abbreviated to "P" or "C".

    Strike Price= An optional numeric value that can allow you to create option ticker symbols for the smfGetOptionQuotes() function. If desired, both the Put/Call and Strike Price parameters should be passed.

    Rows and Columns= These are advanced optional parameters to override the size of the returned array of data. Normally, the returned array size is set by the range the formula is entered over. However, if other functions or VBA are involved, these allow the size of the returned range to be specifically set.

    Type=An optional integer value to determine the type of Internet request to make. Defaults to 0. For now, other values are experimental:

0 = XMLHTTP "Get" Request
1 = IE Object Request
2 = HTMLDocument Request
3 = XMLHTTP "Post" Request
4 = WinHttpRequest.5.1 "Get" Request (for Yahoo urls that require a "crumb" value)

Examples

2023-06-23
2023-06-30
2023-07-07
2023-07-14
2023-07-21
2023-07-28
2023-08-18
2023-09-15




...would return the available option expiration dates for "MMM" from OptionsXpress, formatted as $100 call ticker symbols ready for the smfGetOptionQuotes() function:

MMM 6/23 2023 $100.00 Call
MMM 6/30 2023 $100.00 Call
MMM 7/7 2023 $100.00 Call
MMM 7/14 2023 $100.00 Call
MMM 7/21 2023 $100.00 Call
MMM 7/28 2023 $100.00 Call
MMM 8/18 2023 $100.00 Call
MMM 9/15 2023 $100.00 Call

Usage notes