Hi Ed,

That is the problem.

You can use almost any metric to adjust positionsize, and it works.
The problem occurs if you want to use equity in some form to calculate the 
positionsize.

I have used a more complicated form of the code below in Excel with 
considerable success:

MinContracts=1;//Optimize("Min Contracts",1,1,5,1); 
MaxContracts=10;//Optimize("Max Contracts",20,5,25,1); 
Margin=MarginDeposit; 
PctEq=PctEq/100; 
eq=Equity(); 

PS=Min( MaxContracts * Margin , Max( PctEq * Eq , MinContracts * Margin )); 
PositionSize = PS; 

But in AB, for a while, while it trades just one contract, it works just fine, 
then for some reason the equity blows up to the millions very quickly
and has nothing to do with reality. (Gee, it would be nice if blowing up to the 
millions was reality.)

-CS

  ----- Original Message ----- 
  From: Edward Pottasch 
  To: [email protected] 
  Sent: Thursday, May 28, 2009 1:04 AM
  Subject: Re: [amibroker] Using Equity to Compute Position Size






  Corey,

  I believe your question is answered here:

  http://www.amibroker.com/guide/h_futbacktest.html

  under the paragraph "Margin deposit"

  Just tested myself:

  PositionSize = -10;
  SetOption("MaxOpenPositions", 3); 

  setting inside Amibroker (Information Window) the Margin Deposit at 5000, 
Roundlotsize at 1 and initial equity at 100000. What I find is that it indeed 
increases the number of positions once enough equity is available, however it 
does not stick to the maximum open positions for some reason. Not sure why,

  Ed
  Recent Activity
    a..  39New Members
    b..  1New Files
  Visit Your Group 
  Give Back
  Yahoo! for Good

  Get inspired

  by a good cause.

  Y! Toolbar
  Get it Free!

  easy 1-click access

  to your groups.

  Yahoo! Groups
  Start a group

  in 3 easy steps.

  Connect with others.
  . 

  

Reply via email to