Forums  > Trading  > can a NeuralNet find certain volatility patterns?  
     
Page 1 of 1
Display using:  

steevo


Total Posts: 9
Joined: Feb 2019
 
Posted: 2019-02-18 21:43
imagine a stock with 2 bollinger bands...2st.devs, and 3 st.devs.
and every time the stock price touched the 2nd st dev band, price always stretched to touch the 3rd st dev band. Outside of that pattern, the time series is completely random.

now lets imagine that we were unaware of that pattern existing, so we didn't feed bollinger bands into the NN as one of the inputs.

will the NN, built with Keras over TensorFlow find that pattern on its own? is a NN capable of doing that?

ronin


Total Posts: 478
Joined: May 2006
 
Posted: 2019-02-19 13:03
The question is a bit ill posed.

What standard deviation? Daily?

How does this "every time the stock price touched the 2nd st dev band, price always stretched to touch the 3rd st dev band" work? After the first band is touched, it does a big jump? It only has down ticks until it hits the second band?

Two standard deviations would have the frequency of once every 45 days, three standard deviations once every 750 days.

Exaggerated frequency of down moves would drag the mean down, so there would have to be a correction to the mean to leave it "completely random" - which presumably means zero mean. After correcting the mean, there would be some visible skew. So your time series would be ticking up on average, but brought down every once in a while by an exaggerated down move.

Whether or not a NN would catch it depends on what sort of thing the NN is looking for. When all is said and done, NNs are just curve fitters. And asking "what is the mean, variance, skew and kurtosis of this time series" is a fairly simple place to start.

So, yes.

What you use to construct the NN doesn't matter. That's like saying "could excel spot this". Excel couldn't, but any entry level trader or quant using excel could.

"There is a SIX am?" -- Arthur

steevo


Total Posts: 9
Joined: Feb 2019
 
Posted: 2019-02-19 15:29
ok, this was a great reply..its helping my brain.

