Money Management: The Basics of Money Management II
|
A dictionary of money management
Money Management – part of a trading
strategy that defines the risk that should be
taken at opening a position and the size of the
position to be maintained at a given moment
relative to the capital.
Mathematical expectation of profit –
the sum of profit probabilities multiplied
by the size of those profits minus the sum of
loss probabilities multiplied by the size of
those losses
Ε = S
i
(Probability of profiti *
Profiti ) - S
j(Probability of lossj
* Lossj )
The mathematical expectation may be roughly
estimated as the profit probability (%
Win/100), multiplied by average profit
(AvgWin), minus loss probability (%
Loss/100), multiplied by the average loss
(AvgLoss).
Initial risk – the sum we are ready
to lose before exiting an unprofitable trade per
one share (contract). The difference between the
entry point an the exit at a loss point.
Current (open) risk – the difference
between the current price and the exit point.
Martingale – increasing the position size
as the capital decreases.
Antimartingale – increasing the
position size as the capital increases.
Volatility – the measure of the extent
of price changes per a given period of time.
|
Evidently, if we
put too little at the stake, we won’t cover our
expenditures of time, energy and beer, too. It is
much less evident, yet so, that if we start
betting too much, sooner or later we are going to
lose the entire capital. Economical theories and
common sense both keep telling us that the higher
the risk, the more the profit. This statement is
untrue: the dependece between risk and profit is
non-linear.
Let us imagine there are only two outcomes in
our treading: losing the bet wit ha probability
100 - PctWin, or winning WinToLoss * bet size
with a probability PctWin. In this case the
mathematical expectation will be:
Expectancy = PctWin * 0.01 * WinToLoss - (1 -
PctWin * 0.01)
Suppose that the PctWin and WinToLoss
parameters are set and we can only control the
bet size. Let us then review the dependence
between profit and bet size after 100 trades
with different PctWin and WinToLoss values using
Monte Carlo modeling. To do this we repeat over
and over 100-trade series for every combination
of the bet size, PctWin, WinToLoss parameters.
The exact outcome (profit or loss) will be
determined by a random number generator.
Here is an example of implementing Monte Carlo
methods in TradeStation (the code for the
corresponding TradeStation signal is shown in
Appendix 1). Copy it to PowerEditor, create in
StrategyBuilder a strategy with this signal,
apply it to any plot and launch parameter
optimization in TradeStation as shown below.
Ill.1
This strategy will save to a file the profit
for all combinations of parameters and random
trade outcomes. One should keep in mind that the
number of bars multiplied by the number of
combinations mustn’t exceed 65536 (the maximal
number of lines in an Excel file). The Random
(100) function will generate an uniformly
distributed random value between 1 and 100. Then
the PctWin-Random will define with a PctWin
probability whether the given trade brings profit
or loss, and the profit size will be equal to
WinToLoss.
Then we can plot in Excel the plots indicating
the profit for the given parameters. For example,
let us recall the game played by scientists from
the previous article, where the bet won in 60% of
cases and lost in 40%. To plot the dependence
between average profit and bet size in that game,
we must:
- Launch in TradeStation an optimization of a
strategy by the PctRisk parameter = 5, 10, …, 90
with constant PctWin = 60%, WinToLoss = 1;
- Open in Excel the file
D:TS_ExportMTrading_MMII.csv;
- Enter the values of the parameters to be
optimized in column F and the following formulas
in column G:
=SUMIF (A$1:A$20860,"=5",E$1:E$20860)/COUNTIF
(A$1:A$20860,"=5")
=SUMIF (A$1:A$20860,"=10",E$1:E$20860)/COUNTIF
(A$1:A$20860,"=10")
etc.
We then will see a plot like shown in Ill. 2.
The shape and values of the curve may differ
somewhat in different runs, since random values
are random, but the profit will invariably first
rise and then descend as the risk grows.
All the multitude of money management
algorithms may be divided in two principal
classes: martingale and antimartingale.
Martingale methods state that the risk should
increase as the capital decreases. These methods
are popular with traders trying to extract profit
from a series of losses.
Let us review an application of martingale in
roulette. We bet 1$ on a color and every time we
lose, we double the bet. Next time after we win,
we start at 1$ again. If we lose 10 times in a
row, which may happen with a probability of
(19/37)^10 or 0,13%, we’ll have to bet $1024 to
win $1. Since in such a case the expected
profit/risk ratio is disastrously low, it is
often supposed that martingale methods may not be
used in trading. But, one should keep in mind
that in popular trend-following methods
But, one should be well aware that in popular
trend-following methods
1) profits are usually 2-3 times larger than
losses
2) series of small losses are typically
interspersed with large profits
So martingale methods in our opinion deserve a
serious study.
Antimartingale methods state the direct
opposite: the risk size should be increased as
the capital grows and decreased as the capital
decreases.
The known antimartingale methods advise to
risk a fixed fraction of the capital (fixed
fractional):
- Trade a constant number of stocks – with some
conditions this method can be considered an
antimartingale;
- Use the whole accessible capital;
- Trade one lot per X dollars on account;
- Divide the account into equal shares
corresponding to the assets traded;
- Risk a part of the capital;
- Take the risk in proportion to the traded
assets’ volatility;
- Use the Kelly method, optimal f anf their
variants.
The fixed ratio method by Ryan Jones can also
be considered antimartingale. This method states
that the relation of the number of stocks traded
to the capital gain necessary to increase the
number of stocks should remain constant. Ryan
Jones was so sure of his method’s advantages that
last year he resolved to break the World Trading
Cup record of Larry Williams standing since 1987.
Williams then increased this capital from $10,000
to $1,147 000 in a year of real S&P and T-Bonds
trading. Ryan Jones didn’t make it to 2000 year
winners, but at May 31, 2001 he was a sure leader
with a +226% result.
A positive aspect of antimartingale methods is
that they allow the account to grow in
geometrical progression.
The most popular method of
money management is no money management.
There are three variants of it:
1. Money management for
gamblers
This method includes
betting on a single trade all the accessible
capital wit the maximal allowable leverage. No
matter what the result, close the account and
leave either with 100% loss or with a profit
equal to
(Leverage *Profit_ in_ points *Price_ of_ a_
point /Initial_ deposit_ size – 1) * 365 /
Days_in_position
% per year.
Recommended for newbies
wishing for quick profits. This method is
especially good when using a leverage of 1:100and
higher: in the absence of a strategy with a
positive mathematical expectation this method is
optimal. The most important in this method is
understanding that the strategy is used once, as
luck only is exploited, not statistical
advantage, which according to the law of large
numbers can come true only in a large series of
profits and losses.
2. Fixed number of lots
This method states:
independent of the account state, always enter
the position with the same (usually an even)
number of lots.
Let’s apply this method to the
simplest model system known as the “dynamic
channel”: Buy one lot if the average day price
((high + low)/2) grows over its minimum by X
points;
Sell one lot, if the average
day price ((high + low)/2 falls under its maximum
by X points;
Subtract $1 from every trade
to account for commissions and slippage.
The code for this system with those
algorithms is shown in Appendix 2.
The results of trading a fixed
number of lots with $100000 starting capital and
0.66 margin are shown in Table 1 (here and below
the results are taken from TradeStation Strategy
Performance Reports).
Table 1. Fixed number of lots,
simplest system.
|
Number of lots |
Net profit |
Avg. profit/Avg. loss |
Average trade |
Maximal drawdown |
Profit factor |
|
100 |
33180 |
1.78 |
141.2 |
-41140 |
1.185 |
|
200 |
66360 |
1.78 |
282.4 |
-82280 |
1.185 |
Let
us remark that a further increase of lots
activates an implicit antimartingale money
management in one direction: we cannot open
positions larger than our current capital, so if
the capital dectreases, so will the position
size. When capital grows, the position size will
remain constant. So let us redefine the method as
follows: independent of the account size,
always enter the position with the same (usually
even) number of lots, if the current capital
allows that; otherwise enter the position with
the maximal possible number of lots.
Although this method is fairy safe, it
does not allow the account to grow in geometrical
progression, so we do not recommend using it.
3. «Bet it all»
This method states: use all
the available resources when opening a
position.
In other words, w open the
maximal possible position every time.
Let us review how results of
this method depend on the leverage with the
starting capital of $100000 (table 2).
Table 2. Results of
leverages when trading the whole
capital
|
Own capital/
invested assets |
Net profit |
Avg. profit/
Avg.loss |
Average trade |
Maximal drawdown |
Profit factor |
|
0.5 |
-
55586 |
1.49 |
-
236.5 |
-
1836149 |
0.993 |
|
0.6 |
28734 |
1.51 |
122.3 |
-
2064980 |
1.003 |
|
0.7 |
111598 |
1.52 |
474.9 |
-
1921994 |
1.015 |
|
0.8 |
170958 |
1.54 |
727.5 |
-
1643650 |
1.027 |
|
0.9 |
207034 |
1.56 |
881.0 |
-
1370108 |
1.041 |
|
1 |
225194 |
1.58 |
958.3 |
-
1136433 |
1.054 |
As you can see, even losing
just 4 cents per share in a trade when our
strategy is profitable, with a 2:1 or larger
leverage we eventually lose the entire capital!
This method increases
risk without an adequate increase of profit, so
we cannot recommend using it.
4. Number of lots per fixed sum of
money3
This metod states: trade
one lot per every X dollars on account:
Number of lots = Capital / Х_ dollars
For instance, if we’re trading one lot
per$1000, then, if we have $100000 on account,
then we can trade 100 lots.
The table 3 lists an example
of trading with different sums reserved for
trading on lot (starting capital again $100000
and margin 0.66)
Table 3. Results for trading a
number of lots per fixed sum of money.
|
$
per 1 lot |
Net profit |
Avg. profit/Avg.
loss |
Average trade |
Maximal drawdown |
Profit factor |
|
300 |
-
11042 |
1.49 |
-
46.9 |
-
701498 |
0.996 |
|
400 |
12484 |
1.51 |
53.1 |
-426394 |
1.007 |
|
500 |
27416 |
1.53 |
116.7 |
-306616 |
1.021 |
|
600 |
31244 |
1.55 |
133.0 |
-229446 |
1.033 |
|
700 |
34707 |
1.57 |
147.7 |
-184482 |
1.046 |
|
800 |
35460 |
1.59 |
150.9 |
-152288 |
1.057 |
|
900 |
35231 |
1.60 |
149.9 |
-128847 |
1.067 |
|
1000 |
34161 |
1.61 |
145.4 |
-110798 |
1.076 |
The problem
with the given method is that not all papers are
equal: one lot of AAA shares (100 shares) would
be quite different in its cost and volatility
from a lot of BBB shares (1 share). AAA’s
volatility is, say, 20% of BBB’s, and the
behavior of a pjrtfolio composed of those two
stocks will be 80% influenced by BBB and 20% by
AAA.
Another problem common for all antimartingale
methods is that the position size grows without a
direct proportion to the capital gain. I.e. if we
have a starting capital of $100 000 and buy one
lot per $1000, we must increase our account to
$101000 to increase the position size by one
unit. Yet if our capital is $1 000 000 we must
increase the account to $1001000 to increase the
position size by one unit (just 0.1%). So the
account grows much slower with a small starting
capital.
The method’s advantage is that a trade will
never be rejected as being too risky – but again,
in some cases this may turn out to be a
disadvantage.
5. Equal parts
This is a popular trading method that states
to divide the capital in equal parts according to
the number of assets traded.:
Number of lots = Capital /
(numer_assets * price_of_asset)
This method assigns an equal weight to all
papers in the portfolio and so avoids the
previous’ disadvantage. For instance, with
$100000 on the account and trading 6 shares
without a leverage, we could buy 15 lots of AAA
and 50 lots of BBB. Yet the disproportion
between the position growth and capital growth
in this method persists.
6. Percentage of
risk
The risk per unit of
assets shall be defined as the absolute
difference between position
entry point and the stop-loss
exit, multiplied by the number of lots. The
method states that the initial risk for the
position should be equal to a fixed fraction of
the capital:
Number of lots = % risk * Capital /
initial_risk_per_unit_of_assets
For instance, we have a capital of $100000 and
do not wish to risk more than 1% of it per trade,
i.e. $1000. The simple trading system reviewed
here generates a signal to pen a position in the
other direction as soon as the average day price
deviates from its extreme value by 4 cents or
more. This defines o as $4 per lot (100
shares*$0.04) which limits our position size to
250 lots.
Table 4 lists an example of
using the “% of risk” method with different parts
of the capital in percents at risk (initial
capital $100000, margin 0.66)
|
%
risk |
Net profit |
Avg. Profit/
Avg.loss |
Average trade |
Maximal drawdown |
Profit factor |
|
0.1 |
11649 |
1.73 |
49.6 |
-18308 |
1.151 |
|
0.2 |
21838 |
1.68 |
92.9 |
-43026 |
1.123 |
|
0.3 |
29369 |
1.65 |
125.0 |
-73955 |
1.097 |
|
0.4 |
34161 |
1.61 |
145.4 |
-110798 |
1.076 |
|
0.5 |
35460 |
1.59 |
150.9 |
-152288 |
1.057 |
|
0.6 |
34017 |
1.56 |
144.8 |
-197807 |
1.042 |
|
0.7 |
29459 |
1.54 |
125.4 |
-245598 |
1.028 |
|
0.8 |
21939 |
1.53 |
93.4 |
-293086 |
1.017 |
|
0.9 |
12231 |
1.51 |
52.0 |
-339099 |
1.008 |
|
1 |
600 |
1.50 |
2.6 |
-403935 |
1.000 |
So with a risk of
over 1% we’d get into negative figures. Betting a
set percent of the capital, against our
expectations, did not bring any substantial
improvement. This can be explained by the fact
that the level of the price correction in
relation to extreme value (and consequently the
risk) has been expressed in absolute values
instead of relative. So next we try to change the
system rules to:
Buy 1 lot if the day average
price ((high + low)/2) grows by X percents or
volatility units above its maximum.
Sell 1 lot, if day average
price ((high + low)/2) falls by X percents or
volatility units under its maximum.
We suppose this may produce a major
improvement in relation to the previous methods
and leave the idea for the readers to explore.
7. Percent of
volatility.
Volatility is a measure of
the prices’ movement for a certain period of
time. It can be described by various means, among
which the most frequently used is the average
range
Volatility = Average(Range, Period),
Average true range ATR (an in-
built TradeStation function AvgTrueRange) by W.
Wilder,
or historic volatility
HistVolatility = 100 *StdDev(Log(Close / Close
[1], Period) * SquareRoot(365).
The method states to set a volatility for
every position in relation to a fixed fraction of
the capital:
Number of lots = % volatility * Capital /
Asset_volatility
For instance, we have a capital of $ 100000
and wish to buy AAA stocks. The average true
range for several days was $0.1 or $10 per lot.
If we limit the volatility of our account to 10%,
then we can buy a maximum of 1000 lots. Thus we
can control the possible fluctuations of every
element of the portfolio.
Let us apply thepercent-of-volatility method
to the same conditions (stock trading with a
starting capital of $100000 and a 0.66 margin).
We advise you to get ready for a shock as you
read the next Table 5.
|
%
of volatility |
Net profit |
Avg. profit/
Avg. loss |
Average trade |
Maximal drawdown |
Profit factor |
|
1 |
161683 |
2.11 |
688.0 |
-83663 |
1.407 |
|
2 |
431088 |
1.90 |
1834.4 |
-389217 |
1.268 |
|
3 |
764100 |
1.76 |
3251.5 |
-
1118840 |
1.175 |
|
4 |
1049214 |
1.67 |
4464.7 |
-
2420524 |
1.113 |
|
5 |
1155627 |
1.61 |
4917.6 |
-
4214557 |
1.070 |
|
6 |
1017980 |
1.56 |
4331.8 |
-
6088767 |
1.041 |
|
7 |
691490 |
1.53 |
2942.5 |
-
7407768 |
1.022 |
|
8 |
317292 |
1.51 |
1350.2 |
-
7595240 |
1.009 |
|
9 |
33120 |
1.50 |
140.9 |
-
6488492 |
1.001 |
|
10 |
-
101592 |
1.53 |
-
439.8 |
-
5948430 |
0.997 |
Compared to trading 100 fixed lots the net
profit (with 1% volatility) increased almost five-
fold while the maximal drawdown only doubled. The
relation of avg. profit to avg. loss and the
profit factor increased by 19%. With 5%
volatility the net profit for the same trades
increased 35 times!
We can also limit the overall volatility for
the whole portfolio for the given moment. For
instance, if we limit the portfolio volatility to
10% and the volatility for separate positions to
2%, we can simultaneously open positions in 5
stocks.
The percent of risk and percent of volatility
methods may be used as filters to detect and
reject trades with a high risk.
Speaking of the
antimartingale methods’ advantages
in general, we can make the following
conclusions:
While risking a larger part of
the capital, we allow the account to grow in
geometrical progression.
- Risking a small part of
the capital, we protect the account from
significant damage.
Concerning the general
disadvantages of antimartingale methods,
we can conclude that:
Risking a larger part of the
capital, we are prone to large losses.
- Risking a small part of
the capital, we do not allow the capital to grow
quickly.
- The positions grow
disproportionally to the capital growth.
Next time we are going to
discuss the newer and more efficient methods of
money management including the Fixed Ratio, the
optimal f and the algorithm used by Larry
Williams for his record-breaking achievement.
|
{*************************************************
***
Monte-Carlo
Simulation Signal.
Copyright (c) 2001
DT
***********************************************
*****}
Inputs:
PctRisk(10), {% риска от текущего капитала,
0-100}
PctWin(50), {% выигрышей, 0-100}
WinToLoss(2) {отношение
выигрыш/проигрыш};
Vars: Win
(0), Count(0), Expectancy(0), Equity(1), Str
("");
if CurrentBar = 1 then FileDelete
("D:TS_ExportMTrading_MMII.csv");
Expectancy = 0.01 * PctWin * WinToLoss - (1 -
PctWin * 0.01);
if Expectancy > 0 then begin
Equity = 1;
for count = 1 to 100 begin
value1 = Random(100);
if PctWin - value1 > 0 then
Win = WinToLoss else
Win = -1;
Equity = Equity * (1 + PctRisk
* 0.01 * Win);
end;
Str = NumToStr(PctRisk, 0) + "," + NumToStr
(PctWin, 0) + "," + NumToStr(WinToLoss, 2) + ","
+ NumToStr(Expectancy, 2) + "," + NumToStr
(Equity - 1, 2) + NewLine;
FileAppend
("D:TS_ExportMTrading_MMII.csv", Str);
end;
|
Appendix 1.
|
{*************************************************
***
The
Simplest System #2 with Money Management.
Copyright (c) 2001 DT
**********************************
******************}
Input: Price((H+L)*.5), PtUp
(4.), PtDn(4.);
Inputs: MM_Model(0), {0 = MM
absence, 1 = MM for gamblers; 2 = MM units per
fixed money; 3 = Equal Units; 4 = % Risk; 5 = %
Volatility}
MM(10), {MM
parameter}
InitCapital
(100000), {Initial capital to trade}
Marg(.66);
{Margin percentage}
Vars: MP(0), Risk(0), Num(1),
Equity(0), OpenAssuredProfit(0);
Vars: WinP(0),AvgW(0),AvgL(0),
Kelly(0);
Vars: Marg1(0),
{Margin}
Lots(0),
{Number lots in a
margin, determined by Delta}
Equity_0(0),
{Initial capital to
trade one lot}
FRDelta
(0);
Vars: LL(99999), HH(0), Trend
(0), Volat(TrueRange);
MP = MarketPosition;
Volat = .5 * TrueRange
+ .5*Volat[1];
if MP <= 0 then begin
if Price < LL then LL
= Price;
if Price cross above
LL + PtUp*.01* BigPointValue then begin
Trend =
1;
HH =
Price;
end;
end;
if MP >= 0 then begin
if Price > HH then HH
= Price;
if Price cross below
HH - PtDn*.01* BigPointValue then begin
Trend = -
1;
LL =
Price;
end;
end;
If trend = 1 then Risk = PtDn
{+ Slippage};
If trend = -1 then Risk = PtUp
{+ Slippage};
OpenAssuredProfit = MaxList
((Trend*(close - EntryPrice) - Risk)*Num, 0);
Equity = (InitCapital +
NetProfit + OpenAssuredProfit); {Reduced Total
Equity}
if MM_Model = 0 then { Equal
lots}
Num = MM;
if MM_Model = 1 then { All
Resources}
Num = Floor
(Equity/Marg/close);
if MM_Model = 2 then { MM
Units per Fixed Money }
Num = Floor
(Equity/Marg/MM);
if MM_Model = 3 then { MM
Equal Units }
Num = Floor
(Equity/Marg/close/MM);
if MM_Model = 4 then { % Risk
Model }
if Risk <> 0 then
Num = floor
(MM*Equity *.01/Risk/Marg);
if MM_Model = 5 then { %
Volatility Model }
if Volat <> 0 then
Num = floor
(MM*Equity *.01/Volat/BigPointValue/Marg);
if Num < 1 then Num = 1;
if Num > Equity/close/Marg
then Num = Equity/close/Marg;
{ Entries}
if trend = 1 and trend[1] <> 1
then buy("LE") num contracts at market;
if trend = -1 and trend[1] <> -
1 then sell("SE") num contracts at market;
|
Appendix 2.
|