Kelly provides a formulaic approach to evaluate size. There are a couple different parameters, this article will focus on seeing how a fixed kelly values respond to different prices and share positions.

Our hypothetical company DEMO we are setting round numbers. Target price is $120. Budget is $10k, 50% Kelly sigma, 0.5 kelly f-coefficient value.

The first example we look at what happens if we bought 40 at $100. Kelly says we should be holding $4,000 worth, and so we will hold our position.

DEMO

As of · Author-supplied example

ProposalWAIT

Current shares
40
Average share price
$100.00
Current price
$100.00

Kelly parameters

Target price$120.00
Kelly sigma50%
Kelly f-coefficient0.5
Budget$10,000.00
Trading rules

Use Edit above to adjust these rules for this visit. Enable sell policy to apply its return and lot-selection rules.

Sell policyLimit sales to lots that meet the return and selection rules below.Disabled
Minimum short-term return (%)25%
Minimum long-term return (%)Leave blank for no minimum. Zero requires at least breakeven.0%
Long-term cutoff (days)Lots older than this use the long-term rule. An explicit lot term takes precedence.365 days
Lot selectionFIFO stops at the first ineligible lot, even if newer lots qualify.Any eligible lot
Buy increment (shares)Zero adds no extra increment; whole-share sizing still applies.1 shares
Minimum buy quantity (shares)No minimum
Sell increment (shares)Zero adds no extra increment; whole-share sizing still applies.1 shares
Minimum sell quantity (shares)No minimum
Loss threshold to pause resizing (%)Pauses sizing at this loss from average cost; it does not place a sale. Zero pauses at breakeven or any loss.50%

Kelly Preview

PriceActionTarget sharesTarget Exposure
$80.00 · snapshot BUY 85125$10,000.00
$90.00 · snapshot BUY 3474$6,660.00
$100.00 · snapshot WAIT40$4,000.00
$110.00 · snapshot SELL 2317$1,870.00
$120.00 · snapshot SELL 400$0.00
Open DEMO Trade Details

Open Lots

DEMO open lots and proposed purchase44.833.622.411.20$97.50$98.75$100.00$101.25$102.50SharesEntry price40 shares between $100.00 and $100.50Snapshot price $100.00Average cost $100.002026-10-01: 40 shares at $100.00
Bars total open shares by entry-price range. Dark dots are open lots. Snapshot price: $100.00. Average open-lot cost: $100.00.

Symbol Chart

DEMO closing-price history$123.20$111.60$100.00$88.40$76.802026-10-012026-11-06Snapshot priceTarget price2026-10-01 BUY 40 at $100.00
  • Closing-price history
  • Snapshot price — $100.00
  • Kelly target price — $120.00
  • BUY — green background
  • SELL — red background
  • WAIT / blocked — gray background
Closing prices for the supplied range. Background zones approximate BUY, SELL or WAIT under the current parameters and trading rules. Short-/long-term minimum returns apply when sell policy is enabled. SELL includes partial allowed sales; WAIT includes blocked adjustments. Lot ages use the snapshot date; these zones are not historical recommendations. Trade markers show supplied trades within the plotted range.
Price history (6 points)
DateClose
2026-10-01$100.00
2026-10-08$110.00
2026-10-15$120.00
2026-10-22$100.00
2026-10-29$80.00
2026-11-06$100.00

Kelly Preview

Preview uses the snapshot’s holdings and assumptions at nearby prices. No trades are submitted. The highlighted row is the snapshot price.

$10 price step · 5-row grid.

Target shares are the proposed holdings after the adjustment. The current price is added if it falls between grid prices; repetitive zero-target and stop-loss rows are limited to three each.

PriceActionTarget sharesTarget ExposureReason
$80.00 · snapshot BUY 85125$10,000.00
kelly_sizing

At a preview price of $80.00, using the snapshot assumptions: The Kelly target is 125 shares, compared with 40 held. The preview proposes buying 85 shares after applying trade-size rules.

