Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mirko 2 #43

Open
wants to merge 163 commits into
base: mg-cancel-orders-in-out
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
163 commits
Select commit Hold shift + click to select a range
185fdae
Upload most recent results screen
Aug 19, 2020
d169531
Fixed spacing between player summaries and added your payoff calculat…
Aug 25, 2020
fe80159
Upload most recent payoff table
Aug 25, 2020
c84a13e
Moved my payoff cell to the front
Aug 26, 2020
d4c7a32
Removed subscriptionTime
Aug 27, 2020
046369d
Removed subscriptionTime
Aug 27, 2020
b68c10d
add equations table component to results page
gramorgan Aug 27, 2020
ac9ee00
Updated results table
Aug 28, 2020
3f62cbb
results page: split equations table to multiple rows
gramorgan Aug 28, 2020
ac86d0c
change price card flash to use d3
gramorgan Aug 28, 2020
0c5f30e
Added visual queue and fixed results page
Sep 2, 2020
6d50000
Added visual queue and fixed results page
Sep 3, 2020
e64c10e
Fixed equationTable from resizing and moved title in equationTable div
Sep 4, 2020
56c0bbd
Fixed equationTable from resizing and moved title in equationTable div
Sep 4, 2020
be6a5a3
Added new equation table layout. Cleaned up code
Sep 10, 2020
cd81a65
rewrite external bbo conversion script
gramorgan Oct 15, 2020
9219ae2
Merge branch 'koorous' of github.com:Leeps-Lab/high_frequency_trading…
gramorgan Oct 15, 2020
e59d2fb
Added next button on results page and adjusted the number of rounds t…
Dec 9, 2020
1cd704c
Handled overflow in equation table
Dec 19, 2020
96d1a03
Renamed net_worth to payoff in output csv. Added timeout for results …
Dec 23, 2020
510f4d6
Renamed net_worth to payoff in output csv. Added timeout for results …
Dec 23, 2020
e200326
Fixed bug for market records export CSV
Dec 30, 2020
570c230
Can now upload multiple arrivals files at once
Dec 30, 2020
8da7b74
Can now upload multiple arrivals files at once
Dec 30, 2020
32a2e2e
Upload fixed payoff
Jan 1, 2021
ffc91a2
Fixed issue where sessions couldn't go past round 5
Feb 18, 2021
f44209e
Made auto advance and next button timeout configurable
Feb 19, 2021
facfeb8
Added cummulative payoffs page at end of session and made it configur…
Feb 20, 2021
fdc4652
Added new changes to cumulative payoffs page
Feb 28, 2021
257c195
Added multi-processing to uploading exogenous events
Mar 1, 2021
ea12f0a
Added latency measurer
Apr 9, 2021
01790a6
Added AnonPay
Apr 21, 2021
fc283b5
Added AnonPay
Apr 21, 2021
3ee5dc3
Added consent form
May 15, 2021
dedb947
Added payoff transparency to AnonPay
May 23, 2021
5e79789
Added instructions and feedback links
May 24, 2021
3199fe1
Added new language for payment transparency, timeouts on pages, new f…
May 27, 2021
980f666
Renamed tax to deduction
May 27, 2021
d0108a0
Removed redundancy
May 27, 2021
4516951
Changed tax to deduction in export CSV
May 27, 2021
cd7638c
Added notification when page is advanced
May 27, 2021
d87bb85
Added german translation, speed usage, and fixed payoff
May 28, 2021
aca698e
Changed Payment Before Deduction to PBD, and added legend below pie c…
May 28, 2021
d687b58
Made sure payoff is displayed in ECU's
May 28, 2021
e068cbf
Reordered equation table and fixed negative payoff
May 29, 2021
5d69e8e
Simplified variables
May 29, 2021
4a7086c
Simplified variables
May 29, 2021
cf93cd1
Allow for web server to choose https
Jun 6, 2021
0079b4e
Chooses connection type dynamically
Jun 6, 2021
defa5aa
Removed auto advance on consent page
Jun 7, 2021
d43e92a
Fixed error where it would send payment info every round to AnonPay
kvargha Jul 11, 2021
7ac09d7
Added Morgan's solution to exporting average latency to CSV
Jul 26, 2021
664b9b9
Fixed issue where sending ping to server woulnd't work on firefox
Aug 1, 2021
d68eb02
Update yamls
Aug 12, 2021
7983ef9
Made CSV writing more dynamic
Aug 20, 2021
b72c281
Added price and order indicator for trader csv output
Aug 20, 2021
0d7bd34
Added price and order indicator for trader csv output
Aug 20, 2021
f14ceda
Added missing columns in trader csv
Aug 20, 2021
16a0d82
Reordered csv columns
Aug 20, 2021
661d403
Added trial rounds
Aug 20, 2021
98002ef
Added trial rounds
Aug 20, 2021
a0c1e6f
Added german translation
Aug 24, 2021
d6dd9a9
Moved example yamls to new directory
Aug 25, 2021
d2aefbc
Added flashing for batch intervals, removed vertical lines for FBA, a…
Aug 30, 2021
49b46fb
Added round numbers on pages and added max latency column to trader o…
Sep 13, 2021
61fa9aa
Added round numbers on pages and added max latency column to trader o…
Sep 13, 2021
5aaa489
Fixed issue where exogenous event file had an empty row that would ca…
Sep 20, 2021
21361c6
Fixed issue where exogenous event file had an empty row that would ca…
Sep 20, 2021
8a1ff0b
Implemented overbooking feature
Sep 27, 2021
56335a5
Added underbooking feature
Oct 4, 2021
26d75ee
Added translation
Oct 4, 2021
7b1d460
Fixed speed cost issue on trading screen and make sure starting endow…
Nov 8, 2021
b60894b
Round PBD to 2 deciamls on trading screen"
Nov 27, 2021
d3e72f6
Fixed issue where graphing didnt work, and implemented time spent act…
Jan 2, 2022
ca76c47
Implement Morgan's fix for speed cost being calculated incorrectly
Feb 9, 2022
b416761
Fix PBD calculation error on bar graph on results page
Mar 7, 2022
bbabde3
Fix bar graph calc
Mar 7, 2022
64321df
Revert bar fixes and fix avg sensitivty calc
Mar 7, 2022
8dc8ad3
If event isnt automated, make sensisity empty in output file
Mar 7, 2022
c1b4a78
Show different instructions per market format
Mar 16, 2022
77e1ace
Add check for avg sensitivtiy when its 0
Mar 18, 2022
ea476d6
Add morgan's broadcaster fix, made sure that cash on results screen c…
Mar 21, 2022
663eb87
Fix net worth calc
Mar 27, 2022
d733185
Consent-Page modification Mark
Apr 1, 2022
3e265ac
Merge pull request #30 from Leeps-Lab/Mark
kvargha Apr 7, 2022
74bc89c
Fix sens calculation
Apr 18, 2022
3f1caf2
Add Morgan's particpant code
Apr 19, 2022
6cd2468
added todo for inclusion of survey pages
mgutierrezc Apr 19, 2022
4fb8e86
added base code for hft survey
mgutierrezc Apr 19, 2022
510b260
added models/function to determine whether round is practice
mgutierrezc Apr 19, 2022
caafcde
survey hft pages displayed if end of practice round
mgutierrezc Apr 19, 2022
4d2b507
added function for displaying survey only in first real round
mgutierrezc Apr 19, 2022
8667bb1
updated page sequence for survey hft pages
mgutierrezc Apr 19, 2022
35f375d
added hft survey templates
mgutierrezc Apr 20, 2022
ba6477e
updated general page html
mgutierrezc Apr 20, 2022
49f6f68
added fix for 1 value on templates
mgutierrezc Apr 20, 2022
da2b5df
added errors for fields in general page
mgutierrezc Apr 20, 2022
3e32dad
updated right answer fields in general page
mgutierrezc Apr 21, 2022
bd0aca7
fixed right answer msg in survey pages
mgutierrezc Apr 21, 2022
73128aa
Mark - Embed video instructions into instruction page
Apr 21, 2022
bd1d231
Fix sensitvity calculation to only record non zero values for automated
Apr 22, 2022
6972d83
updated survey_hft files for SQ_CQ_02 changes
mgutierrezc Apr 26, 2022
315d61f
added fix for auction_format bug
mgutierrezc Apr 26, 2022
91d11c7
added second fix for auction_format bug
mgutierrezc Apr 26, 2022
2f4f45c
fixed format of if auction format in MarketSpecific.html
mgutierrezc Apr 26, 2022
33fa728
Changed Show Up Fee to 4 in Consent Page
Apr 27, 2022
33f3b15
Merge pull request #33 from Leeps-Lab/Mark
kvargha Apr 27, 2022
ebcc5fc
added yaml and csv files for deploying hft exp
mgutierrezc Apr 27, 2022
79a0006
frontend changes for trials count
mgutierrezc Apr 30, 2022
670fba3
updated backend of pages for wrong answers and displaying later Gener…
mgutierrezc May 5, 2022
b6d872c
updated frontend of survey_hft pages
mgutierrezc May 5, 2022
542f1ed
Merge pull request #32 from Leeps-Lab/survey_hft
MarkMH May 9, 2022
d6097be
Bug fix for not being able to export market data
May 23, 2022
889d048
Don't record executed price on cancelled orders, and delete unnecessa…
May 23, 2022
e742c0c
Add a check to make sure that the reference price isn't 0 when calcul…
Jun 20, 2022
6f395db
Make sure the reference price is set to the execution price, not the …
Jun 22, 2022
255d2d2
Add morgan's order cancellation code
kvargha Oct 4, 2022
827c7d5
Add docker startup way and ability to not go through surveys
kvargha Oct 20, 2022
ea38675
Add Mirko's improved target bid and offer comparison agains previous …
kvargha Nov 14, 2022
940509e
code to avoid self corssing moved to previous function
Nov 27, 2022
5a7588a
changed order of prices in if statement
Nov 27, 2022
b1ece09
added code to cancel all orders at the moment of change investing mod…
Nov 27, 2022
9b5cb31
order cancelation revisited
Nov 28, 2022
bef80cf
start from returned to original place
Nov 28, 2022
5910d01
fixed managing of state changes
Dec 7, 2022
2e3f27a
removed order cancellation after assignation of new state
Dec 7, 2022
3d27cb0
added order cancelling to manual state
Dec 7, 2022
bb4688b
solved one side trading in automated mode
Dec 16, 2022
5659b11
added exchange_server prefix to ouchServer in translator.py
Mirkiux Jan 4, 2023
8ce558b
added exchange_server prefix to ouchServer in incoming_message.py
Mirkiux Jan 4, 2023
ad2d1d1
order cancellation corrected
Mirkiux Jan 7, 2023
ced7f10
order token handling reverted
Mirkiux Jan 7, 2023
352332a
corrected comparison between new and oild price
Mirkiux Jan 7, 2023
68f0dc1
avoid automated trader to enter new orders when trading mode changes
Mirkiux Jan 8, 2023
6c3cdfa
automated trader tweaked to not putting orders after disabled
Mirkiux Jan 8, 2023
3da0b75
improved handling of order replacement in orderstore
Mirkiux Jan 8, 2023
5c3a7de
added pre orders improved order cancellation
Mirkiux Jan 8, 2023
7ebf98e
corrected error in orderstore
Mirkiux Jan 8, 2023
739f55e
fixed handling of replacement token in pre orders
Mirkiux Jan 8, 2023
9d78fd8
improved lo0gging of orderstore
Mirkiux Jan 8, 2023
099de9d
preorder deepcopy
Mirkiux Jan 8, 2023
a8f51c2
corredted old price in confirm_replace
Mirkiux Jan 8, 2023
df17e0f
cancellation confirmation improved
Mirkiux Jan 8, 2023
01344ef
bbo change managing changed
Mirkiux Jan 8, 2023
fcd18cb
cancel confirmation improved
Mirkiux Jan 8, 2023
e18a08b
changed cancellations processing on trader
Mirkiux Jan 8, 2023
4270fe6
corrected error in trader_state.state_change
Mirkiux Jan 8, 2023
7744e51
added cancel logging
Mirkiux Jan 11, 2023
1cde838
corrected error with ouchserver en exchange.pe
Mirkiux Jan 11, 2023
a96f66f
solved ouchserver in exchange.py 2
Mirkiux Jan 11, 2023
6adc502
pre order elimination added in confirm cancel
Mirkiux Jan 15, 2023
580ab13
added preorder deletion in confirm replace
Mirkiux Jan 15, 2023
723553e
modified cancellation method to target 0 shares
Mirkiux Jan 16, 2023
66caf45
improved replace confirmation in orderstore to correctly update order…
Mirkiux Jan 16, 2023
a2ecd7f
improved pre order handling
Mirkiux Jan 16, 2023
cb4ec3b
corrected preorders updating in replace
Mirkiux Jan 16, 2023
1097046
created IEX test session
Mirkiux Jan 19, 2023
744a36b
added FBA test session
Mirkiux Jan 19, 2023
0cc4947
updated FBA test config file to require just 2 players
Mirkiux Jan 19, 2023
b7355a2
updated fba test session config to 12 rounds
Mirkiux Jan 19, 2023
2176f81
corrected error in excluding trial session payoff
Mirkiux Jan 26, 2023
ad5efea
changed CDA test to run 3 rounds
Mirkiux Jan 26, 2023
70c97b7
changed configuration of CDA test config
Mirkiux Jan 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ __pycache__/
*.vscode
reset*
!session_config/**
!AnonPay/payments/**
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

Empty file added AnonPay/__init__.py
Empty file.
21 changes: 21 additions & 0 deletions AnonPay/_builtin/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Don't change anything in this file.
from .. import models
import otree.api


class Page(otree.api.Page):
subsession: models.Subsession
group: models.Group
player: models.Player


class WaitPage(otree.api.WaitPage):
subsession: models.Subsession
group: models.Group
player: models.Player


class Bot(otree.api.Bot):
subsession: models.Subsession
group: models.Group
player: models.Player
143 changes: 143 additions & 0 deletions AnonPay/anonpay.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
import math, random, sys

# These are the other AnonPay algorithms (ROD, NUN, SPA).
# They must be invoked manually from within your app.
# The remainder of this directory is the oTree equivalent of CPY+TDY.

def count(l, x):
return sum([1 for el in l if el == x])

def p_print2(paym):
for pi in paym:
print(pi, end = ", ")

print()

def hadUniqPaym(paym):
return any([count(paym, pi) == 1 for pi in paym])

def P(paym, attr, q):
a = sum([1 for (i, el) in enumerate(paym) if el == q and attr[i] == 1])/count(attr, 1)
b = sum([1 for (i, el) in enumerate(paym) if el == q and attr[i] == 0])/count(attr, 0)
c = count(attr, 1)/len(paym)

return (a * c)/(a * c + b * (1 - c))

def infoBayes(paym, attr):
return {pi: P(paym, attr, pi) for pi in [_pi for (_pi, _x) in zip(paym, attr) if _x == 1]}

def ROD(paym, chi):
for (i, pi) in enumerate(paym):
paym[i] = math.ceil(pi/chi)*chi

return paym

def NUN(paym):
if len(paym) > 3:
s = 1

while True:
if s == 1:
rank = [sum([1 for pi2 in paym if pi2 >= pi]) for pi in paym]

if count(rank, s) > 0:
q = [paym[i] for (i, r) in enumerate(rank) if r == s][0]

if count(paym, q) == 1:
who1 = max([pi for pi in paym if pi < q], default = -math.inf)
who2 = min([pi for pi in paym if pi > q], default = +math.inf)

if count(paym, who1) > 0 and count(paym, who1)*(q-who1) <= who2-q:
for (i, pi) in enumerate(paym):
if pi == who1:
paym[i] = q

s = 0
break
else:
for (i, pi) in enumerate(paym):
if pi == q:
paym[i] = who2


s = s + 1

if s > len(paym):
break

return paym
else:
print("ok - few subjects, payments all equalized", file = sys.stderr)

paym = [max(paym) for _ in paym]

return paym

def SPA(paym, attr, eta):
if eta > 0 and eta < 1 and len(paym) > 3 and count(attr, 1) > 0 and count(attr, 0) > 0:
s = 1
hadUniq = hadUniqPaym(paym)

while True:
if s == 1:
rank = [sum([1 for pi2 in paym if pi2 >= pi]) for pi in paym]

if count(rank, s) > 0:
q = [paym[i] for (i, r) in enumerate(rank) if r == s][0]

if count(attr, 1)/len(paym) > eta:
print("ERROR: too many attribute bearers, infeasible", file = sys.stderr)

break
else:
while P(paym, attr, q) > eta:
if any([pi < q for (i, pi) in enumerate(paym) if attr[i] == 0]) or any([pi > q for (i, pi) in enumerate(paym) if attr[i] == 0]):
who1 = max([pi for (i, pi) in enumerate(paym) if pi < q and attr[i] == 0], default = -math.inf)
who2 = min([pi for (i, pi) in enumerate(paym) if pi > q and attr[i] == 0], default = +math.inf)

c = sum([1 for (i, pi) in enumerate(paym) if pi == who1 and attr[i] == 0])

if c > 0 and c*(q-who1) <= count(paym, q)*(who2-q):
for (i, pi) in enumerate(paym):
if pi == who1 and attr[i] == 0:
paym[i] = q
break

s = 0
break
else:
for (i, pi) in enumerate(paym):
if pi == q:
paym[i] = who2

s = 0
break
else:
print(f"ERROR: no valid candidates", file = sys.stderr) # should be impossible
break

if s == len(paym) and not hadUniq:
if any([count(paym, pi) == 1 for pi in paym]):
paym = NUN(paym)
s = 0

s = s + 1

if s > len(paym):
break

return paym
elif eta <= 0 or eta >= 1:
print("(disabled)", file = sys.stderr)

return paym
elif len(paym) <= 3:
paym = [max(paym) for _ in paym]

print("err - few subjects, payments all equalized", file = sys.stderr)

return paym
else:
print("ok - inactive", file = sys.stderr)

return paym
39 changes: 39 additions & 0 deletions AnonPay/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
from otree.api import (
models,
widgets,
BaseConstants,
BaseSubsession,
BaseGroup,
BasePlayer,
Currency as c,
currency_range,
)


author = 'AnonPay'

doc = """
AnonPay (CPY/TDY oTree equivalent, the other algorithms are in anonpay.py)
"""


class Constants(BaseConstants):
name_in_url = 'AnonPay'
players_per_group = None
num_rounds = 1


class Subsession(BaseSubsession):
pass


class Group(BaseGroup):
pass


class Player(BasePlayer):
error = models.StringField(initial = '')
email = models.StringField(initial = '')
emergency_code = models.StringField(initial = '')

feedback = models.LongStringField(blank = True)
119 changes: 119 additions & 0 deletions AnonPay/pages.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
from otree.api import Currency as c, currency_range
from ._builtin import Page, WaitPage
from .models import Constants

import random, os

try:
import fcntl
except ModuleNotFoundError:
pass


def formatNicely(amount):
return "{:.2f}".format(amount)
# return "{:.2f}".format(amount).replace('.', ',') # for EUR


class PageWithAmount(Page):
#timeout_seconds = 5*60
def vars_for_template(self):
try:
vft = {
'random_payoff': self.participant.vars['random_payoff'],
'random_round_num': self.participant.vars['random_round_num'],
'earned_more_than_max': self.participant.vars['earned_more_than_max'],
'participation_fee': self.participant.vars['participation_fee'],
'exchange_rate': self.participant.vars['exchange_rate'],
'total_cash_payment_before_exchange_rate': float(self.participant.vars['payment_before_participation_fee'] / self.participant.vars['exchange_rate']),
'negative_payoff': self.participant.vars['negative_payoff'],
'max_payment': self.player.participant.vars['max_payment'],
}
except:
vft = {
'random_payoff': False,
'random_round_num': 0,
'earned_more_than_max': False,
'participation_fee': self.participant.vars['payment'],
'exchange_rate': 0,
'negative_payoff': False,
}

vft['emailEntered'] = self.player.email
vft['feedback_next_button_timeout'] = self.session.config['feedback_next_button_timeout']
vft['consent'] = self.player.participant.vars['consent']
vft['overbooked'] = self.player.participant.vars['overbooked']
vft['underbooked'] = self.player.participant.vars['underbooked']
vft['nicePayment'] = formatNicely(self.participant.vars['payment'])


self.player.email = '[REDACTED]'
return vft

class Feedback(PageWithAmount):
def is_displayed(self):
return self.player.participant.vars['consent'] == True and self.player.participant.vars['overbooked'] == False and self.player.participant.vars['underbooked'] == False



class Details(PageWithAmount):
form_fields = ['email']
form_model = 'player'

#timeout_seconds = 5*60

def before_next_page(self):
self.player.emergency_code = ''.join(random.choices(list('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'), k = 8))

try:
pfile = os.path.join(os.path.dirname(os.path.abspath(__file__)), "payments", self.session.code + ".csv")

with open(pfile, "a+") as fp:
try:
fcntl.flock(fp, fcntl.LOCK_EX)
except NameError:
pass

fp.seek(0)

lines = fp.read().splitlines()

player_status = ''

if self.participant.vars["consent"]:
if self.participant.vars["overbooked"]:
player_status = 'Overbooked'
elif self.participant.vars["underbooked"]:
player_status = 'Underbooked'
else:
player_status = 'Consented'
else:
player_status = 'Did not consent'

lines.append(f'Email: {self.player.email}, Payment Amount: {self.participant.vars["payment"]}, {player_status}')

random.shuffle(lines)

fp.seek(0)
fp.truncate()

fp.write('\n'.join(lines))

try:
fcntl.flock(fp, fcntl.LOCK_UN)
except NameError:
pass
except:
# This should not happen, but if the payment file is not writable, we will write all data
# to the first subject's error variable.

self.group.get_players()[0].error = self.group.get_players()[0].error + "email: " + self.player.email + ", payment: " + str(self.participant.vars["payment"]) + " | "


class FinalPage(PageWithAmount):
#timeout_seconds = 5*60
form_model = 'player'
form_fields = ['feedback']


page_sequence = [Feedback, Details, FinalPage]
2 changes: 2 additions & 0 deletions AnonPay/payments/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
Binary file added AnonPay/static/feedbackQRCode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AnonPay/static/notification.mp3
Binary file not shown.
52 changes: 52 additions & 0 deletions AnonPay/templates/AnonPay/Details.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{% extends "global/Page.html" %}
{% load otree static %}

{% block title %}
Auszahlungsformular
{% endblock %}

{% block content %}
<p>Willkommen beim Auszahlungsformular des Kölner Laboratoriums für Wirtschaftsforschung.</p>

<p>Die Verwendung dieses Formulars stellt sicher, dass Ihre Verhaltensdaten nicht mit Ihren Auszahlungsdaten verknüpft werden können.</p>

{% if negative_payoff %}
<p>Leider ist die Summe ihrer Gewinne aller Handelsperioden negativ, so dass ihre Auszahlung der Show-Up Fee von <b>{{ participation_fee }}</b> entspricht.</p>
{% elif overbooked %}
<p>Vielen Dank für Ihr Erscheinen und Interesse an unserem Experiment. Typischerweise laden wir mehr Teilnehmer als nötig ein, für den Fall, dass einige nicht erscheinen oder nicht mit den Bedingungen einverstanden sind. Falls jedoch alle erscheinen und einverstanden sind, wählen wir die Personen, die an dem Experiment teilnehmen nach dem Zufallsprinzip aus. Sie wurden leider nicht für die Teilnahme an der heutigen Sitzung ausgewählt, aber da Sie pünktlich zur Sitzung erschienen sind, erhalten Sie im nächsten Schritt Ihre Show-Up Fee. Vielen Danken für Ihr Verständnis.</p>
{% elif underbooked %}
<p>Vielen Dank für Ihr Erscheinen und Interesse an unserem Experiment. Leider sind nicht genügend Teilnehmer erschienen und mit den Bedingungen einverstanden, sodass das Experiment nicht zustande kommen kann. Da Sie aber rechtzeitig zu dieser Sitzung erschienen sind, erhalten Sie im nächsten Schritt Ihre Show-Up Fee. Vielen Dank für Ihr Verständnis.</p>
{% elif consent %}
{% if earned_more_than_max %}
<p>Die Summe ihrer Gewinne aller Handelsperioden ist außerordentlich hoch, so dass ihre Auszahlung dem maximalen Wert von {{max_payment}} zuzüglich Show-Up Fee von {{ participation_fee }} entspricht.</p>
{% else %}
{% if random_payoff %}
<p>Runde {{ random_round_num }} wurde zufällig ausgewählt. In dieser Runde haben Sie einen Gewinn von <b>{{ total_cash_payment_before_exchange_rate }} ECU</b> erzielt. Zusammen mit der Show-Up Fee ergibt dies einen Auszahlungsbetrag in der Höhe von: {{ nicePayment }} = {{ total_cash_payment_before_exchange_rate }} ECU x {{ exchange_rate}} (Wechselkurs) + {{ participation_fee }} (Show-Up Fee).</p>
{% else %}
<p>Sie haben insgesamt einen Gewinn von <b>{{ total_cash_payment_before_exchange_rate }} ECU</b> erzielt. Zusammen mit der Show-Up Fee summiert sich dies auf: {{ nicePayment }} = {{ total_cash_payment_before_exchange_rate }} ECU x {{ exchange_rate }} (Wechselkurs) + {{ participation_fee }} (Show-Up Fee).</p>
{% endif %}
{% endif %}
{% else %}
<p>Da Sie mit den Bedingungen des Experiments nicht einverstanden sind, endet das Experiment für Sie an dieser Stelle mit einer Auszahlung in Höhe der Show-Up Fee.</p>
{% endif %}

<p>Ihr Auszahlungsbetrag beträgt <b>€{{ nicePayment }}</b>. Damit wir die Auszahlung vornehmen können, geben Sie bitte hier Ihre Auszahlungsdaten ein.</p>

{% formfield player.email label="Ihre E-Mail-Adresse auf PayPal" %}

<script type="text/javascript">
document.getElementsByName("email")[0].value = "";
</script>

<p>Mit dem Absenden dieses Formulars stimmen Sie den <a href="https://www.lab.uni-koeln.de/public/privacy.php" target="_new">Datenschutzbestimmungen des Kölner Laboratoriums für Wirtschaftsforschung</a> zu. Darüber hinaus erklären Sie sich damit einverstanden, dass Ihre Zahlungsdaten für die Zwecke der Zahlung verarbeitet werden dürfen. In diesem Rahmen übermitteln wir an PayPal Ihren Auszahlungsbetrag und Ihre E-Mail-Adresse. Die Datenschutzbestimmungen von PayPal finden Sie <a href="https://www.paypal.com/webapps/mpp/ua/privacy-full" target="_new">hier</a>. Ihre Verhaltensdaten werden nicht mit Ihren Auszahlungsdaten verknüpft.</p>

{% next_button %}

<audio id="my_audio" src="{% static "notification.mp3" %}"></audio>
<script>
window.onload = function() {
document.getElementById("my_audio").play();
}
</script>

{% endblock %}
Loading