-
-
Notifications
You must be signed in to change notification settings - Fork 26
Adding a lecture on Monte Carlo and European option pricing #115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for taupe-gaufre-c4e660 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for writing such a beautiful and valuable lecture @jstac . I've learned a lot from it.
I've included my reviews below.
PS. A possible new exercise could be added where we introduce the more realistic distributional dynamics for the option price with the persistence and transitory parameters. We could ask students to investigate how the changes in these parameters could affect the distributional dynamics and therefore the option price.
| Suppose that, after analyzing the data, we guess that $S$ is well | ||
| represented by a lognormal distribution with parameters $\mu, \sigma$ . | ||
|
|
||
| * $S$ has the same distribution as $\exp(\mu + \sigma Z)$ where $Z$ is standard normal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe change where $Z$ is standard normal. -> where $Z$ is standard normal $N(\mu, \sigma)$.
| * $S$ has the same distribution as $\exp(\mu + \sigma Z)$ where $Z$ is standard normal. | ||
| * we write this statement as $S \sim LN(\mu, \sigma)$. | ||
|
|
||
| Any good reference on statistics (such as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably statistics -> lognormal distribution.
| * we write this statement as $S \sim LN(\mu, \sigma)$. | ||
|
|
||
| Any good reference on statistics (such as | ||
| [Wikipedia](https://en.wikipedia.org/wiki/Log-normal_distribution)) will tell |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Wikipedia] --> [the one from Wikipedia]?
|
|
||
| $$ | ||
| \mathop{\mathrm{Var}} S | ||
| = [\exp(\sigma^2) - 1] \exp(2\mu + \sigma^2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a full stop . at the end.
lectures/monte_carlo.md
Outdated
|
|
||
| But now suppose that we study the distribution of $S$ more carefully. | ||
|
|
||
| We decide that the share price depends on three variables, $X_1$, $X_2, and $X_3$ (for example, sales, inflation, etc.). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$X_2, -> $X_2$,
Maybe add interest rates to the variable series sales, inflation, since we mentioned 3 variables before.
lectures/monte_carlo.md
Outdated
| Now that our model is more complicated, we cannot easily determine the | ||
| distribution of $S_n$. | ||
|
|
||
| So to compute the price $P_0$ of the option, we use Monte Carlo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$P_0$->$P$- add
.at the end
lectures/monte_carlo.md
Outdated
| So to compute the price $P_0$ of the option, we use Monte Carlo | ||
|
|
||
|
|
||
| WE average over realizations $S_n^1, \ldots, S_n^M$ of $S_n$ and appealing to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WE->Weappealing->appeal
lectures/monte_carlo.md
Outdated
|
|
||
|
|
||
|
|
||
| ## ExerciseS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## ExerciseS -> ## Exercises
lectures/monte_carlo.md
Outdated
| s = np.full(M, np.log(S0)) | ||
| h = np.full(M, h0) | ||
| for t in range(n): | ||
| Z = np.random.randn((2, M)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Z = np.random.randn((2, M)) -> Z = np.random.randn(2, M)
|
|
||
| Notice that this version is faster than the one using a Python loop. | ||
|
|
||
| Now let's try with larger $M$ to get a more accurate calculation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with larger $M$ -> with a larger $M$
|
The commit above updates the exercise and solution environment to exercise 1. |
|
Added to toc in 51ea510 |
Addresses #76
TODO