Import data from .csv question

Posted By: flare9x

Import data from .csv question - 09/19/17 03:13

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
Posted By: flare9x

Re: Import data from .csv question - 09/19/17 03:53

ZHistoryEditor shows 0 data... so I must be parsing it incorrectly.
Posted By: jcl

Re: Import data from .csv question - 09/19/17 09:42

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.
© 2024 lite-C Forums