Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (1 invisible), 692 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
SPY_Options.t8 #468334
09/30/17 17:19
09/30/17 17:19
Joined: Sep 2017
Posts: 1
A
AFJG Offline OP
Guest
AFJG  Offline OP
Guest
A

Joined: Sep 2017
Posts: 1
I have successfully downloaded R and RQuantlib. I created a T6 file in "Yahoo" Format which comes out as Time, O,H,L,C,Spread,Vol.

I have run OptionSimulate.c without any apparent problems but the file seems to be a nonsense. I have looked at the struct in the manual and contract.c and opened the binary file with python / numpy since I am none too familiar with C.

ZHistoryEditor does not permit viewing of t8 files.

When I run the script contained here "http://www.financial-hacker.com/algorithmic-options-trading/" merely get a chart of the time series:
Code:
#include <contract.c>
void run() 
{
	BarPeriod = 1440;
	StartDate = 2004;
	EndDate = 2005;
	assetList("assetsFIX");
	//assetHistory("SP",FROM_YAHOO|UNADJUSTED);
	asset("VIX_2004");
	if(is(INITRUN)) dataLoad(1,"VXX_Options.t8",9);

	Multiplier = 100;
	contractUpdate("VIX_2004",1,CALL|PUT);	
	int Type = ifelse(random() > 0,CALL,PUT);
	contract(Type,30,priceClose());
	static int LastExpiry = 0;
	if(ContractType && LastExpiry != ContractExpiry) {
		enterShort();
	   	LastExpiry = ContractExpiry;
	}
}



Any ideas? Unfortunately I can't upload either the t8 or t6 file here

Re: SPY_Options.t8 [Re: AFJG] #468518
10/09/17 07:28
10/09/17 07:28
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
You can use the dataSaveCSV function for looking in the dataset. It's available in version 1.66 that you can download from this forum. Alternatively, print the selected contract or the whole chain with contractPrint().

The most common problem for generating artificial contracts is some R or RQuantlib installation problem. You see R error messages only on the R console, so the first thing to check is if RQuantlib is working. Call a function from it, like this:

AmericanOption('put', strike=100, volatility=0.4, 100, 0.02, 0.03, 0.5, engine='CrankNicolson')


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1