|
From: U.Mutlu <um...@mu...> - 2023-09-09 23:39:59
|
Jonathan S. <sw...@gm...> on 2023-09-05 12:53:12 wrote: > > 1. Could you provide a bit more info on why you want a path containing a > single step? The typical use case for PathGenerator is for many steps, with > the value at the first step (i.e. at t_0) being equal to the starting > price. Maybe what you're looking for isn't a path, but something else. I'm doing a research on GBM implementations out there in the field by running Monte Carlo simulations to see how good the generated data is by comparing it to the table below of timeSteps and ExpectedHitRate%: I was not able to use timeSteps=1 in QuantLib for verifying the first case below. timeSteps >= 2 is doable, but as said the results are far from being correct. Recent postings here suggested to replace the use of Box-Muller class by some other classes; I'm now trying to test that too. Expected HitRate% for 1SD around initial stock price for varying GBM timeSteps This table is an extension of https://en.wikipedia.org/wiki/68–95–99.7_rule as there only timeStep=1 is given. These numbers are exact values, not the result of simulations. Params used: S=100 rPct=0 qPct=0 IV=30(s=0.3) DIY=365.00 DTE=365(t=1 dt=1 dd=365) zFm=-1(SxFm=74.081822) zTo=++1(SxTo=134.985881) timeSteps Expected_HitRate 1 68.2689% cf. https://en.wikipedia.org/wiki/68–95–99.7_rule 2 76.2695% 3 79.2918% 4 80.7919% 5 81.6648% 6 82.2304% 7 82.6265% 8 82.9197% 9 83.1461% 10 83.3265% 15 83.8653% 20 84.1337% 25 84.2942% 30 84.4010% 35 84.4771% 40 84.5341% 45 84.5785% 50 84.6139% 60 84.6671% 70 84.7050% 80 84.7334% 90 84.7555% 100 84.7732% 500 84.9003% 1000 84.9162% 10000 84.9305% 100000 84.9319% 1000000 84.9320% 10000000 84.9320% |