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

[amibroker] Re: OT: Statistics



PureBytes Links

Trading Reference Links

This is OT on psychology but a while back I believe you were asking
about statistics and trading?  Here's a very simple statistical test
that can be run using AB alone.  This simplified example will estimate
the strength of a "long only" system's entries.  Long and short
systems and exits are a bit trickier but the principle is the same.

Run an *out of sample* (OOS) system backtest.  Save the results. Note:
OOS only!  

Add the following line of code to specify the number of iterations. 
I'd run 1000 or more but as few as 100 will still give a crude
estimate.   

Iterations = Optimize("Iteration",1,1,1000,1);

Replace the system's buy condition with the following code but leave
the original settings, sell condition and stops in place.  Tweak the
value in the Buy line (0.975 in this case) so the number of trades is
approx. the same number as in the original OOS backtest.  BTW, I
personally wouldn't be comfortable with this procedure unless the OOS
backtest has at least several hundred trades.

Buy= Random()>0.975;

Optimize over the OOS period. Sort results by the metric you want to
analyze.  The fraction of optimized results that is greater than or
equal to the OOS backtest metric is an estimate of the probability
that one can do as well as or better than the original system entry by
chance alone.  Of course no matter how good the results, there's no
guarantee of future profitability.  But this is an easy way to get a
decent estimate of how much better than chance your OOS metrics are.

--- In amibroker@xxxxxxxxxxxxxxx, "brian.z123" <brian.z123@xxx> wrote:
>
> Thanks to the silent majority for your patience with me on the 
> Psychology included in this topic.
> Right at the moment I can't see myself raising the subject again, 
> not in this forum anyway.
> 
> My next series of posts is all hardcore trades and code; I promise.
> I have started testing the bearMonday Calender Affect and I will 
> post the results as a training project.
> If there is a valid trade in there I am likely to publish it, but 
> don't hold your breath.
> While, as a project it has some interesting features, I don't see 
> anything to get excited about so far.
> The results will be posted in a new topic: *Calender Effect*; maybe 
> next week.
> 
> ********************************************************************
> 
> Trading Psychology follows.
> Includes material suitable for advanced students only.
> 
> I need to redress the omission of an important point and I will also 
> offer a short explanation to help with practical application.
> 
> Referring to the visual mnemonic.
> 
> The universal energy (white space)is the same within and without 
> except that which is within the area bounded by the mnemonic is that 
> portion commanded by the individual.
> Great men perform great acts in the world by way of the amount of 
> energy at their disposal.
> 
> The visual image implies that this is brought about by an act of 
> dedicated focus based on supreme will power.
> 
> Energy is a matter related to the heart.
> If you don't have enough that is where to start looking.
> 
> The symbology contained in many popular books is often incorrect or 
> of academic interest only.
> The true symbology for Erebus is the circular *Snake that swallows 
> its own tail*; an ancient Cosmological symbol.
> Symbols can have several meanings, depending on their use, rather 
> like signs in some Asian languages.
> In this case it refers to perpetual circular motion.
> 
> 
> Practical examples:
> 
> 1. Should the goals set be achievable goals?
> 
> Your goals should match your dreams and beyond.
> Hitch your wagon to a star.
> If you reach for the stars and fall short you may still grab hold of 
> the moon on the way down.
> 
> 2. How can we ever expect to reach *pie in the sky* goals?
> 
> Assess with total honesty where you are now in comparison to where 
> you intend to be.
> What resources do you command? mentally list the pluses and minuses.
> Then start with a step by step plan to reach the first attainable 
> stage that you can see up ahead in the distance.
> Work to build on your strengths and eliminate your weaknesses.
> Don't look beyond the first stage; the gulf between you and your 
> goals will act to deter you if you do.
> Only look (plan) one stage ahead at a time.
> 
> Hold on to your dream (goal) the way a drowning man or woman 
> clutches at a lifebuoy.
> Don't let go no matter how rough the weather.
> 
> 3. Won't it be psychologically damaging if I set an impossible dream 
> and then fail?
> 
> Not at all.
> Not if you gave it your best shot.
> I have never meet one single person who isn't happy with that.
> 
> It is common for people to hitch their wagon to the wrong star.
> Once this becomes apparent it is better to accept this and change 
> stars.
> 
> Life also changes; relationships, health, family, work and many 
> other issues can force us to abandon or postpone a dream.
> If this is the case accept your destiny with humility, not rancour.
> 
> Trading itself has no more or less intrinsic value than thousands of 
> other things we could do with our lives.
> The true value lies in the character it builds and the habits of 
> success that it engenders.
> They are portable and will serve us well anywhere. 
> 
> *Great Honour* to the venerable Confucius, LaoTze; *The Way of the 
> Tao*.
> 
> Fritjof Capra?
> 
> BrianB2.



Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.27/517 - Release Date: 11/3/2006