-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
derivation of Black-Scholes equation from wikipedia #36
Comments
Starting from https://en.wikipedia.org/wiki/Simple_harmonic_motion prompt to Gemini 2.0 Flash Thinking Experimental 01-21, https://aistudio.google.com/prompts/Wikipedia uses MediaWiki syntax. Convert the following MediaWiki content to a single Latex document. For the Latex equations, add a label for each equation. The label that is added should be descriptive of the equation and contain no spaces, only underscores. Equations labels should be unique within the Latex file.
thoughtsThe user wants to convert MediaWiki content to a single Latex document.
Let's break down the task:
Let's process the provided MediaWiki content step by step and build the Latex document. Step 1: Basic Latex Structure \documentclass{article}
\usepackage{amsmath} % For align environment and other math tools
\begin{document}
% Content will be inserted here
\bibliographystyle{plain}
\bibliography{references}
\end{document} Step 2 & 3: Text and Link Conversion
Step 4 & 5 & 6: Math and Labeling
Step 7: Section Headings
Step 8: References
\begin{thebibliography}{1}
\bibitem{Hull2008}
Hull, John C.
\newblock \emph{Options, Futures and Other Derivatives}.
\newblock 7th edition.
\newblock Prentice Hall, 2008.
\newblock Pages 287–288.
\newblock ISBN 978-0-13-505283-9.
\end{thebibliography}
\begin{thebibliography}{1}
\bibitem{Shreve2004}
Shreve, Steven
\newblock \emph{Stochastic Calculus for Finance II}.
\newblock 1st edition.
\newblock Springer, 2004.
\newblock Pages 268–272.
\newblock ISBN 0-387-40101-6.
\end{thebibliography} We can use Let's assemble the complete Latex document based on these transformations. response\documentclass{article}
\usepackage{amsmath}
\begin{document}
Per the model assumptions above, the price of the underlying asset (typically a stock) follows a geometric Brownian motion.\cite{Hull2008} That is
\begin{equation}\label{geometric_brownian_motion}
dS = \mu S\,dt + \sigma S\,dW\,
\end{equation}
where $W$ is a stochastic variable (Brownian motion). Note that $W$, and consequently its infinitesimal increment $dW$, represents the only source of uncertainty in the price history of the stock. Intuitively, $W(t)$ is a process that "wiggles up and down" in such a random way that its expected change over any time interval is 0. (In addition, its variance over time $T$ is equal to $T$; see Wiener process#Basic properties); a good discrete analogue for $W$ is a simple random walk. Thus the above equation states that the infinitesimal rate of return on the stock has an expected value of $\mu\,dt$ and a variance of $\sigma^2 dt $.
The payoff of an option (or any derivative contingent to stock $S$) $V(S,T)$ at maturity is known. To find its value at an earlier time we need to know how $V$ evolves as a function of $S$ and $t$. By Itô's lemma for two variables we have
\begin{equation}\label{ito_lemma_for_dv}
dV = \left(\mu S \frac{\partial V}{\partial S} + \frac{\partial V}{\partial t} + \frac{1}{2}\sigma^2 S^2 \frac{\partial^2 V}{\partial S^2}\right)dt + \sigma S \frac{\partial V}{\partial S}\,dW
\end{equation}
Replacing the differentials with deltas in the equations for $dS$ and $dV$ gives:
\begin{equation}\label{delta_s_equation}
\Delta S = \mu S \,\Delta t + \sigma S\,\Delta W\,
\end{equation}
\begin{equation}\label{delta_v_equation}
\Delta V = \left(\mu S \frac{\partial V}{\partial S} + \frac{\partial V}{\partial t} + \frac{1}{2}\sigma^2 S^2 \frac{\partial^2 V}{\partial S^2}\right)\Delta t + \sigma S \frac{\partial V}{\partial S}\,\Delta W
\end{equation}
Now consider a portfolio $\Pi$ consisting of a short option and ${\partial V}/{\partial S}$ long shares at time $t$. The value of these holdings is
\begin{equation}\label{portfolio_value}
\Pi = -V + \frac{\partial V}{\partial S}S
\end{equation}
Over the time period $[t,t+\Delta t]$, the total profit or loss from changes in the values of the holdings is:
\begin{equation}\label{delta_portfolio_change}
\Delta \Pi = -\Delta V + \frac{\partial V}{\partial S}\,\Delta S
\end{equation}
Substituting $\Delta S$ and $\Delta V$ into the expression for $\Delta \Pi$:
\begin{equation}\label{delta_portfolio_simplified}
\Delta \Pi = \left(-\frac{\partial V}{\partial t} - \frac{1}{2}\sigma^2 S^2 \frac{\partial^2 V}{\partial S^2}\right)\Delta t
\end{equation}
Note that the $\Delta W$ term has vanished. Thus uncertainty has been eliminated and the portfolio is effectively riskless, i.e. a delta-hedge. The rate of return on this portfolio must be equal to the rate of return on any other riskless instrument; otherwise, there would be opportunities for arbitrage. Now assuming the risk-free rate of return is $r$ we must have over the time period $[t,t+\Delta t]$
\begin{equation}\label{riskless_portfolio_return}
\Delta \Pi = r\Pi\,\Delta t
\end{equation}
If we now substitute our formulas for $\Delta\Pi$ and $\Pi$ we obtain:
\begin{equation}\label{substituted_portfolio_return}
\left(-\frac{\partial V}{\partial t} - \frac{1}{2}\sigma^2 S^2 \frac{\partial^2 V}{\partial S^2}\right)\Delta t = r\left(-V + S\frac{\partial V}{\partial S}\right)\Delta t
\end{equation}
Simplifying, we arrive at the Black–Scholes partial differential equation:
\begin{equation}\label{black_scholes_pde}
\frac{\partial V}{\partial t} + rS\frac{\partial V}{\partial S} + \frac{1}{2}\sigma^2 S^2 \frac{\partial^2 V}{\partial S^2} = rV
\end{equation}
With the assumptions of the Black–Scholes model, this second order partial differential equation holds for any type of option as long as its price function $V$ is twice differentiable with respect to $S$ and once with respect to $t$.
\subsection{Alternative derivation}
Here is an alternative derivation that can be utilized in situations where it is initially unclear what the hedging portfolio should be. (For a reference, see 6.4 of Shreve vol II).\cite{Shreve2004}
In the Black–Scholes model, assuming we have picked the risk-neutral probability measure, the underlying stock price $S(t)$ is assumed to evolve as a geometric Brownian motion:
\begin{equation}\label{geometric_brownian_motion_rate}
\frac{dS(t)}{S(t)} = r\ dt + \sigma dW(t)
\end{equation}
Since this stochastic differential equation (SDE) shows the stock price evolution is Markovian, any derivative on this underlying is a function of time $t$ and the stock price at the current time, $S(t)$. Then an application of Itô's lemma gives an SDE for the discounted derivative process $e^{-rt}V(t, S(t))$, which should be a martingale. In order for that to hold, the drift term must be zero, which implies the Black—Scholes PDE.
This derivation is basically an application of the Feynman–Kac formula and can be attempted whenever the underlying asset(s) evolve according to given SDE(s).
\begin{thebibliography}{2}
\bibitem{Hull2008}
Hull, John C.
\newblock \emph{Options, Futures and Other Derivatives}.
\newblock 7th edition.
\newblock Prentice Hall, 2008.
\newblock Pages 287–288.
\newblock ISBN 978-0-13-505283-9.
\bibitem{Shreve2004}
Shreve, Steven
\newblock \emph{Stochastic Calculus for Finance II}.
\newblock 1st edition.
\newblock Springer, 2004.
\newblock Pages 268–272.
\newblock ISBN 0-387-40101-6.
\end{thebibliography}
\end{document} |
promptThe following Latex file contains a derivation with many steps. Sometimes a previous expression is referenced implicitly. Edit the following text to manually insert references where appropriate. For example replace text like "substitute the forces" with "substitute Eq.~\ref{} to get". Be sure to reference the relevant equation labels so that Latex can compile the document. Just write the revised Latex file content as your answer. \documentclass{article}
\usepackage{amsmath}
% margins of 1 inch:
\setlength{\topmargin}{-.5in}
\setlength{\textheight}{9in}
\setlength{\oddsidemargin}{0in}
\setlength{\textwidth}{6.5in}
\usepackage[pdftex]{hyperref} % hyperlink equation and bibliographic citations
\begin{document}
Per the model assumptions above, the price of the underlying asset (typically a stock) follows a geometric Brownian motion.\cite{Hull2008} That is
\begin{equation}\label{geometric_brownian_motion}
dS = \mu S\,dt + \sigma S\,dW\,
\end{equation}
where $W$ is a stochastic variable (Brownian motion). Note that $W$, and consequently its infinitesimal increment $dW$, represents the only source of uncertainty in the price history of the stock. Intuitively, $W(t)$ is a process that "wiggles up and down" in such a random way that its expected change over any time interval is 0. (In addition, its variance over time $T$ is equal to $T$; see Wiener process, Basic properties); a good discrete analogue for $W$ is a simple random walk. Thus the above equation states that the infinitesimal rate of return on the stock has an expected value of $\mu\,dt$ and a variance of $\sigma^2 dt $.
The payoff of an option (or any derivative contingent to stock $S$) $V(S,T)$ at maturity is known. To find its value at an earlier time we need to know how $V$ evolves as a function of $S$ and $t$. By Itô's lemma for two variables we have
\begin{equation}\label{ito_lemma_for_dv}
dV = \left(\mu S \frac{\partial V}{\partial S} + \frac{\partial V}{\partial t} + \frac{1}{2}\sigma^2 S^2 \frac{\partial^2 V}{\partial S^2}\right)dt + \sigma S \frac{\partial V}{\partial S}\,dW
\end{equation}
Replacing the differentials with deltas in the equations for $dS$ and $dV$ gives:
\begin{equation}\label{delta_s_equation}
\Delta S = \mu S \,\Delta t + \sigma S\,\Delta W\,
\end{equation}
\begin{equation}\label{delta_v_equation}
\Delta V = \left(\mu S \frac{\partial V}{\partial S} + \frac{\partial V}{\partial t} + \frac{1}{2}\sigma^2 S^2 \frac{\partial^2 V}{\partial S^2}\right)\Delta t + \sigma S \frac{\partial V}{\partial S}\,\Delta W
\end{equation}
Now consider a portfolio $\Pi$ consisting of a short option and ${\partial V}/{\partial S}$ long shares at time $t$. The value of these holdings is
\begin{equation}\label{portfolio_value}
\Pi = -V + \frac{\partial V}{\partial S}S
\end{equation}
Over the time period $[t,t+\Delta t]$, the total profit or loss from changes in the values of the holdings is:
\begin{equation}\label{delta_portfolio_change}
\Delta \Pi = -\Delta V + \frac{\partial V}{\partial S}\,\Delta S
\end{equation}
Substituting $\Delta S$ and $\Delta V$ into the expression for $\Delta \Pi$:
\begin{equation}\label{delta_portfolio_simplified}
\Delta \Pi = \left(-\frac{\partial V}{\partial t} - \frac{1}{2}\sigma^2 S^2 \frac{\partial^2 V}{\partial S^2}\right)\Delta t
\end{equation}
Note that the $\Delta W$ term has vanished. Thus uncertainty has been eliminated and the portfolio is effectively riskless, i.e. a delta-hedge. The rate of return on this portfolio must be equal to the rate of return on any other riskless instrument; otherwise, there would be opportunities for arbitrage. Now assuming the risk-free rate of return is $r$ we must have over the time period $[t,t+\Delta t]$
\begin{equation}\label{riskless_portfolio_return}
\Delta \Pi = r\Pi\,\Delta t
\end{equation}
If we now substitute our formulas for $\Delta\Pi$ and $\Pi$ we obtain:
\begin{equation}\label{substituted_portfolio_return}
\left(-\frac{\partial V}{\partial t} - \frac{1}{2}\sigma^2 S^2 \frac{\partial^2 V}{\partial S^2}\right)\Delta t = r\left(-V + S\frac{\partial V}{\partial S}\right)\Delta t
\end{equation}
Simplifying, we arrive at the Black–Scholes partial differential equation:
\begin{equation}\label{black_scholes_pde}
\frac{\partial V}{\partial t} + rS\frac{\partial V}{\partial S} + \frac{1}{2}\sigma^2 S^2 \frac{\partial^2 V}{\partial S^2} = rV
\end{equation}
With the assumptions of the Black–Scholes model, this second order partial differential equation holds for any type of option as long as its price function $V$ is twice differentiable with respect to $S$ and once with respect to $t$.
\subsection{Alternative derivation}
Here is an alternative derivation that can be utilized in situations where it is initially unclear what the hedging portfolio should be. (For a reference, see 6.4 of Shreve vol II).\cite{Shreve2004}
In the Black–Scholes model, assuming we have picked the risk-neutral probability measure, the underlying stock price $S(t)$ is assumed to evolve as a geometric Brownian motion:
\begin{equation}\label{geometric_brownian_motion_rate}
\frac{dS(t)}{S(t)} = r\ dt + \sigma dW(t)
\end{equation}
Since this stochastic differential equation (SDE) shows the stock price evolution is Markovian, any derivative on this underlying is a function of time $t$ and the stock price at the current time, $S(t)$. Then an application of Itô's lemma gives an SDE for the discounted derivative process $e^{-rt}V(t, S(t))$, which should be a martingale. In order for that to hold, the drift term must be zero, which implies the Black—Scholes PDE.
This derivation is basically an application of the Feynman–Kac formula and can be attempted whenever the underlying asset(s) evolve according to given SDE(s).
\begin{thebibliography}{2}
\bibitem{Hull2008}
Hull, John C.
\newblock \emph{Options, Futures and Other Derivatives}.
\newblock 7th edition.
\newblock Prentice Hall, 2008.
\newblock Pages 287–288.
\newblock ISBN 978-0-13-505283-9.
\bibitem{Shreve2004}
Shreve, Steven
\newblock \emph{Stochastic Calculus for Finance II}.
\newblock 1st edition.
\newblock Springer, 2004.
\newblock Pages 268–272.
\newblock ISBN 0-387-40101-6.
\end{thebibliography}
\end{document} thoughtsThe user wants me to edit a Latex file to add explicit references to equations in the text. Let's go through the text step by step:
Looks like I have addressed all the implicit references. Now I will generate the revised Latex code. response\documentclass{article}
\usepackage{amsmath}
% margins of 1 inch:
\setlength{\topmargin}{-.5in}
\setlength{\textheight}{9in}
\setlength{\oddsidemargin}{0in}
\setlength{\textwidth}{6.5in}
\usepackage[pdftex]{hyperref} % hyperlink equation and bibliographic citations
\begin{document}
Per the model assumptions above, the price of the underlying asset (typically a stock) follows a geometric Brownian motion.\cite{Hull2008} That is, Eq.~\ref{geometric_brownian_motion}:
\begin{equation}\label{geometric_brownian_motion}
dS = \mu S\,dt + \sigma S\,dW\,
\end{equation}
where $W$ is a stochastic variable (Brownian motion). Note that $W$, and consequently its infinitesimal increment $dW$, represents the only source of uncertainty in the price history of the stock. Intuitively, $W(t)$ is a process that "wiggles up and down" in such a random way that its expected change over any time interval is 0. (In addition, its variance over time $T$ is equal to $T$; see Wiener process, Basic properties); a good discrete analogue for $W$ is a simple random walk. Thus the above equation states that the infinitesimal rate of return on the stock has an expected value of $\mu\,dt$ and a variance of $\sigma^2 dt $.
The payoff of an option (or any derivative contingent to stock $S$) $V(S,T)$ at maturity is known. To find its value at an earlier time we need to know how $V$ evolves as a function of $S$ and $t$. By Itô's lemma for two variables we have Eq.~\ref{ito_lemma_for_dv}:
\begin{equation}\label{ito_lemma_for_dv}
dV = \left(\mu S \frac{\partial V}{\partial S} + \frac{\partial V}{\partial t} + \frac{1}{2}\sigma^2 S^2 \frac{\partial^2 V}{\partial S^2}\right)dt + \sigma S \frac{\partial V}{\partial S}\,dW
\end{equation}
Replacing the differentials with deltas in Eqs.~\ref{geometric_brownian_motion} and~\ref{ito_lemma_for_dv} gives:
\begin{equation}\label{delta_s_equation}
\Delta S = \mu S \,\Delta t + \sigma S\,\Delta W\,
\end{equation}
\begin{equation}\label{delta_v_equation}
\Delta V = \left(\mu S \frac{\partial V}{\partial S} + \frac{\partial V}{\partial t} + \frac{1}{2}\sigma^2 S^2 \frac{\partial^2 V}{\partial S^2}\right)\Delta t + \sigma S \frac{\partial V}{\partial S}\,\Delta W
\end{equation}
Now consider a portfolio $\Pi$ consisting of a short option and ${\partial V}/{\partial S}$ long shares at time $t$. The value of these holdings is
\begin{equation}\label{portfolio_value}
\Pi = -V + \frac{\partial V}{\partial S}S
\end{equation}
Over the time period $[t,t+\Delta t]$, the total profit or loss from changes in the values of the holdings is given by Eq.~\ref{delta_portfolio_change}:
\begin{equation}\label{delta_portfolio_change}
\Delta \Pi = -\Delta V + \frac{\partial V}{\partial S}\,\Delta S
\end{equation}
Substituting $\Delta S$ from Eq.~\ref{delta_s_equation} and $\Delta V$ from Eq.~\ref{delta_v_equation} into Eq.~\ref{delta_portfolio_change}:
\begin{equation}\label{delta_portfolio_simplified}
\Delta \Pi = \left(-\frac{\partial V}{\partial t} - \frac{1}{2}\sigma^2 S^2 \frac{\partial^2 V}{\partial S^2}\right)\Delta t
\end{equation}
Note that the $\Delta W$ term has vanished. Thus uncertainty has been eliminated and the portfolio is effectively riskless, i.e. a delta-hedge. The rate of return on this portfolio must be equal to the rate of return on any other riskless instrument; otherwise, there would be opportunities for arbitrage. Now assuming the risk-free rate of return is $r$ we must have Eq.~\ref{riskless_portfolio_return} over the time period $[t,t+\Delta t]$
\begin{equation}\label{riskless_portfolio_return}
\Delta \Pi = r\Pi\,\Delta t
\end{equation}
If we now substitute Eq.~\ref{delta_portfolio_simplified} for $\Delta\Pi$ and Eq.~\ref{portfolio_value} for $\Pi$ into Eq.~\ref{riskless_portfolio_return} we obtain:
\begin{equation}\label{substituted_portfolio_return}
\left(-\frac{\partial V}{\partial t} - \frac{1}{2}\sigma^2 S^2 \frac{\partial^2 V}{\partial S^2}\right)\Delta t = r\left(-V + S\frac{\partial V}{\partial S}\right)\Delta t
\end{equation}
Simplifying, we arrive at the Black–Scholes partial differential equation, Eq.~\ref{black_scholes_pde}:
\begin{equation}\label{black_scholes_pde}
\frac{\partial V}{\partial t} + rS\frac{\partial V}{\partial S} + \frac{1}{2}\sigma^2 S^2 \frac{\partial^2 V}{\partial S^2} = rV
\end{equation}
With the assumptions of the Black–Scholes model, this second order partial differential equation holds for any type of option as long as its price function $V$ is twice differentiable with respect to $S$ and once with respect to $t$.
\subsection{Alternative derivation}
Here is an alternative derivation that can be utilized in situations where it is initially unclear what the hedging portfolio should be. (For a reference, see 6.4 of Shreve vol II).\cite{Shreve2004}
In the Black–Scholes model, assuming we have picked the risk-neutral probability measure, the underlying stock price $S(t)$ is assumed to evolve as a geometric Brownian motion, as shown in Eq.~\ref{geometric_brownian_motion_rate}:
\begin{equation}\label{geometric_brownian_motion_rate}
\frac{dS(t)}{S(t)} = r\ dt + \sigma dW(t)
\end{equation}
Since this stochastic differential equation (SDE) shows the stock price evolution is Markovian, any derivative on this underlying is a function of time $t$ and the stock price at the current time, $S(t)$. Then an application of Itô's lemma gives an SDE for the discounted derivative process $e^{-rt}V(t, S(t))$, which should be a martingale. In order for that to hold, the drift term must be zero, which implies the Black—Scholes PDE.
This derivation is basically an application of the Feynman–Kac formula and can be attempted whenever the underlying asset(s) evolve according to given SDE(s).
\begin{thebibliography}{2}
\bibitem{Hull2008}
Hull, John C.
\newblock \emph{Options, Futures and Other Derivatives}.
\newblock 7th edition.
\newblock Prentice Hall, 2008.
\newblock Pages 287–288.
\newblock ISBN 978-0-13-505283-9.
\bibitem{Shreve2004}
Shreve, Steven
\newblock \emph{Stochastic Calculus for Finance II}.
\newblock 1st edition.
\newblock Springer, 2004.
\newblock Pages 268–272.
\newblock ISBN 0-387-40101-6.
\end{thebibliography}
\end{document} |
as per https://en.wikipedia.org/wiki/Black%E2%80%93Scholes_equation#Derivation
The text was updated successfully, but these errors were encountered: