Skip to main content
Version: 2.0.0

Price Simulator Settings

When this is provided and the prices field is not set the price simulator will be called to fill in the prices field before the simulation will be performed.

The price simulator has a lot of settings for information about these please read more in the Price Simulator section of the documentation.

Make sure to use the example below for the formatting when setting these settings.

Format

nametype
typeobject
requiredtrue

Example

priceSimulator:
maturity: 1.0
random_seed_price: 42
random_seed_sigma: 42
random_seed_black_swan: 42
volatility_mode: "cccgarch"
historicalDataBlockRange: [16085600, 16100000]
granularity: 60
settings:
market_drift: [0, 1]
enable_black_swan_event: false
black_swan_must_happen_by: 0.8
black_swan_cannot_happen_before: 0.3
black_swan_range: [0.3, 0.5]
black_swan_step_length: 100
black_swan_kappa: 0.3
black_swan_theta: 0.02
black_swan_xi: 0.1
volatility_scale: 1.0
max_percentage_change: 0.2
max_value_percentage: 1.0
min_value_percentage: 1.0
postprocessing:
- name: "aggregate"
content:
steps:
0: 60
is_ohlc: true

In the above example:

  • The three random seeds are set to 42 to ensure reproducible output.
  • The CCC-GARCH method is used for modeling volatility. For longer time horizons, EWMA may be used instead, as it is more scalable at size.
  • The granularity of 60 means that each time step in the price simulator will be in one-minute intervals. This value is represented in seconds. A value of 0 or less (the default value if undefined) will use block-level time steps.
  • The settings map one-to-one with the price simulator's internal settings configuration and key-value mapping.
  • The postprocessing object defines postprocessing directives. In this case, the aggregate postprocessing directive is being requested. These settings indicate that every 60 time steps in the price simulator's output should be aggregated, and since the granularity is 60, this means that each time step in the final output will represent one hour. Setting is_ohlc to true will mean that data will be output in the [open, high, low, close] format for each time step rather than a single close value. Note that this aggregation will also be done for historical data in the response in order to ensure consistency in the representation of data and consistency in custom simulation code that may be making use of lookback at each time step. Also note that all postprocessing directives will run in the order that they are defined, from first to last.