Breaking News

dd

COVID-19 Predictions w/ Monte Carlo Simulation Cases/Death per Million

0 0

We are going to compare a basic Monte Carlo Pandemic Simulation to the Projections of IHME, MIT, LOS ALAMOS, etc Pythonically.
Keep in mind I am an amateur at this 😉

Data Source https://ourworldindata.org/coronavirus
IHME http://www.healthdata.org/covid
Function Code: ( With the limited knowledge I have to build it)
def montecarlo(data):
global t_intervals
global iterations
global nostrodamus
global predict
log_returns = np.log(1 + data.pct_change())
u = log_returns.mean()
var = log_returns.var()
drift = u – (0.5 * var)
stdev = log_returns.std()
drift.values
stdev.values
t_intervals = len(data)
iterations = 10
nostrodamus = np.exp(drift.values + stdev.values * norm.ppf(np.random.rand(t_intervals, iterations)))
S0 = data.iloc[-1]
predict = np.zeros_like(nostrodamus)
predict[0] = S0
for t in range(1, t_intervals):
predict[t] = predict[t – 1] * nostrodamus[t]
return predict

About Post Author

Ralph Turchiano

I have a strong affinity for the sciences which led me to create my sites. My compulsion for the past decade has been reviewing literally every peer-reviewed research article. Which can easily be validated by following my posts. To me, science is where the real news is, as it will mold our destiny beyond that of politics or economics. 😉 Please feel free to e-mail: 161803p314159@gmail.com
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleppy
Sleppy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%
%d bloggers like this: