Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thee-unruly/stock_price_prediction_model_msft_ticker
Model the randomness of stock price and help us assess the uncertainty of the investment.
https://github.com/thee-unruly/stock_price_prediction_model_msft_ticker
forecasting investment monte-carlo-simulation msft
Last synced: about 1 month ago
JSON representation
Model the randomness of stock price and help us assess the uncertainty of the investment.
- Host: GitHub
- URL: https://github.com/thee-unruly/stock_price_prediction_model_msft_ticker
- Owner: Thee-Unruly
- Created: 2023-10-12T01:46:15.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-12T02:35:00.000Z (about 1 year ago)
- Last Synced: 2024-10-28T14:22:25.275Z (about 2 months ago)
- Topics: forecasting, investment, monte-carlo-simulation, msft
- Language: Jupyter Notebook
- Homepage:
- Size: 593 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Stock_Price_Prediction_Model_MSFT_Ticker
Model the randomness of the stock price and help us assess the uncertainty of the investment.
Monte Carlo Simulations are used to forecast stock prices
Stock returns have a random process. Any future changes are based on new random information.
Monte Carlo simulations help us model the random processes over time.
We need to generate plausible scenarios while watching the price evolve over a 250-day period.
That means That means 250 consecutive daily returns.Simple Return = (Pt-Pt-1) /Pt-1
Simple returns are not additive, which makes them difficult to work with.
Simple returns are not symmetric. Simple returns cannot be approximated by a normal distribution.Log Returns to the Rescue
The benefits of log returns:
• Time additive: The log returns over the whole period are equal to the sum of the log returns over the period.
• Symmetric: The upside and downside movements are more balanced.
• The log returns are assumed to be more closely represented by a normal distribution.Steps
1. Place the historical stock prices into a pandas dataframe
2. Create a dataframe of daily log returns
3. Plot a distribution of returns to confirm assumptions
4. Calculate the historical statistical measures of the daily log returns
5. Simulate price movements over the next 250 days (random log returns)
6. Convert Log returns into simple returns
7. Calculate the price progressions for each simulations
8. Repeat the simulation 10,000 times
9. Quantify the best, worst, and average stock price scenarios and the distribution of the outcomes.