# Bruce Mayer, PE Licensed Electrical & Mechanical Engineer BMayer@ChabotCollege.edu - PowerPoint PPT Presentation

1 / 13

Engineering 25. Prob 7.18 Solution Stock Market Simulation: Buy? Sell? Hold?. Bruce Mayer, PE Licensed Electrical & Mechanical Engineer BMayer@ChabotCollege.edu. Scenario. Behavior of Certain Stock Price, P, is randomly set by NORMAL distribution µ = \$100 σ = \$5

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

Bruce Mayer, PE Licensed Electrical & Mechanical Engineer BMayer@ChabotCollege.edu

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

#### Presentation Transcript

Engineering 25

Prob 7.18SolutionStock Market Simulation:

Bruce Mayer, PE

### Scenario

• Behavior of Certain Stock

• Price, P, is randomly set by NORMAL distribution

• µ = \$100

• σ = \$5

• Simulate Stock behavior over 250 days (1 trading year)

• If P<100, → BUY 50 Shares

• If P>105 → SELL ALL shares

• If 100< P < 105 → HOLD

• Add to Profit the Value of Stock HELD at END of Year

### Key to Problem

• The Critical Issue required to get close to the BOOK answer is to realize:

• That at YEAR’S END we must Assess the Value of Any Shares NOT SOLD

• We will Very Likely (84.13% chance) have shares “Left Over” if P250 < \$105

• Add the Held-Over Value to the previous selling profit

### Method-1 Results (1-Run)

=Stock purchase Profit summary =

SellDays =

38

133

HoldDays=

79

NoSharesLeftInPortfolio=

50

YearEndPrice=

98.9097

YearEndValue=

4.9455e+003

DailyProfit=

6.4715e+004

TotalProfit=

6.9660e+004

### Method-2 Results

mean_yearly_profit=

6.5054e+004

min_yearly_profit=

4.9024e+004

max_yearly_profit=

9.0948e+004

std_profit=

5.7442e+003

MEAN_YrEnd_Price=

99.8867

AVG_YrEnd_Shares=

154.4088

MIN_YrEnd_Shares=

0

MAX_YrEnd_Shares=

1250

### Method-1: 499 Runs

= Stock purchase Profit summary =

MAXProfit=

8.5555e+004

MINProfit=

4.6147e+004

AvgProfit =

6.4593e+004

StdPprofit=

5.7947e+003

AvgEndShares=

168.0361