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

Re: [amibroker] Re: Backtest: specifying position size in terms of compounded capital c,ount



PureBytes Links

Trading Reference Links

Here is my thought on how to calculate the position size in terms of % of equity for futures, hopefully I am correct

TradeRisk = PointValue * TickSize * 
 IIf( Buy, ValueWhen( Buy, BuyPrice - StopPrice ),
 IIf( Short, ValueWhen( Short, StopPrice - ShortPrice ),
 0 ) ); // Stop loss $
EquityRisk = 2; // 2% of current backtest open equity
PositionSize = - EquityRisk * MarginDeposit / TradeRisk;
 // result is percent of equity

Example for long trade
MarginDeposit = 500;
PointValue = 1000;
TickSize  = 0.01;
BuyPrice = 100;
StopPrice = 95;
EquityRisk = 2;

TradeRisk = (1000*0.01)* (100-95) = 50;
PositionSize = -2 * 500 / 50 = 20 % Of Equity for trade


--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://www.aflwriting.com

On 09/05/07, Kevin Glenn <kbglenn@xxxxxxxxx> wrote:
Can I add on to this question please?

If you are for backtesting in futures mode with the following parameters using NQ as an example;

Margin = 3750
Tick size = .25
Points = x20
Equity = 100,000
Position Risk = 1% of equity/$1000
Points between buy and stop  = 10 pts/$200 per contract at risk
Thus, you want the backtester to buy/short 5 contracts



__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___