Hi Sohamdas --

In my opinion, this is definitely a topic that deserves discussion in the
AmiBroker forum.

What position sizing should be used during backtests?

If you will be evaluating each trade for its characteristics -- entry
efficiency, exit efficiency, and so forth, then each trade should be the
same size.  For stocks and ETFs that means the same dollar amount.  For
futures that means the same number of contracts.

If you will be comparing equity growth over a period of time to other
alternatives, then you will want position sizing and / or compounding to
some degree.  For example, if you want to compare the results of a trading
system to buy and hold, you will want to take the same size position at the
beginning if the test period for each alternative, then compare equity
smoothness, growth, drawdown, etc.

If you are planning to use aggressive position sizing, there are several
things to consider.
1.  I cannot state it too often -- your system must have a positive
expectancy measured on strictly out-of-sample results.  You absolutely
cannot use in-sample results to estimate the likely future performance of a
trading system in any event.  And if aggressive position sizing is based on
in-sample results, you will go bankrupt.
2.  Traders should have a business plan in place.  They should know when to
quit -- either when they have enough that they no longer need to trade, or
when they have lost so much that they can no longer trade or realize that
they should pick another profession.
3.  Aggressive position sizing depends on having:
A.  Positive expectancy.
B.  Understanding of risk.  Both the risk that is acceptable for each trade
from the account, and the risk associated with the trading system.  Most
trading systems have higher risk per trade than the account risk allows, so
even taking a position that is everything you can afford to buy is
aggressive.
C.  The ability to use leverage.  Brokers allow use of margin, and some ETFs
have leverage.  By using these, it is possible to get 12 to 20 times
leverage trading stocks and ETFs in an ordinary brokerage account.
D.  Frequent trading, because that provides frequent compounding.  For most
trading systems, the final equity of an account is a multiple of the initial
equity that can be computed from:
terminal_equity = (1 + expectancy) ^ number_of_trades
where expectancy is the average percentage gain per trade.

There are two general schemes for aggressive position sizing.  As you dig
into the math, you will see that they are closely related.
The first is fixed fraction, popularized by Ralph Vince.
The second is fixed ratio, popularized by Ryan Jones.
Both men have written books and papers describing their methods, and you can
do an Internet search on each phrase and get a lot of information.

The essence of both methods is to increase position size when the system is
operating profitably.  In gambling terminology, you are "betting the run of
the table".  When winning, increase; when losing, pull back.  Both of these
are betting schemes called anti-martingale.

Ralph Vince has also popularized the notion of "optimal f" -- that fixed
fraction that should be bet on each play to maximize the terminal equity.
The fraction of the account used for each play is determined by the largest
anticipated drawdown or trade loss.  He, and everyone else who is working
with real money, shows that the fraction bet on each play Must be less than
optimal f if the account is to remain solvent.  In fact, the fraction must
be much less than optimal f if the account is avoid large drawdowns.
Trading at optimal f essentially guarantees drawdowns in the 80 percent
range.

Ryan Jones essentially creates two sub-accounts.  One is the original stake,
say $100,000.  The other is the profits from trading.  Ryan waits until
there are some profits, then uses a high percentage of the profits for each
trade.

The two methods converge mathematically.  Some traders prefer to begin using
one method, then switch to the other as profits accumulate.

Before you consider using an aggressive position sizing scheme, and buying
all the stock you can afford is aggressive, please read my other comments in
both this forum and Aussie Stock Forums related to trading system
development and position sizing.  And read both Vince's and Ryan's books,
and other material you can find on the Internet.

The input to the simulators that model either fixed fraction or fixed ratio
need is a list of closed trade results.  These are individual trades, each
the same size.

Monte Carlo Analysis is used to rearrange the sequence of trades many
times.  The position sizing rules are applied to each sequence and the
equity curve computed and drawn.  Typically many sequences are used -- 1000
or more -- each of many trades -- 100 or more.  After all 1000 runs, all of
the equity curves are draw on a single chart and statistics computed that
will allow you to estimate the final equity and probability of both going
broke and retiring wealthy.  The plot looks like a straw broom with the
straws angled upward to the right.

There are two good programs for testing position sizing.
Equity Monaco. A free position size calculator / simulator published by
TickQuest. It accepts a file, in ASCII format, of closed trade results, and
performs Monte Carlo analysis of reordering the closed trades. Highly
recommended.
http://www.tickquest.com/?page_id=70
Market Systems Analyzer. Costs about US$350, but sometimes available for a
little less. Published by Adaptrade. Does everything Equity Monaco does,
plus tests aggressive position sizing methods. I highly recommend this
program -- provided you understand trading system development, trading
system validation, account risk, trade risk, and aggressive position sizing,
and you are not a novice trader. Again -- using aggressive position sizing
with a trading system that has not passed tests of statistical validation
will result in a swift trip to bankruptcy.
http://www.adaptrade.com/

To use either of these programs, run your backtest using the parameters and
settings that will be used during trading and that represent the
out-of-sample runs from walk forward testing.  Export the trade list to a
csv file.  Strip everything unnecessary out of the file and save it in the
format the position sizing program needs.  Then run the position sizing
simulator.

----------------

There are two other areas where Monte Carlo Analysis is useful.

One is adding noise to the input data.  This can easily be done in AmiBroker
now and is explained in my book Quantitative Trading Systems.

The second is testing the sensitivity of parameter values.  This can be also
be done now, but requires some careful thought and planning to determine
which parameters should be tested and over what range.

-------------

Thanks for listening,
Howard




On Sun, Jul 25, 2010 at 11:33 PM, sohamdas <[email protected]> wrote:

>
>
> Hi Folks,
>
> Though, not exactly, Amibroker related but I guessed it might be a great
> place to ask.
>
> Can anybody of you, who have ample experience designing trading systems,
> can comment that when I am designing a trading system, say, entries and
> exits are to the extent possible frozen, what is the position sizing I
> should use to run my preliminary backtests.
>
> And what are the inputs I should pass onto the Monte Carlo routine.
>
> Is it possible to conduct MC Analysis in Amibroker?
>
> Soham
>
> P.S: Thoughts of Dr. Bandy will be much more than welcome
>
>  
>

Reply via email to