FinancialSACAgentOptions<T>
Options & Configuration · AiDotNet.Models.Options
Configuration options for the Financial SAC (Soft Actor-Critic) trading agent.
Inheritance: ModelOptions → TradingAgentOptions<T> → FinancialSACAgentOptions<T>
For Beginners
SAC learns a policy that earns reward while staying as random as it can afford to, which keeps it exploring. These options choose the paper version and its training settings.
How It Works
The defaults are Haarnoja et al. 2018a (the ICML paper, Table 1): Adam at 3e-4 for every network, γ = 0.99,
a replay buffer of 10⁶, minibatches of 256, two hidden layers of 256 ReLU units, τ = 0.005, one gradient step per
environment step, a state-value network, and a fixed temperature (SACAlpha 0.2, the inverse of the paper’s reward
scale of 5). Sac2018b gives the follow-up paper’s setting, which learns the temperature instead.
Constructors
| Constructor | Summary |
|---|---|
FinancialSACAgentOptions() |
Creates options with the default values. |
FinancialSACAgentOptions(FinancialSACAgentOptions<T> other) |
Creates a copy of another options instance. |
Properties
| Property | Summary |
|---|---|
SacActorHead ActorHead { get; set; } |
How the policy predicts its spread: from the state, as both papers’ Gaussian policy does (the default), or as one learned value per action dimension. |
SacCriticAggregate PolicyCriticAggregate { get; set; } |
How the policy update combines the two Q-functions: their minimum, as both papers specify (the default); the first alone (the 2018a code); or their mean (softlearning). |
SacTemperatureParameter TemperatureParameter { get; set; } |
What a learned temperature takes its gradient steps on: α itself, as the 2018b paper’s Algorithm 1 writes it (the default), or log α, as softlearning does. |
SacVariant Variant { get; set; } |
Which SAC paper the agent follows (2018a’s value network by default). |
bool SimultaneousUpdates { get; set; } |
Whether every network’s step is computed from the same pre-step parameters, as the 2018a code runs all its training ops in one session call, rather than one after another in the order of the papers’ Algorithm 1 (the default). |
double InitialLogAlpha { get; set; } |
The learned temperature’s starting point, as log α (0, so α = 1, softlearning’s initial value). |
double TargetEntropyRatio { get; set; } |
The target entropy per action dimension for the learned temperature (−1, so −dim(A), the 2018b paper’s heuristic). |
Methods
| Method | Summary |
|---|---|
FinancialSACAgentOptions<T> Sac2018b() |
Haarnoja et al. |