https://quantfin.net/posts/ohlc-resampling/
Enhancing Algorithmic Trading Backtesting with Custom OHLC Resampling - QuantFin