cancel
Showing results for 
Search instead for 
Did you mean: 

Monte Carlo Simulation

Former Member
0 Kudos

With SAP HANA and in-memory computing things such as a simulation that mirrors system performance can be executed in a short time frame allowing for companies to test multiple situations or different scenarios of operation in real time. How come this topic is not extensively high lighted in the forums. If anyone know of some links please share. It would be nice to get us talking about monte carlo simulations and event based simulations in light of SAP HANA. Thank you for taking the time to read my post. Ali.

View Entire Topic
mermer1
Explorer
0 Kudos

Monte Carlo simulations, or probability simulations, are a method used to predict possible outcomes of an uncertain event. What we're looking for is a bunch of simulations that ultimately gives us a range within the 95% percentile. That would be our best bet.
One application of Monte Carlo simulations is to predict future stock inventory. As is the case with Predictive analytics for SAP EWM/ SD / you name it.

Method:

Geometric Brownian motion is a stochastic process, which means that it involves random variables that change over time. The basic formula for geometric Brownian motion is: dS = μS dt + σS dz

Here's a SAP HANA table to run simulations using R+Python . ( I don't know the exact way to feed the data back in to SAP)

metrics = df_sim_close.select(F.round(F.mean(F.col("SIM_CLOSE")), 2)
, F.round(F.percentile_cont(0.05).within_group("SIM_CLOSE"), 2)
, F.round(F.percentile_cont(0.95).within_group("SIM_CLOSE"), 2)).collect()
print(f"Expected price: {metrics[0][0]}")
print(f"Quantile (5%): {metrics[0][1]}")
print(f"Quantile (95%): {metrics[0][2]}")