Runner¶
- class pams.runners.Runner(settings, prng=None, logger=None, simulator_class=<class 'pams.simulator.Simulator'>)[source]¶
Runner of the market simulator class (Abstract class).
See also
- class_register(cls)[source]¶
Register class. This method is used for user-defined classes.
Usually, user-defined classes, i.e., the classes you implemented for your original simulation, cannot be referred from pams package, especially from simulation runners. Therefore, the class registration to the runner is necessary.
Note
When the settings are given as a python dictionary, you can also set the class itself instead of its name as the value of “class”, e.g.,
{"class": UserDefinedAgent}. Such a class is used as is, and the registration is not necessary. This is not available for JSON files because JSON cannot hold classes.- Parameters:
cls (Type) – class to register.
- Return type:
None- Returns:
None
- static judge_hft_or_not(agent)[source]¶
Determine if the agent is type of the
pams.agents.HighFrequencyAgent.- Parameters:
agent (Agent) – agent instance.
- Returns:
whether the agent class is the
pams.agents.HighFrequencyAgentor not.- Return type:
bool