An experiment in modeling a monte carlo simulation in erlang
monterl_carlo will simulate market prices on a stock exchange.
You can start it and it will execute a function on every tick or you can have it graph a series of prices for you.
where the parameters are:
2. initial price
3. precision of the price (how many decimals)
4. annual volatility (%)
5. annual expected return (%)
6. update interval (ms)
Start pumping out data:
monterl_carlo:subscribe("MSFT",fun(X) -> io:format("~p~n",[X]) end).
This will start pumping out the state of the simulation at the interval you specified.
You can stop it by calling:
Generate graph data
Where the parameters are:
3. type of data
currently the types of data are: