from otree.api import * c = cu doc = '' class C(BaseConstants): NAME_IN_URL = 'Demographics' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): Age = models.IntegerField(label='Please enter your age in years.') Gender = models.StringField(choices=[['Female', 'Female'], ['Male', 'Male'], ['Divers', 'Divers'], ['Do not want to disclose', 'Do not want to disclose']], label='Please select your gender.') Studyfield = models.StringField(label='Please name your field of study.') Statistic = models.IntegerField(choices=[[1, '1 (very bad)'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7 (very good)']], label='Please indicate your statistical skill.', widget=widgets.RadioSelectHorizontal) RiskAversion = models.IntegerField(choices=[[1, '1 (not all willing)'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7 (very willing)']], label='In general, how willing are you to take financial risks? (1=not at all willing, 7=very willing)', widget=widgets.RadioSelectHorizontal) RiskAversion2 = models.IntegerField(label='Imagine you have saved $10,000. You can now invest this money over the next year using two investment options: a U.S. stock index mutual fund, which tracks the performance of the U.S. stock market, and a savings account. The annual return per dollar invested in the stock index fund will be either +40% or −20%, with equal probability. In other words, it is equally likely that for each dollar you invest in the stock market, at the end of the one year investment period, you will have either gained 40 cents, or lost 20 cents. For the savings account, the known and certain rate of return for a one year investment is 5%. In other words, for each dollar you put in the savings account today, for sure you will gain 5 cents at the end of the one year investment period. We assume that whatever amount you do not invest in stocks will be invested in the savings account and will earn the risk-free rate of return. Given this information, how much of the $10,000 will you invest in the U.S. stock index fund? Choose an answer that you would be comfortable with if this was a real-life investment decision. The answer should be a number between $0 and $10,000.', max=10000, min=0) FinancialLiteracy = models.StringField(choices=[['0.5(0.4x - 0.2x) + 0.05(10,000 - x)', '0.5(0.4x - 0.2x) + 0.05(10,000 - x)'], ['1.4x + 0.8x + 1.05(10,000 - x)', '1.4x + 0.8x + 1.05(10,000 - x)'], ['0.4(10,000 - x) - 0.2(10,000-x) + 0.05x', '0.4(10,000 - x) - 0.2(10,000-x) + 0.05x'], ['0.5[0.4(10,000 - x) - 0.2(10,000 - x)] + 0.05x', '0.5[0.4(10,000 - x) - 0.2(10,000 - x)] + 0.05x'], ['0.4x - 0.2x + 0.05(10,000 - x)', '0.4x - 0.2x + 0.05(10,000 - x)'], ['0.5(1.4x + 0.8x) + 1.05(10,000 - x)', '0.5(1.4x + 0.8x) + 1.05(10,000 - x)'], ['1.4(10,000 - x) + 0.8(10,000 - x) + 1.05x', '1.4(10,000 - x) + 0.8(10,000 - x) + 1.05x'], ['0.5[1.4(10,000 - x) + 0.8(10,000 - x)] + 1.05x', '0.5[1.4(10,000 - x) + 0.8(10,000 - x)] + 1.05x']], label='Let’s say that when you answered the prior question you decided to invest x dollars out of the $10,000 amount in the U.S. stock index fund, and therefore you put (10, 000 − x) dollars in the savings account. Recall that over the next year the rate of return on the stock index fund will be +40% or −20%, with equal probability. For the savings account, the rate of return is 5% for sure. What is the amount of money you expect to have at the end of this one year investment period? Please choose one of the answers below. If you choose the correct answer, you will get a XX bonus added to your pay for this experiment.', widget=widgets.RadioSelect) Remarks = models.LongStringField(label='Do you have any remarks?') class EndExperiment(Page): form_model = 'player' class Demographics(Page): form_model = 'player' form_fields = ['Age', 'Gender', 'Studyfield', 'RiskAversion', 'Statistic'] class Remarks(Page): form_model = 'player' form_fields = ['Remarks'] class CompletionCode(Page): form_model = 'player' page_sequence = [EndExperiment, Demographics, Remarks, CompletionCode]