Julia package – QuantEcon

For predicting a future possible event, one of the tools is the Monte Carlo simulation. For this purpose, we could use a Julia package called QuantEcon. This package is Quantitative Economics with Julia. The first example is the Markov simulation:

using QuantEconP = [0.4 0.6; 0.2 0.8];mc = MarkovChain(P)x = simulate(mc, 100000);mean(x .== 1)#mc2 = MarkovChain(P, ["employed", "unemployed"])simulate(mc2, 4)

The first part of the program simulates 100,000 times of P matrix while the second part simulates two statuses: employed and unemployed. See the following output:

The next example is also borrowed from the manual. ...

Get Hands-On Data Science with Anaconda now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.