Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 831 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Import data from .csv question #468115
09/19/17 03:13
09/19/17 03:13
Joined: Sep 2017
Posts: 7
TX
F
flare9x Offline OP
Newbie
flare9x  Offline OP
Newbie
F

Joined: Sep 2017
Posts: 7
TX
I am receiving this error when I try and run a back test over my imported data.

error 010: Invalid SPY Stop:0.00000 Price:0.0000

I have added my asset to the AssetsFix .csv file in history folder.

My date format in the .csv I wish to import is in yyyymmdd. The frequency is daily bars.


I am using the below settings on the zorro included CSVtoHistroy script:

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

#define SPLIT	// split into separate years

string InName = "C:Stock Market AnalysisMarket DataMASTER_DATA_DUMPSPY.csv";  // name of a single year CSV file
string OutName = "SPY";
//string InName = "D:HistoryVIX_2013_2016.stk";
//string OutName = "VIX"; // 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";

<rest is default >>



The backtest script is good as I can run it over other existing assets in the zorro program.

What on earth am i missing here? Any ideas?

Thanks
Andrew

Last edited by flare9x; 09/19/17 03:15.
Re: Import data from .csv question [Re: flare9x] #468117
09/19/17 03:53
09/19/17 03:53
Joined: Sep 2017
Posts: 7
TX
F
flare9x Offline OP
Newbie
flare9x  Offline OP
Newbie
F

Joined: Sep 2017
Posts: 7
TX
ZHistoryEditor shows 0 data... so I must be parsing it incorrectly.

Re: Import data from .csv question [Re: flare9x] #468122
09/19/17 09:42
09/19/17 09:42
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Use the latest Zorro beta version and set Verbose to 7. The first two lines of the CSV file are then printed to the log, and their parsed versions below them. This way you can check the format and correct parsing.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1