File size: 3,488 Bytes
1f2e77f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/usr/bin/env python3
"""Quick simulation to test MIN_TRADE_USD = $1.44 before restarting live"""
from aureon.core.aureon_baton_link import link_system as _baton_link; _baton_link(__name__)
import sys
sys.path.insert(0, '.')

print('='*60)
print('๐Ÿงช SIMULATION: Testing MIN_TRADE_USD = $1.44')
print('='*60)

from aureon.trading.aureon_unified_ecosystem import AureonKrakenEcosystem, CONFIG

print(f'\n๐Ÿ“Š CONFIG VALUES:')
print(f'   MIN_TRADE_USD: ${CONFIG["MIN_TRADE_USD"]}')
print(f'   BINANCE_MIN_NOTIONAL: ${CONFIG["BINANCE_MIN_NOTIONAL"]}')
print(f'   KRAKEN_MIN_NOTIONAL: ${CONFIG["KRAKEN_MIN_NOTIONAL"]}')
print(f'   BASE_POSITION_SIZE: {CONFIG["BASE_POSITION_SIZE"]*100}%')
print(f'   MAX_POSITION_SIZE: {CONFIG["MAX_POSITION_SIZE"]*100}%')

# Initialize in dry run
print('\n๐Ÿ”„ Initializing ecosystem (DRY RUN)...')
eco = AureonKrakenEcosystem(initial_balance=160.0, dry_run=True)

print(f'\n๐Ÿ’ฐ BALANCE SIMULATION (ยฃ160 starting):')
print(f'   Starting Balance: ยฃ{eco.tracker.balance:.2f}')

# Calculate position sizes at different % allocations
print('\n๐Ÿ“ POSITION SIZE vs MINIMUMS:')
for pct in [0.01, 0.02, 0.05, 0.10, 0.15]:
    size = eco.tracker.balance * pct
    binance_ok = 'โœ…' if size >= CONFIG['BINANCE_MIN_NOTIONAL'] else 'โŒ'
    kraken_ok = 'โœ…' if size >= CONFIG['KRAKEN_MIN_NOTIONAL'] else 'โŒ'
    min_ok = 'โœ…' if size >= CONFIG['MIN_TRADE_USD'] else 'โŒ'
    print(f'   {pct*100:5.1f}% = ยฃ{size:6.2f} | Min:{min_ok} Binance:{binance_ok} Kraken:{kraken_ok}')

# Find opportunities
print('\n๐Ÿ” Finding opportunities (this may take a moment)...')
try:
    eco.refresh_tickers()
    opps = eco.find_opportunities()
    print(f'   Found: {len(opps)} opportunities')

    if opps:
        print('\n๐ŸŽฏ TOP 10 OPPORTUNITIES:')
        for i, opp in enumerate(opps[:10], 1):
            sym = opp['symbol']
            score = opp['score']
            price = opp['price']
            exchange = opp.get('source', 'binance').lower()
            
            # Calculate what position size would be
            coh = opp.get('coherence', 0.5)
            pos_size = eco.tracker.balance * CONFIG['BASE_POSITION_SIZE'] * coh
            
            min_notional = CONFIG['BINANCE_MIN_NOTIONAL'] if 'binance' in exchange else CONFIG['KRAKEN_MIN_NOTIONAL']
            can_trade = 'โœ…' if pos_size >= min_notional else f'โŒ Need ${min_notional}'
            
            print(f'   {i:2}. {sym:12} | Score:{score:3.0f} | Coh:{coh:.2f} | Size:ยฃ{pos_size:5.2f} | {can_trade}')
    else:
        print('   โš ๏ธ No opportunities found')
    
    # Simple net profit sanity check for Binance taker fees/slippage
    print('\n๐Ÿงฎ NET PROFIT CHECK (Binance, taker):')
    tp = CONFIG['TAKE_PROFIT_PCT'] / 100.0
    fee = CONFIG['BINANCE_FEE_TAKER']
    slip = CONFIG['SLIPPAGE_PCT']
    spread = CONFIG['SPREAD_COST_PCT']
    round_trip_cost = (fee*2) + slip + spread
    net = tp - round_trip_cost
    print(f"   TP: {tp*100:.2f}% | Fees RT: {(fee*2)*100:.2f}% | Slippage: {slip*100:.2f}% | Spread: {spread*100:.2f}%")
    print(f"   โžœ Net expected: {net*100:.2f}% {'โœ…' if net>0 else 'โŒ'}")
        
except Exception as e:
    print(f'   โŒ Error: {e}')

print('\n' + '='*60)
print('๐Ÿ SIMULATION COMPLETE')
print('='*60)
print('\n๐Ÿ’ก With $1.44 min, Binance trades should work at 1%+ position size')
print('   Kraken needs 3.3%+ position size ($5.25 min)')