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

[amibroker] Re: Coding Question



PureBytes Links

Trading Reference Links

Steve,
Since we temporarily cannot handle foreign equities inside a function
(), I try an alternative to reach your most important question.
A hi-pass filter after an event.
The event is your RUT signals.
I will try to hi-pass equities after each signal for one stock at 
first. Then I will try the multiple stock application.
My first, already posted, effort has a quite interesting 
[expected ??] result: 
The topEquity at the EVENT time is not always the best vehicle for 
the future.
My next step will be the multiple-EVENT application [I hope my 
formula will work, but I am not sure yet...]
Since time is precious, the only choice for me is to study during the 
session, as I wait for my intradays. And now, I have to stop this 
interesting dialogue, in order to sell this bloody stock, it is the 
time to take a +5.2%.
Back to you soon.
Dimitris
--- In amibroker@xxxxxxxxxxxxxxx, "Steve Almond" <steve2@xxxx> wrote:
> Dimitris,
> 
> Thanks for the suggestion, but the skill needed to adapt your 
application to mine is beyond me.
> When I asked this question over on the PT board some time ago, 
Bruce, Fred & Chuck came up with the following (for use in PT):
> 
> For Market Timing
> RUT = Foreign("^RUT", "C");
> 
> UpTrend = EMA(RUT, 4) > EMA(RUT, 11);
> 
> 
> 
> For Scoring
> 
> Factor1 = IIf(UpTrend, C / Ref(C, -1), 1);
> 
> Factor2 = IIf(IsEmpty(Factor1), 1, Factor1);
> 
> STARTEQ = 1000;
> 
> Product = exp(Cum(log(Factor2))) * STARTEQ;
> 
> Score = Product / Ref(Product, -250);
> 
> rScore = IIf(IsEmpty(Score),0,IIf(Uptrend,Score,0));
> 
> 
> 
> Does this give any clue for running a similar system under AB's new 
backtester?
> 
> 
> 
> Thanks,
> 
> Steve
> 
> 
>   ----- Original Message ----- 
>   From: DIMITRIS TSOKAKIS 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   Sent: Monday, October 06, 2003 10:38
>   Subject: [investment] [amibroker] Re: Coding Question
> 
> 
>   Steve,
>   I have posted "A complete top10 application", Sept7, where I take 
the 
>   top10 performers of systemA and see their performance in systemB.
>   See if it helps, else we shall create a solution from the 
beginning.
>   Dimitris Tsokakis
>   --- In amibroker@xxxxxxxxxxxxxxx, "Steve Almond" <steve2@xxxx> 
wrote:
>   > I want to backtest a system (regular backtest, not rotational) 
>   which has the following two parts:
>   > 
>   > 1. A simple market timing signal - let's say:
>   >     
>   >    RUT = Foreign("^RUT", "C");
>   >     UpTrend = EMA(RUT, 4) > EMA(RUT, 11);
>   > 
>   > 2. A scoring system. I want the scoring system to be based on 
>   the 'performance' of the same market timing system.  Say on 
>   12/31/1997 the market timing signal indicates a buy condition. I 
run 
>   a simple backtest of 1 year duration on the 100 stocks in the 
>   Nasdaq100, like so:
>   > 
>   >     RUT = Foreign("^RUT", "C");
>   >     UpTrend = EMA(RUT, 4) > EMA(RUT, 11);
>   >     buy=Uptrend;
>   >     sell=NOT uptrend;
>   > 
>   > I pick the 5 best performing stocks (say highest CAR) and use 
them 
>   going forward into 1998, until the market timing signal gives a 
sell 
>   indication, when I sell the 5 stocks. At the next market timing 
buy 
>   signal, I again pick the top 5 performers (using the simple 
backtest) 
>   over the past year. etc. etc.
>   > 
>   > It seems like some sort of feedback system.
>   > 
>   > Is it possible?
>   > 
>   > Steve
> 
> 
>         Yahoo! Groups Sponsor 
>               ADVERTISEMENT
>              
>        
>        
> 
>   Send BUG REPORTS to bugs@xxxx
>   Send SUGGESTIONS to suggest@xxxx
>   -----------------------------------------
>   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.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

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 http://docs.yahoo.com/info/terms/