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

Re: [amibroker] Q from Holygrail Board



PureBytes Links

Trading Reference Links




David,
 
With the release 4.43 you can do that.
 
PositionSize variable allows you to control the position 
sizing on PORFOLIO level.
Negative values assigned to it specify the PERCENTAGE of 
PORTFOLIO equity to be invested.
 
So for example, if you want to have no more than 5 
simultaneously positions open
specify
SetOption("MaxOpenPositions", 5 );
PositionSize = -100/5; // 20% of PORFOLIO equity 
 
You may also adjust the position size depending on risk 
(volatility) of given stock:
PositionSize =  -2 * BuyPrice/(2*ATR(10));
 
That way you are investing investing 2% of PORTFOLIO equity in the trade 
adjustedby BuyPrice/2*ATR factor (the higher volatility the less part of 
portfolio funds you would put into trade)
 
As for second part of your question, you can also use ranking 
criteria to specify which trades
are preferred if there are too many candidates than allowed 
positons or available cash:
An easy example from the read me:
 
PositionScore = 100 - RSI();
 
will tell backtester to prefer stocks with low RSI (high 
position score). 
AmiBroker would enter trades starting from trade of the 
highest score until it reaches maximum open pos limit
or no more cash is available.
 
More info is provided in the read me file.
 
Best regards,Tomasz Janeczkoamibroker.com
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  mrdavis9 
  
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibrokeryahoogroups 
  Sent: Tuesday, October 07, 2003 1:51 
  AM
  Subject: [amibroker] Q from Holygrail 
  Board
  
  I saw this on the Holygrail board, so I am 
  passing it along to this board. Ron D
  ----- Original Message ----- 
  From: <A 
  title=wjones5@xxxxxxxxxxxxxxx href="">Ward 
  Jones 
  To: <A title=holygrailsm@xxxxxxxxxxxxxxx 
  href="">holygrailsm@xxxxxxxxxxxxxxx 
  
  Sent: Monday, October 06, 2003 6:33 PM
  Subject: [holygrailsm] Re: amibroker questions.
  
  My friend DAve Johnson sent, to me, the following email that I am 
  incorporating here with a (his) request for information about 
  AmiBroker's backtesting capabilities.  Any helpful responses will be 
  most appreciated.  Thanks in advance.  
  WardWard,If you can, ask these knowledgeable people if there 
  is a way in Amibroker to simulate position sizing.  The issue with 
  backtesting is not generating the trades, it's knowing which trades to 
  take and how much money to put into each one.  Many trading systems 
  suffer from a condition known as clustering, where many of the trades 
  happen in just a few days.  These systems look great statistically, 
  but trade unprofitably because most of the time you are not trading at 
  all (no trades), and when you do get trades you get too manyto take.  
  So, what would really be helpful is if you can specify equity positions in 
  each trade, specify the limits of equity in all positions (so it's 
  realistic), and then define some "tie breaker" ranking criteria if there 
  are too many trades to determine which ones you enter.  Anything you 
  can find out relative to these questions would be 
  helpful.Thanks,David
   
   
  ---Outgoing mail is certified Virus 
  Free.Checked by AVG anti-virus system (<A 
  href="">http://www.grisoft.com).Version: 6.0.522 
  / Virus Database: 320 - Release Date: 9/30/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.