support.tsresearchgroup.com Forum Index

TSResearch | Software Products | Online Help | Free Download | Publications | Research

Username:   Password:   
Log me on automatically each visit
 

FAQ |  Search |  Memberlist |  Usergroups |  Profile |  Log in to check your private messages  Register |  Log in 

Cannot reproduce TSGO results!

 
Post new topic   Reply to topic    support.tsresearchgroup.com Forum Index -> TS Genetic Optimizer for TradeStation
View previous topic :: View next topic  
Author Message
joshv
Guest


Joined: 29 Aug 2007
Posts: 4

PostPosted: Mon Nov 19, 2007 6:13 pm    Post subject: Cannot reproduce TSGO results! Reply with quote

Dear Sirs,

I have emailed you about this, but have not received a response to my last message for two weeks now!

We are trying to reproduce the results from a TSGO optimization run on the base strategy, and we are unable to do so.

I am defining the base strategy as: the strategy as it was before running it through the TSGO Code Converter. If we apply the base strategy to a chart and input the optimized values displayed in the TSGO Report Viewer, we get a different result than what is displayed in the TSGO Report Viewer. Sometimes it is only a slightly different result, other times it is radically different, with 20 trades instead of 10, and $5,000 net profit instead of $10,000! The only thing that is consistent is that the results are never identical! I’ve never been able to reproduce what is shown in the TSGO Report Viewer on a chart with the base strategy applied.

There are no differences in these strategy files. One has simply been run through the code converter. And this same problem happens on any strategy that I run through TSGO. I am unable to duplicate the results of the tests shown in the TSGO Report Viewer by inputting the values that TSGO Report Viewer is telling me that it used to produce this result!

What could be happening here? Why can I not reproduce the result displayed in the Report Viewer? How can I fix this problem?

I have had to bring my TSGO optimization to a complete stop because of this. There is no benefit to me running any more TSGO optimization runs if I cannot reproduce the result.

Thanks.


Josh Virkler
Back to top
View user's profile Send private message
VladGor
Support Team


Joined: 26 Jan 2004
Posts: 528

PostPosted: Wed Nov 21, 2007 7:10 pm    Post subject: Reply with quote

This is results of testing in TS2000
Initial system:

EasyLanguage:
Inputs:  
SFastMovAvg(12),SSlowMovAvg(26),SMACDMovAvg(9),BFastMovAvg(12),BSlowMovAvg(26),BMACDMovAvg(9); 
    
IncludeSignal: "MACD Bearish",SFastMovAvg,SSlowMovAvg,SMACDMovAvg; 
IncludeSignal: "MACD Bullish",BFastMovAvg,BSlowMovAvg,BMACDMovAvg; 
 
If LastBarOnChart Then Begin 
    Print
        " SFastMovAvg = ",SFastMovAvg, 
        " SSlowMovAvg = ",SSlowMovAvg, 
        " SMACDMovAvg = ",SMACDMovAvg, 
        " BFastMovAvg = ",BFastMovAvg, 
        " BSlowMovAvg = ",BSlowMovAvg, 
        " BMACDMovAvg = ",BMACDMovAvg 
        ); 
end;


Result after convert:

EasyLanguage:
{******************************************************************* 
EasyLanguage Code Converter for Genetic Optimizer 
Template: Basic without comments. 
Analysis Type: Strategy 
Description: Code is generated automatically 
Date/Time:20.11.2007 22:02:50 
Used: TSGO12.dll 
Provided By: Trade Smart Research www.tsresearchgroup.com 
*******************************************************************}
 
 
{***Start All Code***} 
 
Inputs: Gen(1), {Optimize in TradeStation with "Start = 1" and "Inc = 1"} 
 ShowInd(1), 
 ModeTSGO(0), 
 Population(100), 
 FreshBlood(0), 
 MyReportName("Test"); 
 
 
Input: Fitness(NetProfit); 
 
Vars: SFastMovAvg(12), 
 SSlowMovAvg(26), 
 SMACDMovAvg(9), 
 BFastMovAvg(12), 
 BSlowMovAvg(26), 
 BMACDMovAvg(9); 
Vars: R(0),K(0),LastRun(0),Ind(0);  
  
If CurrentBar = 1 Then Begin 
    R = TS.GO.Start(MyReportName + ".rgo"); 
 
  If Gen=1 Then Begin 
       R=TS.GO.Mode(ModeTSGO); 
       R=TS.GO.Popul(Population); 
       R=TS.GO.FreshBlood(FreshBlood); 
 
 
