edu.cuny.cat.market
Class EfficiencyCalculator

java.lang.Object
  extended by edu.cuny.cat.market.EfficiencyCalculator

public class EfficiencyCalculator
extends java.lang.Object

A class calculating efficiency, convergence coefficient, and profit dispersion based on a EquilibriumCalculator with true shouts from traders and a set of actual transactions.

Version:
$Revision: 1.11 $
Author:
Jinzhong Niu

Field Summary
protected  double convergenceCoeff
          Market convergence coefficient
protected  double eA
          Market efficiency.
protected  double equilibriumPrice
           
protected static org.apache.log4j.Logger logger
           
protected  java.util.List<Shout> matchedShouts
           
protected  double pBA
          The actual profits of the buyers.
protected  double pBCE
          The profits of the buyers in theoretical equilibrium.
protected  double profitDispersion
           
protected  double pSA
          The actual profits of the sellers.
protected  double pSCE
          The profits of the sellers in theoretical equilibrium.
protected  java.util.Collection<Trader> traders
           
protected  java.util.Collection<Transaction> transactions
           
 
Constructor Summary
EfficiencyCalculator(EquilibriumCalculator equilCal, java.util.Collection<Transaction> transactions, java.util.Collection<Trader> traders)
           
 
Method Summary
protected  void calculateActualProfit()
           
protected  void calculateConvergenceCoeff()
           
protected  void calculateEfficiency()
           
protected  void calculateProfitDispersion()
           
protected  void calculateTheoreticalProfit()
           
 double getActualProfit()
           
 double getConvergenceCoeff()
           
 double getEA()
           
 double getProfitDispersion()
           
 double getTheoreticalProfit()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

matchedShouts

protected java.util.List<Shout> matchedShouts

pBCE

protected double pBCE
The profits of the buyers in theoretical equilibrium.


pSCE

protected double pSCE
The profits of the sellers in theoretical equilibrium.


pBA

protected double pBA
The actual profits of the buyers.


pSA

protected double pSA
The actual profits of the sellers.


eA

protected double eA
Market efficiency.


convergenceCoeff

protected double convergenceCoeff
Market convergence coefficient


profitDispersion

protected double profitDispersion

equilibriumPrice

protected double equilibriumPrice

transactions

protected java.util.Collection<Transaction> transactions

traders

protected java.util.Collection<Trader> traders

logger

protected static org.apache.log4j.Logger logger
Constructor Detail

EfficiencyCalculator

public EfficiencyCalculator(EquilibriumCalculator equilCal,
                            java.util.Collection<Transaction> transactions,
                            java.util.Collection<Trader> traders)
Method Detail

calculateEfficiency

protected void calculateEfficiency()

calculateTheoreticalProfit

protected void calculateTheoreticalProfit()

calculateActualProfit

protected void calculateActualProfit()

calculateConvergenceCoeff

protected void calculateConvergenceCoeff()

calculateProfitDispersion

protected void calculateProfitDispersion()

getActualProfit

public double getActualProfit()

getTheoreticalProfit

public double getTheoreticalProfit()

getEA

public double getEA()

getConvergenceCoeff

public double getConvergenceCoeff()

getProfitDispersion

public double getProfitDispersion()