I want to arbitrage the 2024 election prediction market. There are 2 candidates: Kamala and Trump.
There are 2 markets: Election outcome and Popular vote winner.
Write a program in a language most suitable for this, to find arbitrage opportunities, given the current prices of Yes and No shares for each outcome. 

I got this code, but it always outputs "No arbitrage opportunity detected":

import itertools
from scipy.optimize import linprog
import numpy as np

# Define the markets and outcomes
markets = ['Election Outcome', 'Popular Vote Winner']
outcomes = ['Yes', 'No']

# Example current prices for Yes and No shares in each market
# These can be updated with real-time data
current_prices = {
    'Election Outcome': {'Yes': 0.6, 'No': 0.5},       # Kamala wins: $0.6, Trump wins: $0.5
    'Popular Vote Winner': {'Yes': 0.55, 'No': 0.65},  # Kamala popular: $0.55, Trump popular: $0.65
}

# Define all possible election outcomes
# Each outcome is a tuple: (Election Outcome, Popular Vote Winner)
all_possible_outcomes = list(itertools.product(outcomes, repeat=2))

def find_arbitrage(current_prices, all_possible_outcomes):
    """
    Detect arbitrage opportunities in prediction markets.

    Parameters:
    - current_prices: dict containing current prices for each share in each market.
    - all_possible_outcomes: list of tuples representing all possible outcomes.

    Returns:
    - Prints whether an arbitrage opportunity exists and the corresponding portfolio.
    """
    # Decision variables:
    # x1: Net position in Election Outcome Yes
    # x2: Net position in Election Outcome No
    # x3: Net position in Popular Vote Winner Yes
    # x4: Net position in Popular Vote Winner No
    # Positive values indicate buying shares; negative values indicate selling shares.

    # Payoff constraints for each possible outcome
    A = []
    b = []

    for outcome in all_possible_outcomes:
        eo, pv = outcome
        # Initialize payoff for each variable
        payoff = [0, 0, 0, 0]

        # Election Outcome Payoff
        if eo == 'Yes':
            payoff[0] = 1  # x1
            payoff[1] = 0  # x2
        else:
            payoff[0] = 0
            payoff[1] = 1

        # Popular Vote Winner Payoff
        if pv == 'Yes':
            payoff[2] = 1  # x3
            payoff[3] = 0  # x4
        else:
            payoff[2] = 0
            payoff[3] = 1

        # Constraint: payoff >= 0 can be written as -payoff <= 0 for linprog
        A.append([-p for p in payoff])
        b.append(0)

    # Cost constraint: Total cost <= 0
    # Total cost = (x1 * price_EO_Yes) + (x2 * price_EO_No) + 
    #              (x3 * price_PV_Yes) + (x4 * price_PV_No) <= 0
    A_cost = [
        current_prices['Election Outcome']['Yes'],
        current_prices['Election Outcome']['No'],
        current_prices['Popular Vote Winner']['Yes'],
        current_prices['Popular Vote Winner']['No']
    ]
    A.append(A_cost)
    b.append(0)

    # Objective function: We don't need to optimize anything; we're just checking feasibility.
    # However, linprog requires an objective. We'll set it to zero.
    c = [0, 0, 0, 0]

    # Bounds for variables: No bounds since positions can be long or short
    bounds = [(None, None), (None, None), (None, None), (None, None)]

    # Perform linear programming to check for feasibility
    res = linprog(c=c, A_ub=A, b_ub=b, bounds=bounds, method='highs')

    if res.success:
        # Check if the solution is non-trivial (i.e., not all zeros)
        if not np.allclose(res.x, 0):
            print("Arbitrage opportunity detected.")
            print("Optimal Portfolio (Net Positions):")
            print(f"  Election Outcome Yes: {res.x[0]:.4f}")
            print(f"  Election Outcome No: {res.x[1]:.4f}")
            print(f"  Popular Vote Winner Yes: {res.x[2]:.4f}")
            print(f"  Popular Vote Winner No: {res.x[3]:.4f}")
            # Calculate total cost
            total_cost = (
                res.x[0] * current_prices['Election Outcome']['Yes'] +
                res.x[1] * current_prices['Election Outcome']['No'] +
                res.x[2] * current_prices['Popular Vote Winner']['Yes'] +
                res.x[3] * current_prices['Popular Vote Winner']['No']
            )
            print(f"Total Cost: {total_cost:.4f} <= 0")
            # Calculate payoffs for each outcome
            print("\nPayoffs for each outcome:")
            for outcome in all_possible_outcomes:
                eo, pv = outcome
                payoff = 0
                if eo == 'Yes':
                    payoff += res.x[0] * 1 + res.x[1] * 0
                else:
                    payoff += res.x[0] * 0 + res.x[1] * 1
                if pv == 'Yes':
                    payoff += res.x[2] * 1 + res.x[3] * 0
                else:
                    payoff += res.x[2] * 0 + res.x[3] * 1
                print(f"  Outcome ({eo}, {pv}): Payoff = {payoff:.4f} >= 0")
        else:
            print("No arbitrage opportunity detected.")
    else:
        print("No arbitrage opportunity detected.")

# Example usage
find_arbitrage(current_prices, all_possible_outcomes)