K=TS.GO.Chrom("Sell"); 
  R=TS.GO.Gen("Sell.SFastMovAvg",K,1,50,1); 
  R=TS.GO.Gen("Sell.SSlowMovAvg",K,1,50,1); 
  R=TS.GO.Gen("Sell.SMACDMovAvg",K,1,50,1); 
 
K=TS.GO.Chrom("Buy"); 
  R=TS.GO.Gen("Buy.BFastMovAvg",K,1,50,1); 
  R=TS.GO.Gen("Buy.BSlowMovAvg",K,1,50,1); 
  R=TS.GO.Gen("Buy.BMACDMovAvg",K,1,50,1); 
  
 
R = TS.GO.Var("NetProfit"); 
R = TS.GO.Var("MaxIDD"); 
R = TS.GO.Var("ProfitFactor"); 
R = TS.GO.Var("PercentProfit"); 
R = TS.GO.Var("TotalTrades"); 
R = TS.GO.Var("GrossProfit"); 
R = TS.GO.Var("GrossLoss"); 
R = TS.GO.Var("LargestLosTrade"); 
R = TS.GO.Var("LargestWinTrade"); 
 
  End
 
 
  LastRun = TS.GO.Next(Gen); 
  Ind = Iff(LastRun = 1,ShowInd,0); 
 
SFastMovAvg = TS.GO.Get("Sell.SFastMovAvg",Ind); 
SSlowMovAvg = TS.GO.Get("Sell.SSlowMovAvg",Ind); 
SMACDMovAvg = TS.GO.Get("Sell.SMACDMovAvg",Ind); 
BFastMovAvg = TS.GO.Get("Buy.BFastMovAvg",Ind); 
BSlowMovAvg = TS.GO.Get("Buy.BSlowMovAvg",Ind); 
BMACDMovAvg = TS.GO.Get("Buy.BMACDMovAvg",Ind); 
 
  
 
R = TS.GO.ShowViewer;     
End
 
{***Initial Strategy code begin.***} 
 
IncludeSignal: "MACD Bearish",SFastMovAvg,SSlowMovAvg,SMACDMovAvg; 
IncludeSignal: "MACD Bullish",BFastMovAvg,BSlowMovAvg,BMACDMovAvg; 
 
If LastBarOnChart Then Begin 
    Print
        " SFastMovAvg = ",SFastMovAvg, 
        " SSlowMovAvg = ",SSlowMovAvg, 
        " SMACDMovAvg = ",SMACDMovAvg, 
        " BFastMovAvg = ",BFastMovAvg, 
        " BSlowMovAvg = ",BSlowMovAvg, 
        " BMACDMovAvg = ",BMACDMovAvg 
        ); 
end
  
 
{***Initial Strategy code end.***} 
 
if LastBarOnChart Then Begin 
 
R = TS.GO.Set("NetProfit",NetProfit); 
R = TS.GO.Set("MaxIDD",MaxIDDrawDown); 
R = TS.GO.Set("ProfitFactor",Iff(GrossLoss < 0,-GrossProfit/GrossLoss,0)); 
R = TS.GO.Set("PercentProfit",PercentProfit); 
R = TS.GO.Set("TotalTrades",TotalTrades); 
R = TS.GO.Set("GrossProfit",GrossProfit); 
R = TS.GO.Set("GrossLoss",GrossLoss); 
R = TS.GO.Set("LargestLosTrade",LargestLosTrade); 
R = TS.GO.Set("LargestWinTrade",LargestWinTrade); 
 
  R=TS.GO.Fitness(Fitness); 
 
 {Print(Gen,Fitness,NetProfit);} 
 
End
 
{***End All Code***}


Run optimization with parameters:


Result in viewer:


Run first(initial) system with parameters from viewer first line:


Getting follow results:


On Upper chart is optimization result on TSGO.
On lower chart initial system with TSGO found parameters.

Try this systems
You must have the same result.

For TS8:
EasyLanguage:
IncludeSignal: "MACD Bearish",SFastMovAvg,SSlowMovAvg,SMACDMovAvg; 
IncludeSignal: "MACD Bullish",BFastMovAvg,BSlowMovAvg,BMACDMovAvg;


Replace to:
EasyLanguage:
IncludeSignal: "MACD SE",SFastMovAvg,SSlowMovAvg,SMACDMovAvg; 
IncludeSignal: "MACD LE",BFastMovAvg,BSlowMovAvg,BMACDMovAvg;
Back to top
View user's profile Send private message
joshv
Guest


Joined: 29 Aug 2007
Posts: 4

PostPosted: Wed Nov 21, 2007 7:36 pm    Post subject: Reply with quote

Yes Vlad, you are right. I do get the same result when running this MACD system that you've posted. The only discrepancy is that the NetProfit shown in the TSGO Report Viewer is about $10 different from the NetProfit shown in TradeStation. But that's not a big deal.

So if this is working, then what could cause the problem that I'm experiencing with my strategies?

I did send you one of my strategy files, so you could try this yourself by running it through the code converter and seeing if you can come up with a repeatable result.

Thanks for the continued help on this.


Josh
Back to top
View user's profile Send private message
VladGor
Support Team


Joined: 26 Jan 2004
Posts: 528

PostPosted: Mon Nov 26, 2007 5:16 pm    Post subject: Reply with quote

Do you mean _JV FastRetractionFX signal?
We tested it, result is same to MACD.
Try to do all as with MACD example.

Screenshot:



In the upper-side TSGO result,
In the down-side strategy with parameters from first viewer line.
Back to top
View user's profile Send private message
joshv
Guest


Joined: 29 Aug 2007
Posts: 4

PostPosted: Mon Nov 26, 2007 9:21 pm    Post subject: Reply with quote

Wow! That is amazing. I wonder why you and I have a different result. Yes, I was referring to the JV Fast Retraction FX signal that I sent you. (Actually, all of my other TSGO strategies have the same problem.)

Did you use the version I sent you that had already been converted for TSGO, or did you run my original strategy through the code converter yourselves? If you have created a different TSGO version, I would love it if you could send it to me via email so I can see what the difference is from my non-working file.

Thanks.
Back to top
View user's profile Send private message
VladGor
Support Team


Joined: 26 Jan 2004
Posts: 528

PostPosted: Wed Nov 28, 2007 5:31 pm    Post subject: Reply with quote

We haven't converted your signal.
We did the same as with example with MACD, created new signal for optimization using TSGO and included original signal using operator IncludeSignal.

Example with your signal see below.
Test it.
If there is difference in results anyway try to install the latest version of TSGO.

EasyLanguage:
Inputs
 Gen(1), {Optimize in TradeStation with "Start = 1" and "Inc = 1"} 
 ShowInd(1), 
 ModeTSGO(0), 
 Population(100); 
 
{***Declaration of variables***} 
Vars
    Use1000MA(1), 
    StrictDivergence(1), 
    CoverChartMultiplier(4), 
    FastAvgPctRange(3), 
    FastStochLength(14), 
    ProfitTargetAmt(0), 
    BreakevenFloorAmt( 0 ), 
    StopLossAmt(0), 
    PctTrailingFloorAmt(0), 
    PctTrailingPct(0); 
 
Vars: R(0),K(0),LastRun(0),Ind(0);  
 
