the only place success comes before work is in the dictionary

Sister Sites

Simple Mean Reversion 621 replies

M5 Mean Reversion Strategy 65 replies

mean reversion strategy 8 replies

Forward test of my new mean reversion strategy 11 replies

Synthetic hedges, cointegration, mean reversion and similar stuff 419 replies

- Joined Jan 2016 | Status: Member | 1,879 Posts | Online Now

DislikedMean reversion has a higher-than-expected relative drawdown based on the posts here - something amiss. Try VWAP or TWAP with progressive entry(ies) instead. It helps to reduce floating dd at the moment. Additionally, mean-regression model for smaller accounts sub 250k can look at higher timeframe time-bars to follow the trend while regressing back to WAP. Cheers, PDXIgnored

Usually the majority of retail traders have account <= 3k

DislikedInnanzitutto mi scuso con Riskcuit se il mio contributo qui sotto è considerato "fuori tema" e inutile, non è mia intenzione. Si prega di avvisare se questo è il caso e mi asterrò dal postare ulteriormente senza alcun problema. Non ho intenzione di imbucare questo interessante thread, continuerò a seguirlo da bordo campo e rimarrò in silenzio. Come accennato in precedenza, non ho la mente matematica di voi ragazzi. Il mio approccio è molto semplice, applicando i due indicatori precedentemente caricati per generare segnali di "acquisto" e "vendita"...Ignored

- Joined Aug 2011 | Status: Member | 1,327 Posts

Like yoriz did (btw thanks for the details and the video!), I wondered if it would be interesting to trade the future fair value instead of the current MA.

My idea was to use the standard deviation (over 200 samples) to estimate where the price has a good chance to meet the moving average in the future.

A picture explains better:

The formula used is (forecast is a user input, I chose 24 bars):

Technical note: the lag of an EMA depends on the price action so I replaced it by a LWMA which lag is constant to 1/3 of its period.

Adding a bit of smoothing to the result and surrounding with 1 ATR: (black=MA200 and red=MA800)

My idea was to use the standard deviation (over 200 samples) to estimate where the price has a good chance to meet the moving average in the future.

A picture explains better:

The formula used is (forecast is a user input, I chose 24 bars):

Technical note: the lag of an EMA depends on the price action so I replaced it by a LWMA which lag is constant to 1/3 of its period.

Adding a bit of smoothing to the result and surrounding with 1 ATR: (black=MA200 and red=MA800)

No greed. No fear. Just maths.

3

DislikedThe indicator below plots the distance between the MA-200 of EURUSD and the MA-200 of GBPUSD. I've added Bollinger Bands to it to observe when the distance is "high"... here are some entry points. {image}Ignored

it seems to work like this... 4 successes out of 4. you need to put some pips before the sma 200 as tp. maybe instead of using the sma 200 close you could use the sma 200 high and sma 200 low channel to set the tp

DislikedLike yoriz did (btw thanks for the details and the video!), I wondered if it would be interesting to trade the future fair value instead of the current MA. My idea was to use the standard deviation (over 200 samples) to estimate where the price has a good chance to meet the moving average in the future. A picture explains better: {image} The formula used is (forecast is a user input, I chose 24 bars): Technical note: the lag of an EMA depends on the price action so I replaced it by a LWMA which lag is constant to 1/3 of its period. {image} Adding...Ignored

Is it saying at this point (a close price and the bands at this index), the MA will meet somewhere in the bands range within 200 candles approximately 68% of the time?

ri · skuht

- Joined Aug 2011 | Status: Member | 1,327 Posts

Disliked{quote} I am a little confused what exactly the bands are showing if you don’t mind clarifying. Is it saying at this point (a close price and the bands at this index), the MA will meet somewhere in the bands range within 200 candles approximately 68% of the time?Ignored

No greed. No fear. Just maths.

2

