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
5 registered members (TipmyPip, AndrewAMD, Quad, aliswee, degenerate_762), 970 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 1 of 2 1 2
Financial Hacker - Algorithmic Options Trading 1 #472859
05/26/18 22:26
05/26/18 22:26
Joined: May 2018
Posts: 134
S
SBGuy Offline OP
Member
SBGuy  Offline OP
Member
S

Joined: May 2018
Posts: 134
New to Zorro. Looks very exciting and jcl's informative blog Financial Hacker is where I found Zorro.

I'm having problem running the Options Trading scripts on the blog. Specially, I can't install RQuantLib.

Installed Zorro 1.74 and R successfully. No good instructions to install RQuantLib.

Any pointers would be helpful.

Thanks.

Re: Financial Hacker - Algorithmic Options Trading 1 [Re: SBGuy] #472860
05/27/18 00:42
05/27/18 00:42
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago

Re: Financial Hacker - Algorithmic Options Trading 1 [Re: AndrewAMD] #472865
05/27/18 03:29
05/27/18 03:29
Joined: May 2018
Posts: 134
S
SBGuy Offline OP
Member
SBGuy  Offline OP
Member
S

Joined: May 2018
Posts: 134
Thanks. But I've been there.

Copy and pasted these commands in R:

*********************************************
if (!require("drat")) install.packages("drat")
drat::addRepo("ghrr")
install.packages("RQuantLib", type="binary")
*********************************************

A popup of showing various mirror sites. Tried Germany, USA, a few others and all got this message:

*********************************************
Warning: unable to access index for repository https://ghrr.github.io/drat/bin/windows/contrib/3.5:
cannot open URL 'https://ghrr.github.io/drat/bin/windows/contrib/3.5/PACKAGES'
Warning message:
package ‘RQuantLib’ is not available (as a binary package for R version 3.5.0)
>
*********************************************

Re: Financial Hacker - Algorithmic Options Trading 1 [Re: SBGuy] #472868
05/27/18 04:24
05/27/18 04:24
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
Works for me. I ran those commands before I directed you there.

Reinstall R.

Re: Financial Hacker - Algorithmic Options Trading 1 [Re: AndrewAMD] #472870
05/27/18 04:50
05/27/18 04:50
Joined: May 2018
Posts: 134
S
SBGuy Offline OP
Member
SBGuy  Offline OP
Member
S

Joined: May 2018
Posts: 134
reinstalled and got the same message.

It looks the URLs that the script looks for doesn't exist anymore:

https://ghrr.github.io/drat/bin/windows/contrib/3.5
https://ghrr.github.io/drat/bin/windows/contrib/3.5/PACKAGES

Re: Financial Hacker - Algorithmic Options Trading 1 [Re: SBGuy] #472876
05/27/18 14:42
05/27/18 14:42
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
Ah. You might need an older version of R until another RQuantlib build comes out.

https://github.com/ghrr/drat/tree/gh-pages/bin/windows/contrib/3.4

Last edited by AndrewAMD; 05/29/18 18:06. Reason: clarity
Re: Financial Hacker - Algorithmic Options Trading 1 [Re: AndrewAMD] #472918
05/29/18 17:50
05/29/18 17:50
Joined: May 2018
Posts: 134
S
SBGuy Offline OP
Member
SBGuy  Offline OP
Member
S

Joined: May 2018
Posts: 134
Turns out Zorro is hardcoded somewhere to use only R-3.4.3.

I ran the RTest script and found an error message that said it was looking for RTerm.exe in directory called ProgramFiles/R/R-3.4.3/.

Installed R3.4.3, ran the RQuantLib install script from the blog, downloaded Scripts 2017 from the blog, copied History files to the History folder, copied .c scripts to the Strategy folder, and viola things are working!

OptionsSimulate.C is now running, hopefully creating the 2011-2-17 options chain in SPY_SimOptions.t8.

Re: Financial Hacker - Algorithmic Options Trading 1 [Re: SBGuy] #472919
05/29/18 18:00
05/29/18 18:00
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
Zorro is **not** hardcoded to use a certain version of R. You must set the path to Rterm in the Zorro.ini file.

The RQuantlib team has not updated its binaries. Thus the 3.4 constraint.

Re: Financial Hacker - Algorithmic Options Trading 1 [Re: AndrewAMD] #472921
05/29/18 18:19
05/29/18 18:19
Joined: May 2018
Posts: 134
S
SBGuy Offline OP
Member
SBGuy  Offline OP
Member
S

