OneClick US S&P Stock Prediction Using Monte Carlo and Brownian Motion in Python
Originally published: 16/03/2019 18:43
Last version published: 18/03/2020 07:30
Publication number: ELQ-70862-2
View all versions & Certificate

OneClick US S&P Stock Prediction Using Monte Carlo and Brownian Motion in Python

Monte Carlo and Brownian Motion Models Python script to predict future stock movements.

The OneClick series aims to help finance professionals with no or minimal programming background to expedite financial modelling and analysis tasks with less time and efforts.

The traditional way of establishing Monte Carlo simulation is the spreadsheet which requires repetition of the same tasks and bit labour-intensive and time-consuming. The python template aims to speed up the process with better precision.

The script models future stock movements based on two well-known stochastic processes.
The aim of the script to save tons of time compared to the traditional way of doing it in a spreadsheet.

User provides:
1) stock symbol/ticker of their choice on the exchange,
2) Date of data to be used to model future,
3) Number of days of the future interested, and
4) the number of different scenarios interested.
And then click “Run all Cell”. That’s it!

The result will be in the form of a graph and a short report with some statistics.
If you are not familiar with python and Azure notebook, please refer to the link provided in the template for how to create one.


The template model is an educated guess of the future, which is based on python libraries written by third parties and data received from Yahoo Finance and does not guarantee actual outcomes. The user should not consider it as a stand-alone decision-making tool.
The author will not accept any liabilities.

This Best Practice includes
1 Python Script and linked video that explain how to use this script.

Rizwan Ahmed Surhio offers you this Best Practice for free!

download for free

Add to bookmarks


Further information

To provide one-click calculations of complex simulations

1. Availability of free Microsoft Azure account.
2. Availability of Libraries and Module used in the script.
3. Availability of Data from Yahoo Finance
4. Know how to run Jupyter Notebook

Local or cloud-based python version, libraries, modules are not appropriate
Yahoo finance data service API depreciated



More Best Practices from Rizwan Ahmed Surhio

See all

Discussion feed for OneClick US S&P Stock Prediction Using Monte Carlo And Brownian Motion In Python

The user community and author are here to help. Go ahead!

  • Julian Zehtner
    got it sorry :P
    arrow_drop_uparrow_drop_downReply reply
    • Julian Zehtner
      hi, how can I open the python script?
      arrow_drop_uparrow_drop_downReply reply
      • Rizwan Ahmed Surhio
        Hi Julian,
        you need to upload this script in your azure note book account. It's free account. Link is provided to show how to create free account and upload.
        arrow_drop_uparrow_drop_downReply reply

      4.9 / 5 (8 votes)

      please wait...