turtle_quant_1.backtesting.models¶
turtle_quant_1.backtesting.models
¶
Pydantic models for backtesting results.
PortfolioSummary
¶
Bases: BaseModel
Pydantic model for portfolio summary.
PortfolioTransaction
¶
Bases: BaseModel
Pydantic model for a single transaction.
TestCaseResponse
¶
Bases: BaseModel
Pydantic model for backtesting test case response.
from_failure
classmethod
¶
from_failure(
test_case_name: str,
test_case_description: str,
error: Exception,
execution_time: Optional[float] = None,
) -> TestCaseResponse
Create a failed test case response.
Source code in src/turtle_quant_1/backtesting/models.py
from_success
classmethod
¶
from_success(
test_case_name: str,
test_case_description: str,
results: TestCaseResults,
execution_time: Optional[float] = None,
) -> TestCaseResponse
Create a successful test case response.
Source code in src/turtle_quant_1/backtesting/models.py
TestCaseResults
¶
TestCaseStatus
¶
Bases: str, Enum
Enumeration for test case execution status.