Okay, this is a classic arbitrage problem adapted for prediction markets with liquidity considerations. Here's how to approach maximizing your profit:
1. Understand the Core Arbitrage:
- Let Market A have probability P_A for "YES" and Market B have P_B for "YES".
- Assume P_A > P_B (if not, swap A and B for this explanation).
- This means:
- "NO" in Market A is priced at (1 - P_A).
- "YES" in Market B is priced at P_B.
- Since P_A > P_B, then (1 - P_A) < (1 - P_B).
- The arbitrage opportunity is:
- Buy "NO" shares in Market A (because they are cheaper than what "NO" implies in Market B).
- Buy "YES" shares in Market B (because they are cheaper than what "YES" implies in Market A).
2. The Goal: Equal Payout, Minimized Cost
To guarantee a profit regardless of the outcome, you need to structure your trades so that your net payout is the same whether "YES" or "NO" is the true outcome.
- If "YES" happens: Your "YES" shares in Market B pay out. Your "NO" shares in Market A are worthless.
- If "NO" happens: Your "NO" shares in Market A pay out. Your "YES" shares in Market B are worthless.
To achieve an equal payout, you must purchase an equal number of potential winning shares for each outcome.
Let N be the number of shares you target for your winning leg.
- You will buy
N shares of "NO" in Market A.
- You will buy
N shares of "YES" in Market B.
If the payout per winning share is $1 (common in prediction markets):
- If "YES" resolves: Payout =
N * $1 (from Market B)
- If "NO" resolves: Payout =
N * 1(fromMarketA)Yourgrosspayoutwillbe‘N` regardless of the outcome.
3. Accounting for Liquidity and Cost:
This is where your specific problem lies. The cost to acquire N shares is not simply N * initial_price due to slippage/price impact.
- Let
Cost_A_no(N) be the total cost to acquire N shares of "NO" in Market A.
- Let
Cost_B_yes(N) be the total cost to acquire N shares of "YES" in Market B.
These cost functions are not linear. As you buy more shares, the price per share increases. Most prediction market platforms will show you the average cost per share and the total cost if you try to buy a certain quantity, as well as the new market probability after your trade.
4. Maximizing Profit:
Your profit Π(N) for acquiring N shares in each leg (as described above) will be:
Π(N) = N * ($Payout_per_share) - (Cost_A_no(N) + Cost_B_yes(N))
Assuming Payoutpershare=1:
Π(N) = N - (Cost_A_no(N) + Cost_B_yes(N))
You want to find the value of N that maximizes Π(N).
The Theoretical Optimum (Calculus Approach):
To maximize Π(N), we'd take the derivative with respect to N and set it to zero:
dΠ/dN = 1 - (d(Cost_A_no(N))/dN + d(Cost_B_yes(N))/dN) = 0
This means:
d(Cost_A_no(N))/dN + d(Cost_B_yes(N))/dN = 1
d(Cost_A_no(N))/dN is the marginal cost of the next "NO" share in Market A. This is effectively the instantaneous price of "NO" in Market A after you've bought N shares (let's call this P'_A_no).
d(Cost_B_yes(N))/dN is the marginal cost of the next "YES" share in Market B. This is effectively the instantaneous price of "YES" in Market B after you've bought N shares (let's call this P'_B_yes).
So, the condition for maximum profit is:
P'_A_no + P'_B_yes = 1
Since P'_A_no = 1 - P'_A_yes (where P'_A_yes is the new "YES" probability in Market A):
(1 - P'_A_yes) + P'_B_yes = 1
This simplifies to:
P'_A_yes = P'_B_yes
Conclusion: You maximize your arbitrage profit by buying an equal number of shares (N) of "NO" in the higher-probability market (A) and "YES" in the lower-probability market (B), up to the point where your trades cause the "YES" probabilities in both markets to converge.
5. Practical Steps to Find the Optimal N:
Since you likely don't have the explicit cost functions Cost_A_no(N) and Cost_B_yes(N) or their derivatives, you'll need an iterative or search-based approach, especially if the platform's UI allows you to simulate trades:
-
Pre-computation/Simulation (if possible):
Many modern prediction market UIs (like Polymarket, Manifold Markets) will show you:
- If you want to buy
X shares of an outcome...
- It will cost you
$Y (total).
- The new market probability will be
Z%.
This is exactly the information you need.
-
Iterative Search for N:
- Start with an initial guess for
N (e.g., a small number of shares, or an amount of capital you're willing to risk divided by the initial average price).
- For the current
N:
a. Market A (Buy "NO"): Go to Market A. Input that you want to buy N shares of "NO". The UI should tell you the total cost, let's call it Current_Cost_A_no, and the new "YES" probability, P'_A_yes.
b. Market B (Buy "YES"): Go to Market B. Input that you want to buy N shares of "YES". The UI should tell you the total cost, Current_Cost_B_yes, and the new "YES" probability, P'_B_yes.
- Check for Convergence and Profit:
- Your total investment for this
N is Total_Cost(N) = Current_Cost_A_no + Current_Cost_B_yes.
- Your guaranteed payout is
N * $1 = $N.
- Your profit for this
N is Profit(N) = N - Total_Cost(N).
- Compare
P'_A_yes and P'_B_yes.
- Adjust
N (Bisection Search is good here):
- If
P'_A_yes > P'_B_yes (and Profit(N) > 0): The probabilities haven't fully converged. There's likely still profit to be made by increasing N. The optimal N is higher.
- If
P'_A_yes < P'_B_yes: You've "overshot." Your trades have pushed Market A's probability below Market B's. The optimal N is lower.
- If
P'_A_yes ≈ P'_B_yes: You are at or very close to the optimal N. This N maximizes your profit.
- Repeat steps 2-4, refining your range for
N until P'_A_yes is very close to and you've found the that gives the maximum positive profit. You can use a bisection search on to find this point efficiently.
Example Walkthrough (Conceptual):
- Market A: YES @ 70c (NO @ 30c)
- Market B: YES @ 50c
- Target: Buy
N NO in A, N YES in B.
-
Try N=100 shares.
- Market A: Buying 100 NO shares costs $35 (avg 35c/share). New P'_A_yes becomes 65c.
- Market B: Buying 100 YES shares costs $55 (avg 55c/share). New P'_B_yes becomes 55c.
- Total Cost = 35+55 = 90.Payout=100. Profit = $10.
- P'_A_yes (65c) > P'_B_yes (55c). So, optimal
N is likely higher.
-
Try N=200 shares.
- Market A: Buying 200 NO shares costs $78 (avg 39c/share). New P'_A_yes becomes 61c.
- Market B: Buying 200 YES shares costs $118 (avg 59c/share). New P'_B_yes becomes 59c.
- Total Cost = 78+118 = 200. Profit = $4.
Important Considerations:
- Transaction Fees: Factor them into your
Cost_A_no(N) and Cost_B_yes(N).
- Execution Risk: Prices can move while you are placing trades, especially if you do them sequentially. Try to execute as simultaneously as possible.
- Capital Constraints: You can only buy as many shares as your capital allows. Your optimal
N might be limited by your available funds.
- Market Depth: If a market is very thin, buying even a small number of shares
N can drastically move the price, reducing or eliminating the arbitrage profit. The N you can profitably trade might be small.
By following this process of equalizing the number of shares that pay out and finding the N that makes the final probabilities converge, you will maximize your arbitrage profit given the liquidity constraints.