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

Re: [amibroker] Backtest and portfolio



PureBytes Links

Trading Reference Links

Hello,

Here is the formula that implements your idea:




numstocks = 5;
EnableRotationalTrading();
SetOption("MaxOpenPositions", numstocks );
SetOption("WorstRankHeld", numstocks );

PositionSize = -100/ numstocks;

YearlyReturn = ROC( C, 252 );

score = 1 / YearlyReturn; // lower return -> higher score

BeginningOfTheYear = Year() != Ref( Year(), -1 );

PositionScore = IIF( BeginningOfTheYear, score , 
                              scoreNoRotate );

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "supistarde" <supistarde@xxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Friday, February 18, 2005 12:49 PM
Subject: [amibroker] Backtest and portfolio


> 
> 
> 
> Hi Amibroker community,
> 
> I am new in backtesting. I have the following portfolio-problem:
> I want to filter the 5 lowest yearly-returns from the Dow Jones
> Industrial on the beginning of a year. Afterwards the system holds the
> five stocks for 12 months. 
> Sounds simple, but how do I do it?
> 
> Greetings from Germany
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Check AmiBroker web page at:
> http://www.amibroker.com/
> 
> Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
> 
>


------------------------ Yahoo! Groups Sponsor --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/