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

[amibroker] 2days down-3 days up.



PureBytes Links

Trading Reference Links




This new exploration by Anthony is the first one I have 
ever run.   I am posting my interpretation of the results to see if my 
interpretation is correct.   This is an 
exploration that looks at whatever universe of stocks that you choose, 
and tests  them all to see what they do for a few days after the 
pattern is detected.  The first column shows the # of patterns detected, 
the next column shows the # of bars that were looked at by the scan, and so on 
as you read across. For instance, AAP shows that one day after the study, 
12 of the 18 detected patterns were profitable to the tune of 66.67 % 
had you sold all 18 of them at their closing prices of the following 
day  This implies that 6 of them broke even or lost money.  Therefore, 
the 12 profitable stocks actually made more than 66.67%, because they also had 
to cover the losses of the 6 losers.  Is this the correct 
interpretation of the results?  Since Anthony has already done all of 
the heavy lifting, It might be fairly easy to change this code to 
explore  Oliver Velez's  favorite pattern of three days 
down occurring  after a 30 day high.  Ron D
 
 
----- Original Message ----- 
From: <A 
title=ajf1111@xxxxxxxx href="">Anthony Faragasso 

To: <A title=amibroker@xxxxxxxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx 
Sent: Wednesday, July 09, 2003 6:58 AM
Subject: Re: [amibroker] Re: Calculating Stats

Eugene and Dom
 
I have attached an image showing the 
pattern...
 
DOM: ( yes...I have your formula completed...except 
I am stuck with returning 2 values..min and max values....).
 
Try this:
load into AA....n last quotations and n=1...click 
explore.
 

