Skip to main content

Simulation

No description

type Simulation implements Node {
id: ID!
deletedAt: Time
name: String!
description: String
status: SimulationTaskStatus!
method: SimulationSimulationMethod!
config: Map
result: Map
progress: Float
errorMessage: String
ownerID: String!
strategyID: ID!
backtestID: ID
createdAt: Time!
updatedAt: Time!
completedAt: Time
backtest: Backtest
legibleStatus: EntityStatus!
simulationResult: SimulationResult
strategy: Strategy
}

Fields​

Simulation.id ● ID! non-null scalar​

Simulation.deletedAt ● Time scalar​

Soft-delete timestamp. If set, record is considered deleted.

Simulation.name ● String! non-null scalar​

User-provided simulation name

Simulation.description ● String scalar​

Optional description of the simulation

Simulation.status ● SimulationTaskStatus! non-null enum​

Task status

Simulation.method ● SimulationSimulationMethod! non-null enum​

Monte Carlo simulation method

Simulation.config ● Map scalar​

Simulation configuration parameters

Simulation.result ● Map scalar​

Simulation results (percentiles, equity curves, etc.)

Simulation.progress ● Float scalar​

Simulation progress percentage (0.0 to 100.0)

Simulation.errorMessage ● String scalar​

Error message if simulation failed

Simulation.ownerID ● String! non-null scalar​

Organization alias for multi-tenancy

Simulation.strategyID ● ID! non-null scalar​

Foreign key to strategy

Simulation.backtestID ● ID scalar​

Foreign key to backtest (optional, if seeding from a specific backtest run)

Simulation.createdAt ● Time! non-null scalar​

Simulation.updatedAt ● Time! non-null scalar​

Simulation.completedAt ● Time scalar​

Completion timestamp

Simulation.backtest ● Backtest object​

Simulation.legibleStatus ● EntityStatus! non-null object​

Simulation.simulationResult ● SimulationResult object​

Typed simulation result with distribution statistics and equity curves. Resolved from the raw JSON 'result' Map field, and gated like it: the simulation's own owner read, even under a public strategy (#3376).

Simulation.strategy ● Strategy object​

The strategy this simulation was run against.

NULLABLE by design: strategies are soft-deleted (ADR-0037), so a simulation can outlive its strategy. The ENT-generated non-null strategy: Strategy! edge is skipped (see internal/ent/schema/simulation.go) precisely so a deleted strategy does NOT trigger GraphQL non-null propagation that would NULL the entire Simulation node. When the strategy has been deleted this resolves to null, and the simulation (with its id, status, and result) stays addressable so the user can still open, rerun, or delete it.

Interfaces​

Node interface​

An object with an ID. Follows the Relay Global Object Identification Specification

Returned By​

cancelSimulation mutation ● runSimulation mutation ● simulation query ● simulationChanged subscription ● simulationProgress subscription

Member Of​

SimulationEdge object