$90.00 · snapshot BUY 3474$6,660.00
kelly_sizing

At a preview price of $90.00, using the snapshot assumptions: The Kelly target is 74 shares, compared with 40 held. The preview proposes buying 34 shares after applying trade-size rules.

$100.00 · snapshot WAIT40$4,000.00
delta_zero

At a preview price of $100.00, using the snapshot assumptions: The rounded Kelly target matches the 40 shares already held, so no trade is needed at this price.

$110.00 · snapshot SELL 2317$1,870.00
kelly_sizing

At a preview price of $110.00, using the snapshot assumptions: The Kelly target is 17 shares, compared with 40 held. The preview proposes selling 23 shares after applying trade-size rules.

$120.00 · snapshot SELL 400$0.00
kelly_sizing

At a preview price of $120.00, using the snapshot assumptions: The Kelly target is 0 shares, compared with 40 held. The preview proposes selling 40 shares after applying trade-size rules.

In this next example, we hold 25 shares at $100. Kelly still expects $4,000 so the system says we need to BUY 15 more.

DEMO

As of · Author-supplied example

ProposalBUY 15 shares

Current shares
25
Average share price
$100.00
Current price
$100.00

Kelly parameters

Target price$120.00
Kelly sigma50%
Kelly f-coefficient0.5
Budget$10,000.00
Trading rules

Use Edit above to adjust these rules for this visit. Enable sell policy to apply its return and lot-selection rules.

Sell policyLimit sales to lots that meet the return and selection rules below.Disabled
Minimum short-term return (%)25%
Minimum long-term return (%)Leave blank for no minimum. Zero requires at least breakeven.0%
Long-term cutoff (days)Lots older than this use the long-term rule. An explicit lot term takes precedence.365 days
Lot selectionFIFO stops at the first ineligible lot, even if newer lots qualify.Any eligible lot
Buy increment (shares)Zero adds no extra increment; whole-share sizing still applies.1 shares
Minimum buy quantity (shares)No minimum
Sell increment (shares)Zero adds no extra increment; whole-share sizing still applies.1 shares
Minimum sell quantity (shares)No minimum
Loss threshold to pause resizing (%)Pauses sizing at this loss from average cost; it does not place a sale. Zero pauses at breakeven or any loss.50%

Kelly Preview

PriceActionTarget sharesTarget Exposure
$80.00 · snapshot BUY 100125$10,000.00
$90.00 · snapshot BUY 4974$6,660.00
$100.00 · snapshot BUY 1540$4,000.00
$110.00 · snapshot SELL 817$1,870.00
$120.00 · snapshot SELL 250$0.00
Open DEMO Trade Details

Open Lots

DEMO open lots and proposed purchase28211470$97.50$98.75$100.00$101.25$102.50SharesEntry price25 shares between $100.00 and $100.50Snapshot price $100.00Average cost $100.00After BUY average $100.002026-10-01: 25 shares at $100.00Proposed BUY 15 at $100.00
Bars total open shares by entry-price range. Dark dots are open lots. Snapshot price: $100.00. Average open-lot cost: $100.00. Proposed BUY: 15 shares; projected average: $100.00. Assumes a fill at the snapshot price before fees/slippage.

Symbol Chart

DEMO closing-price history$123.20$111.60$100.00$88.40$76.802026-10-012026-11-06Snapshot priceTarget price2026-10-01 BUY 25 at $100.00
  • Closing-price history
  • Snapshot price — $100.00
  • Kelly target price — $120.00
  • BUY — green background
  • SELL — red background
  • WAIT / blocked — gray background
Closing prices for the supplied range. Background zones approximate BUY, SELL or WAIT under the current parameters and trading rules. Short-/long-term minimum returns apply when sell policy is enabled. SELL includes partial allowed sales; WAIT includes blocked adjustments. Lot ages use the snapshot date; these zones are not historical recommendations. Trade markers show supplied trades within the plotted range.
Price history (6 points)
DateClose
2026-10-01$100.00
2026-10-08$110.00
2026-10-15$120.00
2026-10-22$100.00
2026-10-29$80.00
2026-11-06$100.00

