Difference between revisions of "SOCR EduMaterials Activities ApplicationsActivities StockSimulation"

From SOCR
Jump to: navigation, search
(New page: == A Model for Stock prices == * '''Description''': You can access the stock simulation applet at http://www.socr.ucla.edu/htmls/app/ . * Process for Stock Prices: Assumed a drift rate...)
 
m
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== A Model for Stock prices ==
+
== [[SOCR_EduMaterials_ApplicationsActivities | SOCR Applications Activities]] - A Model for Stock Prices ==
  
* '''Description''':  You can access the stock simulation applet at http://www.socr.ucla.edu/htmls/app/ .
+
===Description===
 +
You can access the Stock Prices applet at [http://www.socr.ucla.edu/htmls/app/ the SOCR Applications Site], select ''Financial Applications'' --> ''StockSimulation''.
  
* Process for Stock Prices:  Assumed a drift rate equal to <math>\mu S</math> where <math>\mu</math> is the expected return of the stock, and variance <math>\sigma^2 S^2</math> where <math>\sigma^2</math> is the variance of the return of the stock.  From Weiner process the model for stock prices is:
+
===Process for Stock Prices===
<math>
+
Assume that the drift rate is equal to <math>\mu S</math>, <math>\mu</math> is the expected return of the stock, and variance <math>\sigma^2 S^2</math> and <math>\sigma^2</math> is the variance of the return of the stock.  From Weiner process the model for stock prices is:
\Delta S = \mu S \Delta t + \sigma S \epsilon \sqrt{\Delta t}
+
: <math> \Delta S = \mu S \Delta t + \sigma S \epsilon \sqrt{\Delta t}
 
</math>
 
</math>
 
or
 
or
<math>
+
: <math>
 
\frac{\Delta S}{S} = \mu \Delta t + \sigma \epsilon \sqrt{\Delta t}.
 
\frac{\Delta S}{S} = \mu \Delta t + \sigma \epsilon \sqrt{\Delta t}.
 
</math>
 
</math>
 
Therefore
 
Therefore
<math>
+
: <math>
 
\frac{\Delta S}{S} \sim N(\mu \Delta t, \sigma \sqrt{\Delta t}).
 
\frac{\Delta S}{S} \sim N(\mu \Delta t, \sigma \sqrt{\Delta t}).
 
</math>
 
</math>
 
<br>
 
<br>
<math>S</math>        Price of the stock.
+
: <math>S</math>        Price of the stock.
<math>\Delta S</math>  Change in the stock price.
+
: <math>\Delta S</math>  Change in the stock price.
<math>\Delta t</math>  Small interval of time.
+
: <math>\Delta t</math>  Small interval of time.
<math>\epsilon</math>  Follows <math>N(0,1)</math>.
+
: <math>\epsilon</math>  Follows <math>N(0,1)</math>.
  
 
<br>
 
<br>
  
*ExampleThe current price of a stock is <math>S_0=\$100</math>.  The expected return is <math>\mu=0.10</math> per year, and the standard deviation of the return is <math>\sigma=0.20</math> (also per year).
+
===Example===
 +
The current price of a stock is <math>S_0=\$100</math>.  The expected return is <math>\mu=0.10</math> per year, and the standard deviation of the return is <math>\sigma=0.20</math> (also per year).
  
 
* Find an expression for the process of the stock. <br>
 
* Find an expression for the process of the stock. <br>
Line 29: Line 31:
 
\frac{\Delta S}{S}=0.14 \Delta t + 0.20 \epsilon \sqrt{\Delta t}
 
\frac{\Delta S}{S}=0.14 \Delta t + 0.20 \epsilon \sqrt{\Delta t}
 
</math>
 
</math>
* Find the distribution of the change in <math>S<math> divided by <math>S<math> at the end of the first year.  That is, find the distribution of <math>\frac{\Delta S}{S}</math>. <br>
+
* Find the distribution of the change in <math>S</math> divided by <math>S</math> at the end of the first year.  That is, find the distribution of <math>\frac{\Delta S}{S}</math>. <br>
<math>
+
: <math>
 
\frac{\Delta S}{S} \sim N\left(0.10 \Delta t, 0.20 \sqrt{\Delta t}\right).
 
\frac{\Delta S}{S} \sim N\left(0.10 \Delta t, 0.20 \sqrt{\Delta t}\right).
 
</math>
 
</math>
 
* Divide the year in weekly intervals and find the distribution of <math>\frac{\Delta S}{S}</math> at the end of each weekly interval.  <br>
 
* Divide the year in weekly intervals and find the distribution of <math>\frac{\Delta S}{S}</math> at the end of each weekly interval.  <br>
<math>
+
: <math>
 
\frac{\Delta S}{S} \sim N\left(0.10 \frac{1}{52}, 0.20 \sqrt{\frac{1}{52}}\right).
 
\frac{\Delta S}{S} \sim N\left(0.10 \frac{1}{52}, 0.20 \sqrt{\frac{1}{52}}\right).
 
</math>
 
</math>
Line 40: Line 42:
 
* Therefore, sampling from this distribution we can simulate the path of the stock.  The price of the stock at the end of the first interval will be <math>S_1 = S_0 + \Delta S_1</math>, where <math>\Delta S_1</math> is the change during the first time interval, etc.
 
* Therefore, sampling from this distribution we can simulate the path of the stock.  The price of the stock at the end of the first interval will be <math>S_1 = S_0 + \Delta S_1</math>, where <math>\Delta S_1</math> is the change during the first time interval, etc.
 
<br>
 
<br>
* Using the SOCR applet we will simulate the stock's path by dividing one year into small intervals each one of length <math>\frac{1}{100}</math> of a year, when <math>S_0=\$20<math>, annual mean and standard deviation: <math>\mu=0.14, \sigma=0.20</math>.
+
* Using the [http://www.socr.ucla.edu/htmls/app/ SOCR applet] we will simulate the stock's path by dividing one year into small intervals each one of length <math>\frac{1}{100}</math> of a year, when <math>S_0=\$20</math>, annual mean and standard deviation: <math>\mu=0.14, \sigma=0.20</math>.
 
<br>
 
<br>
  
 
* The applet will select a random sample of 100 observations from <math>N(0,1)</math> and will compute <br>
 
* The applet will select a random sample of 100 observations from <math>N(0,1)</math> and will compute <br>
<math>
+
: <math> \frac{\Delta S}{S} =  0.14 (0.01) + 0.20 \epsilon \sqrt{0.01}.
\frac{\Delta S}{S} =  0.14 (0.01) + 0.20 \epsilon \sqrt{0.01}.
 
 
</math>
 
</math>
 
Suppose that <math>\epsilon_1=0.58</math>.  Then <br>
 
Suppose that <math>\epsilon_1=0.58</math>.  Then <br>
<math>
+
: <math> \frac{\Delta S}{S} =  0.14 (0.01) + 0.20 (0.58) \sqrt{0.01}= 0.013 \Rightarrow  \Delta S_1= 20(0.013)=0.26. </math>
\frac{\Delta S}{S} =  0.14 (0.01) + 0.20 (0.58) \sqrt{0.01}= 0.013 \Rightarrow  \Delta S_1= 20(0.013)=0.26.
 
</math>
 
 
<br>
 
<br>
 
Therefore  
 
Therefore  
<math>
+
: <math> \Delta S_1 = S_0 +  \Delta S_1 = 20 + 0.26=20.26. </math>
\Delta S_1 = S_0 +  \Delta S_1 = 20 + 0.26=20.26.
+
We continue in the same fashion until we reach the end of the year.  Here is the SOCR applet.
</math>
 
We continue in the same fashion until we reach the end of the year.
 
  
 
<center>[[Image: Christou_stock_simulation.jpg|600px]]</center>
 
<center>[[Image: Christou_stock_simulation.jpg|600px]]</center>
 +
 +
<br>
 +
* The materials above was partially taken from <br>
 +
''Modern Portfolio Theory'' by Edwin J. Elton, Martin J. Gruber, Stephen J. Brown, and William N. Goetzmann, Sixth Edition, Wiley, 2003, and ''Options, Futues, and Other Derivatives'' by John C. Hull, Sixth Edition, Pearson Prentice Hall, 2006.
 +
* [http://www.socr.ucla.edu/htmls/app/ SOCR Applications Site]
 +
 +
{{translate|pageName=http://wiki.stat.ucla.edu/socr/index.php?title=SOCR_EduMaterials_Activities_ApplicationsActivities_StockSimulation}}

Latest revision as of 14:10, 3 August 2008

SOCR Applications Activities - A Model for Stock Prices

Description

You can access the Stock Prices applet at the SOCR Applications Site, select Financial Applications --> StockSimulation.

Process for Stock Prices

Assume that the drift rate is equal to \(\mu S\), \(\mu\) is the expected return of the stock, and variance \(\sigma^2 S^2\) and \(\sigma^2\) is the variance of the return of the stock. From Weiner process the model for stock prices is: \[ \Delta S = \mu S \Delta t + \sigma S \epsilon \sqrt{\Delta t} \] or \[ \frac{\Delta S}{S} = \mu \Delta t + \sigma \epsilon \sqrt{\Delta t}. \] Therefore \[ \frac{\Delta S}{S} \sim N(\mu \Delta t, \sigma \sqrt{\Delta t}). \]
\[S\] Price of the stock. \[\Delta S\] Change in the stock price. \[\Delta t\] Small interval of time. \[\epsilon\] Follows \(N(0,1)\).


Example

The current price of a stock is \(S_0=\$100\). The expected return is \(\mu=0.10\) per year, and the standard deviation of the return is \(\sigma=0.20\) (also per year).

  • Find an expression for the process of the stock.

\( \frac{\Delta S}{S}=0.14 \Delta t + 0.20 \epsilon \sqrt{\Delta t} \)

  • Find the distribution of the change in \(S\) divided by \(S\) at the end of the first year. That is, find the distribution of \(\frac{\Delta S}{S}\).

\[ \frac{\Delta S}{S} \sim N\left(0.10 \Delta t, 0.20 \sqrt{\Delta t}\right). \]

  • Divide the year in weekly intervals and find the distribution of \(\frac{\Delta S}{S}\) at the end of each weekly interval.

\[ \frac{\Delta S}{S} \sim N\left(0.10 \frac{1}{52}, 0.20 \sqrt{\frac{1}{52}}\right). \]

  • Therefore, sampling from this distribution we can simulate the path of the stock. The price of the stock at the end of the first interval will be \(S_1 = S_0 + \Delta S_1\), where \(\Delta S_1\) is the change during the first time interval, etc.


  • Using the SOCR applet we will simulate the stock's path by dividing one year into small intervals each one of length \(\frac{1}{100}\) of a year, when \(S_0=\$20\), annual mean and standard deviation\[\mu=0.14, \sigma=0.20\].


  • The applet will select a random sample of 100 observations from \(N(0,1)\) and will compute

\[ \frac{\Delta S}{S} = 0.14 (0.01) + 0.20 \epsilon \sqrt{0.01}. \] Suppose that \(\epsilon_1=0.58\). Then
\[ \frac{\Delta S}{S} = 0.14 (0.01) + 0.20 (0.58) \sqrt{0.01}= 0.013 \Rightarrow \Delta S_1= 20(0.013)=0.26. \]
Therefore \[ \Delta S_1 = S_0 + \Delta S_1 = 20 + 0.26=20.26. \] We continue in the same fashion until we reach the end of the year. Here is the SOCR applet.

Christou stock simulation.jpg


  • The materials above was partially taken from

Modern Portfolio Theory by Edwin J. Elton, Martin J. Gruber, Stephen J. Brown, and William N. Goetzmann, Sixth Edition, Wiley, 2003, and Options, Futues, and Other Derivatives by John C. Hull, Sixth Edition, Pearson Prentice Hall, 2006.



Translate this page:

(default)
Uk flag.gif

Deutsch
De flag.gif

Español
Es flag.gif

Français
Fr flag.gif

Italiano
It flag.gif

Português
Pt flag.gif

日本語
Jp flag.gif

България
Bg flag.gif

الامارات العربية المتحدة
Ae flag.gif

Suomi
Fi flag.gif

इस भाषा में
In flag.gif

Norge
No flag.png

한국어
Kr flag.gif

中文
Cn flag.gif

繁体中文
Cn flag.gif

Русский
Ru flag.gif

Nederlands
Nl flag.gif

Ελληνικά
Gr flag.gif

Hrvatska
Hr flag.gif

Česká republika
Cz flag.gif

Danmark
Dk flag.gif

Polska
Pl flag.png

România
Ro flag.png

Sverige
Se flag.gif