This code uses the algebra solver in Stan (https://mc-stan.org/) to find the parameters of a distribution that produce a desired tail behavior.
jhelvy
Full Bayesian Inference for Hidden Markov Models
luisdamiano