FCNAgent#

class pams.agents.FCNAgent(agent_id, prng, simulator, name, logger=None)[ソース]#

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\)

参照

is_finite(x)[ソース]#

determine if it is a valid value.

パラメータ:

x (float) -- value.

戻り値:

whether or not it is a valid (not NaN, finite) value.

戻り値の型:

bool

setup(settings, accessible_markets_ids, *args, **kwargs)[ソース]#

agent setup. Usually be called from simulator/runner automatically.

パラメータ:
  • 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.

戻り値の型:

None

戻り値:

None

submit_orders(markets)[ソース]#

submit orders based on FCN-based calculation. :rtype: List[Union[Order, Cancel]]

submit_orders_by_market(market)[ソース]#

submit orders by market (internal usage).

パラメータ:

market (Market) -- market to order.

戻り値:

order list.

戻り値の型:

List[Union[Order, Cancel]]