feat(selection): implement gold brick resonance strategy with evaluation and logging enhancements
This commit is contained in:
@@ -109,7 +109,7 @@ def test_reader_parameterizes_target_and_maps_left_join(monkeypatch: pytest.Monk
|
||||
assert "trade_date <= %s" in cast(str, connection.query)
|
||||
|
||||
|
||||
def test_reader_batches_qfq_rows_by_stock_without_historical_basic_join() -> None:
|
||||
def test_reader_batches_qfq_rows_with_target_day_turnover_only() -> None:
|
||||
connection = FakeConnection(
|
||||
[
|
||||
(
|
||||
@@ -131,6 +131,8 @@ def test_reader_batches_qfq_rows_by_stock_without_historical_basic_join() -> Non
|
||||
"10",
|
||||
"10.8",
|
||||
"1200",
|
||||
"1.2",
|
||||
"100000",
|
||||
),
|
||||
(
|
||||
"000001.SZ",
|
||||
@@ -160,10 +162,15 @@ def test_reader_batches_qfq_rows_by_stock_without_historical_basic_join() -> Non
|
||||
date(2024, 1, 2),
|
||||
date(2024, 1, 3),
|
||||
]
|
||||
assert histories[0].daily_basic == {}
|
||||
assert connection.parameters == (["000001.SZ", "600000.SH"], date(2024, 1, 3))
|
||||
assert histories[0].daily_basic[date(2024, 1, 3)].turnover_rate == 1.2
|
||||
assert connection.parameters == (
|
||||
date(2024, 1, 3),
|
||||
["000001.SZ", "600000.SH"],
|
||||
date(2024, 1, 3),
|
||||
)
|
||||
assert "bar.ts_code = ANY(%s)" in cast(str, connection.query)
|
||||
assert "market_daily_basic" not in cast(str, connection.query)
|
||||
assert "market_daily_basic" in cast(str, connection.query)
|
||||
assert "basic.trade_date = %s" in cast(str, connection.query)
|
||||
assert pool.opened == 1
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user