Join the 80,000 other DTN customers who enjoy the fastest, most reliable data available. There is no better value than DTN!

(Move your cursor to this area to pause scrolling)




"This beats the pants off CQG, I am definitely switching to the ProphetX 3.0!" - Comment from Stephen
"I am a hedge fund manager here. It’s funny, I have a Bloomberg terminal and a Bridge feed, but I still like having my DTN feed!" - Comment from Feras
"The people at Nirvana have very nice things to say about your company and I can see why! Price and service is a potent combination." - Comment from Ed
"I "bracket trade" all major news releases and I have not found one lag or glitch with DTN.IQ feed. I am very comfortable with their feed under all typical news conditions (Fed releases, employment numbers, etc)." - Comment from Public Forum
"My broker in Davenport suggested I give you a try as he uses your service and says its the best." - Comment from Bill via RT Chat
"I ran your IQFeed DDE vs. my broker vs. a level II window for some slow-moving options. I would see the level II quote change, then your feed update instantaneously. My broker's DDE, however, would take as much as 30 seconds to update. I am not chasing milliseconds, but half a minute is unacceptable." - Comment from Rob
"If you want customer service that answers the phone, your best bet is IQFeed. I cannot stop praising them or their technical support. They are always there for you, and they are quick. I have used ****** too but the best value is IQFeed." - Comment from Public Forum
"I am very happy I changed. I love the product, but more so I am thrilled with Tech Support. You are knowledgeable, polite, pleasant and professional." - Comment from Pat
"I've been using Neoticker RT with IQFeed for two months, and I'm very happy with both of the products (I've had IQFeed for two years with very few complaints). The service from both companies is exceptional." - Comment from Public Forum
"Previously I was using *******. IQFeed is WAY more economical, and for my charting needs is just as good, if not better." - Comment from Public Forum Post
Home  Search  Register  Login  Recent Posts

Information on DTN's Industries:
DTN Oil & Gas | DTN Trading | DTN Agriculture | DTN Weather
Follow DTNMarkets on Twitter
DTN.IQ/IQFeed on Twitter
DTN News and Analysis on Twitter
»Forums Index »NEW IQFEED FORUMS »Data Questions »How do I get real-time options greeks using web sockets?
Author Topic: How do I get real-time options greeks using web sockets? (8 messages, Page 1 of 1)

gnosis
-Interested User-
Posts: 3
Joined: Feb 19, 2021


Posted: Feb 20, 2021 12:11 PM          Msg. 1 of 8
Hi,

I am able to get the real-time options data, like the last price, bid, and ask, but can't seem to find a way get the greeks using web sockets. Can someone please help?

Thanks

-Irfan

altmany
-Interested User-
Posts: 73
Joined: Jul 30, 2018

IQML - IQFeed-MATLAB connector


Posted: Feb 20, 2021 12:36 PM          Msg. 2 of 8
I do not believe that IQFeed has a dedicated query for requesting greeks, nor are the greeks reported by IQFeed in the standard market-data query.

Some of the software that connects to IQFeed (for example, my IQML connector for Matlab) calculate the greeks internally and report them to the user. If you are developing your own program, you can calculate the greeks using the information reported for the options and their underlying asset, and the standard Mathematical definitions: https://en.wikipedia.org/wiki/Greeks_(finance).

Yair Altman
IQML - IQFeed-MATLAB connector
https://UndocumentedMatlab.com/IQML

I am not a DTN employee; my post reflects my personal opinion

stargrazer
-DTN Guru-
Posts: 302
Joined: Jun 13, 2005

Right Here & Now


Posted: Feb 20, 2021 03:24 PM          Msg. 3 of 8
hi altmany:

Quote: my IQML connector for Matlab) calculate the greeks internally and report them to the user


What do you use as a source of interest rate?

----

https://github.com/rburkholder/trade-frame/tree/master/lib/TFIQFeed
Edited by stargrazer on Feb 20, 2021 at 03:25 PM

gnosis
-Interested User-
Posts: 3
Joined: Feb 19, 2021


Posted: Feb 20, 2021 04:41 PM          Msg. 4 of 8
The delta can be calculated using the following five values:

1. Stock Price
2. Option Strike Price
3. Time to Expiration
4. Risk-Free Rate
5. Implied Volatility

I am not sure how to get #4 and #5.

Does anyone know?

Thanks

-Irfan

stargrazer
-DTN Guru-
Posts: 302
Joined: Jun 13, 2005

Right Here & Now


Posted: Feb 20, 2021 05:23 PM          Msg. 5 of 8

altmany
-Interested User-
Posts: 73
Joined: Jul 30, 2018

IQML - IQFeed-MATLAB connector


Posted: Feb 21, 2021 02:48 AM          Msg. 6 of 8
For the volatility value you can use the Historical_Volatility field from the underlying asset's fundamental data. DTN's official description of this field is: “30-trading day volatility, calculated using Black-Scholes”. Apparently, the actual calculation (which is updated once a day, after midnight) for options computes the volatility of day-to-day price change values of the last 30 trading days, using the last 31 daily close prices, as follows:
100*sqrt(252)*std(ln(close(i+1)/close(i)))
, rounded to the nearest 0.01. For futures, the calculation is similar but apparently based on 90 (not 30) values. When a contract is newly-listed, fewer values are used, with a minimum of 4 values.

You can also calculate the historic volatility yourself, using historic prices of the underlying asset (use IQFeed's historic bars query for this). In this case, you can use a different number of historic prices for the calculation, ignore outlier values etc., without relying on DTN's built-in opaque calculation.

As an alternative to using the historic volatility, you can also calculate the implied volatility using Black-Scholes. This will typically be easier for European derivatives than for American/Asian/exotic ones.

In my IQML connector I enable the user to choose whether to use IQFeed's built-in Historical_Volatility field, or a calculated Implied Volatility, or a fixed value.

For the risk-free rate, you can either set a fixed rate (in the current financial situation, a simple value of 0 may be close enough for practical purposes), or use the current value of assets such as LIBOR/IRX.XO.

See http://forums.iqfeed.net/index.cfm?page=topic&topicID=4387 for some detailed discussion of these matters.


Yair Altman
IQML - IQFeed-MATLAB connector
https://UndocumentedMatlab.com/IQML

I am not a DTN employee; my post reflects my personal opinion

Edited by altmany on Feb 21, 2021 at 02:58 AM

DTN_Gary_Stephen
-DTN Guru-
Posts: 394
Joined: Jul 3, 2019


Posted: Feb 22, 2021 07:12 AM          Msg. 7 of 8
For the record, altmany is correct that the IQFeed API will not give you the Greeks correctly; you will have to calculate them yourself using data that it does provide.

The "Fundamental Message" and "Update/Summary Messages" pages of the online IQFeed help will list of all data points that are available via the IQFeed API.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

gnosis
-Interested User-
Posts: 3
Joined: Feb 19, 2021


Posted: Feb 25, 2021 09:35 AM          Msg. 8 of 8
Thank you all.

It would be great to provide greeks along with other options data.

I have put in a wishlist request for a future release.

-Irfan
 

 

Time: Tue April 16, 2024 2:41 AM CFBB v1.2.0 12 ms.
© AderSoftware 2002-2003