fix(web): preserve historical backtests with null configuration (CL25)
This commit is contained in:
parent
731acc41db
commit
ed7429cfbc
10 changed files with 41 additions and 23 deletions
|
|
@ -24,7 +24,7 @@ export interface BacktestJob {
|
|||
startDate: Date;
|
||||
endDate: Date;
|
||||
initialCapital: number;
|
||||
config: Record<string, unknown>;
|
||||
config: Record<string, unknown> | null;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
error?: string;
|
||||
|
|
|
|||
|
|
@ -24,14 +24,14 @@ import {
|
|||
builtinStrategySelectionSchema,
|
||||
validateStrategyParameters,
|
||||
} from '@stock-bot/stock-config/strategy';
|
||||
import { readCandidateExecution } from '@stock-bot/trading-runtime/candidate-environment';
|
||||
import { readCanonicalBuildIdentity } from '@stock-bot/trading-runtime/canonical-build';
|
||||
import {
|
||||
HistoricalDataRequestError,
|
||||
parseFinancialDecimal,
|
||||
type HistoricalDatasetV2,
|
||||
type StrategyParameterValue,
|
||||
} from '@stock-bot/types';
|
||||
import { readCandidateExecution } from '@stock-bot/trading-runtime/candidate-environment';
|
||||
import { readCanonicalBuildIdentity } from '@stock-bot/trading-runtime/canonical-build';
|
||||
import { canonicalRiskSessionClock } from './canonical-risk-clock';
|
||||
import type { DatasetCatalogQuery } from './dataset-catalog.service';
|
||||
import { StrategyCatalogService } from './strategy-catalog.service';
|
||||
|
|
@ -44,7 +44,7 @@ export interface CanonicalTemplate {
|
|||
startDate: string | Date;
|
||||
endDate: string | Date;
|
||||
initialCapital: number;
|
||||
config?: Record<string, unknown>;
|
||||
config?: Record<string, unknown> | null;
|
||||
}
|
||||
const invalid = (message: string): never => {
|
||||
throw new HistoricalDataRequestError(message);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue