Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (EternallyCurious, Quad, vicknick), 700 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 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,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
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