// setup P<FONT 
color=#ff0000 size=2>attern
pat=Ref(C,-<FONT 
face="Courier New" color=#ff00ff size=2>5<FONT 
size=2>)>Ref<FONT 
size=2>(C,-<FONT face="Courier New" color=#ff00ff 
size=2>4)AND <FONT color=#0000ff 
size=2>Ref(C,-<FONT face="Courier New" 
color=#ff00ff size=2>3)<<FONT color=#0000ff 
size=2>Ref(C,-<FONT face="Courier New" 
color=#ff00ff size=2>4) AND <FONT color=#0000ff 
size=2>Ref(C,-<FONT face="Courier New" 
color=#ff00ff size=2>2)><FONT color=#0000ff 
size=2>Ref(C,-<FONT face="Courier New" 
color=#ff00ff size=2>3) AND <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1)><FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>2) AND C ><FONT face="Courier New" 
size=2> Ref<FONT 
size=2>(C,-1<FONT 
size=2>);
<FONT 
size=2>/*********************************************************/<FONT 
color=#ff0000 size=2>
// # of patterns
pat1=Cum<FONT 
size=2>(pat);
//# of bars
bars=Cum<FONT 
size=2>(1<FONT 
size=2>);
//% Pattern
Cond1=(Cum<FONT 
size=2>(pat)/Cum<FONT 
size=2>(1<FONT 
size=2>))*100<FONT 
size=2>;
/************************************/<FONT face="Courier New" 
color=#ff0000 size=2>
//# Wins
// 1 day up after 
pattern
Day1up=Cum<FONT 
size=2>(Ref<FONT 
size=2>(pat,-1) AND 
C> Ref<FONT 
size=2>(C,-1<FONT 
size=2>));
// 2 days up after pattern
Day2up=Cum<FONT 
size=2>(Ref<FONT 
size=2>(pat,-2) AND 
Ref(C,-<FONT 
color=#ff00ff size=2>1)><FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>2) AND C> <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1));//2 days 
up
// 3 days up after pattern
Day3up=Cum<FONT 
size=2>(Ref<FONT 
size=2>(pat,-3) AND 
Ref(C,-<FONT 
color=#ff00ff size=2>2)><FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>3) AND <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1)> <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>2)AND C > <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1));//3 days 
up
// 4 days up after pattern
Day4up=Cum<FONT 
size=2>(Ref<FONT 
size=2>(pat,-4) AND 
Ref(C,-<FONT 
color=#ff00ff size=2>3)><FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>4) AND <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>2)> <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>3)AND <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1) > <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>2)AND C > <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1));//4 days 
up
 
// % wins
Day1upPercent=(<FONT color=#0000ff 
size=2>Cum(Ref<FONT 
size=2>(pat,-1) AND 
C > Ref<FONT 
size=2>(C,-1<FONT 
size=2>))/Cum<FONT 
size=2>(pat))*100<FONT 
size=2>;
Day2upPercent=(<FONT color=#0000ff 
size=2>Cum(Ref<FONT 
size=2>(pat,-2) AND 
Ref(C,-<FONT 
color=#ff00ff size=2>1)><FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>2) AND C> <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1))/<FONT color=#0000ff 
size=2>Cum(pat))*<FONT color=#ff00ff 
size=2>100;<FONT 
size=2>
Day3upPercent=(Cum<FONT 
size=2>(Ref<FONT 
size=2>(pat,-3) AND 
Ref(C,-<FONT 
color=#ff00ff size=2>2)><FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>3) AND <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1)> <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>2)AND C > <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1))<FONT face="Courier New" 
size=2>/Cum<FONT 
size=2>(pat))*100<FONT 
size=2>;
Day4upPercent=(Cum<FONT 
size=2>(Ref<FONT 
size=2>(pat,-4) AND 
Ref(C,-<FONT 
color=#ff00ff size=2>3)><FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>4) AND <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>2)> <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>3)AND <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1) > <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>2)AND C > <FONT color=#0000ff 
size=2>Ref(C,-<FONT color=#ff00ff 
size=2>1))<FONT face="Courier New" 
size=2>/Cum<FONT 
size=2>(pat))*100<FONT 
size=2>;
 
Filter=1<FONT 
size=2>;
AddColumn(pat1,<FONT color=#ff00ff 
size=2>"#Pat",<FONT color=#ff00ff 
size=2>1);
AddColumn(bars,<FONT color=#ff00ff 
size=2>"#Bars",<FONT color=#ff00ff 
size=2>1);
AddColumn(Cond1,<FONT color=#ff00ff 
size=2>"%Pat",<FONT color=#ff00ff 
size=2>1.2);
AddColumn(Day1up,<FONT color=#ff00ff 
size=2>"#1up<FONT 
color=#ff00ff size=2>",<FONT color=#ff00ff 
size=2>1);
AddColumn(Day1upPercent,<FONT color=#ff00ff 
size=2>"%<FONT face="Courier New" color=#ff00ff 
size=2>1up",<FONT color=#ff00ff 
size=2>1.2);
AddColumn(Day2up,<FONT color=#ff00ff 
size=2>"#2up<FONT 
color=#ff00ff size=2>",<FONT color=#ff00ff 
size=2>1);
AddColumn(Day2upPercent,<FONT color=#ff00ff 
size=2>"%2up<FONT 
color=#ff00ff size=2>",<FONT color=#ff00ff 
size=2>1.2);
AddColumn(Day3up,<FONT color=#ff00ff 
size=2>"#3up<FONT 
color=#ff00ff size=2>",<FONT color=#ff00ff 
size=2>1);<FONT face="Courier New" 
color=#0000ff size=2>
AddColumn(<FONT 
size=2>Day3<FONT 
size=2>upPercent,"%<FONT 
face="Courier New" color=#ff00ff size=2>3<FONT color=#ff00ff 
size=2>up",<FONT color=#ff00ff 
size=2>1.2);
AddColumn(Day4up,<FONT color=#ff00ff 
size=2>"#4up<FONT 
color=#ff00ff size=2>",<FONT color=#ff00ff 
size=2>1);<FONT face="Courier New" 
color=#0000ff size=2>
AddColumn<FONT face="Courier New" 
size=2>(Day4upPercent,<FONT face="Courier New" color=#ff00ff 
size=2>"%4up",<FONT 
face="Courier New" color=#ff00ff size=2>1.2<FONT face="Courier New" 
size=2>);<FONT face=Arial color=#000000 
size=2>
 
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  dom1_1998 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Tuesday, July 08, 2003 9:08 
AM
  Subject: [amibroker] Re: Calculating 
  Stats
  I'm going to take a WAG at saying this.  But I think 
  Eugene may wantto know, at least I do, what's the performance if held 1 
  day after thecondition, 2 days after, 3 days after etc etc up to the 5th 
  day aftersaid cond.Dominick
  Send BUG REPORTS to <A 
  href="">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. 
  
<BLOCKQUOTE 
><FONT 
  face="Courier New">---Outgoing mail is certified Virus 
  Free.Checked by AVG anti-virus system (<A 
  href="">http://www.grisoft.com).Version: 6.0.498 
  / Virus Database: 297 - Release Date: 7/9/2003Send 
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.



Attachment:
eugene.JPG
Description: JPEG image
Attachment:

Attachment: Description: "Description: JPEG image"

Attachment: Description: "2 days down 3 days up.JPG"