Machine Learning
Systems Architect,
PhD Mathematician
I had my first issue posted on one of my open source projects, fbm, a python package for generating fractional Brownian motion using theoretically exact methods. The issue creator requested adding support for multifractional Brownian motion (mBm).
In fractional Brownian motion, the behavior of the process is controlled by the Hurst parameter, which takes a value on the interval (0, 1). One way to generalize fBm is to allow the Hurst parameter to vary with respect to time. This is known as multifractional Brownian motion. One of the consequences of generalizing the Hurst parameter is that the process no longer has stationary increments. In other words, for \( t > s > 0 \), the the quantity \( B_{H(t)}(t) - B_{H(s)}(s) \) is not equal in distribution to \( B_{H(t-s)}(t-s) \). This also rules out the \( \mathcal{O}(n \log(n)) \) circulant embedding method for stationary Gaussian processes as a means of simulation.
The continuous nature of the Hurst function \( H(t) \) also makes generating theoretically exact discretely sampled realizations of mBm difficult. The best I could find from a few nights of research was an \( \mathcal{O}(n^2) \) approximate method adapted from an algorithm for fBm. Nevertheless I added support for this algorithm in the fbm package for generating multifractional Brownian motion and multifractional Gaussian noise. The update is now available in version 0.2.0 on pypi. Upgrade fbm to try it out.
pip install -U fbm
To use this new feature, create a custom Hurst function taking values in (0, 1), an instance of the class MBM
, and start simulating.
from fbm import MBM
def h(t):
return 0.3 + 0.6 * t
m = MBM(n=2**10, hurst=h)
sample = m.mbm()
noise_sample = m.mgn()
times = m.times()
See the project on GitHub for more info.