Price Simulator Settings
There are multiple settings that can be toggled at either the global level or the asset level. Below enumerates the supported settings and their effect on the generated price trajectories.
Custom Correlation Matrix
Custom correlation matrix for assets being simulated. This field allows overriding the
correlation matrix that is otherwise derived from historical data. If set to an empty list,
as is the default, then the standard correlation matrix method is used. If set to null
,
then there will not be any correlation matrix, resulting in a simulation that does not do
any asset correlation during price simulation.
- Parameter name:
custom_correlation_matrix
- Input type:
List[List[float]]
ornull
- Default value:
[]
Estimate Distribution
Indicates whether to estimate the volatility distribution using statistical methods.
This is False
by default, indicating that the volatility distribution will be
hardcoded to the skewed generalized t distribution. If set to True
, then an estimate
will be made based on skewness and kurtosis. Note that this currently only applies to
the CCC-GARCH volatility mode.
- Parameter name:
estimate_distribution
- Input type:
boolean
- Default value:
false
Market Drift Mode
The market drift mode to use when simulating particular market types. This indicates the shape
that the market should take. The permitted values are currently linear
, parabolic
, cone
,
sinusoidal
, and ranging
. Bull or bear markets will evolve in the indicated direction with
the indicated shape. See the Price Modeling
page for more details.
- Parameter name:
market_drift_mode
- Input type:
string
- Default value:
linear
Market Drift
The market drift value. This is a value which indicates the direction that each asset should
trend throughout the simulation and can be used for simulating bear markets, bull markets, and
ranging markets of varying strengths, where negative values indicate a strengthening total bear
market, positive values indicate a strengthening total bull market, and values from [-1.0, 1.0]
indicate varying degrees of a ranging market. Using null
indicates that no preference should
be given to market scenarios, and a more random market scenario will be simulated.
- Parameter name:
market_drift
- Input type:
float
ornull
- Default value:
null
Enable Black Swan Event
Indicates whether to invoke a black swan event at some point in the simulation. The subsequent
black swan configuration items are dependent on this being set to true
.
- Parameter name:
enable_black_swan_event
- Input type:
boolean
- Default value:
false
Black Swan Must Happen By
The point in the simulation by which the black swan event must happen. This value can range
between 0.0
and 1.0
, representing a proportion of the total simulation time. By default, we
want the black swan event to happen by the time the simulation is 80% complete.
- Parameter name:
black_swan_must_happen_by
- Input type:
float
- Default value:
0.8
Black Swan Cannot Happen Before
The point in the simulation where the black swan event must NOT happen prior. This value can range
between 0.0
and 1.0
, representing a proportion of the total simulation time. By default, we do
not want the black swan event to happen for the first 30% of the simulation.
- Parameter name:
black_swan_cannot_happen_before
- Input type:
float
- Default value:
0.3
Black Swan Range
The range by which the black swan event will depress the price, represented as a percentage of the total value of the asset. By default, during a black swan event, the asset will crash by 30% to 50% of its current value.
- Parameter name:
black_swan_range
- Input type:
List[float]
- Default value:
[0.3, 0.5]
Black Swan Step Length
The number of time steps over which the black swan event should unfold. This is 100
by default
but can be stretched or compressed to different values.
- Parameter name:
black_swan_step_length
- Input type:
integer
- Default value:
100
Black Swan Kappa
The kappa input parameter represents the rate at which the volatility reverts to the long-term mean (theta). This is used for the Heston model of volatility during black swan events.
- Parameter name:
black_swan_kappa
- Input type:
float
- Default value:
0.3
Black Swan Theta
The theta input parameter can either be the mean of the historical/simulated volatilities up to the current time step or the volatility of the time step before the crash (the latter being easier and faster to derive). This is used for the Heston model of volatility during black swan events.
- Parameter name:
black_swan_theta
- Input type:
float
- Default value:
0.02
Black Swan Xi
The xi input parameter represents the volatility of the volatility (i.e., the standard deviation of the changes in the square root of the variance) and is used for the Heston model of volatility during black swan events.
- Parameter name:
black_swan_xi
- Input type:
float
- Default value:
0.1
Volatility Range
The minimum and maximum volatility to allow. This rescales derived volatility values to be within the given range. Note that an empty list indicates to not do any scaling of volatility values, which is the default behavior. Further note that this operation is applied before volatility scaling.
- Parameter name:
volatility_range
- Input type:
List[float]
- Default value:
[]
Volatility Range Historical
This rescales derived volatility values to be within the historical volatility range. Note that
this parameter takes precedence over volatility_range
if set to true
. Further note that this
operation is applied before volatility scaling. This is currently only supported for CCC-GARCH
and EWMA volatility modes, as these are the only volatility modes that provide a historical
volatility value.
- Parameter name:
volatility_range_historical
- Input type:
boolean
- Default value:
false
Volatility Range Historical if Exceeding Historical Max
This rescales derived volatility values to be within the historical volatility range if the
simulated volatility exceeds the historical maximum. Note that this parameter takes precedence
over volatility_range
if set to true
. Further note that this operation is applied before
volatility scaling. This is currently only supported for CCC-GARCH and EWMA volatility modes,
as these are the only volatility modes that provide a historical volatility value.
- Parameter name:
volatility_range_historical_if_exceeding_historical_max
- Input type:
boolean
- Default value:
false
Volatility Scale
A multiplier by which volatility should be scaled at each time step. This multiplier is applied after all other volatility scaling is applied (GARCH, black swan volatility multiplier, etc.) and is intended to be used for risk parameter verification after optimization has produced a candidate set of risk parameters. The formula here is:
adjusted_volatility = simulated_volatility * volatility_scale
- Parameter name:
volatility_scale
- Input type:
float
- Default value:
1.0
Volatility Shift by Standard Deviation
Similar to volatility_scale
except the value indicates by how many standard deviations of
volatility (defined here as the standard deviation of the historical returns) to shift the
volatility value. An addition is applied here rather than volatility_scale
which multiplies the
value against the volatility. Note that this takes precedence over volatility_scale
if set to
anything other than null
. The formula here is:
adjusted_volatility = simulated_volatility + (volatility_shift_by_std * std_dev_of_historical_price_returns)
- Parameter name:
volatility_shift_by_std
- Input type:
float
ornull
- Default value:
null
Maximum Percentage Change
The maximum percentage change that a price is allowed to move in one time step when using the non-scenario price generator.
- Parameter name:
max_percentage_change
- Input type:
float
- Default value:
0.1
Maximum Percentage Change with Historical Maximum Multiplier
The maximum percentage change that a price is allowed to move in one time step when using the
non-scenario price generator. This metric is expressed as a multiplier based on historical price
changes. For example, if the maximum amount that the price changed historically was 3% and this
value is 2.0, then the maximum amount that the price is permitted to move in a single time step is
6%. If this value is set to null
, then the max_percentage_change
value is used as a raw bound
of price movement.
- Parameter name:
max_percentage_change_historical_max_multiplier
- Input type:
float
ornull
- Default value:
null
Maximum Percentage Change with Historical Standard Deviation Multiplier
The same as max_percentage_change_historical_max_multiplier
except the multiplier is based on
the standard deviation of percentage changes over the historical data rather than the maximum.
- Parameter name:
max_percentage_change_historical_std_multiplier
- Input type:
float
ornull
- Default value:
null
Maximum Value Percentage
The maximum percentage upward that the price should be able to increase by before requiring to drift downward when using the non-scenario price generator.
- Parameter name:
max_value_percentage
- Input type:
float
- Default value:
10000.0
Minimum Value Percentage
The minimum percentage downward that the price should be able to decrease by before requiring to drift upward when using the non-scenario price generator.
- Parameter name:
min_value_percentage
- Input type:
float
- Default value:
0.99
Asset-Specific Settings
There are also asset-specific settings that can be set at the asset level. These values reside
at the same hierarchical level as symbol
and config
in the assets
entry.
Start Price
The starting price of the asset. This is used to seed the price process and overrides the latest value in the historical data for this asset. If unset, then the default value of the latest historical price is used.
This could be useful for cases where the historical data is not available or is not reliable. Historical data can still be used for volatility modeling, but the price process can be seeded with this custom start price if needed. This parameter is to be added in the "Assets" JSON, and outside of "Config" E.g
{
"assets": [
{
"symbol": [
"WBTC",
"ETH"
],
"config": {},
"start_price": 20.0
},
{
"symbol": [
"WBTC",
"USDT"
],
"config": {},
"start_price": 40000.0
}
]
}
- Parameter name:
start_price
- Input type:
float
- Default value:
null
Data Source Settings
The data_feed
setting at the top level of the JSON request payload can be used to specify the
data source to use for the simulation. The supported data sources are as follows:
biglake
- Default setting if otherwise unspecified. Uses the BigLake price data source.biglake_trades
- Uses the BigLake trade data source.iceberg
- Uses the Iceberg trade data source.parquet
- Uses the Parquet file price data source.binance
- Uses the Binance price data source.
In general, the above data sources are listed in order of preference based on how often the data
in the source is updated. The biglake
data sources are updated on a daily basis, while the
Binance data source is deprecated and is more of a legacy fallback for historical data.