models
Parameters
Controlling Your Algorithm
Before diving into signal research, backtesting, or optimization, you need to define the key control parameters for your algorithm. These parameters govern various aspects of your strategy, including:
- Indicator Parameters: Settings for your indicators (e.g., period of a moving average).
- Trading Logic Parameters: Values used in your trading rules (e.g., threshold for a crossover).
- Stop-Loss Parameters: Values used in your stop-loss calculations (e.g., ATR multiple).
Configuration
Parameters are organized into the same sections as the trading logic (Signal, Filter, Stops, etc.). This allows you to use different parameter values depending on how you're running the algorithm. Later sections override values in previous sections, providing flexibility in your configuration.
Global Parameters: These parameters are always calculated, regardless of the section.
Values
Each parameter has several value settings:
- Value: The value used during a backtest.
- Def: The default value used during ascent optimization.
- Min/Max: The range of values to analyze during training.
Steps
This setting controls how parameter values are stepped during the training process.
- Default: Increases the value by 10% at each step from the minimum to the maximum.
- Percentage Step: A negative value (e.g., -20) controls the percentage step (e.g., a 20% increase at each step).
- Equal Steps: A positive value (e.g., 15) divides the range between the minimum and maximum into that number of equal steps.
Mappings
Each parameter can have one-to-many mappings that results in efficient fine-grained control of various aspects of your algorithms.
Dynamic Values
Parameter values can be dynamic, meaning they depend on the values of other parameters. You can define the logic for these dynamic relationships, such as multiplying or dividing parameter values.
Example: Moving Average Crossover
- Short-Term Period: The first parameter controls the period of a short-term moving average (e.g., 20).
- Multiplier: The second parameter controls a multiplier value between 2 and 4 (e.g., 3).
- Long-Term Period (Dynamic): A third, dynamic parameter multiplies the short-term period by the multiplier to determine the period of a long-term moving average (e.g., 20 * 3 = 60).
Skipping
You can create parameters that are not trained during ascent optimization but can still be used to control mapped values. This allows you to fix certain parameters while optimizing others, providing more control over the training process.