I hope this is an appropriate forum for this question:
I'm working on an algorithm which would set stops based on price "volatility", i.e. near-term variance. The idea is that the stops are intended for the usual purpose "stop loss". Obviously, if they're too tight then there are unfortunate trades and if they're too loose then there could be inordinate losses. The objective here is to decide mostly "how tight?" and that, it seems to me, requires near-term variance information. This way a stop would trigger if the price were outside some range (like 2 sigma perhaps) on the low side - while preventing setting a stop at, say, 1 sigma.
This has to be based on the recent history of real-time data.
So, where's a good source for that kind of data and, ideally, the variability measures?
I'm working on an algorithm which would set stops based on price "volatility", i.e. near-term variance. The idea is that the stops are intended for the usual purpose "stop loss". Obviously, if they're too tight then there are unfortunate trades and if they're too loose then there could be inordinate losses. The objective here is to decide mostly "how tight?" and that, it seems to me, requires near-term variance information. This way a stop would trigger if the price were outside some range (like 2 sigma perhaps) on the low side - while preventing setting a stop at, say, 1 sigma.
This has to be based on the recent history of real-time data.
So, where's a good source for that kind of data and, ideally, the variability measures?