If CurrentBar = 1 Then Begin 
 
    R = TS.GO.Start("FastRetraction"); 
    R = TS.GO.ShowViewer; 
 
    If Gen=1 Then Begin 
        R=TS.GO.Mode(ModeTSGO); 
        R=TS.GO.Popul(Population); 
 
        K=TS.GO.Chrom("DailyMA"); 
          R=TS.GO.Gen("DailyMA.Use1000MA",K,0,1,1); 
        
        K=TS.GO.Chrom("StrictD"); 
          R=TS.GO.Gen("StrictD.StrictDivergence",K,0,1,1); 
        
        K=TS.GO.Chrom("CChart"); 
          R=TS.GO.Gen("CChart.CoverChartMultiplier",K,4,10,2); 
        
        K=TS.GO.Chrom("AvgPctRange"); 
          R=TS.GO.Gen("AvgPctRange.FastAvgPctRange",K,.02,.4,.02); 
        
        K=TS.GO.Chrom("FStoch"); 
          R=TS.GO.Gen("FStoch.FastStochLength",K,14,40,1); 
        
        K=TS.GO.Chrom("PTgt"); 
          R=TS.GO.Gen("PTgt.ProfitTargetAmt",K,0,4000,500); 
        
        K=TS.GO.Chrom("StopLoss"); 
          R=TS.GO.Gen("StopLoss.StopLossAmt",K,200,800,100); 
        
        K=TS.GO.Chrom("BreakEven"); 
          R=TS.GO.Gen("BreakEven.BreakevenFloorAmt",K,0,800,50); 
        
        K=TS.GO.Chrom("PctTrailing"); 
          R=TS.GO.Gen("PctTrailing.PctTrailingFloorAmt",K,0,4000,500); 
          R=TS.GO.Gen("PctTrailing.PctTrailingPct",K,25,55,5); 
 
        R = TS.GO.Var("NetProfit"); 
        R = TS.GO.Var("MaxIDD"); 
        R = TS.GO.Var("ProfitFactor"); 
        R = TS.GO.Var("PercentProfit"); 
        R = TS.GO.Var("TotalTrades"); 
        R = TS.GO.Var("GrossProfit"); 
        R = TS.GO.Var("GrossLoss"); 
        R = TS.GO.Var("LargestLosTrade"); 
        R = TS.GO.Var("LargestWinTrade"); 
  End
 
    LastRun = TS.GO.Next(Gen); 
    Ind = Iff(LastRun = 1,ShowInd,0); 
 
    Use1000MA = TS.GO.Get("DailyMA.Use1000MA",Ind); 
    StrictDivergence = TS.GO.Get("StrictD.StrictDivergence",Ind); 
    CoverChartMultiplier = TS.GO.Get("CChart.CoverChartMultiplier",Ind); 
    FastAvgPctRange = TS.GO.Get("AvgPctRange.FastAvgPctRange",Ind); 
    FastStochLength = TS.GO.Get("FStoch.FastStochLength",Ind); 
    ProfitTargetAmt = TS.GO.Get("PTgt.ProfitTargetAmt",Ind); 
    StopLossAmt = TS.GO.Get("StopLoss.StopLossAmt",Ind); 
    BreakevenFloorAmt = TS.GO.Get("BreakEven.BreakevenFloorAmt",Ind); 
    PctTrailingFloorAmt = TS.GO.Get("PctTrailing.PctTrailingFloorAmt",Ind); 
    PctTrailingPct = TS.GO.Get("PctTrailing.PctTrailingPct",Ind); 
 
End
 
IncludeSignal: "_JV FastRetractionFX"
    Use1000MA, 
    StrictDivergence, 
    CoverChartMultiplier, 
    FastAvgPctRange, 
    FastStochLength, 
    ProfitTargetAmt, 
    StopLossAmt, 
    BreakevenFloorAmt, 
    PctTrailingFloorAmt, 
    PctTrailingPct; 
 
R = TS.GO.Set("Gen",Gen); 
 
if LastBarOnChart Then Begin 
 
    R = TS.GO.Set("NetProfit",NetProfit); 
    R = TS.GO.Set("MaxIDD",MaxIDDrawDown); 
    R = TS.GO.Set("ProfitFactor",Iff(GrossLoss <  
0,GrossProfit/(1-GrossLoss),0)); 
    R = TS.GO.Set("PercentProfit",PercentProfit); 
    R = TS.GO.Set("TotalTrades",TotalTrades); 
    R = TS.GO.Set("GrossProfit",GrossProfit); 
    R = TS.GO.Set("GrossLoss",GrossLoss); 
    R = TS.GO.Set("LargestLosTrade",LargestLosTrade); 
    R = TS.GO.Set("LargestWinTrade",LargestWinTrade); 
 
If LastRun = 1 Then Print
    NumToStr(Use1000MA,9)," "
    NumToStr(StrictDivergence,9), " "
    NumToStr(CoverChartMultiplier,9)," "
    NumToStr(FastAvgPctRange,9)," "
    NumToStr(FastStochLength,9)," "
    NumToStr(ProfitTargetAmt,9)," "
    NumToStr(BreakevenFloorAmt,9)," "
    NumToStr(StopLossAmt,9)," "
    NumToStr(PctTrailingFloorAmt,9)," "
    NumToStr(PctTrailingPct,9)," "
    NetProfit 
    ); 
 
    R = TS.GO.Fitness(NetProfit); 
End;
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    support.tsresearchgroup.com Forum Index -> TS Genetic Optimizer for TradeStation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Copyright © TS Research Group

Powered by phpBB © 2001, 2002 phpBB Group

Developed by: webdesign.tria.lv