Joined: May 2018
Posts: 134
Ah I see it now.

Re: Financial Hacker - Algorithmic Options Trading 1 [Re: SBGuy] #472990
06/05/18 23:32
06/05/18 23:32
Joined: May 2018
Posts: 134
S
SBGuy Offline OP
Member
SBGuy  Offline OP
Member
S

Joined: May 2018
Posts: 134
oops, looks like i'm missing the Quandl Key as well.

The script ran anyways, but the .t8 file appears to be incorrect. my results were different when using the SPYa.t8 downloaded from archive.

Re: Financial Hacker - Algorithmic Options Trading 1 [Re: SBGuy] #473116
06/14/18 11:10
06/14/18 11:10
Joined: Jun 2018
Posts: 3
M
madeinquant Offline
Guest
madeinquant  Offline
Guest
M

Joined: Jun 2018
Posts: 3
There is a customized script "CSVtoHistory.c" for your reference. this is a customized script to import yahoo's CSV and to convert into .t6 file. However, I don't know how to retrieve the .t6 file for conversion. I would convert .t6 file into artificial option chains. There is a script "OptionSimulate.c" but this script import historical data from quandl. Is it possible to import SP500 historical data locally. Please feel free to comment.

////////////////////////////////////////////////
// Convert price history from .csv to .t6
// The Format string determines the CSV format (see examples)
////////////////////////////////////////////////

// #define SPLIT_YEARS // split into separate years
//#define FIX_ZONE -1 // add a time zone difference, f.i. for converting CST -> EST

//string InName = "DAT_ASCII_USDZAR_M1_2015.csv"; // name of a single year CSV file
//string OutName = "USDZAR_2015.t6";
//string InName = "D:HistoryVIX_2013_2016.stk";
//string OutName = "VIX"; // for separate years, f.i. VIX_2016.t6, VIX_2015.t6 etc.
string InName = "GSPC.CSV";
string OutName = "GSPC.t6"; // for separate years, f.i. VIX_2016.t6, VIX_2015.t6 etc.

// HISTDATA line format: "20100103 170000;1.430100;1.430400;1.430100;1.430400;0"
//string Format = "+%Y%m%d %H%M%S;f3;f1;f2;f4;f6;f";

// YAHOO line format "2015-05-29,43.45,43.59,42.81,42.94,10901500,42.94"
string Format = "%Y-%m-%d,f3,f1,f2,f4,f6,f5"; // unadjusted

// TRADESTATION line format "06/30/2016,17:00:00,2086.50,2086.50,2086.50,2086.50,319,0"
//string Format = "+%m/%d/%Y,%H:%M:%S,f3,f1,f2,f4,f6,f5";

// STK line format "12/23/2016,2300.00,SPY, 225.63, 225.68, 225.72, 225.62,1148991"
//string Format = "+-%m/%d/%Y,%H%M,,f3,f4,f1,f2,f6,f";

function main()
{
int Records = dataParse(1,Format,InName);
printf("n%d lines read",Records);
#ifdef FIX_ZONE
int i;
for(i=0; i<Records; i++)
dataSet(1,i,0,dataVar(1,i,0)+FIX_ZONE/24.);
#endif
#ifndef SPLIT_YEARS
if(Records) dataSave(1,OutName);
#else
int i, Start = 0, Year, LastYear = 0;
for(i=0; i<Records; i++) {
Year = atoi(strdate("%Y",dataVar(1,i,0)));
if(!LastYear) LastYear = Year;
if(i == Records-1) { // end of file
LastYear = Year; Year = 0;
}
if(Year != LastYear) {
string NewName = strf("%s_%4i.t6",strxc(OutName,'.',0),LastYear);
printf("n%s",NewName);
dataSave(1,NewName,Start,i-Start);
Start = i;
LastYear = Year;
}
}
#endif
}

Re: Financial Hacker - Algorithmic Options Trading 1 [Re: SBGuy] #474217
09/30/18 14:54
09/30/18 14:54
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
Just an update... RQuantLib is back on CRAN, so you can now install this on newer versions of R.

This line works on 3.5.1.
Code:
install.packages("RQuantLib")


Re: Financial Hacker - Algorithmic Options Trading 1 [Re: AndrewAMD] #474225
10/01/18 11:19
10/01/18 11:19
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Thanks, good to know!

Page 1 of 2 1 2

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