15 lines
515 B
Python
15 lines
515 B
Python
from dataclasses import dataclass, field
|
|
from datetime import date
|
|
|
|
|
|
@dataclass
|
|
class BacktestConfig:
|
|
symbols: list[str] = field(default_factory=lambda: ["sh600000"])
|
|
start_date: str = "2023-01-01"
|
|
end_date: str = "2024-12-31"
|
|
initial_cash: float = 1_000_000.0
|
|
commission: float = 0.0003 # 0.03% for Chinese A-shares
|
|
stamp_duty: float = 0.001 # 0.1% stamp duty on sells only (handled in strategy)
|
|
adjust: str = "qfq"
|
|
sizer_percent: float = 0.95 # fraction of portfolio per trade
|