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

RE: [amibroker] Total Performance question?



PureBytes Links

Trading Reference Links




<FONT face="Courier New" color=#0000ff 
size=2>drat, hit send by accident while I renaming for shorter variable names. 
corrected below.
<FONT face="Courier New" color=#0000ff 
size=2> 
<FONT face="Courier New" color=#0000ff 
size=2>dave
<BLOCKQUOTE 
>
  <FONT face=Tahoma 
  size=2>-----Original Message-----From: Dave Merrill 
  [mailto:dmerrill@xxxxxxx]Sent: Sunday, November 02, 2003 4:45 
  PMTo: amibroker@xxxxxxxxxxxxxxxSubject: RE: [amibroker] 
  Total Performance question?
  <SPAN 
  class=338271521-02112003>I don't get your context. total change in what? price 
  of the current stock? start and end prices I think would 
  be:
  
  <SPAN 
  class=338271521-02112003> 
  <FONT face="Courier New" color=#0000ff 
  size=2>start_price = 
  LastValue(ValueWhen(Status("FirstBarInRange"), c));<SPAN 
  class=799494621-02112003> end _price<SPAN 
  class=799494621-02112003> = 
  LastValue(ValueWhen(Status("LastBarInRange"), c)); 
   
  <SPAN 
  class=338271521-02112003>do that, then add these columns and explore to 
  verify:
  <SPAN 
  class=338271521-02112003> 
  <SPAN 
  class=338271521-02112003>AddColumn(start_price, 
  "price_at_start_of_test");AddColumn(end_price, 
  "price_at_end_of_test");AddColumn(c, "c");
  <SPAN 
  class=338271521-02112003> 
  <SPAN 
  class=338271521-02112003>percentage change would be:
  <SPAN 
  class=338271521-02112003> 
  <SPAN 
  class=338271521-02112003>pct_change = ((end_price / start_price) - 1) * 
  100;
  <SPAN 
  class=338271521-02112003> 
  <SPAN 
  class=338271521-02112003>some major caveats though...
  <SPAN 
  class=338271521-02112003> 
  <SPAN 
  class=338271521-02112003>- if you're talking about price change over the 
  course of the same backtest that's running now, the backtester itself tells 
  you that, so I don't understand what you're trying to do.
  <SPAN 
  class=338271521-02112003> 
  <SPAN 
  class=338271521-02112003>- if you make buy/sell decisions based on the above, 
  you're looking into the future, and you won't be able to trade like that in 
  real life. that's why you have to use LastValue, so you can see what the 
  value would be as of the last bar.
  <SPAN 
  class=338271521-02112003> 
  <SPAN 
  class=338271521-02112003>- code that runs during a backtest runs *before* 
  the portfolio calculations have been done. in a scoring or rotational system, 
  you can't even tell which of the buys and shorts you set up will actually get 
  taken, and which will be outscored by another stock and 
  skipped.
  <SPAN 
  class=338271521-02112003> 
  <SPAN 
  class=338271521-02112003> 
  <SPAN 
  class=338271521-02112003>all of that's what I thought when I saw your first 
  msg. I figured I didn't have anything useful to say about it then, since I 
  must have misunderstood the point. which I do frequently, it 
  seems...
  <SPAN 
  class=338271521-02112003> 
  <SPAN 
  class=338271521-02112003>dave
  <BLOCKQUOTE 
  >I'm 
    trying to figure out how to determine the Total Percent Changein the 
    Close from the... From Date thru the To Date in my backtest.I'm 
    looking for the value of the Close on the FromDate and also onthe 
    ToDate, so i can compute Total Percentage Change between the 2 
    dates.I obviously don't understand barinrange yet, and if 
    someone can helpme figure this out i'd truly appreciate it. Thank 
    you.BillSend 
  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












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.