Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

otime - Time Preferences for otree

otime allows you to easily create time preference based experiments for otree by editing a single configuration file (see


Here is a screenshot of time with in total two blocks configured. The configuration options match the default ones as outlined below.

otime with radio choices

The following screenshot shows the same configuration with VISUALIZE_CHOICES_AS_SLIDER set to True.

otime with slider


Configuration is done by editing the options present in


This allows you to specify how much the overall budget is that can be distributed in each choice.


When set to True the BLOCKS configured afterwards will not be displayed in the order entered inside the configuration file but in a random order. The output will still be saved as if the blocks were displayed not randomized.


Setting this variable affects how the choices of a question in a block can be selected. When False (default), then the player will be faced with several radio buttons to do the selection. When True, a slider will be displayed allowing a more intuitive type of selection.

        interest_rates=[1.05, 1.10, 1.15, 1.20],
    ... # more Blocks

BLOCKS specifies the list of overall blocks the app will display. Per block there are multiple options which can be configured:

  • interest_rates: These are the values that define how many questions the user will have to fill out during the experiment. The single values correspond to the total interest rate applied to the TOTAL_BUDGET, i.e. a value of 1.10 corresponds to a question where the most amount of money sooner is equal to TOTAL_BUDGET / 1.10. The order of values given will match the questions generated.
  • initial_payout_delay: The number of weeks between today and the initial payout. If initial_payout_delay = 0 then the initial payout is today.
  • initial_to_last_payout_delay: The number of weeks between the initial payout and the last payout. As such the last payout is in initial_payout_delay + initial_to_last_payout_delay weeks total.
  • number_of_intermediate_choices: The number of choices between the two fixed edge choices. The two fixed edge choices are [Sooner: TOTAL_BUDGET / interest_rate, Later: 0] and [Sooner: 0, Later: TOTAL_BUDGET].


The output of the app is stored per Player in the player's block_answers field. The field content is a string that equals a two-dimensional JSON array, as in the following example:

  [2, 5, 7, 8], // Block 1
  [1, 3, 6, 6, 7] // Block 2

Each element in the outer array corresponds to the choices made by the player in the respective block, i.e. the first array element represents the choices the player made in Block 1 - here: [2, 5, 7, 8]. The single numbers of those choice arrays correspond to the selection per question as made by the player - here: 2 as first element means that the player selected the second choice in the first question which was using the first element of the block's interest_rate values.

The order of elements is always irrelevant of any randomization, i.e. even if RANDOMIZE_BLOCKS was set to True the output matches the order as per the BLOCKS in the configuration file. The order in which those blocks were displayed during the experiment to the player is stored in the subsession's block_order field.


An otree app to easily create experiments for time preferences via editing a single configuration file.







No releases published


No packages published