Disliked{quote} It replaces the MA200 a bit like the blue line in yoriz video. It is the target price. I use the MA200 to project the trend (trend following component) and the 1st standard deviation is a kind of the mean reverting component you expect the price to stay in... I'm not 100% sure it makes complete sense TBH. A simple idea is to buy when below the band and sell above with a TP at the opposite side. I'm not sure at all about the SL. The relative position of the bands gives a bias about the trend like the two MAs.Ignored

Looking at the bottom chart that you posted above, the model is effectively assuming that the moving average will continue with the same slope into the future. This assumption is generally valid when the market is trending but makes the estimate overshoot when the moving average changes direction. So the cumulative errors keep getting bigger and don't fully offset and thus the bands tend to not be centered on the price and don't do a good job representing future value.

The estimate's error is measurable at a given point (price - estimate). You could add a fraction of the error (1/n or 2/n * error) to the estimate at each step to at least center the bands on the price. However there will still be lagged overshoot and your bands will be noisier. But it may be somewhat more useful in giving an estimate of potential future value.

3

Disliked{quote} It replaces the MA200 a bit like the blue line in yoriz video. It is the target price. I use the MA200 to project the trend (trend following component) and the 1st standard deviation is a kind of the mean reverting component you expect the price to stay in... I'm not 100% sure it makes complete sense TBH. A simple idea is to buy when below the band and sell above with a TP at the opposite side. I'm not sure at all about the SL. The relative position of the bands gives a bias about the trend like the two MAs.Ignored

something I think to be careful of, is not getting back into the habit of trying to forecast directionality of price.

as soon as you do this, you are back to betting on skew more than anything. And if you add a TP or SL that will make it a binary outcome, you have essentially “flattened” everything else out (volatility, kurtosis) and are only trading skew at that point, which is the hardest to trade over time in my opinion.

The goal is to isolate kurtosis or volatility as much as possible as these are easier to trade.

ri · skuht

1

Disliked{quote} Thanks for clarifying! Very cool stuff. something I think to be careful of, is not getting back into the habit of trying to forecast directionality of price. as soon as you do this, you are back to betting on skew more than anything. And if you add a TP or SL that will make it a binary outcome, you have essentially “flattened” everything else out (volatility, kurtosis) and are only trading skew at that point, which is the hardest to trade over time in my opinion. The goal is to isolate kurtosis or volatility as much as possible as these...Ignored

it’s also the core inspiration for this method. Instead of isolating volatility, we are trying to isolate kurtosis. We like volatility to a degree but it’s not the “driver” of profits or losses like it is in dynamic hedging.

when folks are thinking about ways to improve or tweak the model to their liking, I would encourage them to try and do so in a way that is isolating something other than skew for all the reasons stated previously.

To help again with what this can look like, let’s review trading an option pricing model combined with dynamic hedging to target volatility.

We will simplify the inputs to:

- distribution (assume normal)

- volatility

- strike

- duration

we then use our inputs with the model to generate a price for the option.

let’s say it comes out to $4.00.

So we sell the option for $4.00.

Now we need to isolate the volatility so that is the only thing we are actually trading by using dynamic hedging. This means we will match the delta(probability of profit) of the option with shares throughout the life of the option.

Because we sold the option, we will have negative gamma exposure, simply meaning, as we modify our hedge, we will always take a loss on the adjustments, except for the last one to close out the hedge, that can be a winner or loser.

This is where the magic happens.

If you are able to operate at the limit (small possible price increment with no friction), the combined PnL of the profits received from selling the option (the $4.00), plus the profits from managing and closing out the hedge, will always equal the payoff of the option contract for the path price took, regardless of what path that is.

I’d re-read it so it really sinks in. Because of the dynamic hedging, it doesn’t matter what path price takes, the combined PnL from selling the option and managing the hedge, will always be equal to the payoff of the option contract for the path price took during the contract.

if you sold a ton of options, and delta hedged them all and none of the inputs we used to calculated the option price has changed, then averaged all of these payoffs, guess what they would equal? $4.00.

so if the inputs never changed, the combined PnL of the selling and hedging would be 0. The cost of hedging will always average out to -$4.00, the price you sold the option for.

The only way this changes is if volatility changes, which is really the most likely thing to change in the model.

