A Real Trading Edge, Quantified: Trading and Stop Management

I thought I would post here some analysis that I performed earlier this year on pivot points. I did post this on another forum and had intended to follow it up with further work, but haven’t yet found the time to do that follow up work.

My analysis started to consider if there was a pattern in what pivot levels get hit when the daily open is above or below the pivot point. That is, is there a propensity for price to fall, if the daily open is below the pivot point, or rise if it open above the PP. I then went on to calculate the % probabilities that pivot levels will get hit.

The data was taken from my broker and was for EURUSD between 1/1/2000 up to 17/1/2013.

Here is a screen shot showing the spreadsheet of results (I have also attached the spreadsheet in the zip).


The way to read this is as follows:

The first column lists the level we are referring to and the “Hit” Column is how many times that level was hit. So the green highlighted cell is the beginning of the row for the pivot point (daily pivot). The yellow cell is simply the number of hits there were. So out of 1672 days where the DO > PP, the pivot was actually hit 1319 times. The rest of the “Count” cells tell you how many times other levels were hit AFTERwards. So for this example row, we are referring to the PP. These are the useful numbers.

For example, the blue cell tells us that after the PP was hit, price went back to R1 514 times and the dark orange cell tells us price went to R2 244 times.

Note that the pink highlighted cell is zero. When a level is hit, I don’t count further hits to that level. So if price hit the PP, then to R1 and then went back to the PP, we don’t capture that second PP hit. So, the value for PP on that row is zero.

There are also a whole bunch of percentage columns which I find a better number than just looking at raw hits. They are more telling.
Using the same example from above, we can see that after the PP has been hit, price went back to R1 38.9% of the time but price only went to R2 18.5% of the time.

Those percentage are sometimes quite revealing. So for example we can see that the Pivot is hit nearly 80% of the time!

I hope that this type of analysis is what the OP was looking for in this thread. It is certainly not a trading system, it is however some analysis that could perhaps be useful while considering entries and/or exits in an existing strategy.

EURUSD Daily Pivot Point 2000.01.01 - 2012.12.30 Bars 2013.01.17 17.15.zip (1.11 KB)

Jedster - great insights here, thanks for sharing. I did something like this years ago on % of times price bounces off the previous weeks high or low based on where the open price was in relation to pivots on GBPUSD. I remember that if you ran the numbers for each day of the week and eliminated the poorer days, (Fridays), the probabilities increased. Would be interesting to see your stats for each day of the week …
Also what TF for testing did you use?
Lastly what package did you use?

Hi,

This was calculated using an EA that I wrote for MT4 and it uses the 1H timeframe. Originally I wrote it to look at pivot levels on an hourly basis. I was looking to trade reversals at pivot levels using binaries, hence I needed to know what would happen within an hour of a pivot level being hit. I then changed it to calculate the daily stats, but it still uses the 1H TF as its data source.

Note, it is possible that, if within a 1H candle, price moved very rapidly from one level to another and then back again, that information would be lost. I separately looked into that and determined it only happened twice over all the data, so 1H was accurate enough for my requirements.

I haven’t broken it down into days of the week, yes that could be interesting. Like I said, There were a bunch of things I wanted to follow up on, like using a simple ADX indicator and seeing if the stats were different when the ADX said it was trending/ranging, etc. Not just throwing any old indicator into the mix, but trying to use something that would add some value and was relatively quantifiable. Days would certainly be one of them. Plus also, hits on S3 and R3 are relatively few. So, I wondered if the day following an R3 or S3 had a different pattern. Like I said, lots of things to follow up on, unfortunately, not enough time…

Glad to see others are continuing this thread with solid work. Good job, hope to see more of it.

In the spirit of the original monkey dart board post, I read this article yesterday about win ratios vs. profit/loss ratios seen from the brokers side. The dataset is about 12 million trades over 2 years and quite nicely hammers in the idea that the equivalent value of a trade over time, must be positive for each trade to be successful.

What is the Number One Mistake Forex Traders Make? | DailyFX

Additionally, if you have the % win rate for the system, you can calculate the exact number of losing trades that system will be able to show. That is genuinely helpful for those bad streaks where you start doubting everything about the system and yourself.