so i guess my question now should be...what type of approach should i use when setting up the NN? are there particular models (LSTM i'm guessing), algorithims, number of nodes, layers, other parameters that would need to be set, in order for the NN to be capable of detecting these things?

Maybe those bollinger bands were based on 15 minute bars using a 60 period moving avg...or maybe they were based on 50k shares per bar (so, not time based, but volume based). If the NN was fed tick level trade data, would it be able to aggregate on all those different levels to find those patterns?

Maggette


Total Posts: 1149
Joined: Jun 2007
 
Posted: 2019-02-19 15:37
That depends on your answers to ronins questions:

"What standard deviation? Daily?

How does this "every time the stock price touched the 2nd st dev band, price always stretched to touch the 3rd st dev band" work? After the first band is touched, it does a big jump? It only has down ticks until it hits the second band?
"
LSTM and GRU come to mind. But again, if you think that stddev bollinger bands play a role, there are far more data efficient ways to find it.

If you think: if configure a super deep and smart ANN and it will find any pattern (if there are one), you are wasting your time.

Make the nertwork deep enougfh and you will find "patterns".......like humans do.

Ich kam hierher und sah dich und deine Leute lächeln, und sagte mir: Maggette, scheiss auf den small talk, lass lieber deine Fäuste sprechen...

ronin


Total Posts: 478
Joined: May 2006
 
Posted: 2019-02-19 16:30
I'd second this. Start with a simple model, fit that and see how it works.

E.g. some sort of local volatility, or maybe diffusion plus a jump process with some correlation betweem diffusion and jumps, maybe even correlation skew, or something like that. There may be autocorrelation, or autocorrelation conditional on something.

Of course, you need a bit of data. Enough to resolve stuff that happens in the tails that only comes up very rarely. Look up importance sampling.

Like @maggette says, give it too many degrees of freedom and it will overfit. There is zero predictive value in overfits.

The model I described is say 5-10 parameters (mean, variance, skew, kurtosis = 4, then add a few more to deal with the exotic overlays). All this assumes the distribution is Gaussian plus perturbation. So your NN needs to be able to approximate a Gaussian, and then have those extra degrees of freedom to fiddle with. How many nodes and layers to approximate a Gaussian is a bit like asking how long is a piece of string.

Or, you can just start from a Gaussian model plus perturbation and fit that. Bonus points if you can guess the form of the perturbation well.


"There is a SIX am?" -- Arthur

gaj


Total Posts: 48
Joined: Apr 2018
 
Posted: 2019-02-20 09:39
@ronin, can you elaborate how you use your time series model for prediction? I think in trading we ultimately care about expected values. How does knowing skew and kurtosis affect your prediction?

ronin


Total Posts: 478
Joined: May 2006
 
Posted: 2019-02-20 10:55
> I think in trading we ultimately care about expected values.

Do we though?

E.g. in mean reversion, you'd worry about skew and kurtosis more than the mean. Who cares where it will come back to if it wipes you out in the meantime. In fundamental, you worry about the mean, and skew and kurtosis are risk parameters. You'll get there eventually, and you'll hold it as long as you have to or until the fundamentals change. In trend following, you are looking at the ratio of the mean to some combination of variance, skew and kurtosis. Etc.

In this particular example, there would beat least two obvious ways to trade it, one long gamma and the other short gamma - if the statistics holds.

"There is a SIX am?" -- Arthur

jslade


Total Posts: 1182
Joined: Feb 2007
 
Posted: 2019-02-20 18:16
I fail to see what a neural net will capture that an if statement isn't going to capture in the problem as stated. Is a neural net going to tell you, "hey man, trade the rolling std dev crossover?" Even if it manages to fit to that pattern, which is doubtful; absolutely not; a neural net is the worst tool possible to attempt to gain insight into what a timeseries or any other pile of data is doing. I'd even say it's the worst possible tool to imagine modeling a financial system with, though I am sure you can do it. Ain't no n00b gonna do it.

"Learning, n. The kind of ignorance distinguishing the studious."

gaj


Total Posts: 48
Joined: Apr 2018
 
Posted: 2019-02-21 04:49
@ronin: Good point. I guess I'm biased towards HFT where CLT kicks in quickly and only lower order statistics matter.

rickyvic


Total Posts: 187
Joined: Jul 2013
 
Posted: 2019-03-24 23:03
How would an intelligent machine (with deep NN or similar) adapt to test some time series patters or data relationships to predict returns?
Could we train the machine to use some of the different tools available to us today to find combinations that are hard to spot or nobody human would look at? Because we reason in the linear world mainly.

My idea of this would be to give the machine all the tools and some intelligence to scan all over the possible outcomes and regimes in and out of sample.

That would make sense to me, although I dont know if deep NN are the best tool.

"amicus Plato sed magis amica Veritas"

gaj


Total Posts: 48
Joined: Apr 2018
 
Posted: 2019-03-25 05:22
This guy claims to make a lot of money with deep learning. His credentials look legit (ex-partner at Tower, I think I know the team that he founded and they're still going strong). But he's trying to sell something, so take it with a grain of salt.

nikol


Total Posts: 775
Joined: Jun 2005
 
Posted: 2019-03-25 11:46
Don't forget about the search of specific objects (also patterns). Examples are straight line (trend), saw teeth, morse code, head-and-shoulders, etc etc. In this case one can apply classification ANNs (discrete set).

How can you define 'pump-and-dump' in terms of distribution moments? P&D is a sequence of events which deludes counterparts into buying at higher price and then dumping all back at high level. This is pattern too.

secsy


Total Posts: 10
Joined: Mar 2019
 
Posted: 2019-03-26 13:03
What I have found and I think what others here are explaining is that the classification accuracy of machine learning is only as good as the labeling you give it. You'll find it fairly hard to produce labels for spots you determine are good to trade, as your goal is to label signals, however you will likely end up also labeling noise.

ronin


Total Posts: 478
Joined: May 2006
 
Posted: 2019-03-26 13:15
> This guy claims to make a lot of money with deep learning. His credentials look legit (ex-partner at Tower, I think I know the team that he founded and they're still going strong). But he's trying to sell something, so take it with a grain of salt.


Maybe.

If you don't know what you are doing, there are no tools that can help you. If you do know what you are doing, it doesn't matter what tools you use, and you could even do it without any tools.

Whether or not the guy is for real and he really made money trading some deep learning algo, who knows. Like @guy says, he has something to sell.

But if he is and he did, I bet it has nothing to do with the actual deep learning algo.

"There is a SIX am?" -- Arthur

rickyvic


Total Posts: 187
Joined: Jul 2013
 
Posted: 2019-03-26 16:37
I think this is the very beginning and it is so wide the range of ways to use this tech that it is really hard to argue about anything.

A guy that maybe did something you just don't know, it could be luck, certain is that a lot of firms keep trying and fail.

"amicus Plato sed magis amica Veritas"

frolloos


Total Posts: 72
Joined: Dec 2007
 
Posted: 2019-04-03 16:59
[deleted]

dlwlrma


Total Posts: 4
Joined: Jul 2019
 
Posted: 2019-07-26 06:21
Just as an update, "that guy" no longer has a business (although that probably has more to do with AUM issues than anything else).

That being said, I can assure you that his NNs weren't magic (nor were the strategies anything particularly novel).
Previous Thread :: Next Thread 
Page 1 of 1