The First Passage Time (FPT) problem corresponds to detect the epoch when a stochastic process crosses a constant or a time varying threshold for the first time. Deriving the density, distribution and moments of this random variable is of paramount interest in many scientific fields and applications, such as probability theory, statistics, finance, neuroscience, psychology, reliability theory, etc. Despite the FPT problem has been widely analytically investigated for unidimensional processes, explicit expressions of the FPT density are available only for the Wiener process, for a special case of the Ornstein-Uhlenbeck (OU) process and of the Cox-IngersollRoss (also known as Feller or square-root) process, and for some processes which can be obtained through suitable measure or spacetime transformations of the previous processes. For other processes it has been proved that the FPT distribution function can be obtained as solution of several different integral equations, which however tend to be very difficult to be solved analytically. This has determined the development of ad hoc numerical methods for the solution of integral equations and related tasks (e.g. equations for the moments) arising from the FPT problem.
At the same time, there has been an increasing need to provide algorithms for the simulation of FPTs. Indeed simulations can be used to explore the theoretical properties of the model, as well as to approximate the FPT density, moments and other quantities of interest. But simulations of FPTs arrive with their own set of problems. Apart from pure numerical issues, there is a reasonable chance of missing the exact time of the first crossing when the process is being time discretized. There are possibilities to reduce or even even eliminate this error, e.g. considering bridge processes or sampling from the true FPT distribution, but again formulae and algorithms for this have only been provided for very few processes and most of the time for constant thresholds. Additionally exact simulation is only possible for a small class of processes. For more general ones, one has to rely on approximation schemes.
Apart from presenting results scattered around multiple papers in a unified notation, the goal of this thesis is to implement a software that is able to deal with simulation of FPTs from a broad class of processes and general thresholds, numerical computation of results for the FPT of the Wiener, the Ornstein Uhlenbeck and the Feller process, and check for possible measure transformation. A code for checking whether a given diffusion process can be linked back to a Wiener or Feller process has been implemented in Mathematica, while simulations, computations of moments and FPT density approximation have been implemented in Rcpp, which is an interface between the computing environment R  and C++, which drastically reduces the computational time in comparison to other R based algorithms.