Skip to content
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

Open
bhpayne opened this issue Jan 30, 2025 · 2 comments
Open

derivation of Black-Scholes equation from wikipedia #36

bhpayne opened this issue Jan 30, 2025 · 2 comments
Assignees

Comments

@bhpayne
Copy link
Member

bhpayne commented Jan 30, 2025

as per https://en.wikipedia.org/wiki/Black%E2%80%93Scholes_equation#Derivation

@bhpayne bhpayne self-assigned this Jan 30, 2025
@bhpayne bhpayne changed the title derivation of Black-Scholes equation derivation of Black-Scholes equation from wikipedia Jan 30, 2025
@bhpayne
Copy link
Member Author

bhpayne commented Jan 30, 2025

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.

Per the model assumptions above, the price of the [[underlying asset]] (typically a stock) follows a [[geometric Brownian motion]].<ref name="Hull">{{Cite book|last=Hull |first=John C. |year=2008| edition=7 |title=Options, Futures and Other Derivatives |pages=287–288|publisher=[[Prentice Hall]] |isbn=978-0-13-505283-9}}</ref> That is

:<math>dS = \mu S\,dt + \sigma S\,dW\,</math>

where ''W'' is a stochastic variable ([[Wiener process|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 [[random process|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 {{section link|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 ''μ''&nbsp;''dt'' and a variance of <math>\sigma^2 dt </math>.

The payoff of an option (or any derivative contingent to stock {{mvar|S}}) <math>V(S,T)</math> at maturity is known. To find its value at an earlier time we need to know how <math>V</math> evolves as a function of <math>S</math> and <math>t</math>. By [[Itô's lemma]] for two variables we have

:<math>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</math>

Replacing the differentials with deltas in the equations for ''dS'' and ''dV'' gives:
:<math>\Delta S = \mu S \,\Delta t + \sigma S\,\Delta W\,</math>

:<math>\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</math>

Now consider a portfolio <math>\Pi</math> consisting of a short option and <math display="inline">{\partial V}/{\partial S}</math> long shares at time <math>t</math>. The value of these holdings is
:<math>\Pi = -V + \frac{\partial V}{\partial S}S</math>

Over the time period <math>[t,t+\Delta t]</math>, the total profit or loss from changes in the values of the holdings is:
:<math>\Delta \Pi = -\Delta V + \frac{\partial V}{\partial S}\,\Delta S</math>

Substituting <math>\Delta S</math> and <math>\Delta V</math> into the expression for <math>\Delta \Pi</math>:
:<math>\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</math>

Note that the <math>\Delta W</math> term has vanished. Thus uncertainty has been eliminated and the portfolio is effectively riskless, i.e. a [[delta hedging|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 <math>r</math> we must have over the time period <math>[t,t+\Delta t]</math>
:<math>\Delta \Pi = r\Pi\,\Delta t</math>

If we now substitute our formulas for <math>\Delta\Pi</math> and <math>\Pi</math> we obtain:
:<math>\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</math>

Simplifying, we arrive at the Black–Scholes partial differential equation:
:<math>\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</math>

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 <math>V</math> is twice differentiable with respect to <math>S</math> and once with respect to <math>t</math>.

===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).<ref>{{cite book |last1=Shreve |first1=Steven |title=Stochastic Calculus for Finance II |date=2004 |publisher=Springer |edition=1st |isbn=0-387-40101-6 |pages=268–272}}</ref>

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:

:<math> \frac{dS(t)}{S(t)} = r\ dt + \sigma dW(t) </math>

Since this stochastic differential equation (SDE) shows the stock price evolution is [[Markov chain|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 <math>e^{-rt}V(t, S(t))</math>, 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).

thoughts

The user wants to convert MediaWiki content to a single Latex document.
The MediaWiki content includes text, links, references, and math equations.
The Latex document should include:

  1. Text content from MediaWiki.
  2. Hyperlinks should be removed or converted to plain text.
  3. References should be converted to Latex citation format.
  4. Math equations enclosed in <math> tags should be converted to Latex math environment.
  5. Each Latex equation should have a unique descriptive label without spaces (using underscores).

Let's break down the task:

  1. Document Structure: Start with a basic Latex document structure: \documentclass{article}, \begin{document}, \end{document}.
  2. Text Conversion: Copy the text content directly. Handle special characters if needed.
  3. Link Removal/Conversion: Remove [[ and ]] from links, leaving the text. For piped links like [[underlying asset|stock]], use 'stock'.
  4. Reference Conversion: Convert <ref name="Hull">...</ref> to Latex \cite{Hull}. Define the bibliography at the end using \bibitem and \bibliographystyle{plain} and \bibliography{references}. We will create a references.bib file content in the Latex document itself for simplicity in this single document case.
  5. Math Conversion: Convert <math>...</math> to Latex math environments like \[ ... \] for displayed equations.
  6. Equation Labeling: For each equation, add \label{equation_label} inside the math environment. Create descriptive labels using underscores and ensure uniqueness.
  7. Section Headings: Convert ===...=== to Latex \subsection{...} and ==...== to \section{...}.
  8. Inline Math: Handle <math display="inline">...</math> as inline math using $...$.

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

  • "Per the model assumptions above, the price of the [[underlying asset]] (typically a stock) follows a [[geometric Brownian motion]]." -> "Per the model assumptions above, the price of the underlying asset (typically a stock) follows a geometric Brownian motion."
  • "stochastic variable ([[Wiener process|Brownian motion]])" -> "stochastic variable (Brownian motion)"
  • "[[random process|process]]" -> "process"
  • "[[variance]]" -> "variance"
  • "{{section link|Wiener process#Basic properties}}" -> "see Section Wiener process#Basic properties" (This is a simplification, a better approach might be just "see Wiener process#Basic properties" or remove it entirely as section links are not directly applicable in Latex) - Let's remove it for simplicity.
  • "stock {{mvar|S}}" -> "stock S" (remove {{mvar|...}})
  • "[[Itô's lemma]]" -> "Itô's lemma"
  • "[[delta hedging|delta-hedge]]" -> "delta-hedge"
  • "[[Black–Scholes model]]" -> "Black–Scholes model"
  • "[[Markov chain|Markovian]]" -> "Markovian"
  • "[[Feynman–Kac formula]]" -> "Feynman–Kac formula"

Step 4 & 5 & 6: Math and Labeling

  • :<math>dS = \mu S\,dt + \sigma S\,dW\,</math> -> \begin{equation}\label{geometric_brownian_motion} dS = \mu S\,dt + \sigma S\,dW \end{equation}
  • variance of <math>\sigma^2 dt </math> -> variance of $\sigma^2 dt$
  • :<math>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</math> -> \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}
  • :<math>\Delta S = \mu S \,\Delta t + \sigma S\,\Delta W\,</math> -> \begin{equation}\label{delta_S_equation} \Delta S = \mu S \,\Delta t + \sigma S\,\Delta W \end{equation}
  • :<math>\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</math> -> \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}
  • portfolio <math>\Pi</math> -> portfolio $\Pi$
  • :<math>\Pi = -V + \frac{\partial V}{\partial S}S</math> -> \begin{equation}\label{portfolio_value} \Pi = -V + \frac{\partial V}{\partial S}S \end{equation}
  • :<math>\Delta \Pi = -\Delta V + \frac{\partial V}{\partial S}\,\Delta S</math> -> \begin{equation}\label{delta_portfolio_change} \Delta \Pi = -\Delta V + \frac{\partial V}{\partial S}\,\Delta S \end{equation}
  • :<math>\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</math> -> \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}
  • risk-free rate of return is <math>r</math> -> risk-free rate of return is $r$
  • :<math>\Delta \Pi = r\Pi\,\Delta t</math> -> \begin{equation}\label{riskless_portfolio_return} \Delta \Pi = r\Pi\,\Delta t \end{equation}
  • :<math>\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</math> -> \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}
  • :<math>\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</math> -> \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}
  • price function <math>V</math> -> price function $V$
  • :<math> \frac{dS(t)}{S(t)} = r\ dt + \sigma dW(t) </math> -> \begin{equation}\label{geometric_brownian_motion_rate} \frac{dS(t)}{S(t)} = r\ dt + \sigma dW(t) \end{equation}
  • discounted derivative process <math>e^{-rt}V(t, S(t))</math> -> discounted derivative process $e^{-rt}V(t, S(t))$

Step 7: Section Headings

  • ===Alternative derivation=== -> \subsection{Alternative derivation}

Step 8: References

  • <ref name="Hull">{{Cite book|last=Hull |first=John C. |year=2008| edition=7 |title=Options, Futures and Other Derivatives |pages=287–288|publisher=[[Prentice Hall]] |isbn=978-0-13-505283-9}}</ref> -> \cite{Hull2008} and in bibliography:
\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}
  • <ref>{{cite book |last1=Shreve |first1=Steven |title=Stochastic Calculus for Finance II |date=2004 |publisher=Springer |edition=1st |isbn=0-387-40101-6 |pages=268–272}}</ref> -> \cite{Shreve2004} and in bibliography:
\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 thebibliography environment directly within the document since it's a single document request.

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}

@bhpayne
Copy link
Member Author

bhpayne commented Jan 30, 2025

prompt

The 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}

thoughts

The user wants me to edit a Latex file to add explicit references to equations in the text.
I need to go through the text and identify places where equations are being used or referred to implicitly.
Then, I need to replace these implicit references with explicit references using Eq.~\ref{} and the correct equation labels.

Let's go through the text step by step:

  1. "That is $dS = \mu S,dt + \sigma S,dW,$": This equation is labeled as geometric_brownian_motion. The preceding sentence introduces geometric Brownian motion, and "That is" clearly refers to the equation. So, I should change "That is" to "That is Eq.~\ref{geometric_brownian_motion}".

  2. "By Itô's lemma for two variables we have $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$": This equation is labeled as ito_lemma_for_dv. The text "By Itô's lemma for two variables we have" introduces this equation. So, I should change "By Itô's lemma for two variables we have" to "By Itô's lemma for two variables we have Eq.~\ref{ito_lemma_for_dv}".

  3. "Replacing the differentials with deltas in the equations for $dS$ and $dV$ gives:": This is referring to the previous two equations, geometric_brownian_motion and ito_lemma_for_dv. So, I should change "in the equations for $dS$ and $dV$" to "in Eqs.\ref{geometric_brownian_motion} and\ref{ito_lemma_for_dv}".

  4. Two equations for delta S and delta V are given, labeled delta_s_equation and delta_v_equation. No explicit reference is needed here, these are just presented after the sentence above.

  5. "Now consider a portfolio $\Pi$ consisting of ...": This introduces equation portfolio_value. No explicit reference needed.

  6. "Over the time period ..., the total profit or loss ... is: $\Delta \Pi = -\Delta V + \frac{\partial V}{\partial S},\Delta S$": This equation is labeled delta_portfolio_change. "the total profit or loss ... is:" introduces this equation. So change "is:" to "is given by Eq.~\ref{delta_portfolio_change}:".

  7. "Substituting $\Delta S$ and $\Delta V$ into the expression for $\Delta \Pi$:": This is referring to delta_s_equation, delta_v_equation, and delta_portfolio_change. So, I should change "Substituting $\Delta S$ and $\Delta V$ into the expression for $\Delta \Pi$:" to "Substituting $\Delta S$ from Eq.\ref{delta_s_equation} and $\Delta V$ from Eq.\ref{delta_v_equation} into Eq.~\ref{delta_portfolio_change}:".

  8. Equation delta_portfolio_simplified is presented. No explicit reference is needed here, as it's the result of the substitution in the previous sentence.

  9. "Now assuming the risk-free rate of return is $r$ we must have ... $\Delta \Pi = r\Pi,\Delta t$": This equation is labeled riskless_portfolio_return. "we must have" introduces this equation. So change "we must have" to "we must have Eq.~\ref{riskless_portfolio_return}".

  10. "If we now substitute our formulas for $\Delta\Pi$ and $\Pi$ we obtain:": This refers to delta_portfolio_simplified and portfolio_value, and likely riskless_portfolio_return too since we are equating them. Let's check and refine the reference. Yes, we are substituting delta_portfolio_simplified for $\Delta \Pi$ and portfolio_value for $\Pi$ into riskless_portfolio_return. So, I should change "If we now substitute our formulas for $\Delta\Pi$ and $\Pi$ we obtain:" to "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:".

  11. Equation substituted_portfolio_return is presented. No explicit reference needed.

  12. "Simplifying, we arrive at the Black–Scholes partial differential equation: ...": This equation is labeled black_scholes_pde. "we arrive at" introduces this equation. So change "we arrive at the Black–Scholes partial differential equation:" to "Simplifying, we arrive at the Black–Scholes partial differential equation, Eq.~\ref{black_scholes_pde}:".

  13. "In the Black–Scholes model, assuming ..., the underlying stock price $S(t)$ is assumed to evolve as a geometric Brownian motion: $\frac{dS(t)}{S(t)} = r\ dt + \sigma dW(t)$": This equation is labeled geometric_brownian_motion_rate. "evolve as a geometric Brownian motion:" introduces this equation. So change "evolve as a geometric Brownian motion:" to "evolve as a geometric Brownian motion, as shown in Eq.~\ref{geometric_brownian_motion_rate}:".

  14. "Then an application of Itô's lemma gives an SDE for ...": No equation is presented immediately after this sentence. No change required.

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}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant