globals [ dS dW ttm retVal retList marketPrice Overalld1 Overalld2 pricingBias truePrice marketDayCount strike marketOpen totalBought totalSold range nthMarket spot maxTotalProfit minTotalProfit maxAvgProfit minAvgProfit bestJudgement worstJudgement bestPatience worstPatience pricingBiasStdDev meanPricingBias pricingBiascount totalPricingBias totalPricingBiassq dq J ] patches-own [ patience guessed-sigma price Sell Buy maxSigma minSigma money options d1 d2 callPrice judgement totalProfit totalProfitsq stdDevProfit maxProfit minProfit optPrice ] to setup ;; sets up the program by initializing variables ca if seed != 0 [ random-seed seed ] set ttm -1 ask patches [ set totalProfit 0 ] ask patches [ setup-patches ] ask patches [ set maxProfit 0 ] ask patches [ set minProfit 0 ] set totalPricingBias 0 set pricingBiascount 0 set totalPricingBiassq 0 set maxTotalProfit 0 set minTotalProfit 0 set maxAvgProfit 0 set minAvgProfit 0 reset-ticks end to go ;; calculates profit, and variables associated with profit (such as min and max profit), also plots the profit and calculates the nth market ifelse ((nthMarket - 1) < finalMarket) [ if ttm <= 0 [ ask patches [ let profit (money + (options * marketPrice)) set totalProfit (totalProfit + profit) set totalProfitsq (totalProfit * totalProfit) if nthMarket > 0 [ set stdDevProfit sqrt( (TotalProfitSq / nthMarket) - ((TotalProfit / nthMarket) * (TotalProfit / nthMarket)) ) ] set maxProfit (totalProfit + stdDevProfit) set minProfit (totalProfit - stdDevProfit) ] if nthMarket > 0 [ set range (max [ abs (totalProfit / nthMarket) ] of patches) * 1.10 + 10 ] set totalPricingBias (totalPricingBias + pricingBias) set totalPricingBiassq (totalPricingBiassq + (PricingBias * PricingBias)) if pricingBiasCount > 0 [ set meanPricingBias (TotalPricingBias / pricingBiasCount) set pricingBiasStdDev sqrt(totalPricingBiasSq / pricingBiasCount - meanPricingBias * meanPricingBias) ] set pricingBiasCount (pricingBiasCount + 1) set bestJudgement [ judgement ] of max-one-of patches [ totalProfit ] set worstJudgement [ judgement ] of min-one-of patches [ totalProfit ] set bestPatience [ patience ] of max-one-of patches [ totalProfit ] set worstPatience [ patience ] of min-one-of patches [ totalProfit ] if (nthMarket > 0) [ set maxTotalProfit (max [ totalProfit ] of patches ) / nthMarket set minTotalProfit (min [ totalProfit ] of patches ) / nthMarket set maxAvgProfit (maxTotalProfit / nthMarket) set minAvgProfit (minTotalProfit / nthMarket) ] ask patches [ plot-profit ] setup-market set nthMarket (nthMarket + 1) ] run-market tick ] [ stop ] end to setup-market ;; sets up market by initializing variables, setting up the various graphs, and setting strike and spot prices and time remaining set totalBought 0 set totalSold 0 set marketOpen 0 set marketPrice 0 ask patches [ set callPrice 0 ] set pricingBias 0 set-current-plot "Price" clear-plot set-plot-x-range 0 ceiling (time / dT) set-current-plot "Options Market Line Graph" clear-plot set-plot-x-range 0 ceiling (time / dT) set-current-plot "Sigma plot" clear-plot set-plot-x-range 0 ceiling (time / dT) set-current-plot "Activity" clear-plot set-plot-x-range 0 ceiling (time / dT) set marketDayCount 0 set strike startingPrice set spot startingPrice set retList [ 0 0 ] set retList lput spot retList set ttm time ask patches [ set minSigma 0.0 set maxSigma 0.0 set Buy 0 set Sell 0 set money 0 set options 0 set optPrice 0 ] end to run-market ;; runs the market by updating prices, simulating buying and selling, and adjusting the volatility values of the patches set totalBought 0 set totalSold 0 update-spot update-patchPrices if marketOpen = 1 [ set-marketPrice ] buyAndSell if putMarket = false [ set truePrice calculate-callPrice sigma ] if putMarket = true [ set truePrice calculate-putPrice sigma ] if marketOpen = 1 [ set pricingBias (marketPrice - truePrice) ] set ttm ttm - dt set marketDayCount (marketDayCount + 1) if marketOpen = 0 [ if marketDayCount > (max [ patience ] of patches) + 40 [ set marketOpen 1 ask patches [ set maxSigma guessed-sigma ] ask patches [ set minSigma guessed-sigma ] ] ] end to setup-patches ;; sets up the grid of patches if AgentAssignments = "Scattered" [ set patience minPatience + random (maxPatience - minPatience) set judgement minJudgement + random-float (maxJudgement - minJudgement) ] if AgentAssignments = "JudgementvsPatience" [ if JudgementMaxTwo = true [ set judgement minJudgement + ((maxJudgement - minJudgement) * ((pxcor - min-pxcor) / (max-pxcor - min-pxcor))) ] if JudgementMaxTwo = false [ set judgement minJudgement + (3 * (((pxcor - min-pxcor) / (max-pxcor - min-pxcor)) ^ 2)) ] set patience minPatience + ((maxPatience - minPatience) * ((pycor - min-pycor) / (max-pycor - min-pycor))) ] end to update-spot ;; updates the spot price with Geometric Brownian Motion set dW random-normal 0 sqrt(dt) set dq 0 set J avgJump * (e ^ (-((jumpVolatility ^ 2) / 2) + jumpVolatility * (random-normal 0 1))) if random-float 1 < (lambda * dt) [ set dq 1 ] set dS spot * ((miu * dt + sigma * dW ) + ((J - 1) * dq)) set spot spot + dS if spot < 0 [ set spot 0.001 ] set retVal dS / spot set retList lput retVal retList end to update-patchPrices ;; updates buy and sell prices for patches ask patches [ calculate-sigma if marketOpen = 1 [ if guessed-sigma > maxSigma [ set maxSigma guessed-sigma if putMarket = false [ set Sell calculate-callPrice guessed-sigma ] if putMarket = true [ set Sell calculate-putPrice guessed-sigma ] ] if guessed-sigma < minSigma [set minSigma guessed-sigma if putMarket = false [ set Buy calculate-callPrice guessed-sigma ] if putMarket = true [ set Buy calculate-putPrice guessed-sigma ] ] if putmarket = false [ set optPrice calculate-callPrice guessed-sigma ] if putmarket = true [ set optPrice calculate-putPrice guessed-sigma ] ] ] end to calculate-sigma ;; finds the volatility (sigma) if length retList > patience + 2 [ set guessed-sigma ((standard-deviation sublist retList (length retList - patience) (length retList))/(sqrt(dt)) * judgement) ] end to plot-profit ;; plots the profit of the patches if nthMarket > 0 [ let avgProfMag abs (totalProfit / nthMarket) if (totalProfit / nthMarket) > 0 [ set pcolor scale-color green avgProfMag 0 (range) ] if (totalProfit / nthMarket) <= 0 [ set pcolor scale-color red avgProfMag 0 (range) ] ] if (patience = worstPatience) [ if (judgement = worstJudgement) [ set pcolor yellow ] ] if (patience = bestPatience) [ if (judgement = bestJudgement) [ set pcolor blue ] ] end to set-marketPrice ;; finding highest buy and lowest sell prices and finding average let maxBuy max [ Buy ] of patches let minSell min [ Sell ] of patches set marketPrice (maxBuy + minSell) / 2 end to buyAndSell if marketOpen = 1 [ ask patches [ if length retList > patience + 2 [ if Buy >= marketPrice [ set options options + 1 set money money - marketPrice set totalBought totalBought + 1 ] if Sell <= marketPrice [ set options options - 1 set money money + marketPrice set totalSold totalSold + 1 ] ] ;; if retList long enough ] ;; ask patches ] ;; if market is open ;; (if options market is open) each patch sells if its sell price is lower than the market price and buys if its buy price is higher than the market price end to-report calculate-d1 [ _sigma ] let _d1 ((ln (spot / strike)) + (noRisk + (_sigma * _sigma) / 2) * ttm) / (_sigma * sqrt(ttm)) ;;change variables report _d1 end to-report calculate-d2 [ _d1 _sigma ] let _d2 (_d1 - (_sigma * sqrt(ttm))) report _d2 end to-report calculate-callPrice [ _sigma ] let _d1 calculate-d1 _sigma let _d2 calculate-d2 _d1 _sigma let _callPrice spot * normcdf(_d1) - strike * exp( - noRisk * ttm) * normcdf(_d2) report _callPrice end to-report calculate-putPrice [ _sigma ] let _d1 calculate-d1 _sigma let _d2 calculate-d2 _d1 _sigma let _putPrice strike * exp( - noRisk * ttm) * normcdf(- _d2) - spot * normcdf(- _d1) report _putPrice end ;; Normal distribution cumulative density function from http://stackoverflow.com/questions/809362/cumulative-normal-distribution-in-python to-report normcdf [lclx] let lclt lclx let y 0.5 * erfcc ((-1) * lclt / ( 1 * sqrt 2.0)) if ( y > 1.0 ) [ set y 1.0 ] report y end ;; Normal distribution probability density function to-report normpdf [lclx] report 1 / ( sqrt (2 * pi)) * exp ( - lclx * lclx / 2.0) end ;; Complementary error function to-report erfcc [lclx] let z abs lclx let lclt 1.0 / (1.0 + 0.5 * z) let r lclt * exp ( - z * z - 1.26551223 + lclt * (1.00002368 + lclt * (0.37409196 + lclt * (0.09678418 + lclt * (-0.18628806 + lclt * (.27886807 + lclt * (-1.13520398 + lclt * (1.48851587 + lclt * (-0.82215223 + lclt * .17087277 ))))))))) ifelse (lclx >= 0) [ report r ] [report 2.0 - r] end @#$#@#$#@ GRAPHICS-WINDOW 741 23 1277 550 17 16 15.030303030303031 1 10 1 1 1 0 1 1 1 -17 17 -16 16 1 1 1 ticks 30.0 BUTTON 640 95 703 128 NIL setup NIL 1 T OBSERVER NIL NIL NIL NIL 1 BUTTON 570 95 633 128 NIL go T 1 T OBSERVER NIL NIL NIL NIL 1 SLIDER 410 74 557 107 dt dt 0 1 0.0040 0.0001 1 NIL HORIZONTAL SLIDER 410 110 557 143 sigma sigma 0 2 0.0909 .0001 1 NIL HORIZONTAL SLIDER 410 38 557 71 miu miu 0 1 0.01 .0001 1 NIL HORIZONTAL INPUTBOX 570 290 687 350 noRisk 0.02 1 0 Number INPUTBOX 570 220 684 280 startingPrice 100 1 0 Number MONITOR 420 415 525 472 NIL ttm 3 1 14 INPUTBOX 570 145 685 205 time 1.57 1 0 Number PLOT 15 10 405 135 Price Time Price 0.0 10.0 0.0 10.0 true true "" "" PENS "Stock price" 1.0 0 -16777216 true "" "plot spot" PLOT 15 145 405 275 Options Market Line Graph Time Option Price 0.0 10.0 0.0 0.1 true true "" "" PENS "Avg Price" 1.0 0 -16777216 true "" "plot mean [ optPrice ] of patches" "Avg sell" 1.0 0 -7500403 true "" "plot mean [ Sell ] of patches" "Avg buy " 1.0 0 -2674135 true "" "plot mean [ Buy ] of patches" "Market" 1.0 0 -955883 true "" "plot marketPrice" "Price Bias" 1.0 0 -6459832 true "" "plot pricingBias" "Open" 1.0 0 -13840069 true "" "plot marketOpen" CHOOSER 563 39 733 84 AgentAssignments AgentAssignments "JudgementvsPatience" "Scattered" 0 PLOT 15 285 405 405 Sigma plot Time Sigma 0.0 10.0 0.0 0.02 true true "" "" PENS "Sigma" 1.0 0 -16777216 true "" "ifelse marketOpen = 1 [ plot mean [ guessed-sigma ] of patches ]\n [ plot 0 ]" "MinSig" 1.0 0 -7500403 true "" "ifelse marketOpen = 1 [ plot mean [ minSigma ] of patches ]\n [ plot 0 ]" "MaxSig" 1.0 0 -2674135 true "" "ifelse marketOpen = 1 [ plot mean [ maxSigma ] of patches ]\n [ plot 0 ]" PLOT 15 415 405 535 Activity Time Options 0.0 10.0 0.0 10.0 true true "" "" PENS "TotalBought" 1.0 0 -16777216 true "" "plot totalBought" "TotalSold" 1.0 0 -7500403 true "" "plot totalSold" MONITOR 570 430 675 475 NIL range 3 1 11 MONITOR 420 355 525 400 NIL nthMarket 0 1 11 INPUTBOX 420 205 535 265 Seed 1052 1 0 Number MONITOR 570 370 675 415 NIL spot 3 1 11 SWITCH 420 150 530 183 PutMarket PutMarket 1 1 -1000 INPUTBOX 620 555 735 615 maxPatience 40 1 0 Number INPUTBOX 745 555 860 615 minPatience 20 1 0 Number INPUTBOX 995 555 1110 615 minJudgement 1.0E-4 1 0 Number INPUTBOX 870 555 985 615 maxJudgement 2 1 0 Number MONITOR 420 490 525 535 NIL meanPricingBias 2 1 11 MONITOR 570 490 675 535 NIL pricingBiasStdDev 2 1 11 MONITOR 15 540 105 585 NIL bestJudgement 2 1 11 MONITOR 110 540 200 585 NIL worstJudgement 2 1 11 MONITOR 205 540 295 585 NIL bestPatience 0 1 11 MONITOR 300 540 390 585 NIL worstPatience 0 1 11 MONITOR 395 540 500 585 NIL maxAvgProfit 0 1 11 MONITOR 505 540 610 585 NIL minAvgProfit 0 1 11 INPUTBOX 420 280 530 340 finalMarket 300 1 0 Number INPUTBOX 745 625 860 685 avgJump 1 1 0 Number INPUTBOX 620 625 735 685 lambda 1 1 0 Number INPUTBOX 870 625 985 685 jumpVolatility 0.3 1 0 Number SWITCH 995 625 1157 658 JudgementMaxTwo JudgementMaxTwo 1 1 -1000 @#$#@#$#@ ## WHAT IS IT? This simulated options market creates a grid of traders who use the Black-Scholes formula to determine when to buy and sell options. Values such as the starting price and the risk free rate of interest can be adjusted by the user to see what effects different variables have on the market. ## HOW IT WORKS The agents are arranged on the grid based on their level of "patience" (the range of the market they analyze) and "judgement" (how much they deviate from the Black-Scholes formula). The traders gain and lose money as they trade options with the Black-Scholes formula. Lighter green means success, lighter red means loss, and darker colors or black indicates small success or small loss. Successive markets are averaged into the main display in a Monte-Carlo type model. ## HOW TO USE IT Adjust or input variables with slider bars and boxes. The "Seed" value enables one to run each market with a seed (a value of zero means disregard the seed value). In addition to the default judgement vs. patience graph, the dropdown menu allows the user to change the graph to "Scattered" so that the traders' judgement and patience values are not dependent on their position. The finalMarket value tells the program how many markets to run before the program stops. The putMarket switch enables one to decide whether to simulate a put option market or a call option market. ## THINGS TO NOTICE The four graphs on the left side of the display show the stock price, the options market, the average sigma, and the rate of activity. The main graph often starts out with wild variations, but eventually smooths out over time. In addition, the trader with the best patience and judgement is marked with a blue square, and the trader with the worst patience and judgement is marked with a yellow square. ## THINGS TO TRY It is suggested that the user simulate both a put market and a call market to see how the main graph differs between the two over time. For a more accurate reading of what patience and judgement values yield success in this particular market, leave the market running for several hundered runs. ## EXTENDING THE MODEL ## NETLOGO FEATURES The main grid feature of NetLogo enabled a color-coded simulation of traders in an options market. ## RELATED MODELS Artificial Financial Market OptionsMarket ## AUTHOR William Elliott william.elliott@magprep.com ## CREDITS AND REFERENCES http://code.google.com/p/stock-market-simulation/ http://bradley.bradley.edu/~arr/bsm/pg04.html Zhang, Shu Lin; Feng, De Yu; Wang, Shu Ping. “Option Pricing under Unknown Volatility : An Agent-Based Modeling and Simulation Approach.” 2009 International Conference on Information and Financial Engineering (2009): 130-134 Joshi, Mark. The Concepts and Practice of Mathematical Finance. Merton, Robert. “Option Pricing when Underlying Stock Returns are Discontinuous.” http://demonstrations.wolfram.com/OptionPricesInMertonsJumpDiffusionModel/ @#$#@#$#@ default true 0 Polygon -7500403 true true 150 5 40 250 150 205 260 250 airplane true 0 Polygon -7500403 true true 150 0 135 15 120 60 120 105 15 165 15 195 120 180 135 240 105 270 120 285 150 270 180 285 210 270 165 240 180 180 285 195 285 165 180 105 180 60 165 15 arrow true 0 Polygon -7500403 true true 150 0 0 150 105 150 105 293 195 293 195 150 300 150 box false 0 Polygon -7500403 true true 150 285 285 225 285 75 150 135 Polygon -7500403 true true 150 135 15 75 150 15 285 75 Polygon -7500403 true true 15 75 15 225 150 285 150 135 Line -16777216 false 150 285 150 135 Line -16777216 false 150 135 15 75 Line -16777216 false 150 135 285 75 bug true 0 Circle -7500403 true true 96 182 108 Circle -7500403 true true 110 127 80 Circle -7500403 true true 110 75 80 Line -7500403 true 150 100 80 30 Line -7500403 true 150 100 220 30 butterfly true 0 Polygon -7500403 true true 150 165 209 199 225 225 225 255 195 270 165 255 150 240 Polygon -7500403 true true 150 165 89 198 75 225 75 255 105 270 135 255 150 240 Polygon -7500403 true true 139 148 100 105 55 90 25 90 10 105 10 135 25 180 40 195 85 194 139 163 Polygon -7500403 true true 162 150 200 105 245 90 275 90 290 105 290 135 275 180 260 195 215 195 162 165 Polygon -16777216 true false 150 255 135 225 120 150 135 120 150 105 165 120 180 150 165 225 Circle -16777216 true false 135 90 30 Line -16777216 false 150 105 195 60 Line -16777216 false 150 105 105 60 car false 0 Polygon -7500403 true true 300 180 279 164 261 144 240 135 226 132 213 106 203 84 185 63 159 50 135 50 75 60 0 150 0 165 0 225 300 225 300 180 Circle -16777216 true false 180 180 90 Circle -16777216 true false 30 180 90 Polygon -16777216 true false 162 80 132 78 134 135 209 135 194 105 189 96 180 89 Circle -7500403 true true 47 195 58 Circle -7500403 true true 195 195 58 circle false 0 Circle -7500403 true true 0 0 300 circle 2 false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 cow false 0 Polygon -7500403 true true 200 193 197 249 179 249 177 196 166 187 140 189 93 191 78 179 72 211 49 209 48 181 37 149 25 120 25 89 45 72 103 84 179 75 198 76 252 64 272 81 293 103 285 121 255 121 242 118 224 167 Polygon -7500403 true true 73 210 86 251 62 249 48 208 Polygon -7500403 true true 25 114 16 195 9 204 23 213 25 200 39 123 cylinder false 0 Circle -7500403 true true 0 0 300 dot false 0 Circle -7500403 true true 90 90 120 face happy false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 255 90 239 62 213 47 191 67 179 90 203 109 218 150 225 192 218 210 203 227 181 251 194 236 217 212 240 face neutral false 0 Circle -7500403 true true 8 7 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Rectangle -16777216 true false 60 195 240 225 face sad false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 168 90 184 62 210 47 232 67 244 90 220 109 205 150 198 192 205 210 220 227 242 251 229 236 206 212 183 fish false 0 Polygon -1 true false 44 131 21 87 15 86 0 120 15 150 0 180 13 214 20 212 45 166 Polygon -1 true false 135 195 119 235 95 218 76 210 46 204 60 165 Polygon -1 true false 75 45 83 77 71 103 86 114 166 78 135 60 Polygon -7500403 true true 30 136 151 77 226 81 280 119 292 146 292 160 287 170 270 195 195 210 151 212 30 166 Circle -16777216 true false 215 106 30 flag false 0 Rectangle -7500403 true true 60 15 75 300 Polygon -7500403 true true 90 150 270 90 90 30 Line -7500403 true 75 135 90 135 Line -7500403 true 75 45 90 45 flower false 0 Polygon -10899396 true false 135 120 165 165 180 210 180 240 150 300 165 300 195 240 195 195 165 135 Circle -7500403 true true 85 132 38 Circle -7500403 true true 130 147 38 Circle -7500403 true true 192 85 38 Circle -7500403 true true 85 40 38 Circle -7500403 true true 177 40 38 Circle -7500403 true true 177 132 38 Circle -7500403 true true 70 85 38 Circle -7500403 true true 130 25 38 Circle -7500403 true true 96 51 108 Circle -16777216 true false 113 68 74 Polygon -10899396 true false 189 233 219 188 249 173 279 188 234 218 Polygon -10899396 true false 180 255 150 210 105 210 75 240 135 240 house false 0 Rectangle -7500403 true true 45 120 255 285 Rectangle -16777216 true false 120 210 180 285 Polygon -7500403 true true 15 120 150 15 285 120 Line -16777216 false 30 120 270 120 leaf false 0 Polygon -7500403 true true 150 210 135 195 120 210 60 210 30 195 60 180 60 165 15 135 30 120 15 105 40 104 45 90 60 90 90 105 105 120 120 120 105 60 120 60 135 30 150 15 165 30 180 60 195 60 180 120 195 120 210 105 240 90 255 90 263 104 285 105 270 120 285 135 240 165 240 180 270 195 240 210 180 210 165 195 Polygon -7500403 true true 135 195 135 240 120 255 105 255 105 285 135 285 165 240 165 195 line true 0 Line -7500403 true 150 0 150 300 line half true 0 Line -7500403 true 150 0 150 150 pentagon false 0 Polygon -7500403 true true 150 15 15 120 60 285 240 285 285 120 person false 0 Circle -7500403 true true 110 5 80 Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 Rectangle -7500403 true true 127 79 172 94 Polygon -7500403 true true 195 90 240 150 225 180 165 105 Polygon -7500403 true true 105 90 60 150 75 180 135 105 plant false 0 Rectangle -7500403 true true 135 90 165 300 Polygon -7500403 true true 135 255 90 210 45 195 75 255 135 285 Polygon -7500403 true true 165 255 210 210 255 195 225 255 165 285 Polygon -7500403 true true 135 180 90 135 45 120 75 180 135 210 Polygon -7500403 true true 165 180 165 210 225 180 255 120 210 135 Polygon -7500403 true true 135 105 90 60 45 45 75 105 135 135 Polygon -7500403 true true 165 105 165 135 225 105 255 45 210 60 Polygon -7500403 true true 135 90 120 45 150 15 180 45 165 90 sheep false 15 Circle -1 true true 203 65 88 Circle -1 true true 70 65 162 Circle -1 true true 150 105 120 Polygon -7500403 true false 218 120 240 165 255 165 278 120 Circle -7500403 true false 214 72 67 Rectangle -1 true true 164 223 179 298 Polygon -1 true true 45 285 30 285 30 240 15 195 45 210 Circle -1 true true 3 83 150 Rectangle -1 true true 65 221 80 296 Polygon -1 true true 195 285 210 285 210 240 240 210 195 210 Polygon -7500403 true false 276 85 285 105 302 99 294 83 Polygon -7500403 true false 219 85 210 105 193 99 201 83 square false 0 Rectangle -7500403 true true 30 30 270 270 square 2 false 0 Rectangle -7500403 true true 30 30 270 270 Rectangle -16777216 true false 60 60 240 240 star false 0 Polygon -7500403 true true 151 1 185 108 298 108 207 175 242 282 151 216 59 282 94 175 3 108 116 108 target false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 Circle -7500403 true true 60 60 180 Circle -16777216 true false 90 90 120 Circle -7500403 true true 120 120 60 tree false 0 Circle -7500403 true true 118 3 94 Rectangle -6459832 true false 120 195 180 300 Circle -7500403 true true 65 21 108 Circle -7500403 true true 116 41 127 Circle -7500403 true true 45 90 120 Circle -7500403 true true 104 74 152 triangle false 0 Polygon -7500403 true true 150 30 15 255 285 255 triangle 2 false 0 Polygon -7500403 true true 150 30 15 255 285 255 Polygon -16777216 true false 151 99 225 223 75 224 truck false 0 Rectangle -7500403 true true 4 45 195 187 Polygon -7500403 true true 296 193 296 150 259 134 244 104 208 104 207 194 Rectangle -1 true false 195 60 195 105 Polygon -16777216 true false 238 112 252 141 219 141 218 112 Circle -16777216 true false 234 174 42 Rectangle -7500403 true true 181 185 214 194 Circle -16777216 true false 144 174 42 Circle -16777216 true false 24 174 42 Circle -7500403 false true 24 174 42 Circle -7500403 false true 144 174 42 Circle -7500403 false true 234 174 42 turtle true 0 Polygon -10899396 true false 215 204 240 233 246 254 228 266 215 252 193 210 Polygon -10899396 true false 195 90 225 75 245 75 260 89 269 108 261 124 240 105 225 105 210 105 Polygon -10899396 true false 105 90 75 75 55 75 40 89 31 108 39 124 60 105 75 105 90 105 Polygon -10899396 true false 132 85 134 64 107 51 108 17 150 2 192 18 192 52 169 65 172 87 Polygon -10899396 true false 85 204 60 233 54 254 72 266 85 252 107 210 Polygon -7500403 true true 119 75 179 75 209 101 224 135 220 225 175 261 128 261 81 224 74 135 88 99 wheel false 0 Circle -7500403 true true 3 3 294 Circle -16777216 true false 30 30 240 Line -7500403 true 150 285 150 15 Line -7500403 true 15 150 285 150 Circle -7500403 true true 120 120 60 Line -7500403 true 216 40 79 269 Line -7500403 true 40 84 269 221 Line -7500403 true 40 216 269 79 Line -7500403 true 84 40 221 269 wolf false 0 Polygon -16777216 true false 253 133 245 131 245 133 Polygon -7500403 true true 2 194 13 197 30 191 38 193 38 205 20 226 20 257 27 265 38 266 40 260 31 253 31 230 60 206 68 198 75 209 66 228 65 243 82 261 84 268 100 267 103 261 77 239 79 231 100 207 98 196 119 201 143 202 160 195 166 210 172 213 173 238 167 251 160 248 154 265 169 264 178 247 186 240 198 260 200 271 217 271 219 262 207 258 195 230 192 198 210 184 227 164 242 144 259 145 284 151 277 141 293 140 299 134 297 127 273 119 270 105 Polygon -7500403 true true -1 195 14 180 36 166 40 153 53 140 82 131 134 133 159 126 188 115 227 108 236 102 238 98 268 86 269 92 281 87 269 103 269 113 x false 0 Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ NetLogo 5.0.3 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ setup go meanPricingBias pricingBiasStdDev maxAvgProfit bestJudgement bestPatience minAvgProfit worstJudgement worstPatience setup go count turtles meanPricingBias pricingBiasStdDev maxAvgProfit bestJudgement bestPatience minAvgProfit worstJudgement worstPatience setup go bestJudgement worstJudgement bestPatience worstPatience maxAvgProfit minAvgProfit spot range pricingBiasStdDev setup go meanPricingBias pricingBiasStdDev maxAvgProfit bestJudgement bestPatience minAvgProfit worstJudgement worstPatience setup go meanPricingBias pricingBiasStdDev maxAvgProfit bestJudgement bestPatience minAvgProfit worstJudgement worstPatience setup go meanPricingBias pricingBiasStdDev maxAvgProfit bestJudgement bestPatience minAvgProfit worstJudgement worstPatience setup go meanPricingBias pricingBiasStdDev maxAvgProfit bestJudgement bestPatience minAvgProfit worstJudgement worstPatience setup go meanPricingBias pricingBiasStdDev maxAvgProfit bestJudgement bestPatience minAvgProfit worstJudgement worstPatience setup go meanPricingBias pricingBiasStdDev maxAvgProfit bestJudgement bestPatience minAvgProfit worstJudgement worstPatience setup go meanPricingBias pricingBiasStdDev maxAvgProfit bestJudgement bestPatience minAvgProfit worstJudgement worstPatience @#$#@#$#@ @#$#@#$#@ default 0.0 -0.2 0 1.0 0.0 0.0 1 1.0 0.0 0.2 0 1.0 0.0 link direction true 0 Line -7500403 true 150 150 90 180 Line -7500403 true 150 150 210 180 @#$#@#$#@ 1 @#$#@#$#@