feat(research): add strategy catalog and versioned backtest setup
This commit is contained in:
parent
8cca0ee588
commit
d929db707a
44 changed files with 4198 additions and 209 deletions
|
|
@ -2,7 +2,10 @@ import { randomUUID } from 'node:crypto';
|
|||
import type { PoolClient } from 'pg';
|
||||
import type { TransactionCallback } from '@stock-bot/postgres';
|
||||
import type { PostgresClient } from '@stock-bot/services';
|
||||
import { parseBacktestRequest } from '@stock-bot/stock-config/backtest';
|
||||
import {
|
||||
parseBacktestRequest,
|
||||
rejectCatalogVersionReferences,
|
||||
} from '@stock-bot/stock-config/backtest';
|
||||
import type { BacktestRunResult, HistoricalDataset } from '@stock-bot/types';
|
||||
import { prepareDataset } from '../data/historical-dataset';
|
||||
import type { BacktestConfig } from '../types';
|
||||
|
|
@ -36,6 +39,7 @@ export class PostgresBacktestRunRepository implements BacktestRunRepository {
|
|||
}
|
||||
|
||||
async start(config: BacktestConfig): Promise<RunClaim> {
|
||||
rejectCatalogVersionReferences(config);
|
||||
const attemptId = randomUUID();
|
||||
return this.postgres.transaction(async client => {
|
||||
if (config.runId) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue