Serving the Quantitative Finance Community

 
User avatar
kiann
Topic Author
Posts: 9
Joined: April 16th, 2008, 6:39 pm

Brain teaser question - Algo order - Probability of trade being hit

June 15th, 2018, 12:29 pm

we have a algorithm that pumps out trade recommendations. I am trying to infer probabilities per below.

Assume we have set a particular order where it is trying to sell shares at a favourable price, placed with
1) X % (relative price points away from mid-price)
2) given algorithm signal is positive = probability, P at any time-slice (i.e. if signal is positive, keep the order at X% away placed). When the signal = negative, start countdown of order-expiry time.
3) Expected order-expiry time = Texp
4) Share price volatility (relative volatility per 1 sec) at sigma
5) mean = drift of stock

What is the Probability the order-placed (eventually) gets the algorithm signal = negative AND order does not get hit (touched by market) within the order-expiry time Texp.

I thought through it, and it seems to me that 
Probability(reach signal = negative at time Ti; and order does not get hit until order-expiry time Texp)
= Summation [(1- P) * P^(Ti)] * P[ (X - mean)/sigma*sqrt(Ti)] * P[ (X - mean)/(sigma * sqrt(Texp)]
= where at time Ti (i units of time has passed), 
   (Probability signal = negative only at time Ti) * (Probability stockprice doesn't hit X within time Ti) * (Probability stockprice doesn't hit X within time Texp)

My brain is swimming.... any thoughts?
 
User avatar
Alan
Posts: 2958
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Re: Brain teaser question - Algo order - Probability of trade being hit

June 15th, 2018, 3:51 pm

A conservative way to proceed would be to assume that the stock price [$]S_t[$] is a driftless (geometric) Brownian motion with (lognormal) volatility [$]\sigma[$], regardless of your signals. Then, the essence of your calculation is simply the probability that such a process, starting at [$]S_0[$], will not touch an upper level [$]L = S_0 (1 + X)[$] at any time within a time interval [$]T_{exp}[$].  This is a standard calculation and you can find how to do it in many texts or googling. 

As a hint, you should probably convince yourself that the probability in question is 1 - p, where p is the probability that a standard Brownian motion ([$]\sigma=1[$] and starting from the origin) hits the level [$]l = (\log(1+X))/\sigma > 0[$] during the interval [$]T_{exp}[$]. This latter probability p might be easier to google.
 
User avatar
kiann
Topic Author
Posts: 9
Joined: April 16th, 2008, 6:39 pm

Re: Brain teaser question - Algo order - Probability of trade being hit

July 17th, 2018, 11:13 pm

thanks Alan.

You mean, taking the idea of a touch option pricing, i.e. the probability of a stock (or variable) hitting a level L before expiry time, T-exp? I searched around and found this formula

https://quant.stackexchange.com/questio ... f-touching : the probability p, against x = price(t) - price(0)

p(x,t) = [4 * pi() * (sigma^2)/2 * t]^(-1/2) * exp[-x^2/(4/2 * (sigma^2)*t]

where probability of hitting before time t = Integral p(x, t) dt
 
User avatar
Alan
Posts: 2958
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Re: Brain teaser question - Algo order - Probability of trade being hit

July 18th, 2018, 1:22 am

You're welcome.

Stackexchange is usually more reliable. The question is indeed what I had in mind, but that checked answer is wrong. The correct hitting-time density has a [$]t^{-3/2}[$] and is found, among other places, on pg 198 of the "Handbook of Brownian motion". 

scanned it for you. 2.0.2 in attached:
handbookpg198.pdf
(22.72 KiB) Downloaded 188 times