examples.macro_model.spaces package

Submodules

examples.macro_model.spaces.cG_market module

class examples.macro_model.spaces.cG_market.CGMarket(model, name, actions_set_file, action_class)[source]

Bases: examples.macro_model.spaces.market.Market

The Consumer Goods Market

buy_equipment(a_firm)[source]

A firm buys production equipment (fixed capital)

compute_sales_revenue(a_firm)[source]

Agent compute sells of CG

contract_credit(a_firm)[source]

A firm contracts credit

decide_investment(a_firm)[source]

A firm decides investment

offer_production(a_firm)[source]

Agent offer production of consumer goods

pay_interest_bonds(a_firm)[source]

A firm pays interest on bonds to investors

pay_interest_loans(a_firm)[source]

A firm pays interest on loans to a bank

pay_salaries(a_firm)[source]

A firm pays salaries

pay_suppliers(a_firm)[source]

A firm pays suppliers of goods

sell_production(a_firm)[source]

CG_firm sells production

examples.macro_model.spaces.credit_market module

class examples.macro_model.spaces.credit_market.CreditMarket(model, name, actions_set_file, action_class)[source]

Bases: examples.macro_model.spaces.market.Market

The Credit Market

buy_gov_bonds(a_bank, gov, ammount)[source]

A bank buy government bonds

calculate_exposure(a_bank)[source]

A bank calculates its exposure

contract_cash_advances()[source]

Central Bank Contract Cash Advances on the Credit Market

contract_credit(an_agent, a_bank)[source]

An agent contracts credit from a Bank

decide_cr_target(a_bank)[source]

A bank agent decides capital ratio target

decide_interest_rate_strategy(a_bank)[source]

A bank decides the strategy for interest rate determination

offer_credit(a_bank)[source]

A bank offer credit on the credit market

offer_new_bonds()[source]

A government offers bonds

pay_gov_bonds_interest()[source]

A government pays bonds and interests

receive_advances_CB(a_bank, central_bank, ammount)[source]

A bank receive some ammount of money from the central bank at some interest rate

examples.macro_model.spaces.deposits_market module

class examples.macro_model.spaces.deposits_market.DepositsMarket(model, name, actions_set_file, action_class)[source]

Bases: examples.macro_model.spaces.market.Market

The Deposits Market

cash(a_bank, an_agent, amount)[source]

An agent cash some amount from its’ account

deposit(a_bank, an_agent, amount)[source]

An agent deposits some amount in its’ account

interests_on_deposits(a_bank)[source]

A bank decides the interest rates on deposits

pay(a_bank_to_cash, a_bank_to_deposit, payer, receiver, ammount)[source]

An agent pays some amount to a receiver

pay_unempl_benefits()[source]

The government pays unemployment benefits to households

transfer_profits_gov()[source]

Central Bank transfer profits to Government

examples.macro_model.spaces.kG_market module

class examples.macro_model.spaces.kG_market.KGMarket(model, name, actions_set_file, action_class)[source]

Bases: examples.macro_model.spaces.market.Market

The Capital Goods Market

buy_equipment(a_firm)[source]

A firm buys production equipment (fixed capital)

compute_sales_revenue(a_firm)[source]

Agent compute sells of CG

contract_credit(a_firm)[source]

A firm contracts credit

decide_investment(a_firm)[source]

A firm decides investment

offer_production(a_firm)[source]

Agent offer production of consumer goods

pay_interest_bonds(a_firm)[source]

A firm pays interest on bonds to investors

pay_interest_loans(a_firm)[source]

A firm pays interest on loans to a bank

pay_salaries(a_firm)[source]

A firm pays salaries

pay_suppliers(a_firm)[source]

A firm pays suppliers of goods

sell_production(a_firm)[source]

CG_firm sells production

examples.macro_model.spaces.labor_market module

class examples.macro_model.spaces.labor_market.LaborMarket(model, name, actions_set_file, action_class)[source]

Bases: examples.macro_model.spaces.market.Market

The Labor Market

average_labor_price()[source]

Labor Market answers the average labor price

bid_labor_demand()[source]

A firm ask for a quantity of labor at a price

contract_gov_labor()[source]

Government get household labor

pay_salary()[source]

Agent pay salaries

pay_wages()[source]

Agent pay wages

update()[source]

Labor Market updates

examples.macro_model.spaces.market module

Basic Market Class implementation

class examples.macro_model.spaces.market.Market(model, name, actions_set_file, action_class)[source]

Bases: sphinx.ext.autodoc.importer._MockObject

Abstract Market

BID_TYPE = ['O', 'D']
bid_market(bid_type, a_good)[source]

include an offer in the market

compute_production_price()[source]

Agent compute production price

get_highest_demmand()[source]

A market answers the demmand with the highest value (in the self.demmand ordered dict)

get_highest_offer()[source]

A market answers the offer with the highest value (in the self.offers ordered dict)

get_lowest_demmand()[source]

A market answers the demmand with the lowest value (in the self.demmand ordered dict)

get_lowest_offer()[source]

A market answers the offer with the lowest value (in the self.offers ordered dict)

has_demmand()[source]

A market answers if is has demmand (True or False)

has_offers()[source]

A market answers if is has offers (True or False)

init_offers(new_offers)[source]

Get new offers dict and check if is a sorted dict - if yes, set it

match_bids()[source]

Market matching of offer and demmand This method can be specialized depending on market Is prepared to be an assincronous method

no_of_offers()[source]

A market answers the number of offers it has

notify_match(a_demmand, contracted_offers)[source]

Notify the agents that their bids where matched

offer_gs(offered_good)[source]

include an offer in the market

pay_taxes(an_agent)[source]

An agent pay taxes

register_contract(a_demmand, contracted_offers)[source]

The matched bids become contracts

release_demmand()[source]

When some bid passed the timeout of the system, the market release the bid

release_offers()[source]

When some bid passed the timeout of the system, the market release the bid

return_offer(gs)[source]

A market receives an offer of a good or service

show_offer(an_agent)[source]

Show offer

update()[source]

Implemented by subclass - Testing update

Module contents