# coding=utf-8 from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range, ) from django.forms.widgets import CheckboxSelectMultiple author = 'Your name here' doc = """ Your app description """ class Constants(BaseConstants): name_in_url = 'surveyondiscounting' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): dummy= models.BooleanField(label='''Q1. To evaluate public investment projects, one should discount future expected benefits with a discount rate that is''', choices=[ [False, 'not adjusted to the risk of the project.'], [True, 'adjusted to the risk of the project.'], ], widget=widgets.RadioSelect() ) #variabes for persons who answered "no" no_short_discount= models.FloatField(blank=True) no_long_discount = models.FloatField(blank=True) no_approach = models.StringField( widget=CheckboxSelectMultiple( choices=( ("Arbitrage argument together with assets prices observed on markets", "Arbitrage argument together with assets prices observed on markets"), ("Average cost of capital in the economy", "Average cost of capital in the economy"), ("Sovereign borrowing cost", "Sovereign borrowing cost"), ("Arrow-Lind theorem(states are risk-neutral)", "Arrow-Lind theorem(states are risk-neutral)"), ("Ramsey rule or its extensions to risk", "Ramsey rule or its extensions to risk"), ("Modern asset pricing theory (CAPM and extensions)", "Modern asset pricing theory (CAPM and extensions)"), ("The certainty-equivalent value of the discount rate falling with time (e.g. Gamma discounting)", "The certainty-equivalent value of the discount rate falling with time (e.g. Gamma discounting)"), ("Other", "Other"), ) ), ) other = models.StringField( label=''' If 'Other', please specify your argument below''', blank=True ) #variabes for persons who answered "yes" yes_railway_climate = models.StringField( label='Q2. Would you recommend using a higher rate to discount the benefits of a railway infrastructure compared to the benefits of climate mitigation policies?', choices=[ 'Yes, use a higher discount rate for the railway infrastructure.', 'No, use a higher discount rate for climate mitigation policies.', 'No, use the same discount rate for both the railway infrastructure and climate mitigation policies.', 'I do not know.' ], widget=widgets.RadioSelect() ) yes_railway_hospital = models.StringField( label='Q3. Would you recommend using a higher rate to discount the benefits of a railway infrastructure compared to the benefits of a hospital?', choices=[ 'Yes, use a higher discount rate for the railway infrastructure.', 'No, use a higher discount rate for the hospital.', 'No, use the same discount rate for both the railway infrastructure and the hospital.', 'I do not know.' ], widget=widgets.RadioSelect() ) yes_short_discount_sure= models.FloatField(blank=True ) yes_short_market = models.FloatField(blank=True) yes_short_discount_railroads = models.FloatField( blank=True) yes_short_discount_health= models.FloatField(blank=True) yes_short_discount_debt = models.FloatField(blank=True) yes_short_discount_climate = models.FloatField(blank=True) yes_approach = models.StringField( label="Q10. On which kinds of arguments have you based your answer to questions 2-9 (allow for multiple choices)?", widget=CheckboxSelectMultiple( choices=( ("Arbitrage argument together with assets prices observed on markets", "Arbitrage argument together with assets prices observed on markets"), ("Average cost of capital in the economy", "Average cost of capital in the economy"), ("Sovereign borrowing cost", "Sovereign borrowing cost"), ("Arrow-Lind theorem(states are risk-neutral)", "Arrow-Lind theorem (states are risk-neutral)"), ("Ramsey rule or its extensions to risk", "Ramsey rule or its extensions to risk"), ("Modern asset pricing theory (CAPM and extensions)", "Modern asset pricing theory (CAPM and extensions)"), ("The certainty-equivalent value of the discount rate falling with time (e.g. Gamma discounting)", "The certainty-equivalent value of the discount rate falling with time (e.g. Gamma discounting)"), ("Other", "Other"), ) ), ) yes_otherapproach = models.StringField( label=''' If 'Other', please specify your argument below''', blank=True ) yes_diversification= models.StringField( label='Q11. When evaluating public investment projects, should we also adjust the discount rate to project-specific risks that can be washed out by diversification?', choices=[ 'Yes, diversifiable risks should be priced.', 'No, diversifiable risks should not be priced.', 'I do not know.' ], widget=widgets.RadioSelect() ) yes_recommend= models.StringField( label='''Q12. Would you recommend adjusting the public project-specific discount rate linearly with a measure of the project’s impact on the aggregate risk such as its consumption beta as recommended by the consumption-based CAPM and its extensions?''', choices=[ 'Yes, I would.', 'No, I would not.' , 'I do not know.' ], widget=widgets.RadioSelect() ) yes_familiar = models.PositiveIntegerField( label=''' Q13. How familiar are you with the research topic on social discounting (0 means “not familiar at all”, and 10 means “very familiar”)?''', choices=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], widget=widgets.RadioSelectHorizontal() ) #Demographic variables for persons who answered "yes" yes_gender = models.StringField( label='''Q14. What's your gender?''', choices=[ 'Male', 'Female', 'Other' ], widget=widgets.RadioSelect() ) yes_age= models.StringField(label="Q15. What is your age?", choices=[ 'Under 18', '18-24', '25-34', '35-44', '45-54', '55-64', '65+', ], widget=widgets.RadioSelect()) yes_country = models.StringField( label='''Q16. Where is your country of work?''', ) yes_profession = models.BooleanField(label='''Q17. What profession below better describes you?''', choices=[ [True, 'An academic economist'], [False, 'A non-academic economist']], widget=widgets.RadioSelect() ) yes_field = models.StringField( label="Q18. What are your main fields in economics (allow for multiple choices)?", widget=CheckboxSelectMultiple( choices=( ("Applied microeconomics", "Applied microeconomics"), ("Behavioral and experimental economics ", "Behavioral and experimental economics"), ("Decision theory", "Decision theory"), ("Development economics", "Development economics"), ("Econometrics", "Econometrics"), ("Economic history", "Economic history"), ("Economics of education", "Economics of education"), ("Economics of technology", "Economics of technology"), ("Environmental, resource and energy economics", "Environmental, resource and energy economics"), ("Financial economics", "Financial economics"), ("Game theory", "Game theory"), ("Health economics", "Health economics"), ("Industrial organization", "Industrial organization"), ("International trade", "International trade"), ("Labor economics", "Labor economics"), ("Macroeconomics", "Macroeconomics"), ("Market design", "Market design"), ("Microeconomic theory", "Microeconomic theory"), ("Monetary economics", "Monetary economics"), ("Political economy", "Political economy"), ("Public economics", "Public economics"), ("Other", "Other"), ) ), ) yes_other_field = models.StringField( label=''' If 'Other', please specify below''', blank=True ) #Demographic variables for persons who answered "no" no_familiar = models.PositiveIntegerField( label=''' Q5. How familiar are you with the research topic on social discounting (0 means “not familiar at all”, and 10 means “very familiar”)?''', choices=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], widget=widgets.RadioSelectHorizontal() ) no_field = models.StringField( label="Q10. What are your main fields in economics (allow for multiple choices)?", widget=CheckboxSelectMultiple( choices=( ("Applied microeconomics", "Applied microeconomics"), ("Behavioral and experimental economics ", "Behavioral and experimental economics"), ("Decision theory", "Decision theory"), ("Development economics", "Development economics"), ("Econometrics", "Econometrics"), ("Economic history", "Economic history"), ("Economics of education", "Economics of education"), ("Economics of technology", "Economics of technology"), ("Environmental, resource and energy economics", "Environmental, resource and energy economics"), ("Financial economics", "Financial economics"), ("Game theory", "Game theory"), ("Health economics", "Health economics"), ("Industrial organization", "Industrial organization"), ("International trade", "International trade"), ("Labor economics", "Labor economics"), ("Macroeconomics", "Macroeconomics"), ("Market design", "Market design"), ("Microeconomic theory", "Microeconomic theory"), ("Monetary economics", "Monetary economics"), ("Political economy", "Political economy"), ("Public economics", "Public economics"), ("Other", "Other"), ) ), ) no_other_field = models.StringField( label=''' If 'Other', please specify below''', blank=True ) no_gender= models.StringField( label='''Q6. What's your gender?''', choices=[ 'Male', 'Female', 'Other' ], widget=widgets.RadioSelect() ) no_age= models.StringField(label="Q7. What is your age?", choices=[ 'Under 18', '18-24', '25-34', '35-44', '45-54', '55-64', '65+', ], widget=widgets.RadioSelect()) no_country = models.StringField( label='''Q8. Where is your country of work?''', ) no_profession = models.BooleanField(label='''Q9. What profession below better describes you?''', choices=[ [True,'An academic economist'], [False, 'A non-academic economist']], widget=widgets.RadioSelect() )