There are several issues here: 1. GT/Graphics/Objects/Trades.pm does not "officially" exist. You can search the archives for a version that works, or I can send it to you. For some reason that is not obvious to me, it was never added to the SVN repository. 2. To debug the beancounter interface we would have to work together, as I don't have beancounter (or any SQL interface). As RAS said, a change with respect to the find_calculator routine might have required a corresponding change in the SQL interface. It should not be hard to find. I'll stare at it a little, hard to say how far I can get without running the code... Cheers, Th. ________________________________ From: Nicholas Kuechler [mailto:nkuechler AT gmail.com] Sent: Tue 4/29/2008 1:12 PM To: devel AT geniustrader.org Subject: Re: [GT] Re: gt-d] Trouble with backtest.pl and beancounter Hi, I have a few 'working' versions of GT, but for this backtest I've been using the most recent checkout from a few days ago. I decided to check out the backtest of my version from 2008-03-22, and it works! Well it works as long as I cut out the graph part, which throws: Can't locate object method "new" via package "GT::Graphics::Object::Trades" (perhaps you forgot to load "GT::Graphics::Object::Trades"?) at ./backtest.pl line 281. Which I believe is due to my options file. Removing the graph option gives the same results as yours: ## Analysis of SY:ADX 30|TF:FollowTrend 50|CS:Stop:Fixed 6|MM:Basic History of the portfolio : -------------------------- Long position (0) on GOOGLE (GOOG) 2007-04-19 Buy 21 at 474.5000 2008-03-04 Sell 21 at 446.0300 ## Global analysis (full portfolio always invested) Your backtest options still do not work in the newest(?) GT -- my checkout on 2008-04-26. For now I'll continue to work with my GT checkout from March. I am satisfied. :) For what it's worth, the backtest_many.pl in my 2008-04-26 checkout *does* work, but backtest.pl and backtest_multi.pl do not: $ ./backtest_many.pl ../market_file.txt ../system_file.txt --output-directory=/opt/GeniusTrader/backtest/ ## ## ANALYSIS OF GOOG with system ## CLOSE ## ## Global analysis (full portfolio invested) Analysis of the portfolio (2006-05-02 / 2008-04-28) : ----------------------------------------------------- Performance : 9.4% ( 4.6%) Buy & Hold : 39.8% ( 18.2%) () => by year MaxDrawDown : 0.0% B&H MaxDrawDown : 44.2% Best performance : 9.4% Worst performance : 0.0% Net gain : 935.36 Gross gain : 1022.40 Thanks for your your help, Russ and Robert! Regards, Nick -- Nicholas Kuechler On Tue, Apr 29, 2008 at 12:48 PM, Robert A. Schmied <ras AT acm.org> wrote: ./display_signal.pl --start=2008-04-01 --end=2008-04-07 S:I:RSIDown IBM ./display_signal.pl --start=2008-04-01 --end=2008-04-07 S:I:RSIDown IBMNicholas Kuechler wrote: Hi, Thanks, Russ. I should have included that information in my original post. My beancounter is setup for use with GT and it's currently working with other scripts, such as display_signals.pl and graphic.pl. Also, my GT subversion checkout is recent: 2008-04-26 is when I updated GT. It appears I'm only having issues with backtest.pl and backtest_multi.pl. Here's my beancounter testing: $ beancounter quote ibm Name INTL BUSINESS MAC Symbol IBM Exchange NYSE Date 20080429 Time 12:52pm Previous Close 121.69 Open 122.04 Day low 122.04 Day high 123.20 Close 122.55 Change 0.86 Percent Change +0.71% Bid N/A Ask N/A 52-week low 97.04 52-week high 125.00 Volume 2650467 Average Volume 8675910 Dividend date Mar 10 Dividend / share 1.60 Dividend yield 1.31 Earnings_per_share 7.666 P/E ratio 15.87 Market Capital 169500 And a test of GT using my beancounter DB data: $ ./display_signal.pl --start=2008-04-01 --end=2008-04-07 S:I:RSIDown IBM Testing signal RSIDown[70, 14] ... RSIDown[70, 14] [2008-04-01] = no RSIDown[70, 14] [2008-04-02] = no RSIDown[70, 14] [2008-04-03] = no RSIDown[70, 14] [2008-04-04] = no RSIDown[70, 14] [2008-04-07] = no Thanks, Nick <<snip>> aloha nick my config differs as follows: i) using older version of backtest (without the recent flurry of weigert upgrades as they are coming too fast and furious for me to properly evaluate/integrate) ii) using postgresql beancounter your original command line failed ras [ 14472 ] % ./backtest.pl "Systems:ADX 30 | TradeFilters:FollowTrend | MoneyManagement:Basic" GOOG ./backtest.pl: error: Alias `Systems:ADX 30 | TradeFilters:FollowTrend | MoneyManagement:Basic' wasn't found in options file! key looked for was "Aliases::Global::Systems:ADX 30 | TradeFilters:FollowTrend | MoneyManagement:Basic" so i changed to a bit to look more like one of the perldoc -t ./backtest.pl examples: ./backtest.pl --graph="graphs/btest.png" --display-trades --start "2007-04-16" --end 2008-04-28 --close-strategy="Stop::Fixed 6" --trade-filter="FollowTrend 50" --money-management="Basic" --system="ADX 30" GOOG ## Analysis of SY:ADX 30 | TF:FollowTrend 50 | CS:Stop:Fixed 6 | MM:Basic History of the portfolio : -------------------------- Long position (0) on GOOGLE (GOOG) 2007-04-19 Buy 21 at 474.4800 2008-03-04 Sell 21 at 446.0112 ## Global analysis (full portfolio always invested) Analysis of the portfolio (2007-04-16 / 2008-04-28) : ----------------------------------------------------- Performance : -6.6% ( -6.3%) Buy & Hold : 16.4% ( 15.6%) () => by year MaxDrawDown : 6.6% B&H MaxDrawDown : 44.2% Best performance : 0.0% Worst performance : -6.6% Net gain : -660.84 Gross gain : -597.84 Trades statistics : Number of trades : 1 Trades/Year : 0.97 Number of gains : 0 Number of losses : 1 Win. ratio : 0.0% Max consec. win : 0 Max consec. loss : 1 Expectancy : -0.07 Average gain : 0.00% Average loss : -6.63% Avg. perf : -6.61% Biggest gain : 0.00% Biggest loss : -6.63% Profit fac : 0.00 Sum of gains : 0.00 Sum of losses : -660.84 Risk of ruin : 100.0 your ibm signal matches mine (also older version of display_signal.pl) ras [ 14481 ] % ./display_signal.pl --start=2008-04-01 --end=2008-04-07 S:I:RSIDown IBM S:I:RSIDown Testing signal RSIDown[70,14] ... RSIDown[70,14] [2008-04-01] = no RSIDown[70,14] [2008-04-02] = no RSIDown[70,14] [2008-04-03] = no RSIDown[70,14] [2008-04-04] = no RSIDown[70,14] [2008-04-07] = no also note that my config does not include most of the recent script or the gt package file changes. you seem to be loosing your database connection as you indicate in your initial post: -------------------------- DBD::mysql::st execute failed: MySQL server has gone away at ../GT/DB/ bean.pm <http://bean.pm/> line 161. MySQL server has gone away at ../GT/DB/bean.pm <http://bean.pm/> line 161. i'd start looking at an extra (extraneous or out of order) $db->disconnect statement. i noticed that many of the script changes (re)moved these into gt package files. is GT/DB/bean.pm <http://bean.pm/> a recently changed package file? ras
<<winmail.dat>>