82c68fa8b0
- Switch to oil stocks (USO, XLE, OXY, CVX, XOM, SLB, HAL, DVN, MPC, VLO) - Add JPY/USD forex pairs for Japan targeting - 7-action RL space: long, short, close (was 5 long-only actions) - Bollinger Band mean-reversion scalp entries both directions - 5-minute candles with 60-second cycles for scalping - 35 features (added VWAP, fast RSI, fast ROC for scalping) - Short position support in backtest, executor, and RL environment - GA tuned for scalping: tighter SL/TP, shorter hold times Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
71 lines
2.3 KiB
Python
71 lines
2.3 KiB
Python
#!/usr/bin/env python3
|
|
"""Read BIGGFISH live status for Krystie."""
|
|
import json, sys
|
|
|
|
STATUS_FILE = "/opt/biggfish/src/data/krystie-status.json"
|
|
|
|
try:
|
|
with open(STATUS_FILE) as f:
|
|
s = json.load(f)
|
|
except FileNotFoundError:
|
|
print("BIGGFISH status file not found. The bot may not be running.")
|
|
print("Check: systemctl status biggfish.service")
|
|
sys.exit(1)
|
|
|
|
updated = s.get("updated_at", "unknown")
|
|
uptime = s.get("uptime_hours", 0)
|
|
markets = s.get("markets", {})
|
|
portfolio = s.get("portfolio", {})
|
|
positions = s.get("positions", [])
|
|
learning = s.get("learning", {})
|
|
today = s.get("today_summary", {})
|
|
config = s.get("config", {})
|
|
|
|
print("=== BIGGFISH STATUS ===")
|
|
print("Last updated:", updated)
|
|
print("Uptime: {:.1f} hours".format(uptime))
|
|
print()
|
|
|
|
market_parts = ["{}: {}".format(k, v) for k, v in markets.items()]
|
|
print("Markets:", " | ".join(market_parts))
|
|
print()
|
|
|
|
equity = portfolio.get("equity", 0)
|
|
initial = config.get("initial_capital", 100000)
|
|
target = config.get("target_capital", 1000000)
|
|
total_pnl = equity - initial if equity else 0
|
|
pnl_pct = (total_pnl / initial * 100) if initial else 0
|
|
progress = (equity / target * 100) if target else 0
|
|
|
|
print("Portfolio: ${:,.2f}".format(equity))
|
|
print("Total P&L: ${:+,.2f} ({:+.1f}%)".format(total_pnl, pnl_pct))
|
|
print("Goal: ${:,.0f} / ${:,.0f} ({:.1f}%)".format(equity, target, progress))
|
|
print()
|
|
|
|
if positions:
|
|
print("Open Positions ({}):".format(len(positions)))
|
|
for p in positions:
|
|
pnl = p.get("unrealized_pnl", 0)
|
|
print(" {:8s} {:>6} @ ${:.4f} P&L: ${:+.2f}".format(
|
|
p.get("symbol", "?"), str(p.get("qty", 0)),
|
|
p.get("current_price", 0), pnl))
|
|
else:
|
|
print("No open positions")
|
|
print()
|
|
|
|
print("Today: {} trades | {} wins | {} losses | P&L: ${:+.2f}".format(
|
|
today.get("trades_count", 0), today.get("wins", 0),
|
|
today.get("losses", 0), today.get("total_pnl", 0)))
|
|
print()
|
|
|
|
print("Learning:")
|
|
print(" GA: Gen {} | Fitness: {:.4f}".format(
|
|
learning.get("ga_generation", 0), learning.get("ga_best_fitness", 0)))
|
|
print(" RL: Epsilon: {:.4f} | Experiences: {:,} | Loss: {:.6f}".format(
|
|
learning.get("rl_epsilon", 0), learning.get("rl_experiences", 0),
|
|
learning.get("rl_loss", 0)))
|
|
print()
|
|
|
|
print("Stocks:", ", ".join(config.get("stock_symbols", [])))
|
|
print("Forex:", ", ".join(config.get("forex_symbols", [])))
|