DeribitEthWeeklyPutWriteTrendGatedOnly
สมมติฐาน
Deribit ETH Weekly Cash-Secured OTM Put-Write — ใช้ตัวกรองแนวโน้มเท่านั้น, Delta ~25 คงที่, เกณฑ์ NO Long-Lookback IV (เก็บเกี่ยว Single-Leg VRP; แก้ไขกำแพง Lookback 4-Trades ที่ทำให้ Sibling ETH-Weekly ถูกยกเลิกโดยตรง)
สมมติฐาน
โปรแกรม SINGLE-LEG รายสัปดาห์แบบ PUT-WRITING ที่ใช้เงินสดค้ำประกันเต็มจำนวนบนตัวเลือก Deribit ETH — สินทรัพย์อ้างอิงของตัวเลือกคริปโตที่มีสภาพคล่องรองลงมา โดยใช้เส้นทางการดำเนินการ EXACT ซ้ำ (การเลือก strike ผ่าน greeks, การชำระเงินสดรายสัปดาห์) ของโรงงานที่ Sharpe-12.2 ได้รับการเลื่อนระดับ Deribit-BTC-weekly put-write มันถูกออกแบบมาโดยตั้งใจเพื่อ FIX เหตุผลเดียวที่วินิจฉัยซ้ำๆ ว่าทำให้ sibling ETH-weekly ถูกยกเลิกตลอด 8 iterations: เกณฑ์คู่ IV-rank + IV>RV ต้องใช้ rolling lookback ~560 วัน ซึ่งลดจำนวนการเทรดเหลือเพียง 4 ครั้ง / metrics_reliable=false — ทางตันเชิงโครงสร้างที่นักพัฒนาไม่สามารถแก้ไขได้ เวอร์ชันนี้ DROPS เกณฑ์ lookback ยาว IV โดยสิ้นเชิง และคงไว้เพียง ONLY ตัวกรองแนวโน้ม (เกณฑ์ที่พิสูจน์แล้วว่ารับน้ำหนักในผู้ชนะที่ได้รับการเลื่อนระดับ BTC) โดยเขียน put OTM ETH delta ~25 คงที่ทุกสัปดาห์ที่มีสิทธิ์ โดยไม่มีการพึ่งพา IV-percentile หลายปี มันทำงาน ~40-52 ครั้ง/ปี ตลอดประวัติรายสัปดาห์ Deribit ETH ที่มีอยู่ → จำนวนการเทรดที่น่าเชื่อถือทางสถิติ ขจัดกำแพง 4-trades โดยตรง มันเติมเต็ม venue ที่ถูกแทนน้อยที่สุด (options: 5.5% Deribit + 0.1% Binance เทียบกับเป้า ≥15%) และกระจายสมุด options จาก BTC-only ไปยังสินทรัพย์อ้างอิงที่มี vol ไม่สัมพันธ์ตัวที่สอง มัน NOT โครงสร้างหลายขา (L2), NOT เซลล์ที่มี data-walled (chain รายสัปดาห์ ETH + greeks ถูกจัดทำเป็น catalog และพิสูจน์แล้วว่าดำเนินการได้ผ่าน sibling BTC), NOT directional พารามิเตอร์ที่ 2 โดยตั้งใจ (put delta, ความยาวตัวกรองแนวโน้ม) เพื่อต้านทาน overfit
สมมติฐาน
Iteration 3 แก้ไข Layer-3 wall-clock timeout ด้วยการเปลี่ยนแปลงเฉพาะ config เท่านั้น; กลยุทธ์ CODE ไม่เปลี่ยนแปลง (มันผ่าน Layers 1-2 แล้ว, งานต่อบาร์เป็น O(1) ผ่าน running-sum แบบเพิ่มทีละน้อย SMA, และไม่มีการสแกน min()/sorted()/history ต่อบาร์) การวินิจฉัย: iteration 2 ย้าย primary+leg resolution ไปยัง 1-DAY ได้อย่างถูกต้อง แต่ STILL หมดเวลา ซึ่งพิสูจน์ว่าคอขวดไม่ใช่จำนวนบาร์ กำลังอ่าน src/data/option_chain.py: discover_deribit_chain ออก network fetch_ohlcv probe สำหรับแต่ละ strike ที่เป็น candidate ของ EACH weekly expiry, และ sandbox Layer-3 ครอบคลุม lookback_days (expand_rolling_options / pipeline default 365) ดังนั้นต้นทุนการขยายจึงปรับขนาดตามจำนวน weekly expiries = lookback_days โดยไม่ขึ้นกับ timeframe config ของ iter-2 มี lookback_days ~730 (~104 expiries, เพิ่มจำนวน probe เป็นสองเท่า) ซึ่งทำให้งบประมาณ 300s ระเบิด การย้อนกลับ lookback_days ไปยัง 365 (~52 expiries) จะลด expiry probes และ leg downloads ลงครึ่งหนึ่ง ตรงกับขนาดที่แน่นอนที่ siblings weekly put-write ที่พิสูจน์แล้ว ETH/BTC ผ่าน Layer 3 ในขณะที่ยังครอบคลุม ~52 สัปดาห์ที่มีสิทธิ์ เพื่อให้จำนวนการเทรดยังคงน่าเชื่อถือทางสถิติ (~30-52 writes หลังจาก trend gating) และสูงกว่า dead end 4-trade มาก ทุกอย่างอื่นถูกรักษาไว้และพิสูจน์แล้ว: การ subclass RollingOptionsStrategy โดยตรง (Layer-1 รู้จักมัน; abstract hooks 4 มีอยู่จริง), ไม่มี smoke path (option legs จริงเทรดผ่าน schedule ที่ขยายแล้ว เป็นไปตาม options_no_option_trades), ตัวกรองแนวโน้มที่ใช้ราคาเท่านั้นตัวเดียวใน _enter_leg, primary 1-DAY ETH-PERPETUAL + leg resolution 1-DAY (resolution ที่ passing ETH put-write sibling ใช้), ขนาด cash-secured (risk_frac 0.8, leverage 1.0 ตาม options venue cap), และการออกแบบ 2-parameter (put offset + sma_window)
สมมติฐาน
backtest_failed: RuntimeError: การขยาย rolling_options ล้มเหลว (ConnectError: ); ปฏิเสธที่จะรันด้วยตารางออปชันที่ว่างเปล่า
Traceback (most recent call last):
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 101, in map_httpcore_exceptions
yield
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 394, in handle_async_request
resp = await self._pool.handle_async_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpcore/_async/connection_pool.py", line 256, in handle_async_request
raise exc from None
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpcore/_async/connection_pool.py", line 236, in handle_async_request
response = await connection.handle_async_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpcore/_async/connection.py", line 101, in handle_async_request
raise exc
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpcore/_async/connection.py", line 78, in handle_async_request
stream = await self._connect(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpcore/_async/connection.py", line 156, in _connect
stream = await stream.start_tls(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpcore/_backends/anyio.py", line 67, in start_tls
with map_exceptions(exc_map):
File "/usr/lib/python3.12/contextlib.py", line 158, in __exit__
self.gen.throw(value)
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
raise to_exc(exc) from exc
httpcore.ConnectError
ข้อยกเว้นข้างต้นเป็นสาเหตุโดยตรงของข้อยกเว้นต่อไปนี้:
Traceback (most recent call last):
File "/opt/strategy-factory/src/agents/backtest_agent.py", line 49, in expand_rolling_options_into_config
extra_i, extra_bt, sched = await expand_rolling_options(collector, spec, start, end)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/src/data/option_chain.py", line 242, in expand_rolling_options
contracts = await discover_deribit_chain(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/src/data/option_chain.py", line 143, in discover_deribit_chain
perp_bars = await collector.fetch_ohlcv(perp, start_ms, end_ms, "1D")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/src/data/collectors/deribit_collector.py", line 169, in fetch_ohlcv
result = await self._get("/public/get_tradingview_chart_data", {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/src/data/collectors/deribit_collector.py", line 86, in _get
response = await self._client.get(f"{DERIBIT_API_URL}{endpoint}", params=params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1768, in get
return await self.request(
^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1540, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1629, in send
response = await self._send_handling_auth(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1657, in _send_handling_auth
response = await self._send_handling_redirects(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1694, in _send_handling_redirects
response = await self._send_single_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1730, in _send_single_request
response = await transport.handle_async_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 393, in handle_async_request
with map_httpcore_exceptions():
File "/usr/lib/python3.12/contextlib.py", line 158, in __exit__
self.gen.throw(value)
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 118, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ConnectError
ข้อยกเว้นข้างต้นเป็นสาเหตุโดยตรงของข้อยกเว้นต่อไปนี้:
Traceback (most recent call last):
File "/opt/strategy-factory/src/agents/backtest_agent.py", line 184, in _run_backtest
config = await self._maybe_expand_rolling_options(config, catalog_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/src/agents/backtest_agent.py", line 427, in _maybe_expand_rolling_options
config = await expand_rolling_options_into_config(config, catalog_path, self._logger)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/src/agents/backtest_agent.py", line 59, in expand_rolling_options_into_config
raise RuntimeError(
RuntimeError: การขยาย rolling_options ล้มเหลว (ConnectError: ); ปฏิเสธที่จะรันด้วยตารางออปชันที่ว่างเปล่า
การนำไปใช้
การเขียน put OTM รายสัปดาห์แบบ single-leg, cash-secured บนตัวเลือก Deribit European ETH, ใช้ตัวกรองแนวโน้มเท่านั้น ทุกสัปดาห์เฟรมเวิร์กจะแก้ไข Deribit ETH weekly put chain ในอดีต (กำหนดเป้า strike OTM delta ~25 ผ่าน moneyness offset -6%) และโรลมัน; กลยุทธ์ SELLS หนึ่ง put ที่ ~7 วันก่อนหมดอายุและปิดมัน ~24 ชั่วโมงก่อน settlement เกณฑ์ ONLY เป็นตัวกรองแนวโน้มที่ใช้ราคาเท่านั้น: มันเขียน put เฉพาะเมื่อ spot ETH อยู่เหนือ SMA ~50 วันของมัน (บาร์รายวัน) งดเว้นในช่วง downtrend ที่ยืนยันแล้ว โดยไม่มีหน้าต่าง IV-percentile หลายปี มันเทรดทุกสัปดาห์ที่มีสิทธิ์ (~52/ปี ตลอดหน้าต่าง 365 วัน) เพื่อจำนวนการเทรดที่น่าเชื่อถือทางสถิติ ขจัดกำแพง lookback 4-trades ที่ทำให้ sibling IV-weekly ที่ถูก gated โดย ETH ถูกยกเลิกโดยตรง Primary = ETH-PERPETUAL.DERIBIT บนบาร์ 1-DAY (นาฬิกาโรลเท่านั้น, ไม่เคยถูกเทรด) ขนาด cash-secured (risk_frac 0.8), ไม่มีเลเวอเรจ, พารามิเตอร์ที่ปรับแต่ง 2 (put offset, sma_window)
ผลการตรวจสอบ
CLEAN RESTART 2026-09-04 — ประวัติการตัดสินและบันทึกการเรียนรู้ของรอบนี้ถูกลบออก และเริ่มใหม่ตั้งแต่ขั้นตอนการยืนยัน การยกเลิกครั้งก่อนมาจากไปป์ไลน์ ไม่ใช่มาจากตลาด: harness Layer-2 ผูกเมธอดช่วย @staticmethod ผิดพลาด (แก้ไขแล้ว), QA ออกคำตัดสินประสิทธิภาพขั้นสุดท้ายบน smoke test ที่ยังไม่ได้ปรับแต่ง (ลบออกแล้ว — QA ตอนนี้ตัดสินเฉพาะความถูกต้องเท่านั้น) และ sandbox timeout มาจาก backtest-slot starvation (แก้ไขแล้ว) สมมติฐานและโค้ดกลยุทธ์ไม่เปลี่ยนแปลง ตรวจสอบโค้ดตามคุณค่าของมัน; ประสิทธิภาพจะถูกตัดสินในภายหลังโดย backtest เต็มรูปแบบและ optimizer
ผลการตรวจสอบ
ไม่จำเป็น
ผลการตรวจสอบ
Layer-1 ทำเครื่องหมาย self._win.append() ว่าไม่มีขอบเขต แต่ on_bar ตัดแต่ง deque ทุกบาร์ (ในขณะที่ len > sma_window: popleft()) ดังนั้นการเติบโตจึงมีขอบเขตที่ sma_window ผลบวกลวง
Iteration History
การยืนยันล้มเหลว (Layer 3 — sandbox backtest): smoke test เกินขีดจำกัด wall-clock 300s สิ่งนี้เกือบทุกครั้งหมายถึงงานต่อบาร์ที่ปรับขนาดตามประวัติ — เช่น การสแกนซีรีส์ funding/supplementary ทั้งหมดใหม่ หรือการสร้างลิสต์ใหม่และเรียก min()/sorted() ภายใน calculate_signal()/on_bar() ในทุกบาร์ เตรียมอาร์เรย์ timestamp ที่เรียงลำดับ ONCE ใน __init__ และใช้ bisect หรือแคชการค้นหาที่ใช้ timestamp เป็นคีย์ เพื่อให้ต้นทุนต่อบาร์เป็น O(log n) ไม่ใช่ O(n)
Iteration History
RuntimeError: การขยาย rolling_options ล้มเหลว (ConnectError: ); ปฏิเสธที่จะรันด้วย option schedule ที่ว่างเปล่า
Traceback (most recent call last):
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 101, in map_httpcore_exceptions
yield
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 394, in handle_async_request
resp = await self._pool.handle_async_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpcore/_async/connection_pool.py", line 256, in handle_async_request
raise exc from None
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpcore/_async/connection_pool.py", line 236, in handle_async_request
response = await connection.handle_async_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpcore/_async/connection.py", line 101, in handle_async_request
raise exc
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpcore/_async/connection.py", line 78, in handle_async_request
stream = await self._connect(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpcore/_async/connection.py", line 156, in _connect
stream = await stream.start_tls(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpcore/_backends/anyio.py", line 67, in start_tls
with map_exceptions(exc_map):
File "/usr/lib/python3.12/contextlib.py", line 158, in __exit__
self.gen.throw(value)
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
raise to_exc(exc) from exc
httpcore.ConnectError
ข้อยกเว้นข้างต้นเป็นสาเหตุโดยตรงของข้อยกเว้นต่อไปนี้:
Traceback (most recent call last):
File "/opt/strategy-factory/src/agents/backtest_agent.py", line 49, in expand_rolling_options_into_config
extra_i, extra_bt, sched = await expand_rolling_options(collector, spec, start, end)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/src/data/option_chain.py", line 242, in expand_rolling_options
contracts = await discover_deribit_chain(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/src/data/option_chain.py", line 143, in discover_deribit_chain
perp_bars = await collector.fetch_ohlcv(perp, start_ms, end_ms, "1D")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/src/data/collectors/deribit_collector.py", line 169, in fetch_ohlcv
result = await self._get("/public/get_tradingview_chart_data", {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/src/data/collectors/deribit_collector.py", line 86, in _get
response = await self._client.get(f"{DERIBIT_API_URL}{endpoint}", params=params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1768, in get
return await self.request(
^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1540, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1629, in send
response = await self._send_handling_auth(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1657, in _send_handling_auth
response = await self._send_handling_redirects(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1694, in _send_handling_redirects
response = await self._send_single_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1730, in _send_single_request
response = await transport.handle_async_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 393, in handle_async_request
with map_httpcore_exceptions():
File "/usr/lib/python3.12/contextlib.py", line 158, in __exit__
self.gen.throw(value)
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 118, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ConnectError
ข้อยกเว้นข้างต้นเป็นสาเหตุโดยตรงของข้อยกเว้นต่อไปนี้:
Traceback (most recent call last):
File "/opt/strategy-factory/src/agents/backtest_agent.py", line 184, in _run_backtest
config = await self._maybe_expand_rolling_options(config, catalog_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/src/agents/backtest_agent.py", line 427, in _maybe_expand_rolling_options
config = await expand_rolling_options_into_config(config, catalog_path, self._logger)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/src/agents/backtest_agent.py", line 59, in expand_rolling_options_into_config
raise RuntimeError(
RuntimeError: การขยาย rolling_options ล้มเหลว (ConnectError: ); ปฏิเสธที่จะรันด้วย option schedule ที่ว่างเปล่า
เหตุผลที่ยกเลิก
backtest_failed: RuntimeError: การขยาย rolling_options ล้มเหลว (ConnectError: ); ปฏิเสธที่จะรันด้วยตารางออปชันที่ว่างเปล่า
Traceback (most recent call last):
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 101, in map_httpcore_exceptions
yield
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 394, in handle_async_request
resp = await self._pool.handle_async_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpcore/_async/connection_pool.py", line 256, in handle_async_request
raise exc from None
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpcore/_async/connection_pool.py", line 236, in handle_async_request
response = await connection.handle_async_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpcore/_async/connection.py", line 101, in handle_async_request
raise exc
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpcore/_async/connection.py", line 78, in handle_async_request
stream = await self._connect(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpcore/_async/connection.py", line 156, in _connect
stream = await stream.start_tls(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpcore/_backends/anyio.py", line 67, in start_tls
with map_exceptions(exc_map):
File "/usr/lib/python3.12/contextlib.py", line 158, in __exit__
self.gen.throw(value)
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
raise to_exc(exc) from exc
httpcore.ConnectError
ข้อยกเว้นข้างต้นเป็นสาเหตุโดยตรงของข้อยกเว้นต่อไปนี้:
Traceback (most recent call last):
File "/opt/strategy-factory/src/agents/backtest_agent.py", line 49, in expand_rolling_options_into_config
extra_i, extra_bt, sched = await expand_rolling_options(collector, spec, start, end)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/src/data/option_chain.py", line 242, in expand_rolling_options
contracts = await discover_deribit_chain(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/src/data/option_chain.py", line 143, in discover_deribit_chain
perp_bars = await collector.fetch_ohlcv(perp, start_ms, end_ms, "1D")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/src/data/collectors/deribit_collector.py", line 169, in fetch_ohlcv
result = await self._get("/public/get_tradingview_chart_data", {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/src/data/collectors/deribit_collector.py", line 86, in _get
response = await self._client.get(f"{DERIBIT_API_URL}{endpoint}", params=params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1768, in get
return await self.request(
^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1540, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1629, in send
response = await self._send_handling_auth(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1657, in _send_handling_auth
response = await self._send_handling_redirects(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1694, in _send_handling_redirects
response = await self._send_single_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1730, in _send_single_request
response = await transport.handle_async_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 393, in handle_async_request
with map_httpcore_exceptions():
File "/usr/lib/python3.12/contextlib.py", line 158, in __exit__
self.gen.throw(value)
File "/opt/strategy-factory/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 118, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ConnectError
ข้อยกเว้นข้างต้นเป็นสาเหตุโดยตรงของข้อยกเว้นต่อไปนี้:
Traceback (most recent call last):
File "/opt/strategy-factory/src/agents/backtest_agent.py", line 184, in _run_backtest
config = await self._maybe_expand_rolling_options(config, catalog_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/src/agents/backtest_agent.py", line 427, in _maybe_expand_rolling_options
config = await expand_rolling_options_into_config(config, catalog_path, self._logger)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/strategy-factory/src/agents/backtest_agent.py", line 59, in expand_rolling_options_into_config
raise RuntimeError(
RuntimeError: การขยาย rolling_options ล้มเหลว (ConnectError: ); ปฏิเสธที่จะรันด้วยตารางออปชันที่ว่างเปล่า
Stratmill เป็นเครื่องมือสำหรับการวิจัยและ paper trading ไม่ใช่คำแนะนำทางการเงินหรือโบรกเกอร์ ผลการทดสอบย้อนหลังและ paper trading เป็นเพียงสมมติฐาน การเทรดมีความเสี่ยงที่จะขาดทุน