Help visualizing a measure of volatility on a time series? Direct Statistics.
Welcome to futures.io.
Welcome, Guest!
This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.
We are fundamentally different than most other trading forums:
We work extremely hard to keep things positive on our forums.
We do not tolerate rude behavior, trolling, or vendor advertising in posts.
We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
We expect our members to participate and become a part of the community. Help yourself by helping others.
You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.
Help visualizing a measure of volatility on a time series? Direct Statistics.
I would like to run some analysis/statistics data on a time series consisting of a column of dates and times, and several columns of price data for OHLC values. I'm looking for some conceptual ideas about how to program this to collect this data on various text files I point it to.
So some background on what I have so far.
I am exporting a text file consisting of the price information in the form of a file that looks like this originally:
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).
Then I've been taking that and creating a fints object which contains all of these times with dates. Here you can see in my workspace the name of the object, "EU1Range." Created using the FTStool. Or equivalant command would be "EU1Range=ascii2fts('EU1Range.txt','t',[],1,1);" Also in this picture you can see this series created in the FTStool, along with a corresponding plot of what the graph looks like. Again this is using a 1tic range bar chart. Here is the picture of that:
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).
Ok.... so with that out the way. The first set of statistics I want to measure is to pick a point, and measure the max distance price moves from that fixed point before returning to it.
Initially, I want to do this with say the price at the beginning of each hour. So as price turns to say 1:00am, I would like to take that price, and measure all the distances in that hour. Then take all these lengths, store them and plot distributions for them. I would like to keep stats for EITHER the ENTIRE data set, or being able to set a look-back period of a given number of hours to plot these distributions.
Here is a picture to help visualize this that I drew:
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).
Here is what that would look like on the actual price chart itself:
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).
Then finally I would like to display these excursions over some look-back period in a distribution.
Any ideas on how I could conceptually accomplish what i want?
The following 2 users say Thank You to forrestang for this post:
Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.
Sounds a bit like ATR but instead of just showing the maximum, you would plot the distributions of various excursions?
The hard part seems how to plot this since you're adding a new dimension of information. For every point on an ATR, you would have multiple distributions to plot.
Am I understandingn what you are after correctly?
The following user says Thank You to GoldStandard for this post:
Similar perhaps? I think the main difference is that using the ATR would be like measure the max excursion and nothing else. By that I mean, using say an hourly ATR would report back a SUMMARIZED version of what price did on that hour.
What I am wanting to do is measure each fluctuation about a specific point. So for each hour, there could be say 4 moves back and fourth across the hourly opening..... but an ATR for that hour would just measure the entire range traveled for that hour and summarize it. Does that make sense?
I did a similiar experiment as you describe using 4 hour bars. BTW, this was an idea I found on ET. Where I would find the distances traveled over say the last 21 Four hour bars, and find the distribution of small distances, and the distribution of large distances. Once I had this info, I would then take an entry once price moved beyond that small distance, and exit just short of that large distribution distance.
The idea was that if price moves greater than the SHORT historical distance, it is likely that it will move to the longest distance. There where some subtleties in coming up with this info. Let me know and I can draw a picture or explain more in depth.
So now, the idea is to start with this idea still, but find out exactly HOW the price has moved. Now the hourly starting point is abribtrary for the most part, so it's just the starting point in conceptualizing what I am trying to accomplish.
I rambled quite a bit there. Let me know if this doesn't make sense.
Now that you mention it, I think you were saying what I was saying.
So yes, it would be like taking the ATR of price excursion everytime price returns to a start point (in this case the hourly open), and then resetting that ATR. So to think in terms of ATR, yes the ATR would dynamically have to be reset each time price returns back to the starting point, instead of a ATR SUMMARY of every hourly bar.
The idea I think is that this start point could be anything. A new High or Low, it could even be a moving average or a standard deviation of some sort that is based on a moving average. This is just the starting point I would think.
Just another CONCEPTUAL idea. The statistics could be kept on just about anything beyond an arbitrary opening.
For example, using the hourly open, and then applying a linear regression based on a moving average. So here the deviation starts at every hour. And one could measure the distance that price moves about the Least Square average (the thick blue one in the center), before the average catches back up.
I've attached a picture explaining this. In the picture you can see the red lines representing just some of the distances that price moves before coming back to the center line.
I've thought about this before also and I think it is just a misunderstanding of volatility. If you picture the time series as more random, volatility is the excitation amount going into the system. Measuring the "jiggle" of price is going to always be dependent on an arbitrary time frame. It really has nothing to do with volatility but the amount of trend vs range bound action on the time frame you are looking at.
For the index I think you will have a hard time beating the VIX as a volatility measure unless you dig deeper into SPX options implied volatility.
This guy has some historic volatility calcs in matlab http://tradingwithmatlab.blogspot.com/search/label/Historical%20Volatility
Sinclair's Volatility Trading has a nice chapter on them.
The following user says Thank You to dutchbookmaker for this post:
I think this is telling me that I picked a bad title for this post. As I'm not just interested in knowing "IF" a stock is historically more volatile now than it was prior. Like, looking at VIX, it just tells you if something is volatile, particularly if it is more/less volatile than X number of bars ago. But that alone doesn't tell you 'HOW' you could place a trade.
What I am trying to do is collect DIRECT statistics on price movement, and then apply those stats to find a good place to trade.... if that makes any sense?
It makes total sense...that is to ignore though the stochastic nature of volatility itself....
You can collect the avg length of a 5 min bar? I've done that myself, there is nothing stopping you,....
It was interesting to see the avg 5 min bar length EXPLODE during the crisis....
Normalize your data here...for trend and vol...
I do think of stock pickers pre/post crisis...
Where are the "myspace stocktalk" guys...
I'm right here.......
I regularly look at the ADR (average daily range), the ATR (average true range) and implied volatility. Usually historical volatility works well as a reference, but there are some periods (such as holidays or end of year), where you cannot use historical volatility.
This is what I use the average true range / average daily range for:
-> calculating money management stop loss
-> displaying seasonal volatility intraday
-> defining trailing stops or MAE (see SuperTrend indicator)
-> establish volatility targets for the day trading session
I do not see any advantage of replacing the average true range with a standard deviation. The standard deviation confuses direction and volatility. Direction is a higher timeframe volatility, so it measures two-dimensional volatility.
If you have a chop market with high volatility going nowhere, the standard deviation can actually be small, although volatility for this time frame is high. The standard deviation does not tell me a lot. This is one reason that I do not use Bollinger Bands, but go for Keltner Channels. Easier to understand what they mean.
The following 2 users say Thank You to Fat Tails for this post: