[SciPy-user] Software for economic experiments

Guilherme P. de Freitas guilherme@gpfreitas....
Wed Dec 3 16:34:05 CST 2008

Hi all

One of our professors here at Caltech is working on regulations of
fishing activity in the Pacific coast. He needs software to run some
experiments that would help test possible regulatory designs. The
rough picture is that the subjects are fishing companies that are
assigned a fishing quota and should be allowed to, at each period,
fish, trade their fishing quotas, and participate on auctions of
fishing quotas whenever the regulator decides to have an auction. An
experiment without the trading or auctions would be a start. The
problem is: we need someone to write the software. Nobody in our
research group is a programmer, and I was wondering if this could not
be done with Python.

A still rough but more detailed description can be found in the bottom
of this email. I will provide a better description later, this is just
so you can have an idea. Let me know if you want to see the
theoretical work.

So the questions are:

1. Does anybody know if Python is a good choice of language for
creating this kind of software?
2. Can anybody point to work already done by someone in the community
that is similar to the one we need?
3. Can anyone recommend individual programmers or companies that would
be able to do this job?
4. Does anybody have an idea of how much such a job would cost?
(Please, three prices: without auctions or trading, with auctions
only, with trading only)
5. Maybe we will find someone to do the coding, but still it may be
useful to have an external "consultant"  that provides support to the
coder, and informs us of the quality of the code, makes sure it is
well documented, etc. I personally think it is easy to fall in the
trap of having someone come up with a hack that works for some
situations, and that is ill documented, etc. So, questions 3 and 4
apply to this kind of professional too.
6. What else on top of the rough sketch below does one need to know to
have a good idea of how to do the job and how to price it? I intend to
define the variables and its relations soon.

I guess it is a big bonus if whoever is doing this work for us lives
in the LA/Pasadena area.




Software for fishing experiment - Sketch
Last modified: Wed Dec  3 14:22:01 2008

This texts presents a very rough sketch of the software needed for running
experiments related to a particular regulation of fishing markets. Research is
conducted by prof. John O. Ledyard at the Humanities and Social Sciences (HSS)
division of the California Institute of Technology (Caltech).

  No regulation

First, let's quickly see the scenario without regulation. There are fishing
companies and the environment. Fishing companies are characterized by their
cost function, which associates to each amount of fish caught (the catch) a
specific monetary cost. The environment is characterized by an initial fish
stock and an evolution/transition law that associates to each current fish
stock (number of fish in the environment) a fish stock in the next period.
Fishing companies have to decide how much to fish, and their objective is
maximizing profit. Price of fish is determined exogenously by the market.

One could think of the scenario above as one in which only one species exist or
one in which different levels of catch contain the same proportion of different
species of fish, and thus all that is relevant in terms of price is the average
price per unit (say tons) of catch.

An experiment on this scenario would be as follows: each subject in the
experiment would be a different fishing company. Then:

1. Subjects could be informed of the environmental variables: current fish
  stock and transition law.
2. Subjects would be informed of fish market price.
3. Subjects would be given a fixed amount of time to decide how much to fish
  (say in tons).
4. After decisions were made, profits for that period would be computed, the
  population would be reduced by the sum of the catch of each fishing company
  (total catch at the period), the transition law would determined then how
  much fish is available in the next period.

This is a simple experiment: the experimenter has to be able to set:

- The initial fish stock.
- The transition law of the fish population.
- The price of fish at each period.
- The cost function of fishing companies.
- The number of periods that the experiment lasts.
- The number of subjects (maybe better to be automatically set to the number of
  subjects that log in)
- If subjects know or not about the number of fish available at each stage.
- If the subjects know or not the transition law.
- What happens if subjects do not make any decisions in the time they are given
  to decide how much to fish. For example, the decision could be automatically
  set to fish nothing, or to fish the same as in the previous period.
- What happens if subjects overfish, that is, if their aggregate decision
  implies fishing more than what is available in the environment. For example,
  each subject could be given a share proportional to his fishing decision.
  That it, if in the aggregate decisions subject A would be responsible for
  thirty percent of the total catch, than he should be given thirty percent of
  the total population in case there is overfishing.


Now, suppose that there is a regulator that can do the following:

- Determine a total available catch (TAC), that is, a cap on the aggregate
  number of fish caught.
- Assign fishing quotas at any stage (or, at least at the first stage). Quotas
  are permits to fish x amount of fish for t consecutive periods.
- Auction fishing quotas at any stage.
- Determine when fishing companies can trade their quotas.

The main situation would be the following: the regulator determines the TAC to
protect the environment, and assigns fishing quotas in the initial stage with
the objective of attaining some economic/politic performance goals. To account
for the dynamic nature of the fishing activity, and for possible mistakes in th
einitial assignment, the regulator creates auctions of quotas at certain
stages and lets fishing companies trade their quotas at certain stages.

This experiment would run as follows:

1. The experimenter determines:
  - The initial fish stock.
  - The transition law of the fish population.
  - The TAC function.
  - The price of fish at each period.
  - The cost function of fishing companies.
  - The number of periods that the experiment lasts.
  - The number of subjects (maybe better to be automatically set to the number
    of subjects that log in)
  - At which stages auctions are going to be ran.
  - The rules of the auction.
  - At which stages trading quotas is allowed.
  - The initial allocation of fishing quotas/permits.
2. Then, the software should inform each subject about:
  - The number of periods that the experiment lasts.
  - His initial quota and the initial TAC.
  - His cost function.
  - The initial price of fish.
  - Any scheduled auctions.
  - Any scheduled "markets", that is, at which stages fishing companies will be
    able to trade their fishing quotas.
3. At each stage, each subject should be informed of:
  - His current quota.
  - Current price of fish.
  - Any scheduled auctions.
  - Any schedule markets.
  - Number of remaining stages.
4. At each stage, each subject has to decide:
  - How much to fish.
  - How much to buy and sell in the market, if possible.
  - His bids in the auction, if possible.
5. At each stage, each subject could (experimenter determines whether or
not) be informed of:
  - Current TAC
  - Other fishing companies quotas


1. The auction and market should be built in a independent module. At the
  moment, Caltech has programs for running auctions and markets, but not in
  Python. A lot of work as been put in these programs, and possibly they could
  be "glued" to the main application here described. I personally wonder if it
  is not worth rewriting them as independent modules some day.
2. All variables should be stored in a format that is easily accessible
  (possible via a simple hassle-free conversion) to Python, Matlab, R, Excel
  (or some other widely compatible spereadsheet format), Java, C++.
3. Web interfaces are preferable. That said, I see no reason why a decent
  text-based interface wouldn't be suitable. Maybe it is worth working with a
  text-based interface as long as the application is under heavy development.
  I wonder how Django could be used for a web interface. Why Django? Well, the
  short answer is that it is well documented.
4. The code should be well documented. In the future, graduate students will
  have to understand the code to maintain it.


Guilherme P. de Freitas

More information about the SciPy-user mailing list