IndexMarket#
- class pams.IndexMarket(market_id, prng, simulator, name, logger=None)[ソース]#
Index of market.
This class inherits from the
pams.market.Market
class.- compute_fundamental_index(time=None)[ソース]#
compute fundamental index.
- パラメータ:
time (int, Optional) -- time step.
- 戻り値:
fundamental index.
- 戻り値の型:
float
注釈
- In an index market, there are two types of fundamental values:
fundamental value set from outside such as runner (
pams.index_market.IndexMarket.compute_fundamental_index()
)fundamental value calculated from components' fundamental value (
pams.index_market.IndexMarket.get_fundamental_index()
,pams.index_market.IndexMarket.get_fundamental_price()
)
In usual usage, those become the same. But, in some special usage, it could be differ. This method return 1st one.
- compute_market_index(time=None)[ソース]#
compute market index.
- パラメータ:
time (int, Optional) -- time step.
- 戻り値:
market index.
- 戻り値の型:
float
- get_components()[ソース]#
get components.
- 戻り値:
list of components.
- 戻り値の型:
List[
pams.market.Market
]
- get_fundamental_index(time=None)[ソース]#
get fundamental index.
- パラメータ:
time (int, Optional) -- time step.
- 戻り値:
fundamental index.
- 戻り値の型:
float
注釈
- In an index market, there are two types of fundamental values:
fundamental value set from outside such as runner (
pams.index_market.IndexMarket.compute_fundamental_index()
)fundamental value calculated from components' fundamental value (
pams.index_market.IndexMarket.get_fundamental_index()
,pams.index_market.IndexMarket.get_fundamental_price()
)
In usual usage, those become the same. But, in some special usage, it could be differ. This method return 2nd one.
- get_index(time=None)[ソース]#
get market index.
- パラメータ:
time (int, Optional) -- time step.
- 戻り値:
market index.
- 戻り値の型:
float
- get_market_index(time=None)[ソース]#
get computed market index.
- パラメータ:
time (int, Optional) -- time step.
- 戻り値:
market index.
- 戻り値の型:
float
- is_all_markets_running()[ソース]#
get whether all markets is running or not.
- 戻り値:
whether all markets is running or not.
- 戻り値の型:
bool
- setup(settings, *args, **kwargs)[ソース]#
setup market configuration from setting format.
- パラメータ:
settings (Dict[str, Any]) -- market configuration. Usually, automatically set from json config of simulator. This must include the parameter "markets". This should include the parameter "requires".
- 戻り値の型:
None
- 戻り値:
None