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

Re: [amibroker] Re: Trading Research and its Statistics



PureBytes Links

Trading Reference Links

Soham,
 
If I am reading correctly your questions....
 
From the formula header:
Price Persistency is based on the theory of runs..It is the idea that, given the market has moved in a particular direction for ( n ) days, thelikelihood it will either continue..or not...can be estimated and used in a profitable trading system....
 
So, to answer questions # 2...Does it give something to draw conclusions on ?
 
When you run the exploration on a ticker...you check the CURRENT STATE of the trend....for example, It might say CURRENT UP = 4,
you then would slide over to 5 days up  and check the... ( % up / prev UP ) column....and see the % of time that the ticker moved up 5 days in a row...
Same logic for down trend...
 
 
Not sure how to answer question # 1....
 
 
AND FROM YOUR ORIGINAL POST.
 
#2.  Count the number of days it has trended in the same direction
 
 

/***Current State of the Closes******/

stateUp=BarsSince(C < Ref(C,-1));

stateDown=BarsSince(C > Ref(C,-1));

filter=1;

AddColumn(stateUp,"currentUp");

AddColumn(statedown,"CurrentDown");

#1. Number of days close is above ( below ) bollinger band.
 

aboveBB=BarsSince(C < BBandTop(C,15,2));

belowBB=BarsSince(C > BBandBot(C,15,2));

Filter=1;

AddColumn(aboveBB,"aboveBB",1);

AddColumn(belowBB,"belowBB",1);

 
****Standard histogram of trending days ?

/***Current State of the Closes******/

stateUp=BarsSince(C < Ref(C,-1));

stateDown=(BarsSince(C > Ref(C,-1)));

//histogram output

Plot(stateup,"uptrend",colorGreen,styleHistogram);

Plot(-statedown,"downtrend",colorRed,styleHistogram);

Filter=1;

AddColumn(stateUp,"currentUp");

AddColumn(statedown,"CurrentDown");

----- Original Message -----
From: Soham
Sent: Saturday, January 31, 2009 6:40 AM
Subject: [amibroker] Re: Trading Research and its Statistics

Hi Anthony,

I went through that formula. And indeed its a pretty good work. But I
have some questions.

1. If there is an N day up(or down)trend, ending with N+1st day, then
that streak will also change the 1 day Up count, 2 day up count,3 day
up count.. all the way to N;

2. Also,why is the need for Percent'X'DayUp or Percent'X'DayDown
needed to be compared with Pct'X-1'DayUp. Does it give something to
draw conclusions on?

Soham

--- In amibroker@xxxxxxxxxps.com, "Anthony Faragasso" <ajf1111@xxx> wrote:
>
> Price persistency formula in the AFL library has exactly what you
are looking for.
>
>
> ----- Original Message -----
> From: Soham
> To: amibroker@xxxxxxxxxps.com
> Sent: Friday, January 30, 2009 1:50 PM
> Subject: [amibroker] Trading Research and its Statistics
>
>
> Hi guys,
>
> Although I am familiar with AFL but strangely finding myself not able
> to get my work done.
>
> I am having a requirement to:
>
> 1. Count the number of days,Close is above [or below] the
bollinger band
> 2. And count the number of days for which it has trended in the same
> direction.
>
> I would additionally love to see, a standard histogram of trending
days.
>
> Can you help me out?
>
> Soham
>
>
>
>
>
>
>
----------------------------------------------------------
>
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com
> Version: 8.0.176 / Virus Database: 270.10.16/1925 - Release Date:
1/30/2009 7:37 AM
>



No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.10.16/1926 - Release Date: 1/30/2009 5:31 PM
__._,_.___

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
*********************

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html

*********************************




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___