The equation is Losing streak = ln(# of trades)/-ln(probability of a loss trade)
Where
ln is the natural logarithm. It says LN on my calculator.

of trades is the total number of trades done. In other words, your sample size.

Probability of a loss trade is you loss percent rate.

For the original example, when using the 1:3 profit ratio, the formula would look as follows:
427 total trades taken.
26.463 % win rate = 100% -26.463% = 73.537% loss rate.

Max losing streak = ln(427 total trades) / -ln(1-0.26463)
Max losing streak = 19.70445 continuous loses.

That is one evil system if you have to take 20 consecutive loses in a worst case scenario.
But that doesn’t make any difference to its profitability over those 427 trades.
So in short, if you are sitting in a drawdown wondering if you’re really just one of those unlucky bastards hung up on a crap system, make this calculation and see if something is wrong or the performance is within expectations.

And no, you don’t need 10000 trades before you’ve got adequate sample size. Doing this calculation on 20 trades done might not be indicative of the systems long term performance, but you will get accurate losing streak calculations within that sample size.

I’m not sure I would agree with that. I think it is perhaps a little dangerous to try to calculate a hard and fast figure to encapsulate the randomness of probability.

I have a spreadsheet I often use to quickly show what the equity curve might look like (using just strike rate and profit factor). With a strike rate of only 26%, losing streaks were much higher than 19, they were well into the 20’s and in some cases were 30+. What would you do then? If your max losing streak has been calculated at 19, but you just hit a losing streak of 34 trades! It doesn’t necessarily mean the system is a failure because with a suitable profit factor, the system could still be profitable. However, if you are expecting a potential losing streak of only 19, then you might be tempted to quit when the system could still turn itself around in the longer term.

It would be a brave man who carries on and trusts a system when it has losing streaks of that many trades. That said, this system would likely have relatively high drawdown, and some people are comfortable trading with high drawdown systems because they know that the payoff would be high when they eventually get their good trades.

I understand what you’re saying. The reaction of humans to randomness is often explained with the rat experiment getting food from random pushes on a button. It turns into addiction. Though somehow we need to know when the market has changed sufficiently so that the strategy don’t work any-more.

If the math is wrong, I’d love to see the correct equation.

It’s not that I think the maths is wrong, I just think that you are trying to give a “Maximum” to something that is inherently random and hence, it is not really possible to accurately determine a maximum.

What you could do is run a test say, 1000 (or maybe even upto 1,000,000) times and each time, capture the loss sequences. You would then plot a graph showing your typical range of losing sequences. I’m guessing that the graph would be normally distributed and you could then use this as part of your analysis as to whether the trading strategy was viable or not. You would know what is a “typical” likelihood of hitting losing steaks of 10,20 or 30 losses in a row.

The above method is what i use, monte carlo simulations. but the formula above posted by filson is based on a normal distribution, returns are not normally distributed, so the exact max is probably going to be wrong. However its better to have benchmark that is showing you when to stick with a system. most people would have given up by 10th consecutive loser, even though the system is still performing inside statistical norms.

So how many people can handle 30 loses in a row in a live account, my guess is very few . There must be a selected few traders with such mental strench that can do that.

I don’t believe that most people new to trading have access to the backlog of the systems they test nor the skill to thoroughly test their own theories through such automated means. Most just go for “win chance”, hence the equation. I hope its an aid to those.

100% agree that equation is an easy to use benchmark that will help people understand what is within statistical norms. It may not be exact but its going to be better than what most people do is just quit after 5-10 losses, when their system may have an edge and they just never get to see it materialize. Good work.

Being a little bold and continuing with the previous equation of possible consecutive losing trades, it’s also possible to calculate your risk % per trade.

If you already know how many negative trades you can expect, next question should be “how many % drawdown can you stomach?”. If you can calculate that the system is going to, at some point, throw at least 20 negative trades at you, does trading 5% per trade work?

Well 20*5% is 100% meaning the account is broke, so no.
Figure out your max. mentally tolerable drawdown and divide that by the amount of negative trades in a row. Drawdown in % / losing streak = Risk per trade. If the original 3:1 system, in your opinion can have a maximum drawdown of 15% then your risk per trade should not be higher than 0.75%. That’s a ridiculously small amount of risk if you want to go from a $100 account to making a living of profits in 3 months, but that would be the way to execute your system.
If you picked a higher risk, you would set yourself up to fail with mathematical precision.

Very true, it does come down to that.

Hi all, newbie question. When you say "stay away from market’s noise when placing your stop losses’, does it have to be with number of swings by a certain “swing spread” in which the biggest chunk is at the begging of the chart where movements are a small amounts of pips being this “noise”. If that’s the case, is “noise limit” advised to be calculated strictly? or it’s just more a piece of advice about not placing stop loss near initial price so position has space to “breath” beyond market’s noise?

ZOMBIE REPLY:

the noise distance is calculated strictly, given the rules of calculation in the post. It is mostly used to show that most people who are new or unprofitable tend to place stops too close to the current price and/or inside the noise zone in which case getting stopped out is in fact highly probable or has a negative influence on their +ev. You can adjust my calculations in order to determine which time frames or look back period is best for your trading and determine the noise buffer zone as needed.

I am reviving this thread for a single reason. I have received a lot of PMs regarding quantitative trading, research and development. To be perfectly honest, i have taken a hiatus from BP. This is due to, put bluntly, the fact I think that this place has degraded in quality of productive and accurate trading conversation, and quantity of good posters. A few BPers whose names I recognized from long ago have msged me regarding my methods and advice. I am bringing this thread back to see if there is any current interest in me continuing to post my research.

I want to put it out there that [B]not all research ends up with something that’s totally profitable, or easily turned into an “EA” or set up[/B]. Its just that something that occurs that may be exploitable, or may not be. The market will test my hypothesis and I just will show the unadulterated, and repeatable result.

If there is interest I will continue, otherwise I will just let this thread die again. As it takes a lot of work and time to produce these types of findings.

I know a few who traded like you do and I do believed that they are more than be willingly and happily to see your thread to revived again.

yes, I do agree on your post above. But only do it in your own terms :slight_smile:

I followed your posts with interest and would do so again. It seems you’ve reached the state that most of us long time members that become profitable traders reach: the realization that you’ve sort of outgrown BP and that energy put in no longer gives you that much back.

Should you decide to revive the thread I’d enjoy it, but the decision should lie with you, not by popular vote.