Monday, February 4, 2013

Coin Flips, Risk to Reward Profile and Creating Your Own Synthetic Security


“Cut your losses short and let your winners run”
 “Picking stocks is the easy part.  The hardest part is managing your trade and your emotions.”
 “The certainty of misery is preferable to the misery of uncertainty”
 Size matters…”

There is an interesting thread discussing the fallacies behind the coin flip theory and the law of large numbers.  The opening post says:

Assuming no slippage and commission (an ideal world) and you have a 1:1 risk reward profile the odds of you winning are 50%. You can flip a coin randomly in the market and you would win 50% of the time. After a couple of hundred trades flipping a coin you would be break even on ticks (again assuming no trading costs).

HOWEVER, if you risk 1 to make 2 the odds are not 50/50 because you are expecting the market to move twice as far in your favour to make a profit. To use the coin example again, 1:1 risk reward is a 0.5% chance of winning. However a 1:2 risk reward the odds of you winning are 0.5 x 0.5 = 0.25% chance of winning.

Only problem is that the conclusion is incorrect.  A 1:2 risk reward gives a winning percentage of 33% assuming completely random outcomes of a security.  Let's figure out why.

If we assume a fair coin and a heads is a win in the market and a tails is a loss in the market, then a 1:1 risk to reward profile would leave us at break even as the number of coin flips approach infinity because eventually your losses will equal your wins (insert the standard disclaimer that we aren’t going to consider commissions and slippage).

The second paragraph then applies a little conditional probability.  Conditional probability is the probability that something will happen given that something else has already happened.  Thus, the probability of getting 2 heads in a row is the probability of getting a head followed by a second flip where you also get a head.  We can either find this out using a formula or through Monte Carlo simulation.  The post is correct that the odds of getting two heads in a row is 50% x 50% = 25%.

If we are to assume a completely random market, then there is an independent and equal chance that the market will either go up a tick or down a tick over the next time increment. Recall that a tick is the smallest movement that a security can move in the market.  In a random market, one tick would also have to be independent and distinct from the previous tick.  That is, tick 2 is not dependent on the outcome of tick 3.

The beauty of Excel is that we can create our own random data.  Check out a couple of screenshots of a “synthetic” security I created that has a starting value of 2000 and a tick size of 0.25.  Over 1000 time increments our “security” looks like this:


OR it looks like this:




For an excellent read on how to construct your own Excel file with a “synthetic” security, check out Coin Tosses and Stock Price Charts by Timothy R. Mayes, Ph.D.

What if we randomly enter our synthetic security both long and short and we don’t exit our position until either one of two things happens:  (1) we get stopped out (consider this our “risk”) or (2) we hit our profit target (consider this our “reward”).  Let’s go back to the original post – remember, it stated that at a 1:1 risk to reward, our winning percentage would be 50% and at a 1:2 risk to reward, our winning percentage would be 25%.  Since our synthetic security’s price is based on the “flip of a coin” is it reasonable to assume that our winning percentage both long and short is then going to be equal to 25% using a risk to reward profile of 1:2?

Turns out that the assumption is not correct.  I created a Monte Carlo Simulation in Excel of a synthetic security that had 1000 ticks.  Whether it was an uptick or a downtick was completely random, i.e., there was an equal chance that the security would tick up or tick down over each time increment.  The simulation was run over 500 trades – long or short entry was random.  The trade was either stopped out or hit its profit target.  I repeated these 500 trades 20 times for a total of 10,000 trades. 

For a 1:2 risk reward profile, the results are below for 20 trials of 500 trades:


Based on 10,000 trials, the average winning percentage is 33% with a standard deviation of 2.8%.  But wait, isn’t there a better way of determining this?  Yes, grasshopper, there is.  And it is called Expectancy. 

Expectancy  = (Avg Win * WP) – (Avg Loss * (1 – WP),

where,

WP = Winning Percentage

A positive expectancy means that you have a profitable trading system, ie, for every dollar risked, you can “expect” a certain amount back on average over the long run.

The formula to find the minimum WP for a “break-even” expectancy system is:

Breakeven WP = 1 / (W/L + 1),

where,

W/L = Win Loss Ratio (or risk to loss ratio).

So the Min Winning Percentage for a positive expectancy system with a risk to loss ratio of 1:2 is

Min WP = 1/(2 + 1) = 1/3 = 33%!

Keep ya mind right.




1 comment: