busitech
-Interested User-
Posts: 14
Joined: Apr 16, 2010
|
Posted: Aug 11, 2010 11:37 PM
Msg. 1 of 5
We are trying to use the Option Chain request with a Number of Contracts filter. We are requesting symbols for 2 puts and 2 calls which are out of the money, from up to two of the front months, depending on how close we are to expiration of all options in the current month... There comes a time late in the month when there are no August contracts available while you're still in August, for example.
The request is sent as follows, with possible months specified:
CEO,BAC,pc,,2,F,2,0,2,BAC
Instead of getting two puts and two calls, we receive get 6 of each:
CEO BAC,BAC1013H14,BAC1018I14,BAC1021H14,BAC1013H15,BAC1018I15,BAC1021H15,:,BAC1021T13,BAC1018U13,BAC1013T13,BAC1021T12,BAC1018U12,BAC1013T12,
I've also tried it with front months specified, and it returns the same list:
CEO,BAC,pc,HITU,,F,2,0,2,BAC
Please let me know if I should be doing something differently with respect to the command sent, or if there is a problem with the filter.
Thank you.
|
DTN_Steve_S
-DTN Guru-
Posts: 2093
Joined: Nov 21, 2005
|
Posted: Aug 12, 2010 08:14 AM
Msg. 2 of 5
The filter is working correctly. If you examine those contracts, you are only getting 2 strike prices out of the money (14 and 15 on the calls, 12 and 13 on the put). Edited by DTN_Steve_S on Aug 12, 2010 at 08:15 AM
|
busitech
-Interested User-
Posts: 14
Joined: Apr 16, 2010
|
Posted: Aug 12, 2010 09:03 PM
Msg. 3 of 5
I understand that there are two strike prices, however the API says that filter value 2 filters the number of contracts (not the number of strike prices): Quote: [Filter Value Two] - if [Filter Type] = "2" then the number of contracts out of the money The way I understand a "contract" is to mean one expiration month and strike price combination, or in other words, one option symbol. This is also the way my broker understands this terminology. Let me know DTN's definition of "contract" in terms of this filter.... In general, I think the API should err on the side of being more granular in the option chains query, because IQFeed is limited to the number of symbols we can follow at once. Our use of this filter is centered around quick access to a pair of puts and a pair of calls out of the money - four symbols total - to conserve our 1800 precious symbols. We will be maxing out the limit the way it is. If I will receive no less than 6 symbols, then I will have to do further filtering after receiving the extra symbols. That is OK, but the API could be more flexible in that case. I can't specify one month, because this month's options might all be expired. Thank you.
|
DTN_Steve_S
-DTN Guru-
Posts: 2093
Joined: Nov 21, 2005
|
Posted: Aug 13, 2010 11:27 AM
Msg. 4 of 5
Thanks for the feedback busitech. It sounds like you would prefer that the chains lookup only return the first 2 contract (ordered by expiration date). Is this correct? We will take this into consideration for future releases. My initial thoughts is that it will require also adding more filtering options than are currently available in the feed (for example, the ability to filter weekly or binary options would be needed) in order to satisfy the needs of those who prefer the chains the way they are currently.
You are correct that the documentation is not currently correct in terms of saying that x nuymber of contracts will be returned. It should say that it will return all contracts within 2 strike prices out of the money. A contract is a single symbol. The number of contracts you receive will depend on root symbol you are requesting (but there is no way to determine how many will be returned before making the request). The servers take into account only the strike price when determining in/out of the money filters. As a result, if you only want strikes for the front month out of the money, then you should specify 1 near month (the servers should not be returning expired contracts). The other option would be to do additional filtering yourself based upon your needs.
|
smt52
-Interested User-
Posts: 31
Joined: Feb 23, 2009
|
Posted: Oct 1, 2010 06:04 AM
Msg. 5 of 5
> (for example, the ability to filter weekly or binary options would be needed)
I would love the ability to filter out weekly or binary options, these are a real headache to handle in code, as every single symbol needs to be tweaked by hand to make it work. Nasty.
|