the corresponding Hawses process is the "almost unstable" case where the limit of the branching ratio approaches one which is a process always poised on the edge of criticality in the sense that it never dies out or explodes. The mathematics is very advanced, "limit theorems for nearly unstable Hawkes processes"It was a very rigorous task.. it would exhaust me even thinking about it to write the story up again.. it was 3 years ago to the day that I started going live with it.. i cant find the old screencasts I had of it in action but heres what it looked like .. it would try to achieve a balance between immediacy of execution and getting a rebate for providing liquidity... it was very rigorous, thats why I was able to run it without it exploding.. there are more advanced versions of this idea based on optimal stochastic control of Hawkes processes which are realistic models of order flow but I got tired of that game, though the underlying models were very instrumental in me gaining an intuition for how orderflow aggregates from the micro level up to the macro level. See https://dornsife.usc.edu/assets/sites/350/docs/Aditi-USC_Colloqium.pdf.
Building the model: Stylized facts 1-2
*Markets are highly endogenous, meaning that most of the orders have
no real economic motivations but are rather sent by algorithms in
reaction to other orders, see Bouchaudet al., Filimonov and Sornette.
*Mechanisms preventing statistical arbitrages take place on high
frequency markets, meaning that at the high frequency scale, building
strategies that are on average profitable is hardly possible.
![]()
https://arxiv.org/pdf/1310.2033.pdf

