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)




"I just wanted to let you know how fast and easy I found it to integrate IQFeed into our existing Java code using your JNI client. In my experience, such things almost never go so smoothly - great job!" - Comment from Nate
"Its working FABULOUSLY for me!! Holy cow...there has been so much I've been missing lately, and with this feed and Linnsoft software...I'm in the game now." - Comment from Chris R.
"You have an excellent feed. Very few spikes for Spot Forex." - Comment from Public Forum Post
"DTN has never given me problems. It is incredibly stable. In fact I've occasionally lost the data feed from Interactive Brokers, but still been able to trade because I'm getting good data from DTN." - Comment from Leighton
"Thanks for the great product and support. During this week of high volume trading, my QuoteTracker + IQ Feed setup never missed a beat. Also, thanks for your swiftness in responding to data issues. I was on ******* for a few years before I made the switch over early this year, and wish I had done it a long time ago." - Comment from Ken
"I've been using IQFeed 4 in a multi-threaded situation for the last week or two on 2600 symbols or so with 100 simultaneous daily charts, and I have had 100% responsiveness." - Comment from Scott
"Just a thank you for the very helpful and prompt assistance and services. You provided me with noticeably superior service in my setup compared to a couple of other options I had looked at." - Comment from John
"I am enjoying the feed very much - so superior to the broker provided feed I was previously using." - Comment from George
"This is an excellent value, the system is generous (allowing for 500 stocks) and stable (and really is tick-by-tick), and the support is fantastic." - Comment from Shirin via Email
"IQ feed works very well, does not have all of the normal interruptions I have grown used to on *******" - Comment from Mark
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: 379
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: Thu December 7, 2023 5:06 AM CFBB v1.2.0 23 ms.
© AderSoftware 2002-2003