This commit is contained in:
Oleg Sheynin
2026-01-11 13:33:58 +00:00
parent 6dd0f97d74
commit b196863a34
26 changed files with 5365 additions and 5566 deletions
+5 -3
View File
@@ -4,6 +4,8 @@ from datetime import date, datetime
from typing import Any, Dict, List, Optional, Tuple
import pandas as pd
from cvttpy_trading.trading.instrument import ExchangeInstrument
from pairs_trading.lib.pt_strategy.trading_pair import TradingPair
@@ -120,7 +122,7 @@ def store_config_in_database(
config_file_path: str,
config: Dict,
datafiles: List[Tuple[str, str]],
instruments: List[Dict[str, str]],
instruments: List[ExchangeInstrument],
) -> None:
"""
Store configuration information in the database for reference.
@@ -141,7 +143,7 @@ def store_config_in_database(
datafiles_str = ", ".join([f"{datafile}" for _, datafile in datafiles])
instruments_str = ", ".join(
[
f"{inst['symbol']}:{inst['instrument_type']}:{inst['exchange_id']}"
inst.details_short()
for inst in instruments
]
)
@@ -292,7 +294,7 @@ class PairResearchResult:
pair_return = symbol_a_return + symbol_b_return
# Create round-trip records for both symbols
funding_per_position = self.config_.get("funding_per_pair", 10000) / 2
funding_per_position = self.config_.get_value("funding_per_pair", 10000) / 2
# Symbol A round-trip
day_roundtrips.append({