New paste Repaste Download
[gw5] darwin -- Python 3.12.12 /Users/cao/.pyenv/versions/3.12.12/bin/python3.12
tests/cli/test_sector_momentum_filter.py:3436: in test_consolidation_passes
    result = self._run_filter(picks, ch_data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        ch_data    = {'MOO': {'allows_concentration': False, 'dvr': 0.5, 'long_term_breakout': {'is_breakout': False}, 'regime': 'consolidation', ...}}
        picks      = [{'effective_score': 100, 'momentum_final_score': 0.05, 'sector': 'Agriculture', 'sector_etf': 'MOO', ...}]
        self       = <test_sector_momentum_filter.TestRule14ChannelRegimeFilter object at 0x123fadbb0>
tests/cli/test_sector_momentum_filter.py:3376: in _run_filter
    return apply_sector_momentum_filter(
        apply_sector_momentum_filter = <function apply_sector_momentum_filter at 0x12476d440>
        channel_regime_data = {'MOO': {'allows_concentration': False, 'dvr': 0.5, 'long_term_breakout': {'is_breakout': False}, 'regime': 'consolidation', ...}}
        date       = <class 'datetime.date'>
        json       = <module 'json' from '/Users/cao/.pyenv/versions/3.12.12/lib/python3.12/json/__init__.py'>
        mock_exists = <function TestRule14ChannelRegimeFilter._run_filter.<locals>.mock_exists at 0x12a51d080>
        mock_read_text = <function TestRule14ChannelRegimeFilter._run_filter.<locals>.mock_read_text at 0x12a51c7c0>
        picks      = [{'effective_score': 100, 'momentum_final_score': 0.05, 'sector': 'Agriculture', 'sector_etf': 'MOO', ...}]
        self       = <test_sector_momentum_filter.TestRule14ChannelRegimeFilter object at 0x123fadbb0>
        trading_day = datetime.date(2026, 3, 13)
rtrader/cli/trader_eod_core/services/log_formatting_service.py:1700: in apply_sector_momentum_filter
    assignment = resolve_sector_etf_with_assignment(symbol, trading_day, snapshot_dir=snap_dir)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        CAUTION_WORSENING_BLOCK = True
        CHANNEL_REGIME_FILTER_ENABLED = True
        EXHAUSTION_FILTER_ENABLED = False
        INSTITUTIONAL_DISTRIBUTION_FILTER_ENABLED = False
        NEGATIVE_MOMENTUM_FILTER_ENABLED = False
        NEGATIVE_SCORE_FILTER_ENABLED = False
        NfsReadStatus = <enum 'NfsReadStatus'>
        OK_WORSENING_FILTER_ENABLED = False
        OPTIONS_BEARISH_THRESHOLD = 1.0
        OPTIONS_BULLISH_THRESHOLD = 1.0
        OPTIONS_SENTIMENT_ENABLED = False
        OVERHEATED_SECTOR_FILTER_ENABLED = False
        SECTOR_BREAKOUT_EXCEPTION_ENABLED = False
        SECTOR_BREAKOUT_LOOKBACK_DAYS = 1
        SECTOR_BREAKOUT_MIN_BREAKOUT_CONF = 1.0
        SECTOR_BREAKOUT_MIN_CORRELATION = 1.0
        SECTOR_BREAKOUT_MIN_MEMBERSHIP_CONF = 1.0
        SYMBOL_CROSS_CHECK_THRESHOLD = 1.0
        TREND_STATE_FILTER_ENABLED = False
        _P14       = <class 'pathlib.Path'>
        _capitulation = False
        _find_spy_snap = <function find_snapshot_json at 0x124c53ba0>
        _json_spy  = <module 'json' from '/Users/cao/.pyenv/versions/3.12.12/lib/python3.12/json/__init__.py'>
        _load_sector_channel = <function apply_sector_momentum_filter.<locals>._load_sector_channel at 0x12a51cc20>
        _market_defensive = True
        _nfs_base_r14 = '/Users/cao/mnt/silverssd'
        _r14_ch    = {'allows_concentration': False, 'dvr': 0.5, 'long_term_breakout': {'is_breakout': False}, 'regime': 'consolidation', ...}
        _r14_data  = {'rows': [{'channel_regime': {'allows_concentration': False, 'dvr': 0.5, 'long_term_breakout': {'is_breakout': False}, 'regime': 'consolidation', ...}}]}
        _r14_dvr   = 0.5
        _r14_path  = PosixPath('/Users/cao/mnt/silverssd/minio-mirror/data/snapshots/2026-03-13/MOO.json')
        _r14_regime = 'consolidation'
        _r14_rows  = [{'channel_regime': {'allows_concentration': False, 'dvr': 0.5, 'long_term_breakout': {'is_breakout': False}, 'regime': 'consolidation', ...}}]
        _r14_sect_mom = None
        _r14_sect_mom_val = None
        _r14_sector_etf = 'MOO'
        _r14_sector_strong = False
        _r14_slope = 0.0
        _r14_suggests_exit = False
        _sector_channel_cache = {}
        _spy_ch    = {'allows_concentration': False, 'dvr': 0.0151, 'gap_detected': False, 'gap_direction': '', ...}
        _spy_data  = {'charts': {}, 'component_versions': {'divergence_detector': 19313, 'liquidation_engine': 19313}, 'created_at': '2026-03-13T19:03:58.367671+00:00', 'generated_at': '2026-03-13T19:03:58.367671+00:00', ...}
        _spy_dvr   = 0.0151
        _spy_mom   = {'alpha_3d': -0.02405147033826727, 'final_score': -0.018922425843142947, 'last_5d_ohlc': [{'close': 678.3, 'date': '20...ose': 663.72, 'date': '2026-03-13', 'high': 672.335, 'low': 662.1, ...}], 'momentum_score': -0.019066724022033524, ...}
        _spy_momentum_guard_enabled = True
        _spy_path  = PosixPath('/Users/cao/mnt/silverssd/minio-mirror/data/snapshots/2026-03-13/SPY.json')
        _spy_regime = 'shaking'
        _spy_ret10d = -0.03270374256733115
        _spy_ret10d_threshold = 1.0
        _spy_rows  = [{'c1_to_c3_slope': 0.138936, 'c1_to_c3_slope_override': True, 'channel_regime': {'allows_concentration': False, 'dvr': 0.0151, 'gap_detected': False, 'gap_direction': '', ...}, 'chart_path': None, ...}]
        _spy_rsi   = 34.911912073702965
        _spy_rsi_threshold = 1.0
        _spy_slope = -0.000578
        _spy_snapshot_row = {'c1_to_c3_slope': 0.138936, 'c1_to_c3_slope_override': True, 'channel_regime': {'allows_concentration': False, 'dvr': 0.0151, 'gap_detected': False, 'gap_direction': '', ...}, 'chart_path': None, ...}
        _spy_status = <NfsReadStatus.OK: 'ok'>
        _spy_text  = '{\n  "symbol": "SPY",\n  "indicator": "divergence",\n  "trading_day": "2026-03-13",\n  "generated_at": "2026-03-13T19...n"\n    }\n  },\n  "component_versions": {\n    "divergence_detector": 19313,\n    "liquidation_engine": 19313\n  }\n}'
        _symbol_options_bearish = <function apply_sector_momentum_filter.<locals>._symbol_options_bearish at 0x12a51d440>
        bearish_families = set()
        cfg        = <MagicMock id='4998358960'>
        exempt_symbols = None
        json       = <module 'json' from '/Users/cao/.pyenv/versions/3.12.12/lib/python3.12/json/__init__.py'>
        market_stress_level = None
        pick       = {'effective_score': 100, 'momentum_final_score': 0.05, 'sector': 'Agriculture', 'sector_etf': 'MOO', ...}
        picks      = [{'effective_score': 100, 'momentum_final_score': 0.05, 'sector': 'Agriculture', 'sector_etf': 'MOO', ...}]
        primary_etf_for_filter = None
        read_text_with_status = <function read_text_with_status at 0x124c53380>
        resolve_sector_etf_with_assignment = <function resolve_sector_etf_with_assignment at 0x12479eb60>
        result     = SectorMomentumFilterResult(filtered_picks=[], filtered_out_by_sector={}, saved_by_individual_momentum=[], filtered_out..._channel_regime={}, market_defensive=True, spy_momentum_guard=False, spy_regime_info='shaking slope=-0.0006 dvr=0.015')
        sector_direction = None
        sector_momentum_data = None
        sector_options_sentiment = None
        snap_dir   = 'snapshots/2026-03-13'
        snap_dir_r14 = 'snapshots/2026-03-13'
        snapshot_dir = None
        symbol     = 'CTVA'
        symbol_momentum = 0.05
        symbol_options_sentiment = None
        symbol_sectors = None
        trading_day = datetime.date(2026, 3, 13)
        trend_stats_cache = {}
        weak_sectors = set()
rtrader/services/soft_sector_service.py:1973: in resolve_sector_etf_with_assignment
    soft_sectors = _load_soft_sectors_from_snapshot(symbol, trading_day, snapshot_dir)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        AILabelRepository = <class 'rtrader.utils.ai_labeler.AILabelRepository'>
        age_days   = 121
        ai_label   = SectorAILabel(symbol='CTVA', labeled_etf='MOO', sector_name='Agribusiness', reasoning="Corteva operates in the agricul...'ai', model_used='minimax/MiniMax-M2.1', confidence=0.95, labeled_at=datetime.datetime(2026, 2, 10, 14, 6, 57, 123000))
        broad_etf  = 'XLB'
        label_at   = datetime.datetime(2026, 2, 10, 14, 6, 57, 123000, tzinfo=datetime.timezone.utc)
        label_is_fresh = False
        max_age_days = 60
        snapshot_dir = 'snapshots/2026-03-13'
        symbol     = 'CTVA'
        trading_day = datetime.date(2026, 3, 13)
rtrader/services/soft_sector_service.py:1901: in _load_soft_sectors_from_snapshot
    status, text = read_text_with_status(snapshot_path)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        NFS_SNAPSHOTS_PATH = PosixPath('/Users/cao/mnt/silverssd/minio-mirror/data/snapshots')
        NfsReadStatus = <enum 'NfsReadStatus'>
        json       = <module 'json' from '/Users/cao/.pyenv/versions/3.12.12/lib/python3.12/json/__init__.py'>
        read_text_with_status = <function read_text_with_status at 0x124c53380>
        snapshot_dir = 'snapshots/2026-03-13'
        snapshot_path = PosixPath('/Users/cao/mnt/silverssd/minio-mirror/data/snapshots/2026-03-13/CTVA.json')
        symbol     = 'CTVA'
        trading_day = datetime.date(2026, 3, 13)
rtrader/utils/nfs.py:273: in read_text_with_status
    minio_text = _read_from_minio(s3key)
                 ^^^^^^^^^^^^^^^^^^^^^^^
        path       = PosixPath('/Users/cao/mnt/silverssd/minio-mirror/data/snapshots/2026-03-13/CTVA.json')
        s3key      = 'snapshots/2026-03-13/CTVA.json'
        timeout    = 2.0
rtrader/utils/nfs.py:236: in _read_from_minio
    data = response.read().decode("utf-8")
           ^^^^^^^^^^^^^^^
        _is_minio_reachable = <function _is_minio_reachable at 0x1242440e0>
        client     = <minio.api.Minio object at 0x12a50c770>
        minio_client = <function minio_client at 0x1242444a0>
        response   = <urllib3.response.HTTPResponse object at 0x12a5ac880>
        s3key      = 'snapshots/2026-03-13/CTVA.json'
../.pyenv/versions/3.12.12/lib/python3.12/site-packages/urllib3/response.py:1112: in read
    data = self._raw_read(amt)
           ^^^^^^^^^^^^^^^^^^^
        amt        = None
        cache_content = False
        decode_content = True
        self       = <urllib3.response.HTTPResponse object at 0x12a5ac880>
../.pyenv/versions/3.12.12/lib/python3.12/site-packages/urllib3/response.py:1028: in _raw_read
    data = self._fp_read(amt, read1=read1) if not fp_closed else b""
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        amt        = None
        fp_closed  = False
        read1      = False
        self       = <urllib3.response.HTTPResponse object at 0x12a5ac880>
../.pyenv/versions/3.12.12/lib/python3.12/site-packages/urllib3/response.py:1011: in _fp_read
    return self._fp.read(amt) if amt is not None else self._fp.read()
                                                      ^^^^^^^^^^^^^^^
        amt        = None
        c_int_max  = 2147483647
        read1      = False
        self       = <urllib3.response.HTTPResponse object at 0x12a5ac880>
../.pyenv/versions/3.12.12/lib/python3.12/http/client.py:495: in read
    s = self._safe_read(self.length)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        amt        = None
        self       = <http.client.HTTPResponse object at 0x12a34bc70>
../.pyenv/versions/3.12.12/lib/python3.12/http/client.py:642: in _safe_read
    data = self.fp.read(amt)
           ^^^^^^^^^^^^^^^^^
        amt        = 147696
        self       = <http.client.HTTPResponse object at 0x12a34bc70>
../.pyenv/versions/3.12.12/lib/python3.12/socket.py:720: in readinto
    return self._sock.recv_into(b)
           ^^^^^^^^^^^^^^^^^^^^^^^
E   Failed: Timeout (>60.0s) from pytest-timeout.
        b          = <memory at 0x129d60940>
        self       = <socket.SocketIO object at 0x12a5ac640>
Filename: None. Size: 12kb. View raw, , hex, or download this file.

This paste expires on 2026-06-18 15:07:31.958573+00:00. Pasted through deprecated-web.