MarketAwarePredictionBasedTradingStrategy

class scml.scml2020.MarketAwarePredictionBasedTradingStrategy(*args, add_trade=True, **kwargs)[source]

Bases: MarketAwareTradePredictionStrategy, PredictionBasedTradingStrategy

Attributes Summary

internal_state

Methods Summary

before_step()

init()

on_agent_bankrupt(agent, contracts, ...)

rtype:

None

on_contract_breached(contract, breaches, ...)

rtype:

None

on_contract_executed(contract)

rtype:

None

on_contracts_finalized(signed, cancelled, ...)

rtype:

None

predict_quantity(contract)

sign_all_contracts(contracts)

rtype:

List[Optional[str]]

step()

trade_prediction_before_step()

Will be called at the beginning of every step to update the prediction

trade_prediction_init()

Will be called to update expected_outputs, expected_inputs, input_cost, output_cost during init()

trade_prediction_step()

Will be called at the end of every step to update the prediction

Attributes Documentation

internal_state

Methods Documentation

before_step()
init()
on_agent_bankrupt(agent, contracts, quantities, compensation_money)
Return type:

None

on_contract_breached(contract, breaches, resolution)
Return type:

None

on_contract_executed(contract)
Return type:

None

on_contracts_finalized(signed, cancelled, rejectors)
Return type:

None

predict_quantity(contract)
sign_all_contracts(contracts)
Return type:

List[Optional[str]]

step()
trade_prediction_before_step()

Will be called at the beginning of every step to update the prediction

trade_prediction_init()

Will be called to update expected_outputs, expected_inputs, input_cost, output_cost during init()

trade_prediction_step()

Will be called at the end of every step to update the prediction