if volatility was higher than what was used to calculate the option price, the profits from selling the option and hedging the delta would be negative, again regardless of whatever path price took. This is because you would have collected more negative gamma than expected while managing the hedge.

if the volatility was lower than what was used to calculate the option price, the profited from selling the option and hedging the delta would be positive, again regardless of whatever path price took.

So by delta hedging with the proceeds from selling the option, you are zeroing in on volatility and trading specifically that.

You can even zero in on the volatility with just the delta hedging (with out selling the contract), but by doing so, you are exposing PnL to the skew of each path (just like a single option contract). This is because an option contract by definition is a volatility bet, even if you didn’t dynamically hedge it. So dynamically hedging alone is also a volatility bet since that is how you “manufacture” the option.

This wont necessarily affect expectancy since the effects of the skew would even out over time, but it will impact the volatility of returns, making them much more choppy than if you sold the option in addition to the deploying the hedge.

This should blow your mind if you haven’t realized that this is how a model can work to isolate a variable to trade other than skew.

it truly is an amazing application of probability theory.

Again, the variable we want to try and isolate is kurtosis and/or volatility, and we are trying to use the MA in order to do so.

P.S.

An option contract is simply an f(x) and it's price is the expectancy of f(x). Every f(x) has a delta (probability of profit). This means every f(x) has gamma. Theta = gamma * -1.

ri · skuht

1

Disliked{quote} I know a lot of folks are tired of hearing me harp about option theory as it relates to dynamic hedging, but it’s really an amazing example of isolating a variable to trade that isn’t skew. it’s also the core inspiration for this method. Instead of isolating volatility, we are trying to isolate kurtosis. We like volatility to a degree but it’s not the “driver” of profits or losses like it is in dynamic hedging. when folks are thinking about ways to improve or tweak the model to their liking, I would encourage them to try and do so in a way...Ignored

1.02^200

1

Disliked{quote} Hedging options with shares is one thing, hedging in forex in another. Is there hedging in your strategy, or just averaging?Ignored

ri · skuht

DislikedUnfortunately like the previous poster my knowledge about stats isn't the best (Maths wasn't my strongest subject lol). I have however attached a couple of indicators that I hope may prove fruitful to this project? They are self explanatory but if not clear then please just ask. {image} {file} {file}Ignored

Everyone can find their HolyGrail

- Joined Aug 2011 | Status: Member | 1,327 Posts

Dislikedthe model is effectively assuming that the moving average will continue with the same slope into the future. This assumption is generally valid when the market is trending but makes the estimate overshoot when the moving average changes directionIgnored

Also the MA200 has nothing special and any MA would have its own slope. I know not objective way to select the "best".

DislikedThe estimate's error is measurable at a given point (price - estimate). You could add a fraction of the error (1/n or 2/n * error) to the estimate at each step to at least center the bands on the price. However there will still be lagged overshoot and your bands will be noisier. But it may be somewhat more useful in giving an estimate of potential future value.Ignored

No greed. No fear. Just maths.

1

- Joined Aug 2011 | Status: Member | 1,327 Posts

DislikedI think to be careful of, is not getting back into the habit of trying to forecast directionality of priceIgnored

Dislikedyou have essentially “flattened” everything else out (volatility, kurtosis) and are only trading skew at that point, which is the hardest to trade over time in my opinion.Ignored

You trade toward the fair value (the MA200) but this value drifts over time. Going in the direction of the drift is safer.

No greed. No fear. Just maths.

1

- Joined Aug 2011 | Status: Member | 1,327 Posts

In this situation the price is mainly below the black EMA200 line. You will mainly enter long trades during this down trend and the price will often require that you average down.

With the "forecast" -- which like FXEZ underlined I admit is crap -- you mainly sell during this period because the price is more often above the band.

With the "forecast" -- which like FXEZ underlined I admit is crap -- you mainly sell during this period because the price is more often above the band.

No greed. No fear. Just maths.

1

