|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteos.bank.Bank
public class Bank
Simplified Bank. There is only one bank in the current model. Each agent has an account and several subaccounts, which are balance (main bank account) mortgages (outstanding mortgage loans, which are contracts) interest (per-step) revenue (per-step) savedRevenue -- saved revenue for dumping as data, and use in CGFirm.act savedInterest -- saved interest for possible dumping as data, and use in CGFirm.act payments (per-step) wage (per-step) Smoothed versions of these are also maintained here. A positive balance in an account signifies assets and earns interest. A negative balance signifies loans and pays interest. There are two interest rates, loan interest rate and deposit interest rate, but for now we are taking depositIR = loanIR. loanIR is determined by an adaptive algorithm using parameter tau and some measure of the imbalance in the bank's reserve --> this is the subject of current experimentation bankReserve is the alegraic sum of all balances: deposits, which are positive, and loans, which are negative. mortgages is the total amount on loan by the firms for their purchases of capital, and each mortgage payment pays back the bank some principle and some interest on purchase of a mortgage for a machine, cash flows from the bank's reserve to the capital firm that produced the machine; this is repaid by the purchasing firm to the bank in equal installments determined by the standard mortgage formulas
Nested Class Summary | |
---|---|
static class |
Bank.Account
An account of an agent |
Field Summary | |
---|---|
static double |
DELTA_TC
time constant for exponential smoothing of smoothed interest rate |
static double |
INIT_BANK_RESERVE
initial bank reserve |
static double |
INIT_LOAN_IR
initial loan interest rate |
static double |
IR_TC
time constant for exponential smoothing of smoothed interest rate |
static double |
loanIR
|
static double |
MAX_LOAN_IR
max loan interest rate |
static double |
MIN_LOAN_IR
min loan interest rate |
static double |
SUBACCOUNT_TC
time constant for exponential smoothing of subaccounts |
static double |
tau
sensitivity of interest rate to a change in total loan |
Constructor Summary | |
---|---|
Bank()
|
Method Summary | |
---|---|
static void |
act()
Called by Economy.step() at the beginning of every time step balance is treated algebraically, negative is loan |
static void |
buyMortgage(int payerID,
double paymentTotalMortgage)
ownerID takes out mortgage for a new machine incurring a debt of paymentTotalMortgage to owner's acct |
static void |
closeAcct(int agentID)
Close an account |
static Bank.Account |
getAcct(int agentID)
Return a reference to the agent's account |
static double |
getBalance(int agentID)
Return the balance of the specified account |
static double |
getBankReserve()
Return the total reserve in the last step |
static double |
getCapitalDemand()
Return demand for capital |
static double |
getDelta()
Return delta, used to adjust loanIR |
static double |
getDepositIR()
Return the deposit interest rate in the last step |
static double |
getLoanIR()
Return the loan interest rate in the last step |
static double |
getM0()
Return the narrow money supply M0 |
static double |
getSmoothedCapitalDemand()
Return smoothed demand for capital |
static double |
getSmoothedDepositIR()
Return the long-term deposit interest rate in the last step |
static double |
getSmoothedSupplyOfLoans()
Return smoothed supply of loans |
static double |
getTotalDeposits()
Return the total deposits in the last step |
static double |
getTotalLoans()
Return the total loans in the last step |
static double |
getTotalMortgages()
Return the total mortgages in the last step this is recomputed when called as is therefore up-to-date |
static void |
openAcct(int agentID,
double initBal,
double initMort,
double initInt,
double initRev,
double initPay,
double initWage)
Open an account |
static void |
pay(int payerID,
int payeeID,
double amt)
Transfer amt from payer's account to payee's account. |
static void |
payFrom(int payerID,
double amt)
Deduct amt from the payer's account. |
static void |
payMortgage(int payerID,
double paymentInterest,
double paymentPrinciple)
Bank collects mortgage payments from ownerID, called from Capital.useCapital charge paymentInterest and paymentPrinciple to owner's account, put that in bankReserve; also keep track of mortgages |
static void |
payTo(int payeeID,
double amt)
Add amt to payee's account. |
static void |
updateSubAccounts()
update smoothed values of subaccounts save revenue for data dump in Economy reset /per-step/ subaccounts: interest, revenue, payments |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double INIT_LOAN_IR
public static final double INIT_BANK_RESERVE
public static double tau
public static final double IR_TC
public static final double DELTA_TC
public static final double SUBACCOUNT_TC
public static double MAX_LOAN_IR
public static double MIN_LOAN_IR
public static double loanIR
Constructor Detail |
---|
public Bank()
Method Detail |
---|
public static void openAcct(int agentID, double initBal, double initMort, double initInt, double initRev, double initPay, double initWage)
agentID
- public static void closeAcct(int agentID)
agentID
- public static double getBalance(int agentID)
agentID
-
public static Bank.Account getAcct(int agentID)
agentID
-
public static void payFrom(int payerID, double amt)
payerID
- amt
- amount to be paidpublic static void payTo(int payeeID, double amt)
payeeID
- amt
- amount to be paidpublic static void pay(int payerID, int payeeID, double amt)
payerID
- payeeID
- amt
- amount to be paidpublic static void act()
public static double getLoanIR()
public static double getDepositIR()
public static double getSmoothedDepositIR()
public static double getTotalLoans()
public static double getTotalMortgages()
public static double getTotalDeposits()
public static double getBankReserve()
public static double getM0()
public static double getCapitalDemand()
public static double getSmoothedCapitalDemand()
public static double getSmoothedSupplyOfLoans()
public static double getDelta()
public static void payMortgage(int payerID, double paymentInterest, double paymentPrinciple)
payerID
- paymentInterest
- part of mortgage payment that is interestpaymentPrinciple
- part of mortgage payment that is principlepublic static void buyMortgage(int payerID, double paymentTotalMortgage)
payerID
- paymentTotalMortgage
- total loan represented by mortgagepublic static void updateSubAccounts()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |