Showing posts with label Money Management. Show all posts
Showing posts with label Money Management. Show all posts

Sunday, August 5, 2018

Kelly Criterion - Money Management on Steroids

0
This is an analysis of the Optimal Risk for my y48 system trades, calculated as per the Kelly Criterion.

I have been trading the y48 Trading System since May 28th. The details and statistics of the y48 trades are available on my Trading Stats page.

The chart below shows the continuously calculated values of Optimal Risk based on actual trades. There are 3 lines:
  1. The Green Line shows how the Optimal Risk varied for Long Trades.
  2. The Red Line shows how the Optimal Risk varied for Short Trades.
  3. The White Line shows how the Optimal Risk varied for All Trades - both Long and Short.

Optimal Risk as per Kelly Criterion
Optimal Risk as per Kelly Criterion

 
The Optimal Risk as per Kelly Criterion is calculated based on 2 parameters - the Win Rate, and the Payoff Ratio. The Optimal Risk is percentage of capital to be risked to maximize capital gain. I had posted earlier about the Kelly Criterion.

The continuously calculated value of the Optimal Risk has varied drastically since May 28, as seen in the chart.


Maximum
Value
Minimum
Value
Last
Value
Long
Trades
49.07%
May 31
-1.92%
Jul 23
11.69%
Aug 03
Short
Trades
69.65%
Jun 15
2.10%
May 31
28.00%
Aug 03
All
Trades
53.61%
Jun 04
14.76%
Jun 22
18.35%
Aug 03


So, as of today, if I expect the performance of the y48 trading system to remain the same as since May 28, I should optimally be risking 18.35% of my capital in each trade. Ideally, if I had risked this Optimal Fraction for all my 64 trades from May 28 to Aug 03, with a 50% Win Rate and Payoff Ratio of 1.58, my Return on Capital would have been 426%.

Even better, if I had risked 11.69% of my capital on each long trade, and 28% of my capital in each short trade. So, if I had risked accordingly on the 37 long trades and 27 short trades done between May 28 and Aug 03, and assuming that the win rate and payoff ratio would have remained the same for the longs and shorts, my Return on Capital would have been 504%.

y48 is just an average trading system - profitable, but nowhere close to some of the better trading systems. However, when boosted by the steroid of Kelly Criterion, even an average trading system can give superlative returns. Are you ready to ride the highs (and the lows)?

Well, my returns with the y48 system have not been as good.... but though considerably lower, they have been very very good. That is because, I obviously did not risk this exact calculated percentage of my capital (obvious, since it is a hindsight calculation). Also, I did not actually compound my capital, since I use a slightly mellower version of Money Management. And, there is small matter that I have not considered brokerage and other costs for these calculations. Those costs would have brought down the value of Optimal Risk by a couple of percentages.

I actually risked between 15% to 35% of my ledger balance in each trade. My ledger balance is just one part of what I define as my trading capital. Currently, I work out my the balance to be held in my ledger based on a convoluted formula that also considers my total liquid funds. That really takes the edge off the Steroid - it mellows of the effect of Kelly Criterion to a tolerable level. But more on that later.....





Read Full Post »

Sunday, September 10, 2017

% The Evil Percentage %

0
Language shapes our perceptions. It is almost impossible to express and develop ideas that are not expressible in language. To progress beyond limitations of current thinking, it would be necessary to move beyond current notations. Mathematical notations are one example of the how ideas can be developed further beyond the confines of current language.

There are also self-inflicted constraints that we impose on ourselves to restrict our thinking. Our value systems, our education, traditions, our sources of information bias us to think in a certain way.....

The evil percentage
The evil percentage   source:custom-it.fr


For years, I have been using Win % to evaluate the performance of trading systems. That is perhaps the most common way to indicate the Win-Loss Ratio. However, it is also terribly misleading to indicate Win-Loss Ratio with a Win % - at least to me. Nowadays, I always translate the % into a ratio, and that helps me a lot.

Here are a couple of posts that I had earlier posted in the Bakwaas Trading thread of the Traderji forum.


The importance of the win rate


I am treating this thread more like a scratchpad... So, I am putting out another of my half-baked thoughts here.

For the purpose of this post, I am ignoring Risk-Reward Ratio, which everyone knows is a very important factor in determining a trader's happiness.

Let's say that there are 2 systems - the first has a win rate of 49% and the second has a win rate of 51%. A 2% difference in win rate is not much.

But if you think about it, the first system will win 0.961 times for every loss. The second system will win 1.041 times for every loss. The values calculated as win%/loss% = win%/(100%-win%). So, the second system has a (1.041/0.961) = 1.083 better chance of producing a winner than the first system.....

Restating, a system with a 51% win rate is 8.3% better at producing winners that a system with a 49% win rate. Just a 2% difference in win rate gives me a 8.3% better chance at happiness :)

Take a system with a 45% win rate, and another with 50% win rate. The 50% win rate gives me a 22.2% better chance at happiness than the 45% win rate.

Similarly....

50% win rate --> gives 50% more happiness than --> 40% win rate
60% win rate --> gives 50% more happiness than --> 50% win rate
60% win rate --> gives 125% more happiness than --> 40% win rate
50% win rate --> gives 133.3% more happiness than --> 30% win rate
50% win rate --> gives 200% more happiness than --> 25% win rate
50% win rate --> gives 300% more happiness than --> 20% win rate
10% win rate --> gives 111.1% more happiness than --> 5% win rate
99% win rate --> gives 102% more happiness than --> 98% win rate

and finally,

100% win rate --> gives infinite times more happiness than --> 99% win rate

See... we have scientifically proven that trader's nirvana can be achieved by 100% win rate.

With a higher win rate, the chances of prolonged drawdowns reduces, and so does your blood pressure. With a 100% win rate, you could practically be dead.

Perception


Continuing my blabber from my previous post.... a casual look at win rate of 49% or 51% does not indicate that the impact between the 2 win rates could be more than 2%, like it actually is. Instead, would it have been better to state that the wins-to-loss ratio are 0.961 and 1.041 respectively?

Nowadays, for my trading systems - whether live or backtesting, I use the terms "plus" and "minus", instead of "win" and "loss". Even, when I use the terms "win' and "loss", like in the previous posts, internally I am translating them to mean "plus" and "minus". A "minus" does not give me the same feeling as a loss. It's not a defeat, it is just something that is expected in this business of trading, well anticipated after backtests and simulation. Similarly, a "plus" is not a win, a triumph. Unlike a "win", a "plus" is not going to give me a heady rush of adrenaline that wrecks my psychology. "plus/minus" keeps me calmer emotionally than "win/loss".

I am not very satisfied with the terms "plus" and "minus", but for now they will do - until I am able to expand my vocabulary, or ideate better. In George Orwell's book "1984", Big Brother's party invents Newspeak - a version of English with reduced vocabulary, concepts and rigid structure - just to prevent people from thinking anti-party thoughts. If you don't have the vocabulary to think thoughts, how will you think, communicate and take ideas forward?

So, here, I am trying my own Newspeak, just to get my thoughts and ideas in the right direction (though I am never sure about the direction being right). For now, I can think of viewing "win" rates differently, and "plus/minus"...

Read Full Post »

Friday, October 21, 2016

Kelly Criterion - Position Sizing to Maximize Returns

3
Recently (since August 30th), I have started using the Kelly Criterion to decide the position size of my day trades. I have known about the Kelly Criterion for a long time, but have only had the confidence to use it now.

Why now? 'Cause, I have spent hours on backtests, and finally seem to have arrived at a trading system that gives consistent results over a few years, and gives me enough confidence to decide the p and b needed to calculate the position size according to the Kelly Criterion.

How confident? We will come to that later...


Kelly Criterion (Wikipedia link)


f = ( p * ( b + 1 ) -1 ) / b


where,
f = optimal fraction of capital to be risked to maximize long term gain
p = probability of winning (Win %)
b = expected reward per unit of risk (Risk to Reward Ratio)

As long as you know your p and b, risk f.


Kelly criterion - Why NOT?

 

Open any article about Kelly Criterion - not excluding the Wikipedia article - and you will find many reasons/arguments given to avoid Kelly Criterion. These include everything from the fact that you cannot predict the future, to the gambler's/trader's tendency to overestimate system performance, to reducing volatility of returns, to expected utility, to etc. etc. etc....

Also, to not incite novices and gamblers to risk ruin. (My risk disclaimer is at the bottom of this page)

From what I understand, I think that the Kelly Criterion was originally designed to determine the optimal bet sizes in scenarios where you know/assume the odds and probabilities. How do you apply it to markets that are dynamic? How do you determine the odds and probabilities? (The odds part may not be an issue for systems that have predetermined entries, stops, and targets)


Kelly criterion - Why not?!! 

 

Below, is an example that I had earlier posted in the Bakwaas Trading thread of the Traderji forum...




For example, if a system has a Win % of 50% and Risk to Reward Ratio of 1.6, then the optimal risk according to the Kelly Criterion is 18.75% of compounded capital on every trade.

- If we risk 19% per trade, then after 100 trades, the capital will be 15.42 times the initial capital (1442% return on capital)
- If we risk 18% per trade, then after 100 trades, the capital will be 15.36 times the initial capital
- If we risk 15% per trade, then after 100 trades, the capital will be 13.87 times the initial capital
- If we risk 10% per trade, then after 100 trades, the capital will be 8.61 times the initial capital
- If we risk 5% per trade, then after 100 trades, the capital will be 3.61 times the initial capital
- If we risk 2% per trade, then after 100 trades, the capital will be 1.76 times the initial capital (76% return on capital - not too bad)
- If we risk 1% per trade, then after 100 trades, the capital will be 1.34 times the initial capital (34% return on capital)

Oh, I forgot to mention what happens when we increase the risk beyond the optimal %.

For the same parameters as above,

- If we risk 20% per trade, then after 100 trades, the expectancy is that capital would be 15.25 times the initial capital
- If we risk 25% per trade, then after 100 trades, the expectancy is that capital would be 11.47 times the initial capital
- If we risk 30% per trade, then after 100 trades, the expectancy is that capital would be 5.86 times the initial capital
- If we risk 40% per trade, then after 100 trades, the expectancy is that capital would be 0.45 times the initial capital (55% loss of capital)
- If we risk 50% per trade, then after 100 trades, the expectancy is that capital would be 0.01 times the initial capital (99% loss of capital)
- Risk above 50%, then after 100 trades or lesser, and have the expectancy of losing 100% of your capital!!

 Would I not choose a 1442% return over 76% return? Why not?!!


Anti-Kelly reasons (excuses?) 

 

The problem is that we are unsure of the future win % and RR ratio of trading systems. I guess that is the reason most books recommend 1-2% risk.

The return with 19% risk looks grand... but there could be practical difficulties.

1. Will the Win % and RR ratio of the system hold into the future?
2. What happens when the system hits a continuous losing streak? According to calculations, we should still continue to risk the optimal risk %, if the system will get back to the Win % and RR ratio in future.
3. Margin requirements may limit position size, and not allow optimal risk.
4. The market/s may not have sufficient liquidity to allow compounding of position size.
5. With increased position size, slippages and fills may be affected. This will also impact the Win %, RR ratio, and % of Capital risked.

Points 4 and 5 only become relevant when the position size increases significantly. For a small trader, only question 1 to 3 are relevant, and the answer is that we should try to risk close to the optimal risk to get better return on capital. Notice that even if the system performance deviates slightly, the optimal fraction will only vary slightly.



p and b - The indispensable criterion to apply the Kelly Criterion


Read the formula again.

It says that for a given p and b, risk f
Risk f, only if you know p and b
If you do not know p and b, you cannot find f.

f = ( p * ( b + 1 ) -1 ) / b


where,
f = optimal fraction of capital to be risked to maximize long term gain
p = probability of winning (Win %)
b = expected reward per unit of risk (Risk to Reward Ratio)





Read Full Post »

Friday, November 27, 2015

The Power of Compounding

0
Yes, it's the very same thing that we all learned in school. However, in the heat of trading, we tend to forget this simple principle. So, here's a reminder. Consistently earning even a few points everyday will make a trader rich.

Below, I am pasting verbatim what I posted on the topic on my thread in Traderji. Note the need to deploy full capital to get the results indicated. As mentioned in the post, a high win % and low risk per trade would be great. However, I am now thinking that high Recovery Factor and low risk per trade would be a better criteria to give the confidence to deploy maximum capital.

Recovery Factor = (Net profit) / (Maximum system drawdown)

The Power of Compounding

NF is at 7700. If you are able to net 10 points per day, then you are earning 3.24% on margin on MIS basis, and 1.62% on NRML basis.

If you have a high win %, and low risk per trade, and deploy full capital on each trade, then with NRML your capital would have multiplied 24 time in an year. With MIS, then your capital would have multiplied 588 times.

I am assuming that you are able to trade 200 days in a year.

If you earn 0.1% of capital everyday, compounding your capital will make it 1.22 times after 1 year.
If 0.2%, 1.49 times.
If 0.3%, 1.82 times.
If 0.5%, 2.71 times.
If 1%, 7.32 times.
If 2%, 52 times.
If 3%, 369 times.
If 4%, 2550 times.
If 5%, 17292 times.
If 6%, 115125 times.
If 7%, 752931 times.
If 8%, 4838949 times.
If 9%, 30570292 times.
If 10%, 189905276 times.

Get the drift? Now don't find excuses. Just do it  emoticon-tongue-src-wikimedia



Read Full Post »