Historical Market Simulation: Geometric Brownian Motion and Hurst-Based Data
Summary
The document asks how reinforcement-learning environments such as FinRL simulate markets from historical data, and whether they use geometric Brownian motion. It outlines a GBM approach: calculate historical log returns, estimate their mean and standard deviation, then use those estimates to simulate a price path with a Brownian motion. The question also raises time-driven simulation and asks about other ways to build realistic historical-data-based simulations.
The answer does not establish how FinRL works. Instead, it proposes generating synthetic data with varying Hurst values, using a Hurst value of 0.5 for GBM, and suggests estimating rolling Hurst values from the market, taking their quantiles, and interleaving data generated with those values. No validation, comparison with historical market behavior, or implementation details are supplied. These suggestions therefore serve as possible ideas to investigate, not evidence that the resulting paths reproduce market dynamics or are suitable for evaluating a trading policy.
Key ideas
- A basic GBM simulation estimates the mean and volatility of historical log returns and applies them to a Brownian price process.
- The question asks whether FinRL uses this approach, but the answer does not resolve that point.
- The response suggests generating synthetic series with different Hurst values.
- It proposes using quantiles of rolling market Hurst estimates to choose and interleave simulated data.
- The exchange provides no evidence that these synthetic paths reliably represent market behavior.
Tags
Full text
# What are common ways to realistically simulate the stock market using historical market data?
# What are common ways to realistically simulate the stock market using historical market data?
I am currently using the FinRL library to try to automate Trading using Reinforcement Learning. However, I wanted to understand how FinRL simulates the stock market using historical data. I read here that they "simulate live stock markets with real market data according to the principle of time-driven simulation", but I could not figure out what is meant by time-driven simulation.
Unrelated to FinRL I read here that you could do it with geometric Brownian motion like this: Assume you have historical stock data $S_0, \dots, S_N$. Then we can calculate the log returns $$ r_1 = \log\left(\frac{S_1}{S_0}\right), \dots, \log\left(\frac{S_N}{S_{N-1}}\right) $$ Then we can estimate the empirical mean and standard deviation of the log returns $\hat \mu$ and $\hat \sigma$ and simulate a brownian motion $W_t$ and then simulate the stock market using $$ S_t = S_0 e^{(\hat \mu - \frac{\hat\sigma^2}{2})t + \hat \sigma W_t} $$ Does anyone know if FinRL actually simulates the stock market like this? If not, what are some other (common) ways to realistically simulate the stock market using historical data? Maybe use a time series model with estimated parameters from the given historical data (maybe some references?)?
## Answer by DerivativesTamer (score 0, accepted)
https://quant.stackexchange.com/a/70887
You can generate an arbitrary amount of data with various hurst values using the hurst package in python. There are examples in the documentation but for a Geo Brownian Motion a hurst of 0.5 suffices.
An approach you might want to take is to compute the $n$ period hurst of a market, take the quantiles of said rolling hursts and interleave data computed with each hurst.Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.