[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Optimization questions



PureBytes Links

Trading Reference Links




Chuck,
 
Without seeing all the setting that you have, it is impossible 
to diagnose.
 
I would suggest that you start with something like 1 
parameter combination over 5 stocks to make it easy to check the figures 
and get your settings correct first.
 
I'm no expert at it but, AddToComposite my also be saving just 
your last run which may happen to be using unprofitable parameters, 
too.
 
Always check <A 
href="">http://www.amibroker.com/guide/afl/ for 
the latest AFL descriptions.
 


  
  
    SYNTAX 
    AddToComposite( array, "ticker", 
      "field", flags = atcFlagDefaults ) 
  
    RETURNS
    NOTHING 
  
    FUNCTION 
    Allows you to create composite indicators with ease. <A 
      href="">More 
      info...Parameters:array - the array of values to be added to 
      "field" in "ticker" composite symbol "ticker" - the ticker of 
      composite symbol. It is advised to use ~comp (tilde at the 
      beginning)newly added composites are assigned to group 253 by default 
      andhave "use only local database" feature switched on for proper 
      operation with external sources possible field codes: "C" - close , "O" - 
      open, "H" - high, "L" - low, "V" - volume, "I" - open interest, "X" - 
      updates all OHLC fields at onceflags - contains the sum of 
      following values
      
        atcFlagResetValues = 1 - reset values at the 
        beginning of scan (recommended) 
        atcFlagCompositeGroup = 2 - put composite ticker 
        into group 253 and EXCLUDE all other tickers from group 253 (avoids 
        adding composite to composite) 
        atcFlagTimeStamp = 4 - put last scan date/time stamp into FullName 
        field 
        atcFlagEnableInBacktest = 8 - allow running 
        AddToComposite in backtest/optimization mode 
        atcFlagEnableInExplore = 16 - allow running 
        AddToComposite in exploration mode 
        atcFlagDefaults = 7(this is a composition of atcFlagResetValues 
        | atcFlagCompositeGroup | atcFlagTimeStamp flags)
       
      -CS
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  <A title=chuck_rademacher@xxxxxxxxxx 
  href="">Chuck Rademacher 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Wednesday, March 12, 2003 7:22 
  PM
  Subject: [amibroker] Optimization 
  questions
  
  I 
  would appreciate it if someone could help me to understand what I'm seeing in 
  an optimization run.
  <FONT face=Arial color=#0000ff 
  size=2> 
  I am 
  running about 1000 combinations of parameters over 7,500 stocks over 
  15 years of daily data.   Fortunately, my PC has plenty of 
  grunt and the run actually finishes.
  <FONT face=Arial color=#0000ff 
  size=2> 
  Most 
  columns in the results grid show negative results.   Net 
  profit, RAR, Average Trade, etc. are all negative and the profit factor is 
  less than one.
  <FONT face=Arial color=#0000ff 
  size=2> 
  <FONT face=Arial color=#0000ff 
  size=2>You might be tempted to say "try another 
  system".
  <FONT face=Arial color=#0000ff 
  size=2> 
  <FONT face=Arial color=#0000ff 
  size=2>BUT... the composite equity curve is showing a very positive and 
  consistent profit.   Since this system was converted from a 
  profitable MetaStock system, I expected to see a profitable equity 
  curve.   I sorted the results by "Average Trade" and then did a 
  backtest on the highest ranked set of parameters, even though the average 
  trade was showing as a negative value.
  <FONT face=Arial color=#0000ff 
  size=2> 
  I am 
  building the composite equity by saying:
  <FONT face=Arial color=#0000ff 
  size=2> 
  <FONT face=Arial color=#0000ff 
  size=2>AddToComposite(Equity()/1000, "~Composite", "X");
  <FONT face=Arial color=#0000ff 
  size=2> 
  The 
  reason I divide by 1,000 is so that the profit values are shown in an 
  acceptable format without overflowing into scientific notation.  The 
  equity curve is a very attractive 40% angle, gradually going from zero to $30 
  million.
  <FONT face=Arial color=#0000ff 
  size=2> 
  <FONT face=Arial color=#0000ff 
  size=2>Since the equity curve looks like what I expect, why don't I see 
  positve values for the important metrics like RAR, Average Trade, 
  etc.?
  <FONT face=Arial color=#0000ff 
  size=2> 
  I 
  want to believe the equity curve, of course.   But I'm uncomfortable 
  seeing all the negative metrics.
  <FONT face=Arial color=#0000ff 
  size=2> 
  I'm 
  also uncomfortable simply selecting the highest ranked set of parameters when 
  the best value is negative.
  <FONT face=Arial color=#0000ff 
  size=2> 
  Any 
  assistance or comments would be appreciated.
  <FONT face=Arial color=#0000ff 
  size=2> 
  <FONT face=Arial color=#0000ff 
  size=2> Send 
  BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor


  ADVERTISEMENT









Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.