Optimization problem: solve for the size of negative price shock within a stochastic simulation
Show older comments
I'm running a simulation for stock prices over a 12 months period and each period there are two randomly generated variables that affect the price
- Normally distributed stochastic change in price
- negative shock - that only occur p% of the time
at the end of each month, Price is given by: P(t+1) = P(t)*randn(t) - Shock, where Shock = S if rand(0,1) < 0.1 and Shock = 0 otherwise.
I need to solve for S such that Average Price at the end of the 12 months is a fixed number (say 40). Is there a code that will help me calibrate the size of the shock (s) with 100,000 simulations over 12 months?
Below is an example of the problem described. Thanks!

Accepted Answer
More Answers (0)
Categories
Find more on Problem-Based Optimization Setup in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!