Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Edgar_Herrera, VoroneTZ, Akow), 968 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 3 1 2 3
Re: Loading the options chain with additional data [Re: jcl] #468409
10/03/17 13:11
10/03/17 13:11
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
My understanding is as follows:

- each row in a 'greeks' dataset must contain contract identifier fields for expiry,strike,type
- having found the correct contract in a list of *.t8 records,
Zorro has to look up through these fields in a 'greeks' dataset to get the correct ContractRow.

Both *.t8 records and the "greeks" dataset would most probably derive from the same file with historical options data, and have similar sequences of fields - but that's not given.

So, where am I wrong and how does it actually happen?

Re: Loading the options chain with additional data [Re: Zheka] #468416
10/03/17 14:59
10/03/17 14:59
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
I do not really understand what you want to do with contract identifiers in your greeks dataset. The contract identifiers must be stored in a .t8 file of CONTRACT structs, not in your greeks file. You store both datasets in same order and look up the greeks of a selected contract with the ContractRow variable that gives you the dataset row. What exactly is the problem?


Re: Loading the options chain with additional data [Re: jcl] #468426
10/03/17 21:15
10/03/17 21:15
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
I've re-read the manual one more time, but still cannot grasp how ContractRow can magically find the correct row in a separate, user-defined/freehand dataset,unless both *.t8 and *greeks* datasets have certain fields in common (besides timestamp). How?

An example of how a 'greeks' dataset can typically be structured would really help.

Re: Loading the options chain with additional data [Re: Zheka] #468429
10/04/17 07:07
10/04/17 07:07
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
dataSet(2,CurrentRow,0,Delta);
dataSet(2,CurrentRow,1,Theta);

...


Delta = dataVar(2,ContractRow,0);
Theta = dataVar(2,ContractRow,1);

Re: Loading the options chain with additional data [Re: jcl] #468460
10/05/17 15:13
10/05/17 15:13
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
A! First getting a ContractRow and then using it to save data to the dataset!

Thanks!

I believe this should be documented, with an example of how to use it when parsing a big options data file into price/*.t8 and greeks/etc files.

Re: Loading the options chain with additional data [Re: Zheka] #468774
10/18/17 09:20
10/18/17 09:20
Joined: Sep 2017
Posts: 6
A
asdvao Offline OP
Newbie
asdvao  Offline OP
Newbie
A

Joined: Sep 2017
Posts: 6
Thanks for all the clarifications JCL, I was able to nicely connect my additional data with the T8 data, and retrieve as desired.

I'm able to access the appropriate entries with the dataVar and similar functions, but it seems that it would be useful (mainly to enhance code manageability), to retrieve the whole record within the dataset as a struct.

Say I have a struct CONTRACT_EXT, containing the definition of my record. Is it possible to retrieve the address of the dataset? If it were possible, I could do something like

CONTRACT_EXT * c = baseDatasetAddress + ContractRow;

And then access the data more intuitively, such as c->impl_vol, as opposed to using something like dataVar(2, ContractRow, 7);

Furthermore, is it somehow possible to loop thru all the contracts in a chain for the current bar date?

Re: Loading the options chain with additional data [Re: asdvao] #468775
10/18/17 10:31
10/18/17 10:31
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Yes, dataStr delivers the pointer to the record.

CONTRACT_EXT * c = dataStr(Handle,ContractRow,0);

Page 3 of 3 1 2 3

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1