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
import pulp
from pulp import LpProblem, LpVariable, LpMinimize, lpSum, LpStatus
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.4, '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, epsilon=1e-6):
    """
    Detect arbitrage opportunities in prediction markets using PuLP.

    Parameters:
    - current_prices: dict containing current prices for each share in each market.
    - all_possible_outcomes: list of tuples representing all possible outcomes.
    - epsilon: small positive number to enforce non-trivial solution.

    Returns:
    - Prints whether an arbitrage opportunity exists and the corresponding portfolio.
    """
    # Initialize the LP problem: minimize total cost
    prob = LpProblem("Arbitrage_Detection", LpMinimize)

    # Define decision variables: positions in each share
    # Positive for long positions (buying), negative for short positions (selling)
    x_eo_yes = LpVariable('ElectionOutcome_Yes', lowBound=None, cat='Continuous')
    x_eo_no = LpVariable('ElectionOutcome_No', lowBound=None, cat='Continuous')
    x_pv_yes = LpVariable('PopularVoteWinner_Yes', lowBound=None, cat='Continuous')
    x_pv_no = LpVariable('PopularVoteWinner_No', lowBound=None, cat='Continuous')

    variables = [x_eo_yes, x_eo_no, x_pv_yes, x_pv_no]

    # Objective: minimize total cost
    total_cost = (
        x_eo_yes * current_prices['Election Outcome']['Yes'] +
        x_eo_no * current_prices['Election Outcome']['No'] +
        x_pv_yes * current_prices['Popular Vote Winner']['Yes'] +
        x_pv_no * current_prices['Popular Vote Winner']['No']
    )
    prob += total_cost, "Total_Cost"

    # Add payoff constraints: for each possible outcome, payoff >=0
    for outcome in all_possible_outcomes:
        eo, pv = outcome
        payoff = (
            (1 if eo == 'Yes' else 0) * x_eo_yes +
            (1 if eo == 'No' else 0) * x_eo_no +
            (1 if pv == 'Yes' else 0) * x_pv_yes +
            (1 if pv == 'No' else 0) * x_pv_no
        )
        prob += (payoff >= 0), f"Payoff_{eo}_{pv}"

    # Add a constraint to avoid the trivial all-zero solution
    # For example, ensure that the sum of absolute positions >= epsilon
    # Since PuLP doesn't handle absolute values directly, introduce auxiliary variables
    y_eo_yes = LpVariable('Abs_ElectionOutcome_Yes', lowBound=0, cat='Continuous')
    y_eo_no = LpVariable('Abs_ElectionOutcome_No', lowBound=0, cat='Continuous')
    y_pv_yes = LpVariable('Abs_PopularVoteWinner_Yes', lowBound=0, cat='Continuous')
    y_pv_no = LpVariable('Abs_PopularVoteWinner_No', lowBound=0, cat='Continuous')

    prob += (x_eo_yes <= y_eo_yes, "Abs_Pos_EO_Yes_Pos")
    prob += (-x_eo_yes <= y_eo_yes, "Abs_Pos_EO_Yes_Neg")
    prob += (x_eo_no <= y_eo_no, "Abs_Pos_EO_No_Pos")
    prob += (-x_eo_no <= y_eo_no, "Abs_Pos_EO_No_Neg")
    prob += (x_pv_yes <= y_pv_yes, "Abs_Pos_PV_Yes_Pos")
    prob += (-x_pv_yes <= y_pv_yes, "Abs_Pos_PV_Yes_Neg")
    prob += (x_pv_no <= y_pv_no, "Abs_Pos_PV_No_Pos")
    prob += (-x_pv_no <= y_pv_no, "Abs_Pos_PV_No_Neg")

    # Sum of absolute positions should be at least epsilon
    prob += (y_eo_yes + y_eo_no + y_pv_yes + y_pv_no >= epsilon), "Non_Trivial_Solution"

    # Solve the LP
    prob.solve()

    # Check the results
    status = LpStatus[prob.status]
    if status == 'Optimal':
        minimized_cost = pulp.value(prob.objective)
        if minimized_cost < -epsilon:
            print("Arbitrage opportunity detected.")
            print("Optimal Portfolio (Net Positions):")
            print(f"  Election Outcome Yes: {x_eo_yes.varValue:.4f}")
            print(f"  Election Outcome No: {x_eo_no.varValue:.4f}")
            print(f"  Popular Vote Winner Yes: {x_pv_yes.varValue:.4f}")
            print(f"  Popular Vote Winner No: {x_pv_no.varValue:.4f}")
            print(f"Total Cost: {minimized_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 += x_eo_yes.varValue * 1 + x_eo_no.varValue * 0
                else:
                    payoff += x_eo_yes.varValue * 0 + x_eo_no.varValue * 1

                if pv == 'Yes':
                    payoff += x_pv_yes.varValue * 1 + x_pv_no.varValue * 0
                else:
                    payoff += x_pv_yes.varValue * 0 + x_pv_no.varValue * 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)