Add training workflow, datasets, and runbook
This commit is contained in:
@@ -0,0 +1,215 @@
|
||||
Appendix
|
||||
I. The Logarithm, Log‐Normal Distribution, and Geometric Brownian Motion,
|
||||
with contributions from Jacob Perlman
|
||||
For the following section, let
|
||||
be the initial value of some asset or collection of assets and
|
||||
the value at time
|
||||
. Given the goals of investing, the most obvious statistic to evaluate an investment or portfolio is the profit or loss:
|
||||
. However, according to the efficient market hypothesis (EMH), assets should be judged relative to their initial size, represented using returns,
|
||||
.
|
||||
The returns of the asset from time 0 to time
|
||||
can also be written in terms of each individual return over that time frame. More specifically, for an integer
|
||||
, if
|
||||
then the returns,
|
||||
, can be split into a telescoping
|
||||
1
|
||||
product.
|
||||
(A.1)
|
||||
The EMH states that each term in this product should be independent and similarly distributed. The central limit theorem, and many other powerful tools in probability theory, concern long
|
||||
sums
|
||||
of independent random variables. To apply these tools to this telescoping product of random variables, it first must be converted into a sum of random variables. Logarithms offer a convenient way to accomplish this.
|
||||
Logarithmic functions are a class of functions with wide applications in science and mathematics. Though there are several equivalent definitions, the simplest is as the inverse of exponentiation. If
|
||||
and
|
||||
are positive numbers, and
|
||||
, then
|
||||
(read as “the log base
|
||||
of
|
||||
”) is the number such that
|
||||
. For example,
|
||||
can be equivalently written as
|
||||
.
|
||||
The choice of base is largely arbitrary, only affecting the logarithm by a constant multiple. If
|
||||
is another possible base, then
|
||||
. In mathematics, the most common choice is Euler's constant, a special number:
|
||||
. Using this constant as a base results in the
|
||||
natural logarithm
|
||||
, denoted
|
||||
. The justification for this choice largely comes down to notational convenience, such as when taking derivatives:
|
||||
. In this example, as
|
||||
, using
|
||||
avoids the accumulation of cumbersome and not particularly meaningful constant factors.
|
||||
As
|
||||
, logarithms have the useful property
|
||||
2
|
||||
given by:
|
||||
(A.2)
|
||||
This property transforms the telescoping product given above into a sum of small independent pieces, given by the following equation:
|
||||
(A.3)
|
||||
The central limit theorem states that if a random variable is made by adding together many independently random pieces, then the result will be normally distributed. One can, therefore, conclude that log returns are normally distributed. Observe the following:
|
||||
(A.4)
|
||||
This suggests that stock prices follow a log‐normal distribution or a distribution where the logarithm of a random variable is normally distributed. Within the context of Black‐Scholes, this implies that stock log‐returns evolve as Brownian motion (normally distributed), and stock prices evolve as geometric Brownian motion (log‐normally distributed). The log‐normal distribution is more appropriate to describe stock prices because the log‐normal distribution cannot have negative values and is skewed according to the volatility of price, as shown in the comparisons in
|
||||
Figure A.1
|
||||
.
|
||||
II. Expected Range, Strike Skew, and the Volatility Smile
|
||||
The majority of this book refers to expected range approximated with the following equation:
|
||||
(A.5)
|
||||
For a stock trading at current price
|
||||
with volatility
|
||||
and risk‐free rate
|
||||
, the Black‐Scholes theoretical
|
||||
price range at a future time
|
||||
for this asset is given by the following equation:
|
||||
(A.6)
|
||||
The equation in (
|
||||
A.5
|
||||
) is a valid approximation of this formula when
|
||||
is small, which follows from the mathematical relation
|
||||
. Generally speaking, (
|
||||
A.5
|
||||
) is a very rough approximation for expected range, and it becomes less accurate in high volatility conditions, when
|
||||
is larger.
|
||||
Though (
|
||||
A.5
|
||||
) still yields a reasonable, back‐of‐the‐envelope estimate for expected range, the one standard deviation expected move range is calculated on most trading platforms according to the following:
|
||||
(A.7)
|
||||
Figure A.1
|
||||
Comparison of the log‐normal distribution (a) and the normal distribution (b). The mean and standard deviation of the normal distribution are the exponentiated parameters of the log‐normal distribution.
|
||||
According to the EMH, this is simply the expected future price displacement, i.e., price of at‐the‐money (ATM) straddle, with additional terms (prices of near ATM strangles) to counterbalance the heavy tails pulling the expected value beyond the central 68%. To see how this formula compares with the (
|
||||
A.5
|
||||
) approximation, consider the statistics in
|
||||
Table A.1
|
||||
.
|
||||
Table A.1
|
||||
Expected 30‐day price range approximations for an underlying with a price of $100 and implied volatility (IV) of 20%. According to the Black‐Scholes model, the per‐share prices for the 30‐day options are $4.58 for the straddle, $3.64 for the strangle one strike from ATM, and $2.85 for the strangle two strikes from ATM.
|
||||
30‐Day Expected Price Range Comparison
|
||||
Equation (A.5)
|
||||
Equation (A.7)
|
||||
$5.73
|
||||
$4.13
|
||||
Compared to
|
||||
Equation (A.5)
|
||||
,
|
||||
Equation (A.7)
|
||||
is a more attractive way to calculate expected range on trading platforms because it is computationally simpler and independent of a rigid mathematical model. However, neither of these expected range calculations take
|
||||
skew
|
||||
into account.
|
||||
When comparing contracts across the options chain, an interesting phenomenon commonly observed is the
|
||||
volatility smile
|
||||
. According to the Black‐Scholes model, options with the same underlying and duration should have the same implied volatility, regardless of strike price (as volatility is a property of the underlying). However, because the market values each contract differently and implied volatility is derived from from options prices, the implied volatilities across strikes often vary. A volatility smile appears when the implied volatility is lowest for contracts near ATM and increases as the strikes move further out‐of‐the‐money (OTM). Similarly, a volatility smirk (also known as volatility skew) is a weighted volatility smile, where the options with lower strikes tend to have higher IV than options with higher strikes. The opposite of the volatility smirk is described as forward skew, which is relatively rare, having occurred, for example, with GME in early 2021. For an example of volatility skew, consider the SPY 30 days to expiration (DTE) OTM option data shown in
|
||||
Figure A.2
|
||||
.
|
||||
Figure A.2
|
||||
Volatility curve for OTM 30 DTE SPY calls and puts, collected on November 15, 2021, after the close.
|
||||
The volatility curve in
|
||||
Figure A.2
|
||||
is clearly asymmetric around the ATM strike, with the options with lower strikes (OTM puts) having higher IVs than options with higher strikes (OTM calls). This type of curve is useful for analyzing the perceived value of OTM contracts. Compared to ATM volatility, OTM puts are generally overvalued while OTM calls are generally undervalued until very far OTM (near $510). This suggests that traders are willing to pay a higher premium to protect against downside risk compared to upside risk.
|
||||
This is an example of put skew, a consequence of put contracts further from ATM being perceived as equivalently risky as call contracts closer to ATM.
|
||||
Table A.2
|
||||
reproduces data from
|
||||
Chapter 5
|
||||
.
|
||||
Table A.2
|
||||
Data for 16
|
||||
SPY strangles with different durations from April 20, 2021. The first row is the distance between the strike for a 16
|
||||
put and the price of the underlying for different DTEs (i.e., if the price of the underlying is $100 and the strike for a 16
|
||||
put is $95, then the put distance is [$100 – $95]/$100 = 5%). The second row is the distance between the strike for a 16
|
||||
call and the price of the underlying for different contract durations.
|
||||
16
|
||||
SPY Option Distance from ATM
|
||||
Option Type
|
||||
15 DTE
|
||||
30 DTE
|
||||
45 DTE
|
||||
Put Distance
|
||||
3.9%
|
||||
6.5%
|
||||
8.0%
|
||||
Call Distance
|
||||
2.4%
|
||||
3.9%
|
||||
4.9%
|
||||
This skew results from market fear to the
|
||||
downside
|
||||
, meaning the market fears larger extreme moves to the downside more than extreme moves to the upside. According to the EMH, the skew has already been priced into the current value of the underlying. Hence, the put skew implies that the market views large moves to the downside as more likely than large moves to the upside but small moves to the upside as being the most likely outcome overall. For a given duration, the strikes for the 16
|
||||
puts and calls approximately correspond to the one standard deviation expected range of that asset over that time frame. For example, since SPY was trading at approximately $413 on April 20, 2021, the 30‐day expected price move to the upside was $16 and the expected price move to the downside was $27 according to the 16
|
||||
options.
|
||||
III. Conditional Probability
|
||||
Conditional probability is mentioned briefly in this book, but it is an interesting concept in probability theory worthy of a short discussion. Conditional probability is the probability that an event will occur, given that another event occurred. Consider the following examples:
|
||||
Given that the ground is wet, what is the probability that it rained?
|
||||
Given that the last roll of a fair die was six, what is the probability that the next roll will also be a six?
|
||||
Given that SPY had an up day yesterday, what is the probability it will have an up day tomorrow?
|
||||
Analyzing probabilities conditionally looks at the likelihood of a given outcome within the context of known information. For events
|
||||
and
|
||||
the conditional probability
|
||||
(read as the probability of
|
||||
, given
|
||||
) is calculated as follows:
|
||||
(A.8)
|
||||
where
|
||||
is the probability that event
|
||||
occurs and
|
||||
is the probability that
|
||||
and
|
||||
occur. For example, suppose
|
||||
is the event that it rains on any given day and
|
||||
(20% chance of rain). Suppose
|
||||
is the event that there is a tornado on any given day, there is a 1% chance of a tornado occurring on any given day, and tornados never happen without rain, meaning that
|
||||
. Therefore, given that it is a rainy day, we have the following probability that a tornado will appear:
|
||||
In other words, a tornado is five times more likely to appear if it is raining than under regular circumstances.
|
||||
IV. The Kelly Criterion,
|
||||
derivation courtesy of Jacob Perlman
|
||||
The Kelly Criterion is a concept from information theory and was originally created to analyze signal transmission through noisy communication channels. It can be used to determine the optimal theoretical bet size for a repeated game, presuming the odds and payouts are known. The Kelly bet size is the fraction of the bankroll that maximizes the expected long‐term growth rate of the game, more specifically the logarithm of wealth. For a game with probability
|
||||
of winning
|
||||
and a probability
|
||||
of losing 1 (the full wager), the Kelly bet size is given as follows:
|
||||
(A.9)
|
||||
This is the theoretically optimal fraction of the bankroll to maximize the expected growth rate of the game. A brief justification for this formula follows from the paper listed in Reference 4.
|
||||
Consider a game with probability
|
||||
of winning
|
||||
and a probability
|
||||
of losing the full wager. If a player has
|
||||
in starting wealth and bets a fraction of that wealth,
|
||||
, on this game, the player's goal is to choose a value of
|
||||
that maximizes their wealth growth after
|
||||
bets.
|
||||
If the player has
|
||||
wins and
|
||||
losses in the
|
||||
plays of this game, then:
|
||||
Over many bets of this game, the log‐growth rate is then given by the following:
|
||||
following from the law of large numbers
|
||||
The bet size that maximizes the long‐term growth rate corresponds to
|
||||
.
|
||||
The Kelly Criterion can also be applied to asset management to determine the theoretically optimal allocation percentage for a trade with known (or approximated) probability of profit (POP) and edge. More specifically, for an option with a given duration and POP, the optimal fraction of the bankroll to allocate to this trade is approximately:
|
||||
(A.10)
|
||||
where
|
||||
is the risk‐free rate and
|
||||
is the duration of the trade in years. The derivation for this equation is outlined as follows:
|
||||
For a game with probability
|
||||
of winning
|
||||
and a probability
|
||||
of losing 1 unit, the expected change in bankroll after one play is given by
|
||||
.
|
||||
For an investment of time
|
||||
with the risk‐free rate given by
|
||||
, the expected change in value is estimated by
|
||||
, derived from the future value of the game with continuous compounding. Assuming that
|
||||
is small, then
|
||||
.
|
||||
For the bet to be fairly priced, the change in the bankroll should also equal
|
||||
. Therefore, if
|
||||
, the odds for this trade can be estimated as
|
||||
.
|
||||
Using this value for
|
||||
in the Kelly Criterion formula, one arrives at the following:
|
||||
This then yields the approximate optimal proportion of bankroll to allocate to a given trade, substituting
|
||||
for
|
||||
and POP for
|
||||
.
|
||||
Notes
|
||||
1
|
||||
So called because adjacent numerators and denominators cancel, allowing the long product to be collapsed like a telescope.
|
||||
2
|
||||
Stated abstractly, logarithms are the group homomorphisms between
|
||||
and
|
||||
.
|
||||
Reference in New Issue
Block a user