Rewrite trader service for V4 P0
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package com.quantai.trader.artifact;
|
||||
|
||||
import com.quantai.trader.domain.TraderPmConfig;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public record TraderArtifactBundle(
|
||||
String modelBundleVersion,
|
||||
String calibrationBundleVersion,
|
||||
String pmConfigVersion,
|
||||
String bundleHashSha256,
|
||||
Set<String> providedModels,
|
||||
TraderPmConfig pmConfig
|
||||
) {
|
||||
public TraderArtifactBundle {
|
||||
if (providedModels == null || !providedModels.containsAll(Set.of("DIRECTION", "ENTRY", "CONTINUE", "EXIT", "RISK"))) {
|
||||
throw new IllegalArgumentException("artifact bundle must provide all five V4 models");
|
||||
}
|
||||
pmConfig = java.util.Objects.requireNonNull(pmConfig, "pmConfig is required");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user