feat: Add DART strategy and related configurations
ㅇ Changes: - Introduced the DART strategy to the trading system, including its configuration and integration into the existing framework. - Updated the database schema to include DART-specific tables for disclosures and watchlists. - Enhanced the backtesting and parameter search functionalities to support the DART strategy. - Implemented new rules for browser verification and API interactions to ensure compliance with the updated DART strategy. Impact: - These additions expand the trading capabilities of the system, allowing for more comprehensive analysis and execution of DART-related strategies, while maintaining system integrity and performance.
This commit is contained in:
@@ -106,6 +106,37 @@ def main() -> None:
|
||||
})
|
||||
assert agg2._confirmed[key][0]["volume"] == 800
|
||||
|
||||
# 진행 중 분봉은 REST/merge confirmed 에 넣지 않음 (장초 직전봉% 왜곡 방지)
|
||||
import datetime as _dt
|
||||
agg3 = CandleAggregator(db=None, timeframes=[1])
|
||||
code2 = "333050"
|
||||
frozen = _dt.datetime(2026, 7, 16, 9, 0, 34)
|
||||
# 전일 + 미완성 당일 09:00 을 넣으려 할 때 → 09:00 만 skip
|
||||
n = agg3.merge_confirmed_bars(
|
||||
code2, 1,
|
||||
[
|
||||
bar("202607151530", 5280, 5280, 5280, 5280, 960, "rest"),
|
||||
bar("202607160900", 5220, 5250, 5200, 5220, 10, "rest"), # 진행분
|
||||
],
|
||||
log_tag="smoke_skip_open",
|
||||
skip_incomplete_bucket=True,
|
||||
now=frozen,
|
||||
)
|
||||
assert n == 1
|
||||
buf3 = agg3._confirmed[(code2, 1)]
|
||||
assert len(buf3) == 1 and buf3[0]["candle_time"] == "202607151530"
|
||||
# 이미 들어간 진행분 purge
|
||||
agg3._confirmed[(code2, 1)].append(
|
||||
bar("202607160900", 5220, 5250, 5200, 5220, 10, "rest")
|
||||
)
|
||||
agg3.merge_confirmed_bars(
|
||||
code2, 1, [], log_tag="smoke_purge", skip_incomplete_bucket=True, now=frozen,
|
||||
)
|
||||
assert all(
|
||||
str(c["candle_time"])[:12] < "202607160900"
|
||||
for c in agg3._confirmed[(code2, 1)]
|
||||
)
|
||||
|
||||
print("SMOKE_OK candle_upsert_rollup")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user