from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) doc = '' class Constants(BaseConstants): name_in_url = 'Disposed2BeOverconfident_D' players_per_group = None num_rounds = 1 initial_price = c(30) sure_payment = c(4) exchange_rate = 100 Stock_type = ('hi', 'lo', 'lo', 'lo') Price_changes = (-1, -3, 2, 6) Price_change_weights_hi = (0.2, 0.2, 0.3, 0.3) Price_change_weights_lo = (0.3, 0.3, 0.2, 0.2) List_of_stocks = ['Stock1', 'Stock2', 'Stock3', 'Stock4', 'Stock5', 'Stock6', 'Stock7', 'Stock8', 'Stock9', 'Stock10', 'Stock11', 'Stock12', 'Stock13', 'Stock14', 'Stock15', 'Stock16', 'Stock17', 'Stock18', 'Stock19', 'Stock20', 'Stock21', 'Stock22', 'Stock23', 'Stock24', 'Stock25', 'Stock26', 'Stock27', 'Stock28', 'Stock29', 'Stock30', 'Stock31', 'Stock32', 'Stock33', 'Stock34', 'Stock35', 'Stock36', 'Stock37', 'Stock38', 'Stock39', 'Stock40', 'Stock41', 'Stock42', 'Stock43', 'Stock44'] endowment = 300 stockPrice = 30 fee = 3 fee_high_diff = 0.5 class Subsession(BaseSubsession): def creating_session(self): # randomize to treatments import random for player in self.get_players(): player.Treatment = random.choice(['SellingGains', 'SellingLosses']) class Group(BaseGroup): pass class Player(BasePlayer): Treatment = models.StringField() Consent = models.IntegerField(choices=[[1,'I CONSENT to take part in this study'], [2,'I DO NOT CONSENT to take part in this study']], widget=widgets.RadioSelect) Stock_type1 = models.StringField() Stock_type2 = models.StringField() Stock_type3 = models.StringField() Stock_type4 = models.StringField() Stock_type5 = models.StringField() Stock_type6 = models.StringField() Stock_type7 = models.StringField() Stock_type8 = models.StringField() Stock_type9 = models.StringField() Stock_type10 = models.StringField() Stock_type11 = models.StringField() Stock_type12 = models.StringField() Stock_type13 = models.StringField() Stock_type14 = models.StringField() Stock_type15 = models.StringField() Stock_type16 = models.StringField() Stock_type17 = models.StringField() Stock_type18 = models.StringField() Stock_type19 = models.StringField() Stock_type20 = models.StringField() Stock_type21 = models.StringField() Stock_type22 = models.StringField() Stock_type23 = models.StringField() Stock_type24 = models.StringField() Stock_type25 = models.StringField() Stock_type26 = models.StringField() Stock_type27 = models.StringField() Stock_type28 = models.StringField() Stock_type29 = models.StringField() Stock_type30 = models.StringField() Stock_type31 = models.StringField() Stock_type32 = models.StringField() Stock_type33 = models.StringField() Stock_type34 = models.StringField() Stock_type35 = models.StringField() Stock_type36 = models.StringField() Stock_type37 = models.StringField() Stock_type38 = models.StringField() Stock_type39 = models.StringField() Stock_type40 = models.StringField() Stock_type41 = models.StringField() Stock_type42 = models.StringField() Stock_type43 = models.StringField() Stock_type44 = models.StringField() Stock_type50 = models.StringField() Stock_type51 = models.StringField() Stock_type52 = models.StringField() Stock_type53 = models.StringField() Stock_type54 = models.StringField() Stock_type55 = models.StringField() Stock_type56 = models.StringField() Stock_type57 = models.StringField() Stock_type58 = models.StringField() Stock_type59 = models.StringField() Stock_type60 = models.StringField() Stock_type61 = models.StringField() Stock1_p1 = models.IntegerField() Stock1_p2 = models.IntegerField() Stock1_p3 = models.IntegerField() Stock1_p4 = models.IntegerField() Stock1_p5 = models.IntegerField() Stock1_p6 = models.IntegerField() Stock1_p7 = models.IntegerField() Stock1_p8 = models.IntegerField() Stock1_p9 = models.IntegerField() Stock1_p10 = models.IntegerField() Stock2_p1 = models.IntegerField() Stock2_p2 = models.IntegerField() Stock2_p3 = models.IntegerField() Stock2_p4 = models.IntegerField() Stock2_p5 = models.IntegerField() Stock2_p6 = models.IntegerField() Stock2_p7 = models.IntegerField() Stock2_p8 = models.IntegerField() Stock2_p9 = models.IntegerField() Stock2_p10 = models.IntegerField() Stock3_p1 = models.IntegerField() Stock3_p2 = models.IntegerField() Stock3_p3 = models.IntegerField() Stock3_p4 = models.IntegerField() Stock3_p5 = models.IntegerField() Stock3_p6 = models.IntegerField() Stock3_p7 = models.IntegerField() Stock3_p8 = models.IntegerField() Stock3_p9 = models.IntegerField() Stock3_p10 = models.IntegerField() Stock4_p1 = models.IntegerField() Stock4_p2 = models.IntegerField() Stock4_p3 = models.IntegerField() Stock4_p4 = models.IntegerField() Stock4_p5 = models.IntegerField() Stock4_p6 = models.IntegerField() Stock4_p7 = models.IntegerField() Stock4_p8 = models.IntegerField() Stock4_p9 = models.IntegerField() Stock4_p10 = models.IntegerField() Stock5_p1 = models.IntegerField() Stock5_p2 = models.IntegerField() Stock5_p3 = models.IntegerField() Stock5_p4 = models.IntegerField() Stock5_p5 = models.IntegerField() Stock5_p6 = models.IntegerField() Stock5_p7 = models.IntegerField() Stock5_p8 = models.IntegerField() Stock5_p9 = models.IntegerField() Stock5_p10 = models.IntegerField() Stock6_p1 = models.IntegerField() Stock6_p2 = models.IntegerField() Stock6_p3 = models.IntegerField() Stock6_p4 = models.IntegerField() Stock6_p5 = models.IntegerField() Stock6_p6 = models.IntegerField() Stock6_p7 = models.IntegerField() Stock6_p8 = models.IntegerField() Stock6_p9 = models.IntegerField() Stock6_p10 = models.IntegerField() Stock7_p1 = models.IntegerField() Stock7_p2 = models.IntegerField() Stock7_p3 = models.IntegerField() Stock7_p4 = models.IntegerField() Stock7_p5 = models.IntegerField() Stock7_p6 = models.IntegerField() Stock7_p7 = models.IntegerField() Stock7_p8 = models.IntegerField() Stock7_p9 = models.IntegerField() Stock7_p10 = models.IntegerField() Stock8_p1 = models.IntegerField() Stock8_p2 = models.IntegerField() Stock8_p3 = models.IntegerField() Stock8_p4 = models.IntegerField() Stock8_p5 = models.IntegerField() Stock8_p6 = models.IntegerField() Stock8_p7 = models.IntegerField() Stock8_p8 = models.IntegerField() Stock8_p9 = models.IntegerField() Stock8_p10 = models.IntegerField() Stock9_p1 = models.IntegerField() Stock9_p2 = models.IntegerField() Stock9_p3 = models.IntegerField() Stock9_p4 = models.IntegerField() Stock9_p5 = models.IntegerField() Stock9_p6 = models.IntegerField() Stock9_p7 = models.IntegerField() Stock9_p8 = models.IntegerField() Stock9_p9 = models.IntegerField() Stock9_p10 = models.IntegerField() Stock10_p1 = models.IntegerField() Stock10_p2 = models.IntegerField() Stock10_p3 = models.IntegerField() Stock10_p4 = models.IntegerField() Stock10_p5 = models.IntegerField() Stock10_p6 = models.IntegerField() Stock10_p7 = models.IntegerField() Stock10_p8 = models.IntegerField() Stock10_p9 = models.IntegerField() Stock10_p10 = models.IntegerField() Stock11_p1 = models.IntegerField() Stock11_p2 = models.IntegerField() Stock11_p3 = models.IntegerField() Stock11_p4 = models.IntegerField() Stock11_p5 = models.IntegerField() Stock11_p6 = models.IntegerField() Stock11_p7 = models.IntegerField() Stock11_p8 = models.IntegerField() Stock11_p9 = models.IntegerField() Stock11_p10 = models.IntegerField() Stock12_p1 = models.IntegerField() Stock12_p2 = models.IntegerField() Stock12_p3 = models.IntegerField() Stock12_p4 = models.IntegerField() Stock12_p5 = models.IntegerField() Stock12_p6 = models.IntegerField() Stock12_p7 = models.IntegerField() Stock12_p8 = models.IntegerField() Stock12_p9 = models.IntegerField() Stock12_p10 = models.IntegerField() Stock13_p1 = models.IntegerField() Stock13_p2 = models.IntegerField() Stock13_p3 = models.IntegerField() Stock13_p4 = models.IntegerField() Stock13_p5 = models.IntegerField() Stock13_p6 = models.IntegerField() Stock13_p7 = models.IntegerField() Stock13_p8 = models.IntegerField() Stock13_p9 = models.IntegerField() Stock13_p10 = models.IntegerField() Stock14_p1 = models.IntegerField() Stock14_p2 = models.IntegerField() Stock14_p3 = models.IntegerField() Stock14_p4 = models.IntegerField() Stock14_p5 = models.IntegerField() Stock14_p6 = models.IntegerField() Stock14_p7 = models.IntegerField() Stock14_p8 = models.IntegerField() Stock14_p9 = models.IntegerField() Stock14_p10 = models.IntegerField() Stock15_p1 = models.IntegerField() Stock15_p2 = models.IntegerField() Stock15_p3 = models.IntegerField() Stock15_p4 = models.IntegerField() Stock15_p5 = models.IntegerField() Stock15_p6 = models.IntegerField() Stock15_p7 = models.IntegerField() Stock15_p8 = models.IntegerField() Stock15_p9 = models.IntegerField() Stock15_p10 = models.IntegerField() Stock16_p1 = models.IntegerField() Stock16_p2 = models.IntegerField() Stock16_p3 = models.IntegerField() Stock16_p4 = models.IntegerField() Stock16_p5 = models.IntegerField() Stock16_p6 = models.IntegerField() Stock16_p7 = models.IntegerField() Stock16_p8 = models.IntegerField() Stock16_p9 = models.IntegerField() Stock16_p10 = models.IntegerField() Stock17_p1 = models.IntegerField() Stock17_p2 = models.IntegerField() Stock17_p3 = models.IntegerField() Stock17_p4 = models.IntegerField() Stock17_p5 = models.IntegerField() Stock17_p6 = models.IntegerField() Stock17_p7 = models.IntegerField() Stock17_p8 = models.IntegerField() Stock17_p9 = models.IntegerField() Stock17_p10 = models.IntegerField() Stock18_p1 = models.IntegerField() Stock18_p2 = models.IntegerField() Stock18_p3 = models.IntegerField() Stock18_p4 = models.IntegerField() Stock18_p5 = models.IntegerField() Stock18_p6 = models.IntegerField() Stock18_p7 = models.IntegerField() Stock18_p8 = models.IntegerField() Stock18_p9 = models.IntegerField() Stock18_p10 = models.IntegerField() Stock19_p1 = models.IntegerField() Stock19_p2 = models.IntegerField() Stock19_p3 = models.IntegerField() Stock19_p4 = models.IntegerField() Stock19_p5 = models.IntegerField() Stock19_p6 = models.IntegerField() Stock19_p7 = models.IntegerField() Stock19_p8 = models.IntegerField() Stock19_p9 = models.IntegerField() Stock19_p10 = models.IntegerField() Stock20_p1 = models.IntegerField() Stock20_p2 = models.IntegerField() Stock20_p3 = models.IntegerField() Stock20_p4 = models.IntegerField() Stock20_p5 = models.IntegerField() Stock20_p6 = models.IntegerField() Stock20_p7 = models.IntegerField() Stock20_p8 = models.IntegerField() Stock20_p9 = models.IntegerField() Stock20_p10 = models.IntegerField() Stock21_p1 = models.IntegerField() Stock21_p2 = models.IntegerField() Stock21_p3 = models.IntegerField() Stock21_p4 = models.IntegerField() Stock21_p5 = models.IntegerField() Stock21_p6 = models.IntegerField() Stock21_p7 = models.IntegerField() Stock21_p8 = models.IntegerField() Stock21_p9 = models.IntegerField() Stock21_p10 = models.IntegerField() Stock22_p1 = models.IntegerField() Stock22_p2 = models.IntegerField() Stock22_p3 = models.IntegerField() Stock22_p4 = models.IntegerField() Stock22_p5 = models.IntegerField() Stock22_p6 = models.IntegerField() Stock22_p7 = models.IntegerField() Stock22_p8 = models.IntegerField() Stock22_p9 = models.IntegerField() Stock22_p10 = models.IntegerField() Stock23_p1 = models.IntegerField() Stock23_p2 = models.IntegerField() Stock23_p3 = models.IntegerField() Stock23_p4 = models.IntegerField() Stock23_p5 = models.IntegerField() Stock23_p6 = models.IntegerField() Stock23_p7 = models.IntegerField() Stock23_p8 = models.IntegerField() Stock23_p9 = models.IntegerField() Stock23_p10 = models.IntegerField() Stock24_p1 = models.IntegerField() Stock24_p2 = models.IntegerField() Stock24_p3 = models.IntegerField() Stock24_p4 = models.IntegerField() Stock24_p5 = models.IntegerField() Stock24_p6 = models.IntegerField() Stock24_p7 = models.IntegerField() Stock24_p8 = models.IntegerField() Stock24_p9 = models.IntegerField() Stock24_p10 = models.IntegerField() Stock25_p1 = models.IntegerField() Stock25_p2 = models.IntegerField() Stock25_p3 = models.IntegerField() Stock25_p4 = models.IntegerField() Stock25_p5 = models.IntegerField() Stock25_p6 = models.IntegerField() Stock25_p7 = models.IntegerField() Stock25_p8 = models.IntegerField() Stock25_p9 = models.IntegerField() Stock25_p10 = models.IntegerField() Stock26_p1 = models.IntegerField() Stock26_p2 = models.IntegerField() Stock26_p3 = models.IntegerField() Stock26_p4 = models.IntegerField() Stock26_p5 = models.IntegerField() Stock26_p6 = models.IntegerField() Stock26_p7 = models.IntegerField() Stock26_p8 = models.IntegerField() Stock26_p9 = models.IntegerField() Stock26_p10 = models.IntegerField() Stock27_p1 = models.IntegerField() Stock27_p2 = models.IntegerField() Stock27_p3 = models.IntegerField() Stock27_p4 = models.IntegerField() Stock27_p5 = models.IntegerField() Stock27_p6 = models.IntegerField() Stock27_p7 = models.IntegerField() Stock27_p8 = models.IntegerField() Stock27_p9 = models.IntegerField() Stock27_p10 = models.IntegerField() Stock28_p1 = models.IntegerField() Stock28_p2 = models.IntegerField() Stock28_p3 = models.IntegerField() Stock28_p4 = models.IntegerField() Stock28_p5 = models.IntegerField() Stock28_p6 = models.IntegerField() Stock28_p7 = models.IntegerField() Stock28_p8 = models.IntegerField() Stock28_p9 = models.IntegerField() Stock28_p10 = models.IntegerField() Stock29_p1 = models.IntegerField() Stock29_p2 = models.IntegerField() Stock29_p3 = models.IntegerField() Stock29_p4 = models.IntegerField() Stock29_p5 = models.IntegerField() Stock29_p6 = models.IntegerField() Stock29_p7 = models.IntegerField() Stock29_p8 = models.IntegerField() Stock29_p9 = models.IntegerField() Stock29_p10 = models.IntegerField() Stock30_p1 = models.IntegerField() Stock30_p2 = models.IntegerField() Stock30_p3 = models.IntegerField() Stock30_p4 = models.IntegerField() Stock30_p5 = models.IntegerField() Stock30_p6 = models.IntegerField() Stock30_p7 = models.IntegerField() Stock30_p8 = models.IntegerField() Stock30_p9 = models.IntegerField() Stock30_p10 = models.IntegerField() Stock31_p1 = models.IntegerField() Stock31_p2 = models.IntegerField() Stock31_p3 = models.IntegerField() Stock31_p4 = models.IntegerField() Stock31_p5 = models.IntegerField() Stock31_p6 = models.IntegerField() Stock31_p7 = models.IntegerField() Stock31_p8 = models.IntegerField() Stock31_p9 = models.IntegerField() Stock31_p10 = models.IntegerField() Stock32_p1 = models.IntegerField() Stock32_p2 = models.IntegerField() Stock32_p3 = models.IntegerField() Stock32_p4 = models.IntegerField() Stock32_p5 = models.IntegerField() Stock32_p6 = models.IntegerField() Stock32_p7 = models.IntegerField() Stock32_p8 = models.IntegerField() Stock32_p9 = models.IntegerField() Stock32_p10 = models.IntegerField() Stock33_p1 = models.IntegerField() Stock33_p2 = models.IntegerField() Stock33_p3 = models.IntegerField() Stock33_p4 = models.IntegerField() Stock33_p5 = models.IntegerField() Stock33_p6 = models.IntegerField() Stock33_p7 = models.IntegerField() Stock33_p8 = models.IntegerField() Stock33_p9 = models.IntegerField() Stock33_p10 = models.IntegerField() Stock34_p1 = models.IntegerField() Stock34_p2 = models.IntegerField() Stock34_p3 = models.IntegerField() Stock34_p4 = models.IntegerField() Stock34_p5 = models.IntegerField() Stock34_p6 = models.IntegerField() Stock34_p7 = models.IntegerField() Stock34_p8 = models.IntegerField() Stock34_p9 = models.IntegerField() Stock34_p10 = models.IntegerField() Stock35_p1 = models.IntegerField() Stock35_p2 = models.IntegerField() Stock35_p3 = models.IntegerField() Stock35_p4 = models.IntegerField() Stock35_p5 = models.IntegerField() Stock35_p6 = models.IntegerField() Stock35_p7 = models.IntegerField() Stock35_p8 = models.IntegerField() Stock35_p9 = models.IntegerField() Stock35_p10 = models.IntegerField() Stock36_p1 = models.IntegerField() Stock36_p2 = models.IntegerField() Stock36_p3 = models.IntegerField() Stock36_p4 = models.IntegerField() Stock36_p5 = models.IntegerField() Stock36_p6 = models.IntegerField() Stock36_p7 = models.IntegerField() Stock36_p8 = models.IntegerField() Stock36_p9 = models.IntegerField() Stock36_p10 = models.IntegerField() Stock37_p1 = models.IntegerField() Stock37_p2 = models.IntegerField() Stock37_p3 = models.IntegerField() Stock37_p4 = models.IntegerField() Stock37_p5 = models.IntegerField() Stock37_p6 = models.IntegerField() Stock37_p7 = models.IntegerField() Stock37_p8 = models.IntegerField() Stock37_p9 = models.IntegerField() Stock37_p10 = models.IntegerField() Stock38_p1 = models.IntegerField() Stock38_p2 = models.IntegerField() Stock38_p3 = models.IntegerField() Stock38_p4 = models.IntegerField() Stock38_p5 = models.IntegerField() Stock38_p6 = models.IntegerField() Stock38_p7 = models.IntegerField() Stock38_p8 = models.IntegerField() Stock38_p9 = models.IntegerField() Stock38_p10 = models.IntegerField() Stock39_p1 = models.IntegerField() Stock39_p2 = models.IntegerField() Stock39_p3 = models.IntegerField() Stock39_p4 = models.IntegerField() Stock39_p5 = models.IntegerField() Stock39_p6 = models.IntegerField() Stock39_p7 = models.IntegerField() Stock39_p8 = models.IntegerField() Stock39_p9 = models.IntegerField() Stock39_p10 = models.IntegerField() Stock40_p1 = models.IntegerField() Stock40_p2 = models.IntegerField() Stock40_p3 = models.IntegerField() Stock40_p4 = models.IntegerField() Stock40_p5 = models.IntegerField() Stock40_p6 = models.IntegerField() Stock40_p7 = models.IntegerField() Stock40_p8 = models.IntegerField() Stock40_p9 = models.IntegerField() Stock40_p10 = models.IntegerField() Stock41_p1 = models.IntegerField() Stock41_p2 = models.IntegerField() Stock41_p3 = models.IntegerField() Stock41_p4 = models.IntegerField() Stock41_p5 = models.IntegerField() Stock41_p6 = models.IntegerField() Stock41_p7 = models.IntegerField() Stock41_p8 = models.IntegerField() Stock41_p9 = models.IntegerField() Stock41_p10 = models.IntegerField() Stock42_p1 = models.IntegerField() Stock42_p2 = models.IntegerField() Stock42_p3 = models.IntegerField() Stock42_p4 = models.IntegerField() Stock42_p5 = models.IntegerField() Stock42_p6 = models.IntegerField() Stock42_p7 = models.IntegerField() Stock42_p8 = models.IntegerField() Stock42_p9 = models.IntegerField() Stock42_p10 = models.IntegerField() Stock43_p1 = models.IntegerField() Stock43_p2 = models.IntegerField() Stock43_p3 = models.IntegerField() Stock43_p4 = models.IntegerField() Stock43_p5 = models.IntegerField() Stock43_p6 = models.IntegerField() Stock43_p7 = models.IntegerField() Stock43_p8 = models.IntegerField() Stock43_p9 = models.IntegerField() Stock43_p10 = models.IntegerField() Stock44_p1 = models.IntegerField() Stock44_p2 = models.IntegerField() Stock44_p3 = models.IntegerField() Stock44_p4 = models.IntegerField() Stock44_p5 = models.IntegerField() Stock44_p6 = models.IntegerField() Stock44_p7 = models.IntegerField() Stock44_p8 = models.IntegerField() Stock44_p9 = models.IntegerField() Stock44_p10 = models.IntegerField() Stock50_p1 = models.IntegerField() Stock50_p2 = models.IntegerField() Stock50_p3 = models.IntegerField() Stock50_p4 = models.IntegerField() Stock50_p5 = models.IntegerField() Stock50_p6 = models.IntegerField() Stock50_p7 = models.IntegerField() Stock50_p8 = models.IntegerField() Stock50_p9 = models.IntegerField() Stock50_p10 = models.IntegerField() Stock51_p1 = models.IntegerField() Stock51_p2 = models.IntegerField() Stock51_p3 = models.IntegerField() Stock51_p4 = models.IntegerField() Stock51_p5 = models.IntegerField() Stock51_p6 = models.IntegerField() Stock51_p7 = models.IntegerField() Stock51_p8 = models.IntegerField() Stock51_p9 = models.IntegerField() Stock51_p10 = models.IntegerField() Stock52_p1 = models.IntegerField() Stock52_p2 = models.IntegerField() Stock52_p3 = models.IntegerField() Stock52_p4 = models.IntegerField() Stock52_p5 = models.IntegerField() Stock52_p6 = models.IntegerField() Stock52_p7 = models.IntegerField() Stock52_p8 = models.IntegerField() Stock52_p9 = models.IntegerField() Stock52_p10 = models.IntegerField() Stock53_p1 = models.IntegerField() Stock53_p2 = models.IntegerField() Stock53_p3 = models.IntegerField() Stock53_p4 = models.IntegerField() Stock53_p5 = models.IntegerField() Stock53_p6 = models.IntegerField() Stock53_p7 = models.IntegerField() Stock53_p8 = models.IntegerField() Stock53_p9 = models.IntegerField() Stock53_p10 = models.IntegerField() Stock54_p1 = models.IntegerField() Stock54_p2 = models.IntegerField() Stock54_p3 = models.IntegerField() Stock54_p4 = models.IntegerField() Stock54_p5 = models.IntegerField() Stock54_p6 = models.IntegerField() Stock54_p7 = models.IntegerField() Stock54_p8 = models.IntegerField() Stock54_p9 = models.IntegerField() Stock54_p10 = models.IntegerField() Stock55_p1 = models.IntegerField() Stock55_p2 = models.IntegerField() Stock55_p3 = models.IntegerField() Stock55_p4 = models.IntegerField() Stock55_p5 = models.IntegerField() Stock55_p6 = models.IntegerField() Stock55_p7 = models.IntegerField() Stock55_p8 = models.IntegerField() Stock55_p9 = models.IntegerField() Stock55_p10 = models.IntegerField() Stock56_p1 = models.IntegerField() Stock56_p2 = models.IntegerField() Stock56_p3 = models.IntegerField() Stock56_p4 = models.IntegerField() Stock56_p5 = models.IntegerField() Stock56_p6 = models.IntegerField() Stock56_p7 = models.IntegerField() Stock56_p8 = models.IntegerField() Stock56_p9 = models.IntegerField() Stock56_p10 = models.IntegerField() Stock57_p1 = models.IntegerField() Stock57_p2 = models.IntegerField() Stock57_p3 = models.IntegerField() Stock57_p4 = models.IntegerField() Stock57_p5 = models.IntegerField() Stock57_p6 = models.IntegerField() Stock57_p7 = models.IntegerField() Stock57_p8 = models.IntegerField() Stock57_p9 = models.IntegerField() Stock57_p10 = models.IntegerField() Stock58_p1 = models.IntegerField() Stock58_p2 = models.IntegerField() Stock58_p3 = models.IntegerField() Stock58_p4 = models.IntegerField() Stock58_p5 = models.IntegerField() Stock58_p6 = models.IntegerField() Stock58_p7 = models.IntegerField() Stock58_p8 = models.IntegerField() Stock58_p9 = models.IntegerField() Stock58_p10 = models.IntegerField() Stock59_p1 = models.IntegerField() Stock59_p2 = models.IntegerField() Stock59_p3 = models.IntegerField() Stock59_p4 = models.IntegerField() Stock59_p5 = models.IntegerField() Stock59_p6 = models.IntegerField() Stock59_p7 = models.IntegerField() Stock59_p8 = models.IntegerField() Stock59_p9 = models.IntegerField() Stock59_p10 = models.IntegerField() Stock60_p1 = models.IntegerField() Stock60_p2 = models.IntegerField() Stock60_p3 = models.IntegerField() Stock60_p4 = models.IntegerField() Stock60_p5 = models.IntegerField() Stock60_p6 = models.IntegerField() Stock60_p7 = models.IntegerField() Stock60_p8 = models.IntegerField() Stock60_p9 = models.IntegerField() Stock60_p10 = models.IntegerField() Stock61_p1 = models.IntegerField() Stock61_p2 = models.IntegerField() Stock61_p3 = models.IntegerField() Stock61_p4 = models.IntegerField() Stock61_p5 = models.IntegerField() Stock61_p6 = models.IntegerField() Stock61_p7 = models.IntegerField() Stock61_p8 = models.IntegerField() Stock61_p9 = models.IntegerField() Stock61_p10 = models.IntegerField() Select_stock1 = models.StringField(blank = True) Select_stock2 = models.StringField(blank = True) Select_stock3 = models.StringField(blank = True) Select_stock4 = models.StringField(blank = True) Select_stock5 = models.StringField(blank = True) Select_stock6 = models.StringField(blank = True) Select_stock7 = models.StringField(blank = True) Select_stock8 = models.StringField(blank = True) Select_stock9 = models.StringField(blank = True) Select_stock10 = models.StringField(blank = True) Select_stock11 = models.StringField(blank = True) Select_stock12 = models.StringField(blank = True) Select_stock13 = models.StringField(blank = True) Select_stock14 = models.StringField(blank = True) Select_stock15 = models.StringField(blank = True) Select_stock16 = models.StringField(blank = True) Select_stock17 = models.StringField(blank = True) Select_stock18 = models.StringField(blank = True) Select_stock19 = models.StringField(blank = True) Select_stock20 = models.StringField(blank = True) Select_choice2 = models.IntegerField(choices=[[21, ''], [22, ''], [23, ''], [24, '']], label='', widget=widgets.RadioSelect) Select_choice3 = models.IntegerField(choices=[[25, ''], [26, ''], [27, ''], [28, '']], label='', widget=widgets.RadioSelect) Select_choice4 = models.IntegerField(choices=[[29, ''], [30, ''], [31, ''], [32, '']], label='', widget=widgets.RadioSelect) Select_choice5 = models.IntegerField(choices=[[33, ''], [34, ''], [35, ''], [36, '']], label='', widget=widgets.RadioSelect) Select_choice6 = models.IntegerField(choices=[[37, ''], [38, ''], [39, ''], [40, '']], label='', widget=widgets.RadioSelect) Select_choice7 = models.IntegerField(choices=[[41, ''], [42, ''], [43, ''], [44, '']], label='', widget=widgets.RadioSelect) Select_stock50 = models.StringField(blank = True) Select_stock51 = models.StringField(blank = True) Select_stock52 = models.StringField(blank = True) Select_stock53 = models.StringField(blank = True) Select_stock54 = models.StringField(blank = True) Select_stock55 = models.StringField(blank = True) Select_stock56 = models.StringField(blank = True) Select_stock57 = models.StringField(blank = True) Select_stock58 = models.StringField(blank = True) Select_stock59 = models.StringField(blank = True) Select_stock60 = models.StringField(blank = True) Select_stock61 = models.StringField(blank = True) Increased_shares_stock50 = models.IntegerField(choices=[[0, '1 share'], [1, '2 shares'], [2, '3 shares']], label='', widget=widgets.RadioSelect, blank = True) Increased_shares_stock51 = models.IntegerField(choices=[[0, '1 share'], [1, '2 shares'], [2, '3 shares']], label='', widget=widgets.RadioSelect, blank = True) Increased_shares_stock52 = models.IntegerField(choices=[[0, '1 share'], [1, '2 shares'], [2, '3 shares']], label='', widget=widgets.RadioSelect, blank = True) Increased_shares_stock53 = models.IntegerField(choices=[[0, '1 share'], [1, '2 shares'], [2, '3 shares']], label='', widget=widgets.RadioSelect, blank = True) Increased_shares_stock54 = models.IntegerField(choices=[[0, '1 share'], [1, '2 shares'], [2, '3 shares']], label='', widget=widgets.RadioSelect, blank = True) Increased_shares_stock55 = models.IntegerField(choices=[[0, '1 share'], [1, '2 shares'], [2, '3 shares']], label='', widget=widgets.RadioSelect, blank = True) Increased_shares_stock56 = models.IntegerField(choices=[[0, '1 share'], [1, '2 shares'], [2, '3 shares']], label='', widget=widgets.RadioSelect, blank = True) Increased_shares_stock57 = models.IntegerField(choices=[[0, '1 share'], [1, '2 shares'], [2, '3 shares']], label='', widget=widgets.RadioSelect, blank = True) Increased_shares_stock58 = models.IntegerField(choices=[[0, '1 share'], [1, '2 shares'], [2, '3 shares']], label='', widget=widgets.RadioSelect, blank = True) Increased_shares_stock59 = models.IntegerField(choices=[[0, '1 share'], [1, '2 shares'], [2, '3 shares']], label='', widget=widgets.RadioSelect, blank = True) Increased_shares_stock60 = models.IntegerField(choices=[[0, '1 share'], [1, '2 shares'], [2, '3 shares']], label='', widget=widgets.RadioSelect, blank = True) Increased_shares_stock61 = models.IntegerField(choices=[[0, '1 share'], [1, '2 shares'], [2, '3 shares']], label='', widget=widgets.RadioSelect, blank = True) period1Price_stock1 = models.IntegerField() period1Price_stock2 = models.IntegerField() period1Price_stock3 = models.IntegerField() period1Price_stock4 = models.IntegerField() period1Price_stock5 = models.IntegerField() period1Price_stock6 = models.IntegerField() period1Price_stock7 = models.IntegerField() period1Price_stock8 = models.IntegerField() period1Price_stock9 = models.IntegerField() period1Price_stock10 = models.IntegerField() period1Price_stock11 = models.IntegerField() period1Price_stock12 = models.IntegerField() period1Price_stock13 = models.IntegerField() period1Price_stock14 = models.IntegerField() period1Price_stock15 = models.IntegerField() period1Price_stock16 = models.IntegerField() period1Price_stock17 = models.IntegerField() period1Price_stock18 = models.IntegerField() period1Price_stock19 = models.IntegerField() period1Price_stock20 = models.IntegerField() stockRow1 = models.StringField() stockRow2 = models.StringField() stockRow3 = models.StringField() stockRow4 = models.StringField() stockRow5 = models.StringField() period1Price_row1 = models.IntegerField() period1Price_row2 = models.IntegerField() period1Price_row3 = models.IntegerField() period1Price_row4 = models.IntegerField() period1Price_row5 = models.IntegerField() period1PriceChange_row1 = models.IntegerField() period1PriceChange_row2 = models.IntegerField() period1PriceChange_row3 = models.IntegerField() period1PriceChange_row4 = models.IntegerField() period1PriceChange_row5 = models.IntegerField() period2Price_row1 = models.IntegerField() period2Price_row2 = models.IntegerField() period2Price_row3 = models.IntegerField() period2Price_row4 = models.IntegerField() period2Price_row5 = models.IntegerField() period2PriceChange_row1 = models.IntegerField() period2PriceChange_row2 = models.IntegerField() period2PriceChange_row3 = models.IntegerField() period2PriceChange_row4 = models.IntegerField() period2PriceChange_row5 = models.IntegerField() period3Price_row1 = models.IntegerField() period3Price_row2 = models.IntegerField() period3Price_row3 = models.IntegerField() period3Price_row4 = models.IntegerField() period3Price_row5 = models.IntegerField() period3PriceChange_row1 = models.IntegerField() period3PriceChange_row2 = models.IntegerField() period3PriceChange_row3 = models.IntegerField() period3PriceChange_row4 = models.IntegerField() period3PriceChange_row5 = models.IntegerField() period4Price_row1 = models.IntegerField() period4Price_row2 = models.IntegerField() period4Price_row3 = models.IntegerField() period4Price_row4 = models.IntegerField() period4Price_row5 = models.IntegerField() period4PriceChange_row1 = models.IntegerField() period4PriceChange_row2 = models.IntegerField() period4PriceChange_row3 = models.IntegerField() period4PriceChange_row4 = models.IntegerField() period4PriceChange_row5 = models.IntegerField() period5Price_row1 = models.IntegerField() period5Price_row2 = models.IntegerField() period5Price_row3 = models.IntegerField() period5Price_row4 = models.IntegerField() period5Price_row5 = models.IntegerField() period5PriceChange_row1 = models.IntegerField() period5PriceChange_row2 = models.IntegerField() period5PriceChange_row3 = models.IntegerField() period5PriceChange_row4 = models.IntegerField() period5PriceChange_row5 = models.IntegerField() period6Price_row1 = models.IntegerField() period6Price_row2 = models.IntegerField() period6Price_row3 = models.IntegerField() period6Price_row4 = models.IntegerField() period6Price_row5 = models.IntegerField() period6PriceChange_row1 = models.IntegerField() period6PriceChange_row2 = models.IntegerField() period6PriceChange_row3 = models.IntegerField() period6PriceChange_row4 = models.IntegerField() period6PriceChange_row5 = models.IntegerField() period7Price_row1 = models.IntegerField() period7Price_row2 = models.IntegerField() period7Price_row3 = models.IntegerField() period7Price_row4 = models.IntegerField() period7Price_row5 = models.IntegerField() period7PriceChange_row1 = models.IntegerField() period7PriceChange_row2 = models.IntegerField() period7PriceChange_row3 = models.IntegerField() period7PriceChange_row4 = models.IntegerField() period7PriceChange_row5 = models.IntegerField() preperiod1Price_row1 = models.IntegerField() preperiod1Price_row2 = models.IntegerField() preperiod1Price_row3 = models.IntegerField() preperiod1Price_row4 = models.IntegerField() preperiod1Price_row5 = models.IntegerField() preperiod2Price_row1 = models.IntegerField() preperiod2Price_row2 = models.IntegerField() preperiod2Price_row3 = models.IntegerField() preperiod2Price_row4 = models.IntegerField() preperiod2Price_row5 = models.IntegerField() preperiod3Price_row1 = models.IntegerField() preperiod3Price_row2 = models.IntegerField() preperiod3Price_row3 = models.IntegerField() preperiod3Price_row4 = models.IntegerField() preperiod3Price_row5 = models.IntegerField() preperiod4Price_row1 = models.IntegerField() preperiod4Price_row2 = models.IntegerField() preperiod4Price_row3 = models.IntegerField() preperiod4Price_row4 = models.IntegerField() preperiod4Price_row5 = models.IntegerField() preperiod5Price_row1 = models.IntegerField() preperiod5Price_row2 = models.IntegerField() preperiod5Price_row3 = models.IntegerField() preperiod5Price_row4 = models.IntegerField() preperiod5Price_row5 = models.IntegerField() preperiod6Price_row1 = models.IntegerField() preperiod6Price_row2 = models.IntegerField() preperiod6Price_row3 = models.IntegerField() preperiod6Price_row4 = models.IntegerField() preperiod6Price_row5 = models.IntegerField() preperiod7Price_row1 = models.IntegerField() preperiod7Price_row2 = models.IntegerField() preperiod7Price_row3 = models.IntegerField() preperiod7Price_row4 = models.IntegerField() preperiod7Price_row5 = models.IntegerField() stockSold1 = models.StringField() stockSold2 = models.StringField() stockSold3 = models.StringField() stockSold4 = models.StringField() stockSold5 = models.StringField() stockSold6 = models.StringField() stockSold7 = models.StringField() stockSold8 = models.StringField() stockSold9 = models.StringField() stockSold10 = models.StringField() stockSold11 = models.StringField() sellingPriceSold1 = models.IntegerField() sellingPriceSold2 = models.IntegerField() sellingPriceSold3 = models.IntegerField() sellingPriceSold4 = models.IntegerField() sellingPriceSold5 = models.IntegerField() sellingPriceSold6 = models.IntegerField() sellingPriceSold7 = models.IntegerField() sellingPriceSold8 = models.IntegerField() sellingPriceSold9 = models.IntegerField() sellingPriceSold10 = models.IntegerField() sellingPriceSold11 = models.IntegerField() confidence1 = models.IntegerField(choices=[], label='', max=11, min=0) surpriseValueAnte = models.IntegerField() surpriseValuePost = models.IntegerField() surprise = models.IntegerField(choices=[[1, '1 (not at all surprised)'], [2, '2'], [3, '3'], [4, '4'], [5, '5 (very surprised)']], label='', widget=widgets.RadioSelect) confidence2 = models.IntegerField(choices=[], label='', max=100, min=0) confidence2_slider = models.IntegerField(label='', max=100, min=0, widget=widgets.Slider(attrs={'step': '1'})) confidence3 = models.IntegerField(choices=[], label='', max=100, min=0) memory = models.IntegerField(choices=[], label='', max=11, min=0) task1Earnings = models.FloatField() task2Earnings = models.FloatField() stockEvaluationEarnings = models.FloatField() recallEarnings = models.FloatField() paymentTask = models.StringField() bonusPayment = models.FloatField() countSales = models.IntegerField() surpriseSentence = models.StringField() cashPosition_choice = models.IntegerField() task1Proceeds = models.FloatField() task1Totals = models.FloatField() Control1 = models.IntegerField(label='', widget=widgets.RadioSelect) def Control1_choices(self): import random choices = [[1, 'how much the stock costs'], [2, 'how likely the stock price increases'], [3, 'how much the stock price increases given a stock price increase']] random.shuffle(choices) return choices Control2 = models.IntegerField(label='', widget=widgets.RadioSelect) def Control2_choices(self): import random choices = [[1, 'A'], [2, 'B'], [3, 'C']] random.shuffle(choices) return Control3 = models.IntegerField(label='', widget=widgets.RadioSelect) def Control3_choices(self): import random choices = [[1, 'the more price increases in the past, the more likely the stock is of high type'], [2, 'each stock is of the same type'], [3, 'the type is irrelevant for the stock’s future price changes']] random.shuffle(choices) return choices Control4 = models.IntegerField(label='', widget=widgets.RadioSelect) def Control4_choices(self): import random choices = [[1, 'is always $30'], [2, 'depends on whether the stock is of high type or ordinary type'], [3, 'depends on other participants’ previous choices in the task']] random.shuffle(choices) return choices Control5 = models.IntegerField(label='', widget=widgets.RadioSelect) def Control5_choices(self): import random choices = [[1, 'each stock has a 25% probability of being a high type'], [2, 'each stock’s probability of being a high type depends on your number of correct answers to the control questions'], [3, 'each stock’s probability of being a high type depends on your previous knowledge about the stock market']] random.shuffle(choices) return choices number_highStocks = models.IntegerField() numberAdditionalShares = models.IntegerField() numberTotalShares = models.IntegerField() task2Proceeds = models.FloatField() task2Totals = models.FloatField() costsPurchaseTask2 = models.IntegerField() costsFeesTask2 = models.FloatField() numberHighFeeTotal = models.IntegerField() stockRow1_Task2 = models.StringField() stockRow2_Task2 = models.StringField() stockRow3_Task2 = models.StringField() prePrice1Row1_Task2 = models.IntegerField() prePrice1Row2_Task2 = models.IntegerField() prePrice1Row3_Task2 = models.IntegerField() prePrice2Row1_Task2 = models.IntegerField() prePrice2Row2_Task2 = models.IntegerField() prePrice2Row3_Task2 = models.IntegerField() priceRow1_Task2 = models.IntegerField() priceRow2_Task2 = models.IntegerField() priceRow3_Task2 = models.IntegerField() sharesRow1_Task2 = models.IntegerField() sharesRow2_Task2 = models.IntegerField() sharesRow3_Task2 = models.IntegerField() numberWrongControl1 = models.IntegerField() numberWrongControl2 = models.IntegerField() numberWrongControl3 = models.IntegerField() numberWrongControl4 = models.IntegerField() numberWrongControl5 = models.IntegerField() Understanding = models.LongStringField(blank = True, label='') Comments = models.LongStringField(blank = True, label='') TimeFirstClick_stock50 = models.StringField(blank = True) TimeSecondClick_stock50 = models.StringField(blank = True) TimeFirstClick_stock51 = models.StringField(blank = True) TimeSecondClick_stock51 = models.StringField(blank = True) TimeFirstClick_stock52 = models.StringField(blank = True) TimeSecondClick_stock52 = models.StringField(blank = True) TimeFirstClick_stock53 = models.StringField(blank = True) TimeSecondClick_stock53 = models.StringField(blank = True) TimeFirstClick_stock54 = models.StringField(blank = True) TimeSecondClick_stock54 = models.StringField(blank = True) TimeFirstClick_stock55 = models.StringField(blank = True) TimeSecondClick_stock55 = models.StringField(blank = True) TimeFirstClick_stock56 = models.StringField(blank = True) TimeSecondClick_stock56 = models.StringField(blank = True) TimeFirstClick_stock57 = models.StringField(blank = True) TimeSecondClick_stock57 = models.StringField(blank = True) TimeFirstClick_stock58 = models.StringField(blank = True) TimeSecondClick_stock58 = models.StringField(blank = True) TimeFirstClick_stock59 = models.StringField(blank = True) TimeSecondClick_stock59 = models.StringField(blank = True) TimeFirstClick_stock60 = models.StringField(blank = True) TimeSecondClick_stock60 = models.StringField(blank = True) TimeFirstClick_stock61 = models.StringField(blank = True) TimeSecondClick_stock61 = models.StringField(blank = True) Link = models.StringField() #get price changes per row def showPriceChangeForStockName(self, stockName, period): priceChangeForStockName = 0 if period == 1: priceChangeForStockName = self.participant.vars["priceChangeDict"].get(stockName + '_p4',0) elif period == 2: priceChangeForStockName = self.participant.vars["priceChangeDict"].get(stockName + '_p5',0) elif period == 3: priceChangeForStockName = self.participant.vars["priceChangeDict"].get(stockName + '_p6',0) elif period == 4: priceChangeForStockName = self.participant.vars["priceChangeDict"].get(stockName + '_p7',0) elif period == 5: priceChangeForStockName = self.participant.vars["priceChangeDict"].get(stockName + '_p8',0) elif period == 6: priceChangeForStockName = self.participant.vars["priceChangeDict"].get(stockName + '_p9',0) elif period == 7: priceChangeForStockName = self.participant.vars["priceChangeDict"].get(stockName + '_p10',0) return priceChangeForStockName def getBuyingPeriod(self, stockName): buyingPeriod = 0 if stockName == 'Stock1': buyingPeriod = 0 if stockName == 'Stock2': buyingPeriod = 0 if stockName == 'Stock3': buyingPeriod = 0 if stockName == 'Stock4': buyingPeriod = 0 if stockName == 'Stock5': buyingPeriod = 0 if stockName == 'Stock6': buyingPeriod = 0 if stockName == 'Stock7': buyingPeriod = 0 if stockName == 'Stock8': buyingPeriod = 0 if stockName == 'Stock9': buyingPeriod = 0 if stockName == 'Stock10': buyingPeriod = 0 if stockName == 'Stock11': buyingPeriod = 0 if stockName == 'Stock12': buyingPeriod = 0 if stockName == 'Stock13': buyingPeriod = 0 if stockName == 'Stock14': buyingPeriod = 0 if stockName == 'Stock15': buyingPeriod = 0 if stockName == 'Stock16': buyingPeriod = 0 if stockName == 'Stock17': buyingPeriod = 0 if stockName == 'Stock18': buyingPeriod = 0 if stockName == 'Stock19': buyingPeriod = 0 if stockName == 'Stock20': buyingPeriod = 0 if stockName == 'Stock21': buyingPeriod = 1 if stockName == 'Stock22': buyingPeriod = 1 if stockName == 'Stock23': buyingPeriod = 1 if stockName == 'Stock24': buyingPeriod = 1 if stockName == 'Stock25': buyingPeriod = 2 if stockName == 'Stock26': buyingPeriod = 2 if stockName == 'Stock27': buyingPeriod = 2 if stockName == 'Stock28': buyingPeriod = 2 if stockName == 'Stock29': buyingPeriod = 3 if stockName == 'Stock30': buyingPeriod = 3 if stockName == 'Stock31': buyingPeriod = 3 if stockName == 'Stock32': buyingPeriod = 3 if stockName == 'Stock33': buyingPeriod = 4 if stockName == 'Stock34': buyingPeriod = 4 if stockName == 'Stock35': buyingPeriod = 4 if stockName == 'Stock36': buyingPeriod = 4 if stockName == 'Stock37': buyingPeriod = 5 if stockName == 'Stock38': buyingPeriod = 5 if stockName == 'Stock39': buyingPeriod = 5 if stockName == 'Stock40': buyingPeriod = 5 if stockName == 'Stock41': buyingPeriod = 6 if stockName == 'Stock42': buyingPeriod = 6 if stockName == 'Stock43': buyingPeriod = 6 if stockName == 'Stock44': buyingPeriod = 6 return buyingPeriod def sumPriceChangesInPeriod(self, stockName, period): p = period sumPriceChange = 0 buyingPeriod = self.getBuyingPeriod(stockName) while (p - buyingPeriod) > 0: sumPriceChange = sumPriceChange + self.showPriceChangeForStockName(stockName, p) p = p - 1 return sumPriceChange #selling price of stock def sellingPrice(self, stockName, period): p = period sellingPrice = 30 + self.sumPriceChangesInPeriod(stockName, p) return sellingPrice #cash position def currentCash_choice(self, period): p = period cashPosition_choice = 0 if p == 1: cashPosition_choice = Constants.endowment - (5 * Constants.stockPrice) if p == 2: cashPosition_choice = Constants.endowment - (6 * Constants.stockPrice) + self.sellingPriceSold1 if p == 3: cashPosition_choice = Constants.endowment - (7 * Constants.stockPrice) + self.sellingPriceSold1 + self.sellingPriceSold2 if p == 4: cashPosition_choice = Constants.endowment - (8 * Constants.stockPrice) + self.sellingPriceSold1 + self.sellingPriceSold2 + self.sellingPriceSold3 if p == 5: cashPosition_choice = Constants.endowment - (9 * Constants.stockPrice) + self.sellingPriceSold1 + self.sellingPriceSold2 + self.sellingPriceSold3 + self.sellingPriceSold4 if p == 6: cashPosition_choice = Constants.endowment - (10 * Constants.stockPrice) + self.sellingPriceSold1 + self.sellingPriceSold2 + self.sellingPriceSold3 + self.sellingPriceSold4 + self.sellingPriceSold5 if p == 7: cashPosition_choice = Constants.endowment - (11 * Constants.stockPrice) + self.sellingPriceSold1 + self.sellingPriceSold2 + self.sellingPriceSold3 + self.sellingPriceSold4 + self.sellingPriceSold5 + self.sellingPriceSold6 + self.sellingPriceSold7 + self.sellingPriceSold8 + self.sellingPriceSold9 + self.sellingPriceSold10 + self.sellingPriceSold11 return cashPosition_choice # create list with all sold stocks def soldList(self): self.participant.vars['soldList'] = [] self.participant.vars['soldList'].append(self.stockSold1) self.participant.vars['soldList'].append(self.stockSold2) self.participant.vars['soldList'].append(self.stockSold3) self.participant.vars['soldList'].append(self.stockSold4) self.participant.vars['soldList'].append(self.stockSold5) self.participant.vars['soldList'].append(self.stockSold6) self.participant.vars['soldList'].append(self.stockSold7) self.participant.vars['soldList'].append(self.stockSold8) self.participant.vars['soldList'].append(self.stockSold9) self.participant.vars['soldList'].append(self.stockSold10) self.participant.vars['soldList'].append(self.stockSold11) # get stock type for stock name def getStockType(self, name): if name == 'Stock1': stockType = self.Stock_type1 if name == 'Stock2': stockType = self.Stock_type2 if name == 'Stock3': stockType = self.Stock_type3 if name == 'Stock4': stockType = self.Stock_type4 if name == 'Stock5': stockType = self.Stock_type5 if name == 'Stock6': stockType = self.Stock_type6 if name == 'Stock7': stockType = self.Stock_type7 if name == 'Stock8': stockType = self.Stock_type8 if name == 'Stock9': stockType = self.Stock_type9 if name == 'Stock10': stockType = self.Stock_type10 if name == 'Stock11': stockType = self.Stock_type11 if name == 'Stock12': stockType = self.Stock_type12 if name == 'Stock13': stockType = self.Stock_type13 if name == 'Stock14': stockType = self.Stock_type14 if name == 'Stock15': stockType = self.Stock_type15 if name == 'Stock16': stockType = self.Stock_type16 if name == 'Stock17': stockType = self.Stock_type17 if name == 'Stock18': stockType = self.Stock_type18 if name == 'Stock19': stockType = self.Stock_type19 if name == 'Stock20': stockType = self.Stock_type20 if name == 'Stock21': stockType = self.Stock_type21 if name == 'Stock22': stockType = self.Stock_type22 if name == 'Stock23': stockType = self.Stock_type23 if name == 'Stock24': stockType = self.Stock_type24 if name == 'Stock25': stockType = self.Stock_type25 if name == 'Stock26': stockType = self.Stock_type26 if name == 'Stock27': stockType = self.Stock_type27 if name == 'Stock28': stockType = self.Stock_type28 if name == 'Stock29': stockType = self.Stock_type29 if name == 'Stock30': stockType = self.Stock_type30 if name == 'Stock31': stockType = self.Stock_type31 if name == 'Stock32': stockType = self.Stock_type32 if name == 'Stock33': stockType = self.Stock_type33 if name == 'Stock34': stockType = self.Stock_type34 if name == 'Stock35': stockType = self.Stock_type35 if name == 'Stock36': stockType = self.Stock_type36 if name == 'Stock37': stockType = self.Stock_type37 if name == 'Stock38': stockType = self.Stock_type38 if name == 'Stock39': stockType = self.Stock_type39 if name == 'Stock40': stockType = self.Stock_type40 if name == 'Stock41': stockType = self.Stock_type41 if name == 'Stock42': stockType = self.Stock_type42 if name == 'Stock43': stockType = self.Stock_type43 if name == 'Stock44': stockType = self.Stock_type44 return stockType