Logic · live_paper_fn

Read-only view of active client JSON

{
    "engine": "fast_news_live_data_paper_algorithm",
    "version": "2026-06-09-v2",
    "mode": "LIVE_MARKET_DATA_PAPER_TRADING_ONLY",
    "tradier_market_data_environment": "live",
    "tradier_order_environment": "disabled_no_orders",
    "real_order_execution_enabled": false,
    "paper_trade_enabled": true,
    "paper_trade_usd_per_signal": 100,
    "delete_all_sandbox_delay_logic": true,
    "only_delay_adjustment_allowed": "news_delay_backtrack_5_7_minutes",
    "must_not_call_order_endpoint": true,
    "news_delay_backtrack": {
        "module": "news_delay_backtrack_replay",
        "version": "2026-06-09-v2",
        "purpose": "When news is received late, backtrack 5-7 minutes to reconstruct the true market and option premium state around the likely event time.",
        "enabled": true,
        "applies_to": [
            "fast_news",
            "a_plus"
        ],
        "reason": "The system is using live market data but the news feed may be delayed. The bot must evaluate the opportunity from the estimated event window, not only from the late received timestamp.",
        "default_backtrack_minutes": 7,
        "minimum_backtrack_minutes": 5,
        "maximum_backtrack_minutes": 10,
        "event_time_estimation": {
            "primary": "news_published_at if available and trusted",
            "fallback": "news_received_at minus default_backtrack_minutes",
            "secondary_checks": [
                "first unusual underlying volume spike",
                "first 1-minute candle break",
                "first option premium expansion",
                "first sector sympathy reaction",
                "first duplicate-source confirmation"
            ],
            "estimated_event_time_field": "estimated_event_time"
        },
        "backtrack_windows": {
            "pre_event_window": {
                "start": "estimated_event_time - 2 minutes",
                "end": "estimated_event_time"
            },
            "reaction_window": {
                "start": "estimated_event_time",
                "end": "estimated_event_time + 7 minutes"
            },
            "late_received_window": {
                "start": "news_received_at",
                "end": "news_received_at + 5 minutes"
            }
        },
        "data_to_reconstruct": [
            "underlying 1-minute candles",
            "underlying bid\/ask\/last",
            "underlying volume spike",
            "VWAP at estimated event time",
            "EMA_9 and EMA_20",
            "RSI_14",
            "ATR_14",
            "option chain at nearest available timestamp",
            "option quote bid\/ask\/mid\/last",
            "option premium before event",
            "option premium at event",
            "option premium at late received time",
            "spread pct at event",
            "spread pct at received time",
            "sector move",
            "SPY and QQQ context"
        ],
        "slippage_calculations": {
            "event_to_received_premium_expansion_pct": "(premium_at_received - premium_at_event) \/ premium_at_event * 100",
            "late_entry_slippage_pct": "(paper_entry_ask_at_received - theoretical_event_ask) \/ theoretical_event_ask * 100",
            "missed_move_pct": "(best_exit_premium_in_reaction_window - theoretical_event_entry) \/ theoretical_event_entry * 100",
            "news_delay_seconds": "news_received_at - estimated_event_time"
        },
        "trade_decision_rules": {
            "fast_news": {
                "if_news_received_late_but_current_tape_still_valid": "paper_trade_and_label_delayed_valid",
                "if_premium_already_expanded_too_much": "reject_paper_entry_but_save_missed_opportunity",
                "if_data_missing": "save_data_gap_and_replay_later",
                "never_do": "do_not_reject_only_because_news_was_late"
            },
            "a_plus": {
                "if_news_late": "use backtracked data for learning and current live data for paper entry decision",
                "if_setup_still_valid": "paper_trade",
                "if_setup_already_played_out": "save as missed_opportunity_with_late_news_reason"
            }
        },
        "postgres_fields_to_add": {
            "raw_news_events": [
                "estimated_event_time",
                "backtrack_minutes_used",
                "news_delay_backtrack_used",
                "event_time_confidence",
                "first_reaction_time"
            ],
            "slippage_metrics": [
                "premium_at_estimated_event_time",
                "premium_at_news_received_time",
                "event_to_received_premium_expansion_pct",
                "theoretical_event_entry_price",
                "late_entry_slippage_pct"
            ],
            "missed_opportunities": [
                "missed_due_to_news_delay",
                "estimated_event_time",
                "paper_entry_possible_at_received_time",
                "played_out_before_received"
            ]
        },
        "dev_notes": [
            "If provider cannot return historical option quotes for the backtrack window, store live option quote snapshots every 1-2 seconds going forward.",
            "For historical replay before snapshots exist, use nearest available option quote and mark confidence lower.",
            "Never use backtracked price to pretend a live paper fill happened earlier; save it separately as theoretical_event_entry.",
            "Actual paper entry must still use live quote at decision time."
        ]
    },
    "algorithm": {
        "scan": "all breaking news and sector shocks",
        "minimum_news_score": 9,
        "paper_entry_budget_usd": 100,
        "contract_selection": "liquid ATM\/slightly OTM weekly or monthly option",
        "fill_model": "paper buy at live ask at decision time; also save theoretical event entry from backtrack",
        "monitoring": "TA-Lib + live option premium every 2 seconds",
        "exit_rules": {
            "hard_stop_pct": -20,
            "profit_take_pct": 30,
            "trail_after_pct": 25,
            "trail_distance_pct": 12
        }
    },
    "learning_csv": "csv_learning_engine_day1_to_today_2026-06-09.csv"
}