W. T. Ziemba, S. Lleo and M. V. Zhitlukhin suggested an Exit Model for selling an asset based on Change Point Detection Theory from the field of Statistical Quality Control
https://ideas.repec.org/h/wsi/wschap/9789813223851_0012.html
It is also discussed in Zhitlukhin's thesis: https://www.research.manchester.ac.uk/portal/files/54548175/FULL_TEXT.PDF
The numerical procedure they suggest is not clear to me, I wanted to replicate the result, can some post a pseudo code or procedure, for calculation and evolution of 'b'