Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, Baklazhan, Ayumi, Hanky27), 1,387 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
(Options) find contract by delta #470834
02/08/18 09:02
02/08/18 09:02
Joined: Feb 2018
Posts: 15
J
jzastrow Offline OP
Newbie
jzastrow  Offline OP
Newbie
J

Joined: Feb 2018
Posts: 15
Is there some hidden function which allows selecting an option close to a specified delta?
Implemented as a binary search would be a lot faster than simply looping over all options.

Re: (Options) find contract by delta [Re: jzastrow] #470836
02/08/18 09:45
02/08/18 09:45
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
No, a binary search won't do because Delta is not a stored value. It must be calculated. Go through all the options and call

var Delta;
contractVal(Contract,Price,HistVol,0,Yield,&Delta);

Then select the contract closest to the specified delta.

Re: (Options) find contract by delta [Re: jcl] #470838
02/08/18 12:41
02/08/18 12:41
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
I once had a suggestion to add several greeks to the Contract struct. It would be quite convenient to store everything in one place-both for historical testing and in RT. Also, IB streams greeks via API. Getting them ready would allow searching much faster than doing numerous calculations in R.
But IB plug-in should allow for that.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1