Calculating Affordable Shares Under Exponential Price Impact
Summary
The document derives how many shares a fixed budget can purchase when each successive share raises the price by a constant multiplicative factor. It represents the total spend as a finite geometric series, with the first share priced at the initial stock price and later shares priced progressively higher. Solving the budget inequality for the number of shares gives a logarithmic expression, rounded down to ensure the purchase stays within budget.
The example assumes a 20% price increase for each 1,000 shares bought and an initial price of $50. The derivation depends on treating the stated price impact as deterministic and applying it only to the buy-side offers. It does not account for other market participants, changing liquidity, fees, or any uncertainty in execution, so the formula is a simplified sizing calculation rather than a complete market-impact model.
Key ideas
- A fixed multiplicative price increase per share makes the cumulative purchase cost a geometric series.
- The maximum affordable share count can be found by solving the budget inequality with logarithms.
- The result must be rounded down to keep total spending within the available budget.
- The calculation assumes deterministic price impact and ignores other execution costs or market responses.
Tags
Full text
# Answer by Kermittfrog (score 2, accepted)
# How to calculate the number of stocks I can buy with X dollars, if we know the exact growth rate of the stock price per dollar?
Let's say we have a stock whose price goes up at a rate (from the doubling time formula):
$ r = e^{(\text{volume}/1000 * \ln(1.2))} - 1 $
(The 1 is subtracted from e^pwr, not from pwr)
Meaning that it will go up 20% every time 1000 stocks are bought (we assume the sellers are only on the order book offers). Now, if we know that the starting price of the stock is 50, is there a close form solution to calculate how many stocks can I buy with X amount of dollars?
## Answer by Kermittfrog (score 2, accepted)
https://quant.stackexchange.com/a/68851
If I get you correctly,
The first unit you buy will increase the price from $P_0$ to $P_0 \times 1.2^{(1/1000)}$, yes? Then, given some budget $X$, you would be looking for:
$\max K$ subject to
$$ P_0\sum_{i=0}^K 1.2^{(i/1000)}\leq X $$
i.e. a geometric series where your total number of buys is $N=K+1$.
As @Alper wrote in the comment, this is easily solved: Let $G$ denote the growth factor $G=1.2^{1/1000}$, and $P_0=50$ the initial price. Then
$$ \begin{align} X&\geq P_0\sum_{k=0}^KG^k\\ &=P_0\frac{1-G^{K+1}}{1-G}=P_0\frac{1-G^{N}}{1-G}\\ \Rightarrow N&=\left\lfloor\frac{\ln\left(1-\frac{X}{P_0}(1-G)\right)}{\ln G}\right\rfloor \end{align} $$ where we $\lfloor x\rfloor$ denotes rounding $x$ down.Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.