Kelly Preview

Preview uses the snapshot’s holdings and assumptions at nearby prices. No trades are submitted. The highlighted row is the snapshot price.

$10 price step · 5-row grid.

Target shares are the proposed holdings after the adjustment. The current price is added if it falls between grid prices; repetitive zero-target and stop-loss rows are limited to three each.

PriceActionTarget sharesTarget ExposureReason
$80.00 · snapshot BUY 100125$10,000.00
kelly_sizing

At a preview price of $80.00, using the snapshot assumptions: The Kelly target is 125 shares, compared with 25 held. The preview proposes buying 100 shares after applying trade-size rules.

$90.00 · snapshot BUY 4974$6,660.00
kelly_sizing

At a preview price of $90.00, using the snapshot assumptions: The Kelly target is 74 shares, compared with 25 held. The preview proposes buying 49 shares after applying trade-size rules.

$100.00 · snapshot BUY 1540$4,000.00
kelly_sizing

At a preview price of $100.00, using the snapshot assumptions: The Kelly target is 40 shares, compared with 25 held. The preview proposes buying 15 shares after applying trade-size rules.

$110.00 · snapshot SELL 817$1,870.00
kelly_sizing

At a preview price of $110.00, using the snapshot assumptions: The Kelly target is 17 shares, compared with 25 held. The preview proposes selling 8 shares after applying trade-size rules.

$120.00 · snapshot SELL 250$0.00
kelly_sizing

At a preview price of $120.00, using the snapshot assumptions: The Kelly target is 0 shares, compared with 25 held. The preview proposes selling 25 shares after applying trade-size rules.

Now let's look at what happens if we bought shares at mixed prices. In this we bought 60 at $100 and 40 at $80. The system has a sell policy, and so it'll see that we should be exposed to $6,000 but we hold $10,000. It suggests selling the 40 shares at $80 to re-balance our position. Notice how this is $6,000 exposure locked and this is because the sell policy requires a minimum return on that short term lot of 25%.

DEMO

As of · Author-supplied example

ProposalSELL 40 shares

Current shares
100
Average share price
$92.00
Current price
$100.00

Kelly parameters

Target price$120.00
Kelly sigma50%
Kelly f-coefficient0.5
Budget$10,000.00
Trading rules

Use Edit above to adjust these rules for this visit. Enable sell policy to apply its return and lot-selection rules.

Sell policyLimit sales to lots that meet the return and selection rules below.Enabled
Minimum short-term return (%)25%
Minimum long-term return (%)Leave blank for no minimum. Zero requires at least breakeven.0%
Long-term cutoff (days)Lots older than this use the long-term rule. An explicit lot term takes precedence.365 days
Lot selectionFIFO stops at the first ineligible lot, even if newer lots qualify.Any eligible lot
Buy increment (shares)Zero adds no extra increment; whole-share sizing still applies.1 shares
Minimum buy quantity (shares)No minimum
Sell increment (shares)Zero adds no extra increment; whole-share sizing still applies.1 shares
Minimum sell quantity (shares)No minimum
Loss threshold to pause resizing (%)Pauses sizing at this loss from average cost; it does not place a sale. Zero pauses at breakeven or any loss.50%

Kelly Preview

PriceActionTarget sharesTarget Exposure
$80.00 · snapshot BUY 25125$10,000.00
$90.00 · snapshot WAIT100$9,000.00
$100.00 · snapshot SELL 4060$6,000.00
$110.00 · snapshot SELL 4060$6,600.00
$120.00 · snapshot SELL 4060$7,200.00
Open DEMO Trade Details

Open Lots

DEMO open lots and proposed purchase67.250.433.616.80$77.50$83.75$90.00$96.25$102.50SharesEntry price40 shares between $80.00 and $82.5060 shares between $100.00 and $102.50Snapshot price $100.00Average cost $92.002026-01-02: 60 shares at $100.002026-06-01: 40 shares at $80.00
Bars total open shares by entry-price range. Dark dots are open lots. Snapshot price: $100.00. Average open-lot cost: $92.00.

Symbol Chart

DEMO closing-price history$123.20$111.60$100.00$88.40$76.802026-01-022026-11-06Snapshot priceTarget price2026-01-02 BUY 60 at $100.002026-06-01 BUY 40 at $80.00
  • Closing-price history
  • Snapshot price — $100.00
  • Kelly target price — $120.00
  • BUY — green background
  • SELL — red background
  • WAIT / blocked — gray background
Closing prices for the supplied range. Background zones approximate BUY, SELL or WAIT under the current parameters and trading rules. Short-/long-term minimum returns apply when sell policy is enabled. SELL includes partial allowed sales; WAIT includes blocked adjustments. Lot ages use the snapshot date; these zones are not historical recommendations. Trade markers show supplied trades within the plotted range.
Price history (5 points)
DateClose
2026-01-02$100.00
2026-03-02$90.00
2026-06-01$80.00
2026-09-01$90.00
2026-11-06$100.00

Kelly Preview

Preview uses the snapshot’s holdings and assumptions at nearby prices. No trades are submitted. The highlighted row is the snapshot price.

$10 price step · 5-row grid.

Target shares are the proposed holdings after the adjustment. The current price is added if it falls between grid prices; repetitive zero-target and stop-loss rows are limited to three each.

PriceActionTarget sharesTarget ExposureReason
$80.00 · snapshot BUY 25125$10,000.00
kelly_sizing

At a preview price of $80.00, using the snapshot assumptions: The Kelly target is 125 shares, compared with 100 held. The preview proposes buying 25 shares after applying trade-size rules.

$90.00 · snapshot WAIT100$9,000.00
sell_policy_no_eligible_lots

At a preview price of $90.00, using the snapshot assumptions: Sell-policy and trade-size rules leave no actionable shares to sell at this price, so the preview waits. Lots may be restricted by return or holding-period rules, or eligible shares may be below the trade lot or minimum quantity. Sell policy: 0 of 26 requested shares allowed; 0 shares eligible before trade-size rules. Sell trade lot: 1 shares. ANY mode can use any eligible lot. Each lot must meet its applicable holding-period and return rules.

$100.00 · snapshot SELL 4060$6,000.00
sell_policy_clamped

At a preview price of $100.00, using the snapshot assumptions: The Kelly calculation calls for a larger sale, but sell-policy and trade-size rules limit it. The preview shows the reduced sale and resulting shares held. Sell policy: 40 of 60 requested shares allowed; 40 shares eligible before trade-size rules. Sell trade lot: 1 shares. ANY mode can use any eligible lot. Each lot must meet its applicable holding-period and return rules.

$110.00 · snapshot SELL 4060$6,600.00
sell_policy_clamped

At a preview price of $110.00, using the snapshot assumptions: The Kelly calculation calls for a larger sale, but sell-policy and trade-size rules limit it. The preview shows the reduced sale and resulting shares held. Sell policy: 40 of 83 requested shares allowed; 40 shares eligible before trade-size rules. Sell trade lot: 1 shares. ANY mode can use any eligible lot. Each lot must meet its applicable holding-period and return rules.

$120.00 · snapshot SELL 4060$7,200.00
sell_policy_clamped

At a preview price of $120.00, using the snapshot assumptions: The Kelly calculation calls for a larger sale, but sell-policy and trade-size rules limit it. The preview shows the reduced sale and resulting shares held. Sell policy: 40 of 100 requested shares allowed; 40 shares eligible before trade-size rules. Sell trade lot: 1 shares. ANY mode can use any eligible lot. Each lot must meet its applicable holding-period and return rules.

More examples to come!