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

RE: [amibroker] Re: Optimization - "Issues" testing portfolios with AB.



PureBytes Links

Trading Reference Links




yes, 
please share your work-around.

  <FONT face=Tahoma 
  size=2>-----Original Message-----From: b519b 
  [mailto:b519b@xxxxxxxxx]Sent: Thursday, March 13, 2003 9:31 
  AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re: 
  Optimization - "Issues" testing portfolios with 
  AB.Chuck,At present, using AB to simulate 
  trading a portfolio raises a number of "issues". When Tomasz adds 
  portfolio level testing to AB (hopefully soon), all of these issues will 
  be history. Until then, users need to be very careful when using AB to 
  test such systems. As I said there are several issues, but this post 
  will focus on the one that is most likely causing your strange 
  results.> I am building the composite equity by saying:> 
  AddToComposite(Equity()/1000, "~Composite", "X");Dividing by 1000 is 
  not a problem and it has the advantage you state. But your 
  composite does not take into account how many stocks have contributed to 
  the equity curve on a given bar. As it stands, the composite justs sums 
  the equity curves of all the stocks tested. Since the number of stocks in 
  existance (even when including inactives) has increased over time, the 
  composite is NOT measuring return, but total capital invested (plus or 
  minus profit). Until AB adds portfolio level testing, there is no way to 
  tell AB to limit the total capital invested in any given year. So if 100 
  stocks met the criteria in year 1, the equity curve of the 100 stocks gets 
  added to the composite. If in year 2, 50 stocks met the criteria to 
  trade, then the composite will have the original 100 plus 50, and so 
  on. Here is another way to look at the same issue. When AB looks 
  at the first stock (it tests each independently), adds that stock's equity 
  curve to the Composite. Lets assume stock 1 started trading in 1991. 
  If the system looses money, the amount getting added to the composite 
  will decrease over time. AB then looks at the 2nd stock and it also 
  looses money. However, stock 2 has only been around since 1992 and so its 
  equity curve gets added to your composite beginning in 1992. So even if 
  both stocks 1 and 2 lost money, the composite equity curve would show a 
  jump up in 1992. Let's say stock 3 starts trading in 1993 and it also 
  looses money, but the composite will show another increase. Repeating this 
  for the 7,500 stocks you tested could make a loosing system show 
  "beautiful" equity. If this explaination is correct, it suggests that 
  you have yet to get that profitable MetaStock code into its Amibroker 
  equivalent.If any are interested I can share how I try to "work 
  around" this issue.b--- In amibroker@xxxxxxxxxxxxxxx, 
  "Chuck Rademacher" <chuck_rademacher@x> wrote:> I would 
  appreciate it if someone could help me to understand what I'm 
  seeing> in an optimization run.> > 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.> > 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.> > You might be tempted to say "try another 
  system".> > 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.> > I am building the composite equity by 
  saying:> > AddToComposite(Equity()/1000, "~Composite", 
  "X");> > 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.> 
  > 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.?> > I want to believe the equity curve, of 
  course.   But I'm uncomfortable> seeing all the negative 
  metrics.> > I'm also uncomfortable simply selecting the highest 
  ranked set of parameters> when the best value is negative.> 
  > Any assistance or comments would be appreciated.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.