FCNAgent#
- class pams.agents.FCNAgent(agent_id, prng, simulator, name, logger=None)[source]#
FCN (Fundamental, Chartist, Noise) Agent class
This class inherits from the
pams.agents.Agent
class.An order decision mechanism proposed in Chiarella & Iori (2004). It employs two simple margin-based random tradings. Given an expected future price p, submit an order of price
“fixed” : \(p (1 ± k)\) where \(0 \leq k \leq 1\)
“normal” : \(p + N(0, k)\) where \(k > 0\)
References
Chiarella, C., & Iori, G. (2002). A simulation analysis of the microstructure of double auction markets. Quantitative Finance, 2(5), 346–353. https://doi.org/10.1088/1469-7688/2/5/303
- is_finite(x)[source]#
determine if it is a valid value.
- Parameters:
x (float) – value.
- Returns:
whether or not it is a valid (not NaN, finite) value.
- Return type:
bool
- setup(settings, accessible_markets_ids, *args, **kwargs)[source]#
agent setup. Usually be called from simulator/runner automatically.
- Parameters:
settings (Dict[str, Any]) – agent configuration. This can include the parameters “fundamentalWeight”, “chartWeight”, “noiseWeight”, “noiseScale”, “timeWindowSize”, “orderMargin”, “marginType”, and “meanReversionTime”.
accessible_markets_ids (List[int]) – list of market IDs.
- Return type:
None
- Returns:
None