|
G'day GTers! I've installed GT and configured the environment as per the "First use" page - everything seems to work great when I do the standard backtest using the 13000.txt data file. I have browsed through almost all of the documentation and find the project inspiring. I'm new to technical analysis / trading / but have a little Perl experience (just enough to get me in trouble). Now I've set up: 1. a mysql database with historical EOD data for some symbols. 2. tested that Perl can read and write from the database (in fact I used Perl to populate the quotes table). 3. Changed my options file to enable usage of said database (please see options contents below) 4. When I attempt to run the following backtest I get an error. I found one such message in the archives where this is mentioned but the fix seems unrelated to my problem: $ ./backtest.pl TFS[30,7,7] W2_0_I0B Use of uninitialized value in concatenation (.) or string at ../GT/Eval.pm line 87. Can't locate GT/DB/.pm in @INC (@INC contains: .. /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at (eval 28) line 1. BEGIN failed--compilation aborted at (eval 28) line 1. (W2_0_I0B is a symbol in my quotes table.) My options file: ======================================= DB::genericdbi::dbname eodb DB::genericdbi::dbhost localhost DB::genericdbi::dbport 3306 DB::genericdbi::dbuser myusername DB::genericdbi::dbpasswd mypassword DB::genericdbi::db mysql DB::genericdbi::prices_sql SELECT period_open, period_high, period_low, period_close, volume, Concat(date, ' ', time) FROM quotes WHERE symbol = '$code' ORDER BY Concat(date, ' ', time) DESC LIMIT $limit DB::genericdbi::name_sql SELECT symname from symbols WHERE symcode = '$code' Brokers::module SelfTrade Path::Font::Arial /usr/share/fonts/truetype/msttcorefonts/arial.ttf Path::Font::Courier /usr/share/fonts/truetype/msttcorefonts/couri.ttf Path::Font::Times /usr/share/fonts/truetype/msttcorefonts/times.ttf #Analysis::ReferenceTimeFrame year Analysis::ReferenceTimeFrame day #Graphic::BackgroundColor black #Graphic::ForegroundColor white Aliases::Global::TFS SY:TFS 50 10|CS:SY:TFS Aliases::Global::TFS[] SY:TFS #1 #2|CS:SY:TFS #1|CS:Stop:Fixed #3 ============================================================= I'm a little stuck with this but from looking at the archives it doesn't seem like I'm having a common problem (although I imagive someone's had the problem before). My mysql schema looks as follows: mysql> desc quotes; +--------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------+--------------+------+-----+---------+-------+ | uniqkey | varchar(64) | NO | PRI | NULL | | | period_open | double | NO | | NULL | | | period_high | double | NO | | NULL | | | period_low | double | NO | | NULL | | | period_close | double | NO | | NULL | | | volume | double | NO | | NULL | | | date | date | NO | | NULL | | | time | time | YES | | NULL | | | symbol | varchar(128) | NO | | NULL | | +--------------+--------------+------+-----+---------+-------+ 9 rows in set (0.01 sec) mysql> desc symbols; +---------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------+--------------+------+-----+---------+-------+ | symcode | varchar(128) | NO | PRI | NULL | | | symname | varchar(128) | NO | | NULL | | +---------+--------------+------+-----+---------+-------+ Any help would be appreciated if someone knows of a fix (or further tests that might help track down the problem). Tielman |