Disliked{quote} You also do! Betting the "mean reversion" is a already directional forecast. With options you can build a straddle which is a bet that the price won't move far away. This already is a directional forecast (except you also trade the volatilty short). In spot trading you cannot profit from a "non-move". When you short at the time the price is well above the MA you do bet the direction. {quote} The skew is the current trend and it happens to be the prevalent statistics in price. Mean reversion is close to non existant in the data. A mean reverting...Ignored

Lets think back to how the price of an option contract is calculated.

For one contract in isolation, it’s a directional bet, but in aggregation, the only way the buyer of options can make money consistently is if they only buy options that have under priced volatility. Otherwise, the accumulation of all bets will result in $0.00 profit.

The seller can only make money if they can sell the contract with overpriced volatility.

The path of any one result does not matter in aggregation. Someone can buy an overpriced contract that does payoff for some paths (many possible paths even) but it doesn’t mean volatility was priced right, so in aggregation it they over paid for it, the winners won’t matter because the volatility of the losers matters as well.

This system is designed to be the same way. For any one opportunity, direction matters because you have to trade one way or the other. But in aggregation, it’s not what we are using to drive profits/actually trading or “forecasting” to be more specific.

if you get wrapped up in anyone opportunity or the idea of trying to predict which path will be taken, you are missing the forest for the trees.

also regarding the idea that “skew” is the most prevalent part of price, I would push back this pretty strongly in 2 ways but I am open to changing my mind depending on the arguments.

But for me, the real big issues are:

1. If skew is so prevalent (true skew) in any meaningful/consistent way, why is it essentially impossible to trade? Traditional trading would be extremely easy if this were the case.

2. Skew is going to manifest itself in long leads. This doesn’t mean it’s actually real. Think of Brownian motion drawn with coin flips. The results have long leads, meaning it rarely even ends where it started, and will spend most of its time “trending” one way or the other, ending above/below where it started.

when you look at the paths in isolation, they all have skew one way or the other, but in aggregation, we know there is no actual skew in the data, and all the observable skew on any one path is cancelled out by the other paths that skewed the other way.

This idea of skew manifesting in long leads but actually always averaging out to 0.00 between all the paths, is why it’s so friggin hard to trade consistently.

ri · skuht

1

DislikedIn this situation the price is mainly below the black EMA200 line. You will mainly enter long trades during this down trend and the price will often require that you average down. {image} With the "forecast" -- which like FXEZ underlined I admit is crap -- you mainly sell during this period because the price is more often above the band. {image}Ignored

I have tried to solve that problem for years and years and years but never cracked it…

For every path like this, there is one going up.

and many many many more that chop.

ri · skuht

- Joined Aug 2011 | Status: Member | 1,327 Posts

DislikedLets think back to how the price of an option contract is calculated.

For one contract in isolation, it’s a directional bet, but in aggregation, the only way the buyer of options can make money consistently is if they only buy options that have under priced volatility. Otherwise, the accumulation of all bets will result in $0.00 profit.

The seller can only make money if they can sell the contract with overpriced volatility.Ignored

No greed. No fear. Just maths.

2

Disliked{quote} What you describe is an option straddle. But you cannot build a straddle with longs and shorts. You can't trade volatily directly this way.Ignored

Even with a SINGLE contract, you are trading volatility in the aggregate of your trades, not direction.

A some example:

Here is a call price with following inputs:

The price of this call or fair value is $6.30.

This is the price because if you were to hold this contract 1000 times and price mirrored the inputs used to calculate it, the expectancy, or expected value, or average all of the wins and losses, would be exactly $6.30.

Here is what happens if volatility was under priced:

The expectancy, or expected value, or average of all wins and losses of holding this contract 1000 times has risen.

Nothing has changed in skew. The only thing that changed was volatility. This is why even a single contract in isolation is really a volatility bet when aggregated with all your other trades. You are betting that the contract mispriced volatility.

The directionality is built in the contract so your PnL will be more volatile based on the direction of paths your observe and the order you observe them in, but it’s only doing just that, affecting the volatility of returns, not the expectancy of the returns.

ri · skuht

1