tag:blogger.com,1999:blog-12407305800830325842024-03-11T20:21:05.480-07:00Money, Markets, and MisperceptionsUnknownnoreply@blogger.comBlogger156125tag:blogger.com,1999:blog-1240730580083032584.post-87660158636204560552019-12-12T21:40:00.004-08:002019-12-30T09:42:34.280-08:00Using Python to Gather Data from FRED for the Solow ModelThis script gathers and generates data for Solow. The second two functions plot the data using matplotlib and save the visualizations in a PDF.<br />
<br />
<br />
<div style="line-height: 19px;"><div style="background-color: #1e1e1e; color: #d4d4d4; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div style="line-height: 19px;"><div style="line-height: 19px;"><div style="font-family: Consolas, "Courier New", monospace; line-height: 19px;"><div style="line-height: 19px;"><div><span style="color: #c586c0;">import</span> pandas <span style="color: #c586c0;">as</span> pd</div><br />
<div>pd.core.common.is_list_like = pd.api.types.is_list_like</div><div><span style="color: #c586c0;">import</span> pandas_datareader.data <span style="color: #c586c0;">as</span> web</div><div><span style="color: #c586c0;">import</span> datetime</div><div><span style="color: #c586c0;">import</span> matplotlib.pyplot <span style="color: #c586c0;">as</span> plt</div><div><span style="color: #c586c0;">from</span> matplotlib.backends.backend_pdf <span style="color: #c586c0;">import</span> PdfPages</div><br />
<div><span style="color: #569cd6;">def</span> <span style="color: #dcdcaa;">gather_data</span>(<span style="color: #9cdcfe;">data_codes</span>, <span style="color: #9cdcfe;">start</span>, <span style="color: #9cdcfe;">end</span> = datetime.datetime.today(), <span style="color: #9cdcfe;">freq</span> = <span style="color: #ce9178;">"A"</span>):</div><div> i = <span style="color: #b5cea8;">0</span></div><div> <span style="color: #6a9955;"># dct.items() calls key and value that key points to</span></div><div> <span style="color: #c586c0;">for</span> key, val <span style="color: #569cd6;">in</span> data_codes.items():</div><div> <span style="color: #c586c0;">if</span> i == <span style="color: #b5cea8;">0</span>:</div><div> <span style="color: #6a9955;"># Create dataframe for first variable, then rename column</span></div><div> df = web.DataReader(val, <span style="color: #ce9178;">"fred"</span>, start, end).resample(freq).first()</div><div> df.rename(<span style="color: #9cdcfe;">columns</span> = {val:key}, <span style="color: #9cdcfe;">inplace</span> = <span style="color: #569cd6;">True</span>) </div><div> i = <span style="color: #569cd6;">None</span></div><div> <span style="color: #c586c0;">else</span>:</div><div> <span style="color: #6a9955;"># If dataframe already exists, add new column</span></div><div> df[key] = web.DataReader(val, <span style="color: #ce9178;">"fred"</span>, start, end).resample(freq).first()</div><div> </div><div> <span style="color: #c586c0;">return</span> df</div><div> </div><div><span style="color: #569cd6;">def</span> <span style="color: #dcdcaa;">plot_lines</span>(<span style="color: #9cdcfe;">df</span>, <span style="color: #9cdcfe;">plot_vars</span>, <span style="color: #9cdcfe;">linewidth</span> = <span style="color: #b5cea8;">1</span>, <span style="color: #9cdcfe;">logy</span> = <span style="color: #569cd6;">False</span>, <span style="color: #9cdcfe;">figsize</span> = (<span style="color: #b5cea8;">40</span>,<span style="color: #b5cea8;">20</span>), </div><div> <span style="color: #9cdcfe;">secondary_y</span> = <span style="color: #569cd6;">None</span>, <span style="color: #9cdcfe;">pp</span> = <span style="color: #569cd6;">None</span>):</div><div> </div><div> fig, ax = plt.subplots(<span style="color: #9cdcfe;">figsize</span> = figsize)</div><div> </div><div> legend_scale = <span style="color: #b5cea8;">20</span> / figsize[<span style="color: #b5cea8;">1</span>]</div><div> <span style="color: #6a9955;"># If no secondary_y (axis), plot all variables at once</span></div><div> <span style="color: #c586c0;">if</span> secondary_y == <span style="color: #569cd6;">None</span>:</div><div> df[plot_vars].plot.line(<span style="color: #9cdcfe;">linewidth</span> = linewidth, <span style="color: #9cdcfe;">logy</span> = logy, <span style="color: #9cdcfe;">ax</span> = ax)</div><div> ax.legend(<span style="color: #9cdcfe;">bbox_to_anchor</span>=(<span style="color: #b5cea8;">0</span>, <span style="color: #b5cea8;">1.035</span> + <span style="color: #b5cea8;">.045</span> * <span style="color: #dcdcaa;">len</span>(plot_vars) * legend_scale), </div><div> <span style="color: #9cdcfe;">loc</span>=<span style="color: #b5cea8;">2</span>)</div><div> <span style="color: #6a9955;"># Otherwise, create a new axis and plot each variable individually</span></div><div> <span style="color: #c586c0;">else</span>:</div><div> ax2 = ax.twinx()</div><div> <span style="color: #c586c0;">for</span> var <span style="color: #569cd6;">in</span> plot_vars:</div><div> <span style="color: #c586c0;">if</span> var == secondary_y: </div><div> df[var].plot.line(<span style="color: #9cdcfe;">linewidth</span> = linewidth, <span style="color: #9cdcfe;">logy</span> = logy, <span style="color: #9cdcfe;">ax</span> = ax2, <span style="color: #9cdcfe;">c</span> = <span style="color: #ce9178;">"C9"</span>,</div><div> <span style="color: #9cdcfe;">label</span> = var + <span style="color: #ce9178;">" (right)"</span>)</div><div> <span style="color: #c586c0;">else</span>:</div><div> df[var].plot.line(<span style="color: #9cdcfe;">linewidth</span> = linewidth, <span style="color: #9cdcfe;">logy</span> = logy, <span style="color: #9cdcfe;">ax</span> = ax)</div><div> <span style="color: #6a9955;"># If there are two axes, then gather lines from each axis</span></div><div> lines = ax.get_lines() + ax2.get_lines()</div><div> <span style="color: #6a9955;"># then gather the label from each line</span></div><div> labels = [l.get_label() <span style="color: #c586c0;">for</span> l <span style="color: #569cd6;">in</span> lines]</div><div> <span style="color: #6a9955;"># and use the lines and labels to create the legend</span></div><div> ax.legend(lines, labels, <span style="color: #9cdcfe;">bbox_to_anchor</span>=(<span style="color: #b5cea8;">0</span>, </div><div> <span style="color: #b5cea8;">1.04</span> + <span style="color: #b5cea8;">.045</span> * <span style="color: #dcdcaa;">len</span>(plot_vars) * legend_scale), <span style="color: #9cdcfe;">loc</span>=<span style="color: #b5cea8;">2</span>)</div><div> <span style="color: #6a9955;"># Turn the text on the x-axis so that it reads vertically</span></div><div> ax.tick_params(<span style="color: #9cdcfe;">axis</span>=<span style="color: #ce9178;">'x'</span>, <span style="color: #9cdcfe;">rotation</span>=<span style="color: #b5cea8;">90</span>)</div><div> <span style="color: #6a9955;"># Get rid of tick lines perpendicular to the axis for aesthetic</span></div><div> ax.tick_params(<span style="color: #ce9178;">'both'</span>, <span style="color: #9cdcfe;">length</span>=<span style="color: #b5cea8;">0</span>, <span style="color: #9cdcfe;">which</span>=<span style="color: #ce9178;">'both'</span>)</div><div> <span style="color: #6a9955;"># save image if PdfPages object was passed</span></div><div> <span style="color: #c586c0;">if</span> pp != <span style="color: #569cd6;">None</span>: pp.savefig(fig, <span style="color: #9cdcfe;">bbox_inches</span> = <span style="color: #ce9178;">"tight"</span>)</div><br />
<div><span style="color: #569cd6;">def</span> <span style="color: #dcdcaa;">plot_scatter</span>(<span style="color: #9cdcfe;">df</span>, <span style="color: #9cdcfe;">plot_vars</span>, <span style="color: #9cdcfe;">s</span> = <span style="color: #b5cea8;">75</span>, <span style="color: #9cdcfe;">figsize</span> = (<span style="color: #b5cea8;">40</span>, <span style="color: #b5cea8;">20</span>), <span style="color: #9cdcfe;">pp</span> = <span style="color: #569cd6;">None</span>):</div><div> <span style="color: #6a9955;"># Create plot for every unique pair of variables</span></div><div> <span style="color: #c586c0;">for</span> var1 <span style="color: #569cd6;">in</span> plot_vars:</div><div> <span style="color: #c586c0;">for</span> var2 <span style="color: #569cd6;">in</span> plot_vars:</div><div> <span style="color: #c586c0;">if</span> var1 != var2:</div><div> fig, ax = plt.subplots(<span style="color: #9cdcfe;">figsize</span> = figsize)</div><div> <span style="color: #6a9955;"># Create list of years from index</span></div><div> <span style="color: #6a9955;"># Year will be represented by color</span></div><div> df[<span style="color: #ce9178;">"Year"</span>] = [<span style="color: #4ec9b0;">int</span>(<span style="color: #4ec9b0;">str</span>(ind)[:<span style="color: #b5cea8;">4</span>]) <span style="color: #c586c0;">for</span> ind <span style="color: #569cd6;">in</span> df.index]</div><div> df.plot.scatter(<span style="color: #9cdcfe;">x</span> = var1, <span style="color: #9cdcfe;">y</span> = var2, <span style="color: #9cdcfe;">s</span> = s, <span style="color: #9cdcfe;">ax</span> = ax, <span style="color: #9cdcfe;">c</span> = <span style="color: #ce9178;">"Year"</span>,</div><div> <span style="color: #9cdcfe;">cmap</span> = <span style="color: #ce9178;">"viridis"</span>)</div><div> <span style="color: #6a9955;"># Turn the text on the x-axis so that it reads vertically</span></div><div> ax.tick_params(<span style="color: #9cdcfe;">axis</span>=<span style="color: #ce9178;">'x'</span>, <span style="color: #9cdcfe;">rotation</span>=<span style="color: #b5cea8;">90</span>)</div><div> <span style="color: #6a9955;"># Get rid of tick lines perpendicular to the axis for aesthetic</span></div><div> ax.tick_params(<span style="color: #ce9178;">'both'</span>, <span style="color: #9cdcfe;">length</span>=<span style="color: #b5cea8;">0</span>, <span style="color: #9cdcfe;">which</span>=<span style="color: #ce9178;">'both'</span>)</div><div> <span style="color: #6a9955;"># save image if PdfPages object was passed</span></div><div> <span style="color: #c586c0;">if</span> pp != <span style="color: #569cd6;">None</span>: pp.savefig(fig, <span style="color: #9cdcfe;">bbox_inches</span> = <span style="color: #ce9178;">"tight"</span>)</div><br />
<div><span style="color: #6a9955;"># Create PDF that will hold visualizations</span></div><div>pp = PdfPages(<span style="color: #ce9178;">"Capital Measures "</span> + <span style="color: #4ec9b0;">str</span>(datetime.datetime.today())[:<span style="color: #b5cea8;">10</span>] + <span style="color: #ce9178;">".pdf"</span>)</div><div><span style="color: #6a9955;"># set default fontsize for text in plot</span></div><div>plt.rcParams.update({<span style="color: #ce9178;">'font.size'</span>: <span style="color: #b5cea8;">32</span>})</div><div><span style="color: #6a9955;"># Choose data from FRED</span></div><div><span style="color: #6a9955;"># Keys will be used to name variable. Key points to FRED code</span></div><div>data_codes = {<span style="color: #ce9178;">"Capital Stock"</span>:<span style="color: #ce9178;">"RKNANPUSA666NRUG"</span>,</div><div> <span style="color: #ce9178;">"Nominal GDP"</span>:<span style="color: #ce9178;">"GDP"</span>,</div><div> <span style="color: #ce9178;">"Price Level"</span>:<span style="color: #ce9178;">"GDPDEF"</span>,</div><div> <span style="color: #ce9178;">"Population"</span>:<span style="color: #ce9178;">"B230RC0A052NBEA"</span>}</div><div><span style="color: #6a9955;"># Select start and end dates</span></div><div>start = datetime.datetime(<span style="color: #b5cea8;">1950</span>, <span style="color: #b5cea8;">1</span>, <span style="color: #b5cea8;">1</span>)</div><div>end = datetime.datetime(<span style="color: #b5cea8;">2019</span>, <span style="color: #b5cea8;">1</span>, <span style="color: #b5cea8;">31</span>)</div><br />
<div><span style="color: #6a9955;"># Check if data has been gathered.</span></div><div><span style="color: #6a9955;"># If data needs to be gathered again, clear variables or restart kernel</span></div><div><span style="color: #c586c0;">if</span> <span style="color: #ce9178;">"data_gathered"</span> <span style="color: #569cd6;">not</span> <span style="color: #569cd6;">in</span> <span style="color: #dcdcaa;">locals</span>():</div><div> df = gather_data(data_codes, <span style="color: #9cdcfe;">start</span> = start, </div><div> <span style="color: #9cdcfe;">end</span> = end, <span style="color: #9cdcfe;">freq</span> = <span style="color: #ce9178;">"A"</span>)</div><div> <span style="color: #6a9955;"># After data is downloaded create new data and transform data</span></div><div> <span style="color: #6a9955;"># set population to millions </span></div><div> df[<span style="color: #ce9178;">"Population"</span>] = df[<span style="color: #ce9178;">"Population"</span>] / <span style="color: #b5cea8;">10</span> ** <span style="color: #b5cea8;">3</span></div><div> <span style="color: #6a9955;"># set NGDP to millions</span></div><div> df[<span style="color: #ce9178;">"Nominal GDP"</span>] = df[<span style="color: #ce9178;">"Nominal GDP"</span>] * <span style="color: #b5cea8;">10</span> ** <span style="color: #b5cea8;">3</span></div><div> <span style="color: #6a9955;"># Make 2011 base year for price level to match capital stock values</span></div><div> df[<span style="color: #ce9178;">"Price Level"</span>] = df[<span style="color: #ce9178;">"Price Level"</span>].div(df[<span style="color: #ce9178;">"Price Level"</span>].loc[<span style="color: #ce9178;">"2011"</span>].values[<span style="color: #b5cea8;">0</span>])</div><div> <span style="color: #6a9955;"># Create RGDP using 2011 prices</span></div><div> df[<span style="color: #ce9178;">"Real GDP"</span>] = df[<span style="color: #ce9178;">"Nominal GDP"</span>].div(df[<span style="color: #ce9178;">"Price Level"</span>])</div><div> <span style="color: #6a9955;"># Use population as proxy for L</span></div><div> <span style="color: #6a9955;"># y = Y / L</span></div><div> df[<span style="color: #ce9178;">"Real GDP Per Capita"</span>] = df[<span style="color: #ce9178;">"Real GDP"</span>].div(df[<span style="color: #ce9178;">"Population"</span>])</div><div> <span style="color: #6a9955;"># k = K / L</span></div><div> df[<span style="color: #ce9178;">"Effective Capital Stock"</span>] = df[<span style="color: #ce9178;">"Capital Stock"</span>].div(df[<span style="color: #ce9178;">"Population"</span>])</div><div> <span style="color: #6a9955;"># Estimate Solow's A</span></div><div> <span style="color: #6a9955;"># y = Ak**.5</span></div><div> <span style="color: #6a9955;"># A = y / k ** .5</span></div><div> df[<span style="color: #ce9178;">"Efficiency of Capital"</span>] = df[<span style="color: #ce9178;">"Real GDP Per Capita"</span>].div(df[<span style="color: #ce9178;">"Effective Capital Stock"</span>] ** (<span style="color: #b5cea8;">1</span>/<span style="color: #b5cea8;">2</span>))</div><div> data_gathered = <span style="color: #569cd6;">True</span></div><br />
<div><span style="color: #6a9955;">####### Plot Variables #######</span></div><div>plot_vars = [<span style="color: #ce9178;">"Effective Capital Stock"</span>]</div><div>plot_lines(df, plot_vars, <span style="color: #9cdcfe;">linewidth</span> = <span style="color: #b5cea8;">3</span>, <span style="color: #9cdcfe;">logy</span> = <span style="color: #569cd6;">True</span>, <span style="color: #9cdcfe;">pp</span> = pp)</div><div>plot_vars = [<span style="color: #ce9178;">"Efficiency of Capital"</span>, <span style="color: #ce9178;">"Real GDP Per Capita"</span>]</div><div>plot_lines(df, plot_vars, <span style="color: #9cdcfe;">linewidth</span> = <span style="color: #b5cea8;">3</span>, <span style="color: #9cdcfe;">logy</span> = <span style="color: #569cd6;">True</span>, </div><div> <span style="color: #9cdcfe;">secondary_y</span> = <span style="color: #ce9178;">"Efficiency of Capital"</span>, <span style="color: #9cdcfe;">pp</span> = pp)</div><br />
<div>plot_scatter(df, plot_vars, <span style="color: #9cdcfe;">pp</span> = pp)</div><br />
<div>pp.close()</div></div></div></div></div></div><br />
<br />
Some figures generated:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSXK1mLA38_29BM2rhLx5FphiOab3sSVIbnhlj7VzPvCQ3jNb7a-LDTpV8OFAPiCN_r9D84ISIpIcojhZGXh8c0z9uGl76d9d-z6R_JEfYF1I0qodSx7-gkB4r7CHt6zKKKjDFzsltbmk/s1600/Real+GDP+and+Capi.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="472" data-original-width="870" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSXK1mLA38_29BM2rhLx5FphiOab3sSVIbnhlj7VzPvCQ3jNb7a-LDTpV8OFAPiCN_r9D84ISIpIcojhZGXh8c0z9uGl76d9d-z6R_JEfYF1I0qodSx7-gkB4r7CHt6zKKKjDFzsltbmk/s1600/Real+GDP+and+Capi.png" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMP1gzAtCOzVqF_vrhlU2fOJ2XwZVXYK9I7cIKUP_I-PS75V9PLEtxRm3v6nAYRHEZ4TuID8L_cVzDT2KUCeqYmWajMDTIWIhpgcWti9Cm460vv0jv-e9KWBHprwOrsUnu8sao6c0D1_k/s1600/Real+GDP+and+Capital+Efficiency+Scatter.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="421" data-original-width="781" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMP1gzAtCOzVqF_vrhlU2fOJ2XwZVXYK9I7cIKUP_I-PS75V9PLEtxRm3v6nAYRHEZ4TuID8L_cVzDT2KUCeqYmWajMDTIWIhpgcWti9Cm460vv0jv-e9KWBHprwOrsUnu8sao6c0D1_k/s1600/Real+GDP+and+Capital+Efficiency+Scatter.png" /></a></div><br />
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1240730580083032584.post-60479774716981497662018-12-14T15:16:00.000-08:002018-12-14T22:34:33.715-08:00Creating a List of Prime Numbers with a Simple Generator FunctionIn working on curriculum for <i>Introduction to Computational Economics</i>, I like to imagine puzzles that I might have my students solve. One of these is to create a list of prime numbers. Usually I do this by using a couple of for-loops and some if statements. So today I thought, maybe I can do this with a generator. Well, it worked :)<br />
<br />
<blockquote class="tr_bq">
primes = [i for i in range(2,100) if True not in [i % j == 0 for j in range(2,i)]] </blockquote>
<div>
P.S. 0012 hrs CST: My wife pointed out that I need only test half of the numbers between 1 and i. The new code is faster :)<br />
<br />
<blockquote class="tr_bq">
primes = [i for i in range(2,100) if True not in [i % j == 0 for j in range(2,int(i / 2 + 1))]]</blockquote>
</div>
<div>
<br /></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1240730580083032584.post-51599761813362944772018-11-27T07:41:00.004-08:002018-11-27T07:47:02.658-08:00GitHub: Heuristic SugarscapeA model of Sugarscape with exchanging agents whose decisions are guided by heuristics can be found on <a href="https://github.com/jlcatonjr/Sugarscape-with-Heuristic-Agents-and-Exchange">Github</a>.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1240730580083032584.post-23802797437407832412018-11-10T22:32:00.001-08:002018-11-14T07:17:37.429-08:00Building a Contract in Solidity and Uploading it to a Test Blockchain<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
</div>
<div class="MsoNormalCxSpFirst" style="line-height: normal;">
In this lesson, we will
write a contract and execute it on a test blockchain. The <i>Ownable</i> contract uses solidity 0.4.8, which is not the current
version of solidity. For this reason we will debug the contract, replacing
deprecated terms and syntax.</div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
If you have not, you
will need to download <span class="MsoHyperlink"><a href="https://code.visualstudio.com/">Visual Studio Code</a></span> and install
Juan Blanco’s <span class="MsoHyperlink"><a href="https://marketplace.visualstudio.com/items?itemName=JuanBlanco.solidity">Solidity
compiler</a></span>. You will need to download and install Node.js. This will
allow you to download and install truffle with the command:<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">npm</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">install</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">truffle</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
You will also need to
download and install <span class="MsoHyperlink"><a href="https://truffleframework.com/ganache">Ganache</a></span>, which will
automatically set up the test blockchain.<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
To start, open
PowerShell to start a new project with Truffle. Navigate to your desired
directory and create a new folder with the <i style="mso-bidi-font-style: normal;">mkdir</i>
command.<span style="mso-spacerun: yes;"> </span>Since we will build the <i style="mso-bidi-font-style: normal;">Ownable </i>contract in this folder, name
the folder <i style="mso-bidi-font-style: normal;">ownable</i>:<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">mkdir</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">ownable</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">cd</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">ownable</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
Once you have navigated
to the new folder, create a new project using truffle:<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal; margin-left: .5in; mso-add-space: auto;">
<br /></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">truffle init</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
The console should
return the following text:<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">Compile:<span style="mso-spacerun: yes;"> </span></span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">truffle</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">compile</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">Migrate:<span style="mso-spacerun: yes;"> </span></span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">truffle</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">migrate</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d9d9d9; font-family: "consolas"; font-size: 10.5pt;">Test </span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">contracts: </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">truffle</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">test</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal; margin-left: .5in; mso-add-space: auto;">
<br /></div>
<div class="MsoNormalCxSpMiddle">
Now that you have initialized a project with
truffle, it is time to create a contract. We are going to copy a contract from
Chapter 7, page 148, of <i style="mso-bidi-font-style: normal;"><a href="https://www.amazon.com/Blockchain-Practical-Developing-Technology-Solutions/dp/1260115879?SubscriptionId=AKIAILSHYYTFIVPWUY6Q&tag=duckduckgo-d-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=1260115879">Blockchain: A PracticalGuide to Developing Business, Law, and Technology Solutions</a></i>.<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
Write the following code in a Visual Studio file
and save it as Ownable.sol under the contracts folder, created during the truffle
initialization of the ownable folder.<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #c586c0; font-family: "consolas"; font-size: 10.5pt;">pragma</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #569cd6; font-family: "consolas"; font-size: 10.5pt;">solidity</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> ^0.4.8;<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #6a9955; font-family: "consolas"; font-size: 10.5pt;">// module handling and transfer of contract ownership</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #569cd6; font-family: "consolas"; font-size: 10.5pt;">contract</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #4ec9b0; font-family: "consolas"; font-size: 10.5pt;">Ownable</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #4ec9b0; font-family: "consolas"; font-size: 10.5pt;">address</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #569cd6; font-family: "consolas"; font-size: 10.5pt;">public</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> owner;<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #569cd6; font-family: "consolas"; font-size: 10.5pt;">function</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #dcdcaa; font-family: "consolas"; font-size: 10.5pt;">Ownable</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">() {<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>owner = </span><span style="color: #569cd6; font-family: "consolas"; font-size: 10.5pt;">msg</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">.sender;<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #569cd6; font-family: "consolas"; font-size: 10.5pt;">modifier</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #dcdcaa; font-family: "consolas"; font-size: 10.5pt;">onlyOwner</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #c586c0; font-family: "consolas"; font-size: 10.5pt;">if</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">(</span><span style="color: #569cd6; font-family: "consolas"; font-size: 10.5pt;">msg</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">.sender != owner) </span><span style="color: #c586c0; font-family: "consolas"; font-size: 10.5pt;">revert</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">();<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>_;<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #569cd6; font-family: "consolas"; font-size: 10.5pt;">function</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #dcdcaa; font-family: "consolas"; font-size: 10.5pt;">transferOwnership</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">(</span><span style="color: #4ec9b0; font-family: "consolas"; font-size: 10.5pt;">address</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> _newOwner) </span><span style="color: #569cd6; font-family: "consolas"; font-size: 10.5pt;">external</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> onlyOwner {<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>owner = _newOwner;<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span></span><span style="color: #dcdcaa; font-family: "consolas"; font-size: 10.5pt;">TransferOwnership</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">(</span><span style="color: #569cd6; font-family: "consolas"; font-size: 10.5pt;">msg</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">.sender, _newOwner);<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #569cd6; font-family: "consolas"; font-size: 10.5pt;">event</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #4ec9b0; font-family: "consolas"; font-size: 10.5pt;">TransferOwnership</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">(</span><span style="color: #4ec9b0; font-family: "consolas"; font-size: 10.5pt;">address</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #569cd6; font-family: "consolas"; font-size: 10.5pt;">indexed</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> _from, </span><span style="color: #4ec9b0; font-family: "consolas"; font-size: 10.5pt;">address</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #569cd6; font-family: "consolas"; font-size: 10.5pt;">indexed</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> _to);<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">}<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
Now compile your code. You may use the short-cut <i style="mso-bidi-font-style: normal;">F5</i> for this. Make sure that you have
opened the file explorer. If not, you can use the command CTRL + SHIFT + E.
Upon compiling the code, you should see a list of errors, under the PROBLEMS
tab. We will solve these one at a time.<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<span style="mso-no-proof: yes;"><!--[if gte vml 1]><v:shapetype
id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t"
path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">
<v:stroke joinstyle="miter"/>
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0"/>
<v:f eqn="sum @0 1 0"/>
<v:f eqn="sum 0 0 @1"/>
<v:f eqn="prod @2 1 2"/>
<v:f eqn="prod @3 21600 pixelWidth"/>
<v:f eqn="prod @3 21600 pixelHeight"/>
<v:f eqn="sum @0 0 1"/>
<v:f eqn="prod @6 1 2"/>
<v:f eqn="prod @7 21600 pixelWidth"/>
<v:f eqn="sum @8 21600 0"/>
<v:f eqn="prod @7 21600 pixelHeight"/>
<v:f eqn="sum @10 21600 0"/>
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
<o:lock v:ext="edit" aspectratio="t"/>
</v:shapetype><v:shape id="Picture_x0020_1" o:spid="_x0000_i1029" type="#_x0000_t75"
style='width:468pt;height:96.3pt;visibility:visible;mso-wrap-style:square'>
<v:imagedata src="file:///C:/Users/JLCat/AppData/Local/Temp/msohtmlclip1/01/clip_image001.png"
o:title="" croptop="37791f" cropbottom="7879f" cropleft="11343f" cropright="-42f"/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--></span><o:p></o:p></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8B8ahZGeczorDSpckp781tryMdf7bMLwja_3xyWPG0mOhP8QUAhJdaABRFnX83CPz8cLfbNeIMbsGv6i142dRMKzxPy-7zZjUvtnxFwNrL7ezpeCEbys5GRwEQ_i2oDgfg3L9t1QRNio/s1600/Problems1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="336" data-original-width="1600" height="134" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8B8ahZGeczorDSpckp781tryMdf7bMLwja_3xyWPG0mOhP8QUAhJdaABRFnX83CPz8cLfbNeIMbsGv6i142dRMKzxPy-7zZjUvtnxFwNrL7ezpeCEbys5GRwEQ_i2oDgfg3L9t1QRNio/s640/Problems1.png" width="640" /></a></div>
<div class="MsoNormalCxSpMiddle">
<o:p><br /></o:p></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<b style="mso-bidi-font-weight: normal;">Debugging<o:p></o:p></b></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
The first error is not significant to the
execution of the program. To make it disappear, we can enter a command above
the first line:<i style="mso-bidi-font-style: normal;"><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt; line-height: 107%;"><o:p></o:p></span></i></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #6a9955; font-family: "consolas"; font-size: 10.5pt;">//solium-disable linebreak-style</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #595959; font-family: "consolas"; font-size: 10.5pt;">pragma solidity ^0.4.8;<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #595959; font-family: "consolas"; font-size: 10.5pt;">// module handling and
transfer of contract ownership<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #595959; font-family: "consolas"; font-size: 10.5pt;">...<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
The next two errors appear on line 6:<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<span style="mso-no-proof: yes;"><!--[if gte vml 1]><v:shape
id="Picture_x0020_7" o:spid="_x0000_i1028" type="#_x0000_t75" style='width:468pt;
height:45.3pt;visibility:visible;mso-wrap-style:square'>
<v:imagedata src="file:///C:/Users/JLCat/AppData/Local/Temp/msohtmlclip1/01/clip_image003.png"
o:title="" croptop="38133f" cropbottom="16617f" cropleft="2353f"/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--></span><o:p></o:p></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghGiupN-Cw1eDRASZUk-60DpUNSd5veOKG2ay7qG0QUDwc1wKgcehsRinH6huPDd5ctbxyyABkfUqJOOKbHh3frUkTHeqvj9AIpwY7C4Xn0S4HMUEbdbGCYfqjOte3qOsMKUAl_N1GuiY/s1600/problems2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="297" data-original-width="1600" height="118" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghGiupN-Cw1eDRASZUk-60DpUNSd5veOKG2ay7qG0QUDwc1wKgcehsRinH6huPDd5ctbxyyABkfUqJOOKbHh3frUkTHeqvj9AIpwY7C4Xn0S4HMUEbdbGCYfqjOte3qOsMKUAl_N1GuiY/s640/problems2.png" width="640" /></a></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<o:p><br /></o:p></div>
<div class="MsoNormalCxSpMiddle">
The first error indicates we should have specified
and access keyword like: public, private, internal or external. The second
error notes that <i style="mso-bidi-font-style: normal;">constructor()</i> should
be used to define a constructor for the class instead of <i style="mso-bidi-font-style: normal;">function Ownable()</i>. Edit the script to reflect this:<o:p></o:p></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #595959; font-family: "consolas"; font-size: 10.5pt;">contract Ownable {<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #595959; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>address public owner;<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #569cd6; font-family: "consolas"; font-size: 10.5pt;">constructor</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">() </span><span style="color: #569cd6; font-family: "consolas"; font-size: 10.5pt;">public</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #595959; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>owner =
msg.sender;<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #595959; font-family: "consolas"; font-size: 10.5pt;">...<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
We change <i style="mso-bidi-font-style: normal;">function
Ownable() </i>to <i style="mso-bidi-font-style: normal;">constructor()</i>. We
also add the term <i style="mso-bidi-font-style: normal;">public</i> after the
constructor. This allows the constructor to be called from both inside and outside
of the contract.<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle">
A comprehensive list of visibility keywords for
functions and state variables:<o:p></o:p></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 22.5pt; margin-right: 0in; margin-top: 0in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -.25in; vertical-align: baseline;">
<!--[if !supportLists]--><span lang="RO" style="color: #242729; font-family: "symbol"; font-size: 10.0pt;"><span style="mso-list: Ignore;">·<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]--><b><span lang="RO" style="border: none 1.0pt; color: #242729; font-family: inherit; font-size: 11.5pt; padding: 0in;">public</span></b><span lang="RO" style="color: #242729; font-family: inherit; font-size: 11.5pt;"> - all can access the referenced object<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 22.5pt; margin-right: 0in; margin-top: 0in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -.25in; vertical-align: baseline;">
<!--[if !supportLists]--><span lang="RO" style="color: #242729; font-family: "symbol"; font-size: 10.0pt;"><span style="mso-list: Ignore;">·<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]--><b><span lang="RO" style="border: none 1.0pt; color: #242729; font-family: inherit; font-size: 11.5pt; padding: 0in;">external</span></b><span lang="RO" style="color: #242729; font-family: inherit; font-size: 11.5pt;"> – The object cannot be accessed from outside
of the contract<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 22.5pt; margin-right: 0in; margin-top: 0in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -.25in; vertical-align: baseline;">
<!--[if !supportLists]--><span lang="RO" style="color: #242729; font-family: "symbol"; font-size: 10.0pt;"><span style="mso-list: Ignore;">·<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]--><b><span lang="RO" style="border: none 1.0pt; color: #242729; font-family: inherit; font-size: 11.5pt; padding: 0in;">internal</span></b><span lang="RO" style="color: #242729; font-family: inherit; font-size: 11.5pt;"> - only this contract and contracts deriving
from it can access the object<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: 22.5pt; margin-right: 0in; margin-top: 0in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -.25in; vertical-align: baseline;">
<!--[if !supportLists]--><span lang="RO" style="color: #242729; font-family: "symbol"; font-size: 10.0pt;"><span style="mso-list: Ignore;">·<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]--><b><span lang="RO" style="border: none 1.0pt; color: #242729; font-family: inherit; font-size: 11.5pt; padding: 0in;">private</span></b><span lang="RO" style="color: #242729; font-family: inherit; font-size: 11.5pt;"> – the object can only be accessed only from
this contract<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
After making the edits for the constructor, the
errors for line 6 have disappeared.<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<span style="mso-no-proof: yes;"><!--[if gte vml 1]><v:shape
id="Picture_x0020_4" o:spid="_x0000_i1027" type="#_x0000_t75" style='width:468pt;
height:43.8pt;visibility:visible;mso-wrap-style:square'>
<v:imagedata src="file:///C:/Users/JLCat/AppData/Local/Temp/msohtmlclip1/01/clip_image005.png"
o:title="" croptop="37940f" cropbottom="18559f" cropleft="11343f"/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--></span><o:p></o:p></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWZ0XEsxQOWXYoVWBBP61DpEm0f8jLFMcgWNa5-GCuA87M3mmHydUpcstlQR-QwrZTSXnvy05_ILryq5ihQncwWCeq9Neu59J_4UIql94O3RK8xmA-VzL5jZeNvGcCBw2b2yLjJYlpH6M/s1600/problems3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="331" data-original-width="1600" height="132" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWZ0XEsxQOWXYoVWBBP61DpEm0f8jLFMcgWNa5-GCuA87M3mmHydUpcstlQR-QwrZTSXnvy05_ILryq5ihQncwWCeq9Neu59J_4UIql94O3RK8xmA-VzL5jZeNvGcCBw2b2yLjJYlpH6M/s640/problems3.png" width="640" /></a></div>
<br />
<div class="MsoNormalCxSpMiddle">
<o:p><br /></o:p></div>
<div class="MsoNormalCxSpMiddle">
Next is an error concerning the calling of <i style="mso-bidi-font-style: normal;">revert()</i>. <span style="mso-spacerun: yes;"> </span>The error suggests that a string should be
passed into the revert function. We could pass one like this:<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #e7e6e6; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;">
</span></span><span style="color: #595959; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>modifier onlyOwner {<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #c586c0; font-family: "consolas"; font-size: 10.5pt;">if</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> (</span><span style="color: #569cd6; font-family: "consolas"; font-size: 10.5pt;">msg</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">.sender != owner) </span><span style="color: #c586c0; font-family: "consolas"; font-size: 10.5pt;">revert</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">(“Error: non-owner access
denied”);<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #595959; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>_;<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #595959; font-family: "consolas"; font-size: 10.5pt;">...<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
The error disappears, but when we upload the
contract to the blockchain, this will require more gas than if we do not pass a
string to <i style="mso-bidi-font-style: normal;">revert()</i>. For now, we can
leave this blank. The error will not affect anything.<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
To solve the next error, we need to call the event
on line 15 using the term <i style="mso-bidi-font-style: normal;">emit</i>. This
is required by more recent versions of solidity:<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #595959; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>function transferOwnership(address
_newOwner) external onlyOwner {<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #595959; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>owner = _newOwner;<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #c586c0; font-family: "consolas"; font-size: 10.5pt;">emit</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #dcdcaa; font-family: "consolas"; font-size: 10.5pt;">TransferOwnership</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">(</span><span style="color: #569cd6; font-family: "consolas"; font-size: 10.5pt;">msg</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">.sender, _newOwner);<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #595959; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #595959; font-family: "consolas"; font-size: 10.5pt;">...<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormal">
If you have followed the instructions to this point, there
should remain only the error concerning <i style="mso-bidi-font-style: normal;">require()</i><i style="mso-bidi-font-style: normal;"><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt; line-height: 107%;"> </span></i>from line 6. The contract is ready
to be executed. Before we do this, we will need to create a migration file for
the Ownable contract and modify the Truffle.js file to point to a private
blockchain.<o:p></o:p></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">Compile and Migrate<o:p></o:p></b></div>
<div class="MsoNormal">
In order to upload the contract, we need to first convert
the contract to a form that is readable in javascript. Then, this will be
converted to byte code which is uploaded to the blockchain.<o:p></o:p></div>
<div class="MsoNormal">
Using Visual Studio let’s create a javascript file
called<span style="mso-spacerun: yes;"> </span>2_ownable_migration.js , and save
it under the ownable/migrations folder.<o:p></o:p></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #569cd6; font-family: "consolas"; font-size: 10.5pt;">var</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">Ownable</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>= </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">artifacts</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">.</span><span style="color: #dcdcaa; font-family: "consolas"; font-size: 10.5pt;">require</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">(</span><span style="color: #ce9178; font-family: "consolas"; font-size: 10.5pt;">'./Ownable.sol'</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #4ec9b0; font-family: "consolas"; font-size: 10.5pt;">module</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">.</span><span style="color: #4ec9b0; font-family: "consolas"; font-size: 10.5pt;">exports</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> = </span><span style="color: #569cd6; font-family: "consolas"; font-size: 10.5pt;">function</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">(</span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">deployer</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">) {<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">deployer</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">.</span><span style="color: #dcdcaa; font-family: "consolas"; font-size: 10.5pt;">deploy</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">(</span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">Ownable</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">};<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
When the files are compiled using truffle, this script will
be used to upload to the blockchain the json file representing the compiled
contract.<o:p></o:p></div>
<div class="MsoNormal">
Next, edit the truffle.js file, located in the ownable folder.
This file identifies the network that will be used to locate the test
blockchain to which we will upload the contract. <a href="https://blog.theodo.fr/2018/01/deploy-first-ethereum-smart-contract-blockchain/">Replace this code</a>:<o:p></o:p></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #4ec9b0; font-family: "consolas"; font-size: 10.5pt;">module</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">.</span><span style="color: #4ec9b0; font-family: "consolas"; font-size: 10.5pt;">exports</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> = {<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #6a9955; font-family: "consolas"; font-size: 10.5pt;">// See
<http://truffleframework.com/docs/advanced/configuration></span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #6a9955; font-family: "consolas"; font-size: 10.5pt;">// to customize your
Truffle configuration!</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">};<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
With the following:<o:p></o:p><br />
<br /></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #4ec9b0; font-family: "consolas"; font-size: 10.5pt;">module</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">.</span><span style="color: #4ec9b0; font-family: "consolas"; font-size: 10.5pt;">exports</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> = {<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">networks:</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">development:</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">host:</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #ce9178; font-family: "consolas"; font-size: 10.5pt;">'localhost'</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">port:</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #b5cea8; font-family: "consolas"; font-size: 10.5pt;">7545</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">network_id:</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #ce9178; font-family: "consolas"; font-size: 10.5pt;">'*'</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">};<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
This points to the test blockchain on your local machine, that
is created when you launch Ganache.<o:p></o:p></div>
<div class="MsoNormal">
Now that everything is ready, make sure that you have
navigated in the PowerShell to the <i style="mso-bidi-font-style: normal;">ownable</i>
folder. Compile the contract using the commands:<o:p></o:p></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">truffle</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">compile<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
If you were successful, you should see the
following text:<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">Compiling</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> .\</span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">contracts</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">\</span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">Migrations</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">.</span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">sol</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">...<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">Compiling</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> .\</span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">contracts</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">\</span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">Ownable</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">.</span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">sol</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">...<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">Writing</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">artifacts</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">to</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> .\</span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">build</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">\</span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">contracts</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
Next, migrate the contracts to the blockchain.
First, we will need to open Ganache so that there is a blockchain with which we
can interact through truffle. When you launch Ganache, you will see the
accounts created for the test blockchain:<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle">
<span style="mso-no-proof: yes;"><!--[if gte vml 1]><v:shape
id="Picture_x0020_5" o:spid="_x0000_i1026" type="#_x0000_t75" style='width:468pt;
height:426.9pt;visibility:visible;mso-wrap-style:square'>
<v:imagedata src="file:///C:/Users/JLCat/AppData/Local/Temp/msohtmlclip1/01/clip_image007.png"
o:title="" cropbottom="1307f" cropleft="25164f" cropright="756f"/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--></span><o:p></o:p></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinpqQ270uUWe2hIcUPHueDuy8ioC-UzyiLo5qzTHxh9Q4qkr-TqjuJA387ID8JpIyVZhWAgCwyRzhyREigbutHDCSxfik_VU8awumVxJFbMF8Ay36ArYadys8uh-agkm7TchRcyPs6ch0/s1600/GanacheAccounts+%25282%2529.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1408" data-original-width="1600" height="563" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinpqQ270uUWe2hIcUPHueDuy8ioC-UzyiLo5qzTHxh9Q4qkr-TqjuJA387ID8JpIyVZhWAgCwyRzhyREigbutHDCSxfik_VU8awumVxJFbMF8Ay36ArYadys8uh-agkm7TchRcyPs6ch0/s640/GanacheAccounts+%25282%2529.png" width="640" /></a></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
Only the genesis block has been created. We will
now upload the contract to the test blockchain by using the command:<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">truffle</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">migrate<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
This will yield the following in the PowerShell<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">Using</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">network</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #ce9178; font-family: "consolas"; font-size: 10.5pt;">'development'</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">Running</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> migration: 1</span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">_initial_migration</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">.</span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">js</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">Deploying</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">Migrations</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">...<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>... </span><span style="color: #b5cea8; font-family: "consolas"; font-size: 10.5pt;">0x2bcc6f737e1244ee9be0db52bf59dd0e954b4c3c9ae2028b3f4479bd13d57cd6</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>Migrations: </span><span style="color: #b5cea8; font-family: "consolas"; font-size: 10.5pt;">0xe9ab13bb64959432cf38416759cc2e4c0db7d6be</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">Saving</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">successful</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">migration</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">to</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">network</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">...<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>... </span><span style="color: #b5cea8; font-family: "consolas"; font-size: 10.5pt;">0x661b37c2202a45457151ec65f23f15080f23238724c8d665db12df4bb67a6afc</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">Saving</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">artifacts</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">...<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">Running</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> migration: 2</span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">_ownable_migration</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">.</span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">js</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">Deploying</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">Ownable</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">...<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>... </span><span style="color: #b5cea8; font-family: "consolas"; font-size: 10.5pt;">0x6603eaf64060e817a202810c5b6f717f3492a2f5d07fcef221b2af45057f5773</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>Ownable: </span><span style="color: #b5cea8; font-family: "consolas"; font-size: 10.5pt;">0xcea93908c932064d61cd2dd1f72c974b190cc3ce</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">Saving</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">successful</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">migration</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">to</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">network</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">...<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>... </span><span style="color: #b5cea8; font-family: "consolas"; font-size: 10.5pt;">0x6bfd670baad0f28816e6d0df7f2b9cd40e64b32fa70d2e3da73c241edcb09f47</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">Saving</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">artifacts</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">...<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
This reflects that blocks have been added to the
genesis block. We also observe this in Ganache:<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_mc-kl1NfMvrKXfalb_XLedMYmWs8dPsheif8TD-ATVq_deK6W1GIC0F6-Chn5mRcNBbr7MohDlZGsSS_dSjylQHw2PaYsXXmqpsiEExDQiOb2cQhjX7UnkOQAt-6u12a-sIiSf8ra2Y/s1600/GanacheBlocks.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="745" data-original-width="1600" height="297" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_mc-kl1NfMvrKXfalb_XLedMYmWs8dPsheif8TD-ATVq_deK6W1GIC0F6-Chn5mRcNBbr7MohDlZGsSS_dSjylQHw2PaYsXXmqpsiEExDQiOb2cQhjX7UnkOQAt-6u12a-sIiSf8ra2Y/s640/GanacheBlocks.png" width="640" /></a></div>
<div class="MsoNormalCxSpMiddle">
<o:p><br /></o:p></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
<b style="mso-bidi-font-weight: normal;">Create an
Instance of the Contract<o:p></o:p></b></div>
<div class="MsoNormalCxSpMiddle">
Now we can call the truffle console. Since we have
already edited the truffle.js file, truffle will automatically connect to the
network housing the test blockchain. <o:p></o:p></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">truffle</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">console<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
If you have successfully connected the network
provided by Ganache, you should see the following:<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">truffle</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">(</span><span style="color: #dcdcaa; font-family: "consolas"; font-size: 10.5pt;">development</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">)><o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
To create an instance of the contract, we must
first create a variable using javascript commands. Enter the following lines
one by one into the truffle console:<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #569cd6; font-family: "consolas"; font-size: 10.5pt;">var</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">ownable</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">Ownable</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">.</span><span style="color: #dcdcaa; font-family: "consolas"; font-size: 10.5pt;">deployed</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">().</span><span style="color: #dcdcaa; font-family: "consolas"; font-size: 10.5pt;">then</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">(</span><span style="color: #569cd6; font-family: "consolas"; font-size: 10.5pt;">function</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">(</span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">instance</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">){</span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">ownable</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> = </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">instance</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">;})<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">ownable</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">.</span><span style="color: #dcdcaa; font-family: "consolas"; font-size: 10.5pt;">transferOwnership</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">(</span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">web3</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">.</span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">eth</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">.</span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">accounts</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">[</span><span style="color: #b5cea8; font-family: "consolas"; font-size: 10.5pt;">1</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">]);<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
The command <i style="mso-bidi-font-style: normal;">var
ownable;</i><i style="mso-bidi-font-style: normal;"><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt; line-height: 107%;"> </span></i>creates a new
object called <i style="mso-bidi-font-style: normal;">ownable</i>. The next line
defines this object as an instance of the contract that we created. <o:p></o:p></div>
<div class="MsoNormalCxSpMiddle">
After both commands the truffle console will
return the result ‘undefined’.<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
If you are familiar with programming already, you
will see that the contract is essentially a class. Finally we transfer
ownership of the contract from the account identified by index [0] to the
account identified by index[1].<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
The event is executed and logged, yielding the
following text in the console:<o:p></o:p></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">{ tx: </span><span style="color: #ce9178; font-family: "consolas"; font-size: 10.5pt;">'0x20a8fd775c5c26868b18b2b61c127e6acdbc02e509fb28783aa9594b9195c9bc'</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>receipt:<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>{ transactionHash: </span><span style="color: #ce9178; font-family: "consolas"; font-size: 10.5pt;">'0x20a8fd775c5c26868b18b2b61c127e6acdbc02e509fb28783aa9594b9195c9bc'</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>transactionIndex: </span><span style="color: #b5cea8; font-family: "consolas"; font-size: 10.5pt;">0</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>blockHash: </span><span style="color: #ce9178; font-family: "consolas"; font-size: 10.5pt;">'0xa433b974f3ea4ae87aa94229263f64b2b3947056d77ca7be6212a569a5d8cf27'</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>blockNumber: </span><span style="color: #b5cea8; font-family: "consolas"; font-size: 10.5pt;">5</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>gasUsed: </span><span style="color: #b5cea8; font-family: "consolas"; font-size: 10.5pt;">29986</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>cumulativeGasUsed: </span><span style="color: #b5cea8; font-family: "consolas"; font-size: 10.5pt;">29986</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>contractAddress: </span><span style="color: #569cd6; font-family: "consolas"; font-size: 10.5pt;">null</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>logs: [ [</span><span style="color: #4ec9b0; font-family: "consolas"; font-size: 10.5pt;">Object</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">] ],<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>status: </span><span style="color: #ce9178; font-family: "consolas"; font-size: 10.5pt;">'0x1'</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>logsBloom: </span><span style="color: #ce9178; font-family: "consolas"; font-size: 10.5pt;">'0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000400000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000800000000000004010002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000060000000000000000000000000000100000'</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> },<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>logs:<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span>[ { </span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">logIndex:</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #b5cea8; font-family: "consolas"; font-size: 10.5pt;">0</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">transactionIndex:</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #b5cea8; font-family: "consolas"; font-size: 10.5pt;">0</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">transactionHash:</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #ce9178; font-family: "consolas"; font-size: 10.5pt;">'0x20a8fd775c5c26868b18b2b61c127e6acdbc02e509fb28783aa9594b9195c9bc'</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">blockHash:</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #ce9178; font-family: "consolas"; font-size: 10.5pt;">'0xa433b974f3ea4ae87aa94229263f64b2b3947056d77ca7be6212a569a5d8cf27'</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">blockNumber:</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #b5cea8; font-family: "consolas"; font-size: 10.5pt;">5</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">address:</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #ce9178; font-family: "consolas"; font-size: 10.5pt;">'0xcea93908c932064d61cd2dd1f72c974b190cc3ce'</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">type:</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #ce9178; font-family: "consolas"; font-size: 10.5pt;">'mined'</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">event:</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> </span><span style="color: #ce9178; font-family: "consolas"; font-size: 10.5pt;">'TransferOwnership'</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">,<o:p></o:p></span></div>
<div class="MsoNormal" style="background: #1E1E1E; line-height: 14.25pt; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: #9cdcfe; font-family: "consolas"; font-size: 10.5pt;">args:</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;"> [</span><span style="color: #4ec9b0; font-family: "consolas"; font-size: 10.5pt;">Object</span><span style="color: #d4d4d4; font-family: "consolas"; font-size: 10.5pt;">] } ] }<o:p></o:p></span></div>
<div class="MsoNormalCxSpMiddle">
<br /></div>
<div class="MsoNormalCxSpMiddle">
Congratulations, you have successfully built and
executed your first contract!<o:p></o:p></div>
<br />
*Ingrid Caton shares credit for this postUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-1240730580083032584.post-84225944571348015142017-07-20T04:11:00.002-07:002017-07-20T04:11:59.000-07:00What is an Institution?Find out in my new post at the <a href="https://www.ndsu.edu/centers/pcpe/news/detail/29797/">NDSU Center for the Study of Public Choice Blog</a>.<br />
<div class="notranslate" id="kpm_content_wrapper">
</div>
Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-1240730580083032584.post-15275629972924538272017-02-21T21:14:00.000-08:002017-02-22T06:38:23.381-08:00The Emergence and Functions of Money 2.0To the lay observer, the existence of money appears to be a given, and this is if they even notice money’s peculiarity. Money is a good, but unlike other goods, its primary use is as a medium of exchange. In the pre-modern era, money was typically linked to a commodity, but in the modern financial system, this is no longer true – at least not for base money. So how does money become an object of its own, delinked from any use value? How does money arise at all?<br />
<br />
<div>
Given that humans preexisted money, there must have been a time where money did not exist. This is consistent with the framework that we have built over the last several weeks. Remember that analysis starts with agents. These agents have preferences that are revealed as they engage in exchange. Implicit in this exchange is the existence property rights. Every agent has opportunities to engage in entrepreneurial action. Our agent acts to attain profit. She imagines that she can transform the world from its present state into one that she prefers more greatly. She forms an expectation that she will use to frame and guide her action. The agent may prove successful and attain the profit or may break even or even incur a loss. In typical fashion, we can extend this concept to exchange. Two agents, both looking to improve the state of their existence, notice that each has a good desired by the other. It so happens that each wants the good that the other holds so they exchange the goods. Each has improved his or her lot, although we cannot be sure by how much exactly as there is no such thing as a cardinal utility measure – not even for a single agent. We must take agent action at face value and accept the action as a contextually constrained expression of the agent’s preference.<br />
<br />
Barter is easy to accommodate in the model when the agents lacks geography. Action, however, always occurs at a particular time and place. The agent interested in a trade, let’s call him agent A, must find another agent, agent B, who owns the object of desire and who is interested in trading it for something owned by agent A. Often, this double coincidence of wants fails to arise. The agent can continue looking for a single trading partner, or he can partition his work. Instead of finding only a single agent, he can find a good that is demanded by agent B and trade that intermediate good for the desired good. Over time, the agent might realize that there are one or several goods that most easily accommodate this indirect exchange. First several other agents notice this wise idea and begin to copy the innovation. A small number of goods come to be recognized as having value in exchange in addition to value in use. These goods are different forms of money.<br />
<br />
As we have seen, money does not arise by the plan of a single individual. It arises without intention. The goal of agent A was simply to find a good desired by agent B. There is no need for agent A to expect that other agents will adopt his strategy. His goal was simple. As the innovation is copied, the commodity becomes a network good. It gains value because other agents are willing to use it in indirect exchange, and therefore, charge prices in terms of the intermediate good. The good that becomes money comes to serve as a numeraire in which prices are denominated.<br />
<br />
What makes for a good money? History provides an answer. Societies have tended to select money that meets 5 criteria. Money must be<br />
<blockquote class="tr_bq">
1. durable<br />
2. easily divisible<br />
3. relatively scarce<br />
4. highly saleable<br />
5. portable.</blockquote>
<br />
These qualities promote the function of money. With these criteria more or less present, money can serve as:<br />
<blockquote class="tr_bq">
1. a medium of exchange<br />
2. a store of value<br />
3. a unit of account<br />
4. a standard of deferred payment.</blockquote>
Notice that the criteria for money relate to its functions. Saleability and portability allows money to function as a medium of exchange in the first place. What good is a money that is difficult to carry? Increased portability makes a money more easily saleable and more broadly acceptable. Durability and scarcity promote money’s function as a store of value. Divisibility is closely linked to money’s role as a unit of account. Prices, denominated in the unit of account, are more easily accommodated if money can be divided into homogeneous units. Given a common unit of account, agents can also lend money to one another. This allows an agent to attain a good that she otherwise could not afford or would be unable to borrow. Thus, money becomes a standard of deferred payment.<br />
<br />
The development of money represents an innovation in accounting. A common standard or standards of measure allow for an approximation of the socially determined value of a good. Since prices are denominated in a common unit of account, the value of different goods, as determined in light of the demand of consumers and cost of supply, can be compared objectively. These prices represent the quantity of money a good can fetch if it is sold on the market. This allows producers to compare costs and revenues so that they can be certain of the magnitudes of their gain or loss. <br />
<br />
These prices fluctuate according to changes in the quantity demanded at a given price (shifts in the demand curve) or as quantities available at given prices fluctuate (shift in the supply curve). They also change if either of these factors are expected to change. Thus, prices reflect not only present conditions but also expected changes in these factors. Since prices reflect information about agent valuations, they increase the accuracy with which agents can account for the value of their goods. This promotes an allocation of goods that reflect needs of all agents the preferences and budget constraints of those agents. With the addition of money, our model contains the building blocks requisite for economic calculation and widespread patterns of exchange.<br />
<br />
<b>Market regulation of the quantity of money</b></div>
<div>
<span style="text-align: center;"><br /></span></div>
<div>
<span style="text-align: center;">Just as money emerges from within a market dependent upon barter exchange, the quantity of money is also determined by market forces. Imagine that in some market, oats become the commonly accepted medium of exchange overnight. This change means that any person who buys or sells goods is willing to let money represent the other half of the exchange. A farmer who sells an apple use negotiates a price in terms of some weight of oats. He buys other goods using these same oats. </span></div>
<div>
<br />
Suppose that a community recognizes, overnight, that oats can now be used as money. Instantly demand for oats will increase as agents understand that oats can be exchanged for other goods. That is, oast not only have a <b>use value</b> – they can be eaten – but they also have an <b>exchange value</b> – they can be used to acquire other goods. The new price of oats, p<span style="font-size: xx-small;">1</span> (Figure 1) represent the combined use and exchange values. The original price, p<span style="font-size: xx-small;">0</span>, represent the use value of oats. The difference between these two (p<span style="font-size: xx-small;">0</span> – p<span style="font-size: xx-small;">1</span>), represent value derived from exchange. Note that if the supply curve was perfectly inelastic at q<span style="font-size: xx-small;">0</span>, that the exchange value would be reflected by price implied at the intersection of Q<span style="font-size: xx-small;">0</span> and D<span style="font-size: xx-small;">1</span>. For this example, the exchange value of oats in the short-run will be higher than the price reached in the long-run equilibrium.<br />
<br />
The higher price sustained by the use of oats as medium of exchange incentivize greater production of oats. If the price is pushed high enough, it can also incentivize the development of technology that reduces the cost of oat production. Something similar occurred at the end of the 19th century when a relatively high price of gold incentivized the development of cyanide extraction process. For oats, this may include the development of new irrigation techniques or systematic use and breeding of the most productive strains of oats, among other possibilities. If the technology successfully reduces the cost of producing a unit of oats, the cost of supply falls. We represent this by shifting the supply curve to the right (Figure 2). Suppose that oat farmers suffer a drought one year. What will happen to the price of oats? In the case of a drought, the cost of supply increases. The supply curve for oats will shift left and the value of oats will increase.</div>
<div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNmggGvkAeCngEc5oxtVgcUrxD4UM-agHQl1g9CUh1yZ7NRLspZPS8d7KZjESj5e7cmAfecrT5PlLMppoCb82VcaPhzEFu47_JlzPnwH2okURVqj3hyphenhyphenFajEB1Xf03sLtq2mQiaCbeKvac/s1600/Oat+Demand+Increase.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNmggGvkAeCngEc5oxtVgcUrxD4UM-agHQl1g9CUh1yZ7NRLspZPS8d7KZjESj5e7cmAfecrT5PlLMppoCb82VcaPhzEFu47_JlzPnwH2okURVqj3hyphenhyphenFajEB1Xf03sLtq2mQiaCbeKvac/s400/Oat+Demand+Increase.png" width="400" /></a></div>
<div style="text-align: center;">
<b>Figure 1</b></div>
<div style="text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRE9KSdA1msf8XB2kgHwk7ds0bthO8-U2XeoDr20KND2_c2Ae_bmnIIQVL4KvCbz4Mwi9IRNsEXTin1DBc-h0cJ7vXgrm0Tvt_W6HbeTvSEdLrwTAM0PPWBvJpXtEBh6yu4eDEPiJ3fQM/s1600/Oat+Supply+Increase.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRE9KSdA1msf8XB2kgHwk7ds0bthO8-U2XeoDr20KND2_c2Ae_bmnIIQVL4KvCbz4Mwi9IRNsEXTin1DBc-h0cJ7vXgrm0Tvt_W6HbeTvSEdLrwTAM0PPWBvJpXtEBh6yu4eDEPiJ3fQM/s400/Oat+Supply+Increase.png" width="400" /></a></div>
<div style="text-align: center;">
<b>Figure 2</b></div>
<div style="text-align: center;">
<br /></div>
<br />
<b>The price of money</b><br />
You may ask yourself, if oats are money, how do we determine their price. For any money, its price is what it exchanges for. If a quart of oats trades for 2 apples in equilibrium, then the price of a quart of oats is two apples. Likewise, if the same quart trades for 3 oranges, then the price of a quart of oats is also 3 oranges. Likewise, the price of an apple is 1/2 quart of oats and the price of an orange is 1/3 quart of oats. Money has an array of prices. Thus, the price of money is whatever it can exchange for. What we usually mean by the price of money, however, is the average price of money. This is often referred to as its purchasing power. Typically, we refer to the price level, which is the inverse of the purchasing power of money. A price index considers all exchanges for each type of good. Ideally, the price of each category of good sold is weighted according to the total number of goods exchanged. In reality, the basket of goods and weights of these goods change overtime, so there exists no perfect estimation of the price level and, by implication, the purchasing power of money.<br />
<br />
<br />
<br />
<a href="https://www.blogger.com/blogger.g?blogID=1240730580083032584#_ftnref1">[1]</a> Another term commonly used is the purchasing power of money.<br /><br />*Expanded from <a href="http://moneymarketsandmisperceptions.blogspot.com/2015/02/the-emergence-and-functions-of-money.html">The Emergence and Functions of Money</a><br />
<div>
<div id="ftn1">
</div>
</div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1240730580083032584.post-19272113946200300252017-02-21T07:09:00.000-08:002017-02-21T07:09:20.219-08:00Specialization and the Extended Order<div class="MsoNormal">
In earliest society, the number of
jobs that were available to men and women were limited. They were also strictly
allocated on the basis of gender. Goods were allocated amongst a community
according to one’s position in the hierarchy. As society grows larger, this
structure of cooperation is difficult to maintain. Groups tend to divide at
Dunbar’s number, which lies somewhere between 150 and 300 persons. When groups
split in two, there will likely remain contact and cooperation between the
groups, but as groups grow more numerous they become more difficult to manage.
The structure of society must become more sophisticated if many parts are to
form a coherent whole.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
In a world where resources are
scarce, humans must necessarily be value creating if they are to survive. At
its core, this value consists in the provision of goods that promote survival.
In pre-modern society, this may consist only of finding goods and shelter. As
society grows more complex, many agents are expected to acquire more skills and
means to augment their labor. One
person’s livelihood may depend on his Volkswagen van to deliver mail in rural
Nebraska. The van is a means to providing the income that maintains his life.
Others must develop specialized skills, a form of human capital, in order to
offer a service that generates income. Plumbers, lathe operators, auto
mechanics, programmers, and many other fall under this category. Blue collar
and white collar jobs typically fall within this domain.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Specialization requires the
development of technology and capital that embodies this technology. To move
from a society of hunter-gatherers to a society of farmers, the technology for
farming must be developed and spread. One cannot farm without knowledge of the seasons
and of planting. One must also have available means of protecting one’s crops
from hungry animal and thieves. All of this is technology that would otherwise
be unnecessary and relatively costly in a world where food is abundant. As
regions become more crowded, inhabitants face two options: move to regions with
fewer people or begin farming. Hunter-gathering groups cannot remain in these
areas. Herders are forced to the outskirts of this society as farmers develop
land for intensive cultivation. The movement from a life in transit to a
relatively sedentary existence enables the formation of a governing structure
that is also stable. This may not happen immediately, but it does not take
long. We will discuss this further in the next lecture.<o:p></o:p></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
<b>Specialization and Technological Development<o:p></o:p></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Specialization also
enables the development of technology and capital. Imagine two castaways
stranded one an island. We often use the story of Robinson Crusoe in this
manner. Crusoe, stranded on an island, must find the means to satisfy his
desire for food and shelter. He cannot work simultaneously to achieve both.
Thus, he must spend some portion of his time fishing or harvesting coconuts and
another portion to dedicated to building and maintain shelter. As long as
Robinson Crusoe is alone, it is difficult for him to develop means for either.
When Friday arrives on the island, he brings with him similar demand for food
and shelter. Yet, the economic problem becomes more complex and, therefore,
provides more possibilities. If Friday enjoys fishing, he can spend his time
gathering food in this manner while Robinson Crusoe concentrates his energies
on providing shelter. Perhaps Friday can catch enough fish for Robinson Crusoe
in 6 hours. If he likes, he can spend the rest of the day resting. However,
since Robinson Crusoe is working on the other side of the island, he may feel
an obligation to contribute to the team so as to leave everyone better off.
Suppose that Friday would like to be able to catch more fish in less time, so
he spends his free time trying to create a net. At first, this is a laborious
process as he lacks the knowledge for this, so he must spend time
experimenting. Perhaps Friday needs two months two develop a proper net. Once
he has discovered a successful strategy for building nets, he dedicate less time
to fishing. Further, the time taken to create a new net will be less as it will
not require the initial costs of discovery that Crusoe first faced. Now Crusoe
can spend his time searching for new food sources. Or if he would, he can work
with Robinson Crusoe to improve their shelter.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Once shelter is built,
Robinson Crusoe and Friday will need clothes to stay warm at night. If the
productive potential of both persons for each good is given, we can perform
some simple operations to understand how specialize improve outcomes in a world
of exchange. Imagine that, if Robinson Crusoe and Friday specialized, their
maximum production of either good is as follows.<o:p></o:p></div>
<div align="center">
<table border="0" cellpadding="0" cellspacing="4" class="MsoNormalTable" style="background: white; mso-cellspacing: 1.5pt; mso-yfti-tbllook: 1184;" summary="lfHendersonCEE2-024_table_011">
<tbody>
<tr>
<td colspan="3" style="padding: .75pt .75pt .75pt .75pt;">
<div align="center" class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<b><span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Table 1</span></b><span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">
<o:p></o:p></span></div>
<div align="center" class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Production Possibilities<o:p></o:p></span></div>
<div align="center" class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Frontier <o:p></o:p></span></div>
</td>
</tr>
<tr>
<td colspan="3" style="padding: .75pt .75pt .75pt .75pt;">
<div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">
<hr align="center" size="4" width="100%" />
</span></div>
</td>
</tr>
<tr>
<td style="padding: .75pt .75pt .75pt .75pt;"></td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">RC<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">F<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td colspan="3" style="padding: .75pt .75pt .75pt .75pt;">
<div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">
<hr align="center" size="4" width="100%" />
</span></div>
</td>
</tr>
<tr>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Clothing<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">20<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">20<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Fish<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">10<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">30<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td colspan="3" style="padding: .75pt .75pt .75pt .75pt;">
<div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">
<hr align="center" size="4" width="100%" />
</span></div>
</td>
</tr>
</tbody></table>
</div>
<div class="MsoNormal">
If both Robinson Crusoe and Friday
split their productive energies evenly between the two goods, they will produce
the following amounts.<o:p></o:p></div>
<div align="center">
<table border="0" cellpadding="0" cellspacing="4" class="MsoNormalTable" style="background: white; mso-cellspacing: 1.5pt; mso-yfti-tbllook: 1184;" summary="lfHendersonCEE2-024_table_012">
<tbody>
<tr>
<td colspan="3" style="padding: .75pt .75pt .75pt .75pt;">
<div align="center" class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<b><span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Table 2</span></b><span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">
<o:p></o:p></span></div>
<div align="center" class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Production absent<o:p></o:p></span></div>
<div align="center" class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";"> Specialization <o:p></o:p></span></div>
<div align="center" class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">and Trade <o:p></o:p></span></div>
</td>
</tr>
<tr>
<td colspan="3" style="padding: .75pt .75pt .75pt .75pt;">
<div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">
<hr align="center" size="4" width="100%" />
</span></div>
</td>
</tr>
<tr>
<td style="padding: .75pt .75pt .75pt .75pt;"></td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">RC<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">F<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td colspan="3" style="padding: .75pt .75pt .75pt .75pt;">
<div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">
<hr align="center" size="4" width="100%" />
</span></div>
</td>
</tr>
<tr>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Clothing<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">10<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">10<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Fish<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">5<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">15<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
This is not the most efficient
outcome. Robinson Crusoe must sacrifice 2 units of clothing for every fish he
catches, while Friday sacrifices 2/3 units of clothing for every 1 fish he
catches. Inversely, he sacrifices 1.5 fish for every 1 unit of clothing he
creates. If they were to specialize, they would produce as follows<o:p></o:p></div>
<div align="center">
<table border="0" cellpadding="0" cellspacing="4" class="MsoNormalTable" style="background: white; mso-cellspacing: 1.5pt; mso-yfti-tbllook: 1184;" summary="lfHendersonCEE2-024_table_013">
<tbody>
<tr>
<td colspan="3" style="padding: .75pt .75pt .75pt .75pt;">
<div align="center" class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<b><span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Table 3</span></b><span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">
<o:p></o:p></span></div>
<div align="center" class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Production<o:p></o:p></span></div>
<div align="center" class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">with Specialization <o:p></o:p></span></div>
<div align="center" class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">and Trade <o:p></o:p></span></div>
</td>
</tr>
<tr>
<td colspan="3" style="padding: .75pt .75pt .75pt .75pt;">
<div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">
<hr align="center" size="4" width="100%" />
</span></div>
</td>
</tr>
<tr>
<td style="padding: .75pt .75pt .75pt .75pt;"></td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">RC<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">F<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td colspan="3" style="padding: .75pt .75pt .75pt .75pt;">
<div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">
<hr align="center" size="4" width="100%" />
</span></div>
</td>
</tr>
<tr>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Clothing<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">20<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">0<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Fish<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">0<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">30<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Robinson Crusoe will be willing to
trade up to 2 pieces of clothing for 1 fish. Let’s assume that Friday is
willing to trade fish at a price of one piece of clothing, which he would
surely accept because the opportunity cost of producing one unit of clothing
himself is 1.5 fish. That represents a discount of 1/3 for Friday. In the final
allocation, Robinson Crusoe has 5 more fish than he could produce on his own.
Friday also has 5 more fish. As fish provide positive utility to both parties,
we observe a pure pareto improvement as a result of specialization and exchange.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div align="center">
<table border="0" cellpadding="0" cellspacing="4" class="MsoNormalTable" style="background: white; mso-cellspacing: 1.5pt; mso-yfti-tbllook: 1184;" summary="lfHendersonCEE2-024_table_014">
<tbody>
<tr>
<td colspan="3" style="padding: .75pt .75pt .75pt .75pt;">
<div align="center" class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<b><span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Table 4</span></b><span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">
<o:p></o:p></span></div>
<div align="center" class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Final Quantities<o:p></o:p></span></div>
<div align="center" class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">with Specialization <o:p></o:p></span></div>
<div align="center" class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">and Trade <o:p></o:p></span></div>
</td>
</tr>
<tr>
<td colspan="3" style="padding: .75pt .75pt .75pt .75pt;">
<div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">
<hr align="center" size="4" width="100%" />
</span></div>
</td>
</tr>
<tr>
<td style="padding: .75pt .75pt .75pt .75pt;"></td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">RC<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">F<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td colspan="3" style="padding: .75pt .75pt .75pt .75pt;">
<div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">
<hr align="center" size="4" width="100%" />
</span></div>
</td>
</tr>
<tr>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Clothing<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">10<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">10<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Fish<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">10<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">20<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
If both Robinson Crusoe
and Friday develop technology to improve their efficiency, we may see their
production possibilities frontier shift out. We could perform the same exercise
and see that, assuming that specialization enables the development of
technology, the situation of both parties will continue to improve so long as
technological advancement is possible.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div align="center">
<table border="0" cellpadding="0" cellspacing="4" class="MsoNormalTable" style="background: white; mso-cellspacing: 1.5pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td colspan="3" style="padding: .75pt .75pt .75pt .75pt;">
<div align="center" class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<b><span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Table 5</span></b><span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">
<o:p></o:p></span></div>
<div align="center" class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">New Technology Shifts<o:p></o:p></span></div>
<div align="center" class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Production Possibilities<o:p></o:p></span></div>
<div align="center" class="MsoNormal" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Frontier <o:p></o:p></span></div>
</td>
</tr>
<tr>
<td colspan="3" style="padding: .75pt .75pt .75pt .75pt;">
<div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">
<hr align="center" size="4" width="100%" />
</span></div>
</td>
</tr>
<tr>
<td style="padding: .75pt .75pt .75pt .75pt;"></td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">RC<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">F<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td colspan="3" style="padding: .75pt .75pt .75pt .75pt;">
<div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-align: center;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">
<hr align="center" size="4" width="100%" />
</span></div>
</td>
</tr>
<tr>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Clothing<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">40<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">20<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Fish<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">10<o:p></o:p></span></div>
</td>
<td style="padding: .75pt .75pt .75pt .75pt;">
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">50<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
One change enables another. The
development of a more cost efficient form of production can support larger
populations and more complex societies. Before this change, it may be difficult
for metallurgists to survive. To the extent that one can develop and maintain a
social position for oneself with a specialization such as this, he can maintain
his well-being through production and exchange. Likewise, this change in
society opens the opportunity for carpenters who have specialized knowledge of
constructing and repairing buildings. Underlying this change is the fundamental
principle we identified early on: humans act to improve the state of the world
as they perceive it. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Decision to action occurs in light
of the costs and benefits that such action is expected to generate. Humans
rarely imagine radical change. Even that thought be radical is usually marginal
in light of the present state. Thomas Edison’s discovery of the light bulb,
while unexpected by many, required a combination of elements that were readily
available to him. This innovation required a search through the vast space of
possibility that exists at the fringes of existence. Once found it may enable
and encourage many other innovations that were not previously possible. The
development of the light bulb, for example, made valuable the provision of
electricity in cities. This further provision opened up many opportunities as
it allowed for technical development and specialization that would have
otherwise been impossible.<o:p></o:p></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
<b>Comparative Advantage and Opportunity Cost<o:p></o:p></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
So far, we have been thinking of
action solely in terms of the exploitation and creation of profit
opportunities. If we also integrate the notion of the opportunity cost that
inherently exists as a result of living in a world of scarcity, we add another
dimension to specialization. Ricardo first spoke of this dimension as
comparative advantage. Consider the job of Stephen Curry who plays for the
Golden State Warriors. Stephen Curry is a phenomenal leader and basketball
player. He seems to make best use of his talents playing for the Golden State
Warriors. Curry is not just a talented player, his presence is a unifying force
that has helped move the team to win a championship and a heartbreaking miss
last season. The opportunity cost of Curry’s participation with the Golden
State Warriors is likely participation with another team. The value he creates
for the Golden State Warriors is substantial enough that the team has retained
him since his entrance in 2009. Although Curry would likely be valuable for any
team on which he plays, he has a comparative advantage playing for the Golden
State Warriors.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
This becomes more obvious if Curry
were to change his occupation altogether. Curry may be a fantastic manager.
When he graduated from college, he could have entered a field that allowed him
to exploit his leadership ability through management. Even if Curry was one of
the best managers, it would be difficult for him to surpass his current pay and
other benefits he receives playing for the Warriors. This is to say that Curry
may have an absolute advantage in comparison to others both in his management
ability and his ability on the basketball court. Market prices, however, inform
Curry that the most valuable use of his skills will leave him playing for the
Warriors, even if he had an absolute advantage as a manager and as a basketball
player, he has a comparative advantage in playing basketball. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Comparative advantage allows us to
explore areas that may, at first glance, seem to be a source of waste or
laziness. Bill Gates, who is estimated to be the world’s wealthiest person in
2017, generates a tremendous amount of value with his time. It makes little
sense for Bill Gates to spend time preparing meals or cleaning his own home.
Every moment he spends engaged in this activity, he could be dedicating to
create more value elsewhere. Cleaning and cooking is especially costly for Bill
Gates. He is better served by purchasing cleaning and cooking services than by
performing these tasks himself. He may choose to do this simply out of
enjoyment of the activity or belief in the personal enrichment from such
activity. In terms of value as measured by money prices, he is incurring great
cost if he chooses to do so.<o:p></o:p></div>
<br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Development of specialization that
arises due to comparative advantage plays a significant role in the provision
of knowledge in society. Specialization itself allow individuals to develop
knowledge of a particular category of activity. Gold refining processes could
not be developed unless individuals were allowed to spend their time and
creative energies developing them. The same can be said of computer processors,
means of transportation, mass production, and so forth. The development of
cost-reducing technology that allowed much farmland to be tended by far fewer people
has allowed individuals to invest their labor in other ventures. It is no
coincidence that, within a century of this shift, we live in a world that is
dominated by technology. The pace of change appears only to increase as freedom
to develop technology and organization also increases.<br /><br />(Table structure borrowed from <a href="http://www.econlib.org/library/Enc/ComparativeAdvantage.html">Don Boudreaux's article on comparative advantage.</a>)</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1240730580083032584.post-92203808636750951062017-02-10T04:50:00.003-08:002017-02-10T14:17:16.767-08:00Entrepreneurship: language, knowledge, and networksA task of human action and organization is to reduce uncertainty to risk, an event whose outcome that can be predicted probabilistically, and to adapt in the face of uncertainty that is irreducible (Knight 1921). All action entails uncertainty. One does not know what will happen tomorrow. If we lived in a world where developments were perfectly predictable, coordination would be a simple task. Not only can we not be certain whether or not we will meet the fate of the dinosaurs in five years’ time, we cannot even be certain of the actions that other people will take. We cannot look into their minds. We can only develop relationships and communities that help reduce this uncertainty. The task of the entrepreneur is especially complex for this reason. He must successfully navigate an environment where consumer preferences are changing and where cooperation is not guaranteed.<br />
<br />
Successful entrepreneurship is a task of sensing. This requires two key components: a model that coherently identifies and predicts the environment and accurate information that is to be processed by the model. We gave some examples of this in the previous post. Models used by successful entrepreneurs are likely difficult to explicitly identify. Some combination of intuition and explicit beliefs feed into entrepreneurial decision-making. While we cannot identify a particular model that makes an entrepreneur successful, we can consider some components that lead to coordination which the entrepreneur must learn to navigate if he is to be successful.<br />
<br />
We have seen that prices lead to coordination, but this is only the case if non-price information can be integrated into prices. There is a variety of information to be integrated. Changes in physical conditions are primary. The emergence of a new form of capital provides opportunities for use. Changes in climate must be predicted if farmers are to make decisions that cohere to the environment and, thereby, maintain substantial yields. A more difficult task is navigating the social environment of other actors who themselves are guided by models and information that the entrepreneur knows only in part.<br />
<br />
Humans are social animals. It should not be surprising that we must spend a tremendous amount of energy to reduce uncertainty within this domain. If an entrepreneur is to engage in a venture, he must feel confident in his trust of his business partners. Building trust between partners is a matter of ingraining patterns of action sufficiently that all action evidences a level of mutual concern sufficient for the end toward which cooperation is aimed. The greater the volume of interaction and the number of ways in which one interacts with another, the greater the need for mutual trust. Action that can be interpreted as a violation of trust makes future cooperation less attractive for the observing partner. Maintaining trust is a complex task that requires continual evidence of commitment to the well-being of the other and a lack of evidence to the contrary.<br />
<br />
<a href="https://s-media-cache-ak0.pinimg.com/originals/39/c4/08/39c4086a6a91fed2b203167eaadc6505.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="230" src="https://s-media-cache-ak0.pinimg.com/originals/39/c4/08/39c4086a6a91fed2b203167eaadc6505.jpg" style="cursor: move;" width="400" /></a>The primary way in which human agents maintain commitment is through the practice of a complex array of overlapping games whose meanings reinforce one another. These are institutions, but this term is not fully descriptive in that there are a multitude of these and that every social milieu includes its own unique mix of overlapping patterns: these are language games, which I will refer to as social games when appropriate or, simply, games (<a href="https://www.amazon.com/Philosophical-Investigations-3rd-Ludwig-Wittgenstein/dp/0024288101">Wittgenstein 1953</a>). The game of largest extent is the game of market exchange (<a href="https://www.amazon.com/Wittgenstein-Rules-Institutions-Bloor-Paperback/dp/B011DASO3K/ref=sr_1_1?s=books&ie=UTF8&qid=1486764975&sr=1-1&keywords=bloor+institutions">Bloor 1995</a>; <a href="https://www.amazon.com/Big-Players-Economic-Theory-Expectations/dp/0333678265/ref=sr_1_1?s=books&ie=UTF8&qid=1486764998&sr=1-1&keywords=big+players+koppl">Koppl 2002</a>). In the basic form of the game of market exchange, agents own property and themselves and are able to exchange that property and services rendered by it for other goods. If existing barriers to competition are relatively small or non-existent, prices of like goods will tend to converge to the same value when controlled for transaction costs, which include costs derived from distance, search, administration, and the like. <br />
<br />
As has become especially obvious to those who purchase goods online, the game of exchange spans groups and larger collectives. Persons from an Amish community in Pennsylvania are able to purchase materials from India, even though the internal functioning of the group is not oriented toward market exchange. Groups that may seem impervious to markets inevitably participate in them. Inclusion in the market is welfare improving even for these groups. When the risk of fraud is low, the game of exchange leads other players in it to promote the well-being of other players in the game. The larger the extent of the market, the more benefits consumers receive. Cost reducing division of labor and improvements in product quality are promoted by the increase in the number of players, and therefore, competition and the reduction of the cost of specialization.<br />
<br />
There are many other games that occur within and between groups who play the game of exchange. The meanings embedded in sets of overlapping games reinforce the place of each actor and normative beliefs held in the group and play a significant role in interpretation of action. Whether the group hierarchy is rigid or fluid, of great power distance or small, relatively oppressive or less so, meanings implied by games reinforce that hierarchy as it exists. These games themselves tend to be adaptive to needs in the group and drives of its members. If some group participating in a game larger than its membership find that they are oppressed by another group, discontent expressed through action may lead to a reduction of the weight placed on it by the more powerful group. In politics, the latter group is thought of as the ruling class (<a href="https://www.amazon.com/Ruling-Class-Scholars-Choice/dp/1297032438/ref=pd_sbs_14_img_0?_encoding=UTF8&psc=1&refRID=97286Y8T9D6QH9YRXYRB">Mosca 1939</a>). Such implicit agreements arise in the course of gift exchange and other symbolic interactions in many early societies (<a href="https://www.amazon.com/Logic-Practice-Pierre-Bourdieu-al/dp/0804720118/ref=sr_1_1?s=books&ie=UTF8&qid=1486729968&sr=1-1&keywords=bourdieu+logic+of+practice">Bordieu 1980</a>). While they may alleviate the burden of the underclass, they also reinforce the existing hierarchy. Not all games are embedded in systems of oppression. In fact, it is difficult to identify a system as purely oppressive or something else, especially if there is no obvious path to improvement for all. Sometimes, societies will be stuck in suboptimal equilibrium, much as most of human society was stuck before the industrial revolution and dramatic political change that surrounded it.<br />
<br />
Social games tend to be confined to networks of individuals who are part of the in-group. Consider students from secondary school. They all play the same game concerning the schools schedule. They obey the bells and their meanings. Failure to obey may create problems for the students as rules require the students to show up at certain places at certain times. Inside of this larger game, many other games are played. Students form groups whose meanings tend to be contained in the group. One group may occupy a table at lunch and tend to follow a rule that all remain seated there during lunch. A member who fails to adhere to this rule may receive strange looks. Other groups may prefer to stand and do not demand continual presence. Those in the group may feel secure with some minimum threshold of participation from others that is not quite as burdensome. Groups may feud between one another within a school and yet, members from these groups may all come together in larger events like sports games and musical competitions where they face other schools. Most students successfully navigate these interwoven games. Schools with students who are adept at this and therefore able to cooperate at larger scales are more likely to excel in these bigger competitions. We would also expect that schools where groups tend to hold less animosity between one another will also excel as the population forms a more coherent whole.<br />
<br />
Coordination through games does not happen automatically. Humans are often predisposed by their passions to animosity toward those who are not within their own group. Entrepreneurs help bring together groups such that plans of members more coherently overlap. Successful social entrepreneurs are able to work between groups, filling structure holes (<a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.652.5296&rep=rep1&type=pdf">Burt 2000</a>). The holes represent network structure where two agent or groups of agents are otherwise distinct from one another. There is no member in one group who shares membership with the other. Due in part to their congeniality toward both groups and their ability to speak the language of both groups, social entrepreneurs who fill structural holes are able to realize profit opportunities that are otherwise unavailable. Not only must such a person speak the language of both groups, but he must do so in a manner that, in the least, implies no ill will or deception toward his partners. A failure to do so will likely limit the success of the entrepreneur as well developed groups are especially sensitive to potential for fraud. In the ideal case, his actions reinforce the meanings of both groups to the extent that it is possible, though this becomes an increasingly difficult as the magnitude of animosity increases between groups. This may be why early merchants were held in disdain.<br />
<br />
Entrepreneurs who are successful at navigating these games are able to foster a world that they would prefer to live in. The better their ability to navigate the social milieu, the more they can reduce costs of organization and find access to resources that are otherwise unavailable. Following Foss and Klein (<a href="https://www.amazon.com/Organizing-Entrepreneurial-Judgment-Approach-Firm/dp/0521697263">2012</a>), entrepreneurship exists as agency that controls some set of resources, using the available bundle to exploit profit opportunities and create new ones in the process. Navigation of social context potentiates profit opportunities. Thus we may look to firm operation to better understand the role of language and communication in entrepreneurship. <br />
<br />
Efficiency increases lie in wait within firms whose divisions lack knowledge of one another. Language common to the firm must facilitate the transmission of information within it. Channels must exist between the parts of the firm in order to minimize information costs. Kenneth Arrow (<a href="https://www.amazon.com/Limits-Organization-Lectures-Public-Analysis/dp/0393093239">1974</a>) observes,<br />
<blockquote class="tr_bq">
An organization can acquire more information than any one individual, for it can have each member performing different experiments. Thus, the limitations on an individual’s capacity are overcome. But as always there is a price to be paid . . . The information has to be coordinated if it is to be of any use to the organization. (52, 53)</blockquote>
He continues in regard to coordination of diverse knowledge within a firm,<br />
<blockquote class="tr_bq">
. . . we have seen that the organization’s gains from increasing scale are derived by having its members make different experiments, that is, by specialization. As we have seen in the last chapter’s discussion of the economics of information for the individual, this means the members will be accumulating differing types of skills in information processing, learning (acquiring [human] capital), in the areas in which they are specializing and unlearning elsewhere. As a result, communication among them becomes more difficult (as academic specialists are learning), and the codes used in their intercommunications have to become more complex. (55)</blockquote>
The development of unique language within a group promotes specialization while increasing the cost of integration of this dispersed knowledge. Nonaka (<a href="http://km.camt.cmu.ac.th/mskm/952701/Extra%20materials/Nonaka%201998.pdf">1994</a>) observes that creations of redundancies within a firm can facilitate the sharing of knowledge between divisions.<br />
<blockquote class="tr_bq">
Rotation helps members of an organization understand the business from a multiplicity of perspectives. This makes organizational knowledge more fluid and easier to put into practice. Wide access to company information also helps build redundancy. When information differential exist, members of an organization can no longer interact on equal terms, which hinders the search for different interpretation of knowledge (29). [emphasis mine]</blockquote>
Perhaps ironically, the increased flow of knowledge and potential for creativity, while being welfare promoting, also increases uncertainty as new possibilities for the course and ends of production arise at a faster rate.<br />
<blockquote class="tr_bq">
Creative chaos is generated naturally when the organization faces a real ‘crisis’ such as rapid decline of performance due to changes in technologies or market needs, or the realization of a significant competitive advantage on the part of a rival firm. It can also be generated intentionally when leaders of an organization try to evoke a ‘sense of crisis’ among organizational members by proposing challenging goals (28).</blockquote>
So long as redundancies in knowledge exist, members understand how their work affects one another creating plans that tend to dovetail. This requires a “deep, mutual trust between members of the organization” so that “the organization can control its knowledge creation (28-29).”<br />
<br />
From our discussion, we can observe some traditional aspects of the entrepreneur. In a context with given knowledge, it is the job of the entrepreneur to reduce inefficiencies. This promotes the equilibrium result of traditional supply and demand analysis (<a href="https://mises.org/sites/default/files/Market%20Theory%20and%20the%20Price%20System_2.pdf">Kirzner 1963</a>). Not wholly unrelated, the entrepreneur brings new innovations to market. These represent an expansion of knowledge that we often refer to as technology in economics. Joseph Schumpeter (<a href="https://www.amazon.com/Capitalism-Socialism-Democracy-Joseph-Schumpeter/dp/0061561614">1942</a>) referred to such innovation as “creative destruction”, noting its short-run disequilibrating effects. As Kirzner (<a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.486.2875&rep=rep1&type=pdf">1999</a>) points out, what this entrepreneur has actually done is bring about a new equilibrium that is reached in the process of market competition for profits generated by the innovation. Finally we observe political entrepreneurship. While this sort of entrepreneurship can tend to be unproductive or destructive, especially in regard to state politics (<a href="http://www.colorado.edu/ibs/es/alston/econ4504/readings/Baumol%201990.pdf">Baumol 1990</a>), within a firm a transformation of political orientation may be required to increase efficiencies. Changes may naturally arise when a firm is in crisis, though successful handling is never guaranteed. This certainly would be the case for implementation of the sorts of knowledge sharing management policies that Nonaka observes and suggests (1994, 28).Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1240730580083032584.post-69656637409715317362017-02-08T09:45:00.001-08:002017-02-23T06:41:52.800-08:00Entrepreneurship: rationality and human actionWithin the context of the market, entrepreneurship consists in seeking monetary profit. In the broader context, entrepreneurship consists of seeking psychic profit. As we define action as consisting of an agent’s attempt to influence the future toward a state of the world he prefers. In acting humans attempt to mold the world to their liking. Action is inherently entrepreneurial. <br />
<br />
Every actor is not equally skillful. Some are better than others at generating end states that they prefer. It is these men and women that we tend to think of as entrepreneurs. We often use the word leader in our society. Those of great fame tend to include market entrepreneurs and CEOs and politicians. Market entrepreneurs earn profit by organizing the production and sale of goods and services. These are positive sum transaction for all involved so long as no negative externalities are generated from their activity. Market entrepreneurship is inherently value creating when markets are subject to rule of law. Political entrepreneurship creates value for those players involved, but often generate negative externalities. Political systems that employ the use of force – i.e., the state – tend to engage in zero sum transactions. Revenue in politics arises from transfers that are enabled by the use of force. We call these taxes. If you fail to pay taxes, the political system will continue to inflict pain upon you in the form of imprisonment and further fines.<br />
<br />
You may be surprised to learn that some market entrepreneurs have spearheaded one of the most successful genres of literature: the self-help book. Writers like Zig Ziglar and Dale Carnegie did not begin their career as professional writers and speakers. They learned the art of social organization by working in sales and rising through the ranks of their respective companies. Dale Carnegie went on to write the now famous <a href="https://www.amazon.ca/How-Win-Friends-Influence-People/dp/0671027034"><i>How to Win Friends and Influence People</i></a> and Zig Ziglar left behind a legacy having written books like <i><a href="https://www.amazon.ca/See-You-Top-Zig-Ziglar/dp/1565547063/ref=sr_1_1?s=books&ie=UTF8&qid=1486574963&sr=1-1&keywords=ziglar+see+you+at+the+top">See You at the Top</a> </i>and <i><a href="https://www.amazon.ca/Selling-101-Every-Successful-Professional/dp/0785264817/ref=sr_1_1?s=books&ie=UTF8&qid=1486574992&sr=1-1&keywords=ziglar+selling+101">Selling 101</a></i>. One author, Og Mandino, overcame great hardship and poor lifestyle. He had at one point in his sales career suffered from alcoholism and even considered suicide. But he became transformed from the reading of self-help books, development in his own faith, and the transformation of his mind. Og Mandino’s <a href="https://www.amazon.ca/Choice-Surprising-New-Message-Hope/dp/0553245767/ref=sr_1_1?s=books&ie=UTF8&qid=1486575019&sr=1-1&keywords=og+mandino+the+choice"><i>The Choice </i></a>tells the story of a man who, supported by his family, chooses to be an author and abandon a successful career. He faces much hardship along the way, but persists to follow his desire. He eventually succeeds. <br />
<br />
All of these works are permeated with optimism. They represent a different way of seeing the world. One does not simply live to survive. These authors believe that men and women are themselves authors of their own lives. They believe that humans embody a design suited for prosperity. These men evidence an instance of rationality that breeds success in the realization of one’s ends. <br />
<br />
<b>Defining rationality </b><br />
When we speak of rationality, we mean that there is a logic that governs action. Rationality is lately a term of abuse. Some use the term to refer to action that they prefer. Irrational action, on the other hand, is action that one does not understand or simply disagree with. This framing is incorrect. <br />
<br />
Rationality requires three things. Logical structure (a model), data, and ends. We will refer to the logical structure as a model or map. Science, for example, provides us models, but no end toward which these models should be used. When we speak of a positive science, such as economics, we mean to say that we are attempting to model the social world in an objective manner. It is possible, and often is the case, that the model guiding one’s decisions and actions is skewed by the ends of the actor. We often see this in the development of ideologies and other beliefs that arise as a convenient explanation of an individual or groups belief. Consider the recent outcry against executive action by the American left, which was largely silent when president Barack Obama employed the same means to implement policy. <br />
<br />
In your day to day life, rationality need not be especially abstract. Your model of your mother or your brother does not need to be generalized to anyone else. If you do generalize, you more than likely are not conscious of such generalization. If you meet a man Robert and come to find that he reminds you of your brother, you probably do not identify that, in fact, you borrow a bit from the model of your brother in your interaction with him. In psychology, we see a reference to this with Jungian archetypes. (It is no coincidence that Jung was in the Viennese milieu. He used a form of categorical analysis that, while particular to his system, shares general features with that of Ludwig von Mises.) You need not treat these as ineffable, but as a child it is reasonable to think that you see the world in only two categories: mother and not mother. As you observe more data through experience, this model of the social world expands. You come to understand that you have a father and likely derive further social concepts from these to early archetypes. Those do not handle you with the love of the mother or the tenderness of the father are placed in a category of people who are not appreciated by you. You cry at their touch or voice. <br />
<br />
It would hardly be accurate to see the wincing of a baby at the hands of an unknown woman as irrational. Given her model of the world, which is literally infantile, the baby acts rationally. As with all human action, the baby acts with the end of feeling comfort and to remove felt uneasiness. The baby’s response is to avoid something whose outcome she believes to be not beneficial to her. The baby responds to data that does not fit into the category of mother or father. The unfamiliar is regarded with discomfort and even fear. <br />
<br />
<b>Artificial intelligence and rationality </b><br />
Self-help authors suggest a change in the perception of the reader is necessary. Dale Carnegie (<a href="https://www.amazon.ca/How-Win-Friends-Influence-People/dp/0671027034">1937</a>) divides his book into four sections: “Fundamental Techniques of Handling People”, “Ways to Make People Like You”, “How to Win People to Your Way of Thinking”, and “How to Change People Without Giving Offense”. In each of these sections, there is embedded a belief that one can change the pattern of his or her actions. Robert Kiyosaki, author of <a href="https://www.amazon.ca/Rich-Dad-Poor-Teach-Middle/dp/1612680003/ref=sr_1_1?s=books&ie=UTF8&qid=1486575121&sr=1-1&keywords=rich+dad+poor+dad"><i>Rich Dad, Poor Dad</i></a>, presents to ways of viewing and interacting with the world which are personified by the two fathers in his story. These authors and others like them understand that personal transformation lies in a change in perspective. It requires a change in mindset, the interface through which one interacts with the world. Interaction with the world requires understanding of it (<a href="https://www.amazon.ca/Mindset-Psychology-Carol-S-Dweck-ebook/dp/B000FCKPHG/ref=sr_1_1?s=books&ie=UTF8&qid=1486575154&sr=1-1&keywords=dweck++mindset">Dweck 2006</a>; <a href="https://www.amazon.ca/Sciences-Artificial-Herbert-Simon/dp/0262691914/ref=sr_1_1?s=books&ie=UTF8&qid=1486575214&sr=1-1&keywords=herbert+simon+sciences+of+the+artificial">Simon 1996</a>). <br />
<br />
Most people do not appreciate that they do not interact directly with reality. The Viennese scholars in the late 18th and early 19th century referred to this as verstehen: interpretation. Scientists seek to create an objective model of the world (<a href="https://mises.org/sites/default/files/Individualism%20and%20Economic%20Order_4.pdf">Hayek 1943</a>; <a href="https://www.jstor.org/stable/685677">Hayek 1955</a>). Scientific knowledge abstracts away from unnecessary features and observe only those elements that we believe to be impinge on the phenomena being studied. Human understanding is the knowledge of the acting agent, whether scientific or lay. Action is guided by the logic of one’s model of the world (<a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.370.3623&rep=rep1&type=pdf">Johnson-Laird 1980</a>). We attempt to refine our understanding such that we may interact with an environment coherently (Gigerenzer 2008). The usefulness of one’s understanding is reflected by the success of action generated by that knowledge. Fitter knowledge will tend to allow acting men and women to achieve their ends that promote survival more efficiently (<a href="https://www.amazon.ca/Darwins-Conjecture-Principles-Economic-Evolution/dp/022600578X">Hodgson and Knudsen 2010</a>; <a href="http://institutoamagi.org/download/Alchain-Armen-Uncertainty-Evolution-and-Economic-Theory.pdf">Alchian 1950</a>). <br />
<br />
Knowledge is thus a means to action. Personal knowledge identifies aspects of the world as they relate to one’s place in it. A woman born in Harrisburg, Pennsylvania and remained there for the entirety of her life will likely have little reason to learn Tok Pisin, a language spoken in Papua New Guinea. If she is a receptionist dental office, she will probably lack the knowledge necessary to repair and maintain a Mercedes Benz S500. Unless one finds value in learning some subject for its own sake, a person’s knowledge will reflect the needs that arise in her life. Our lives are embedded in our models of and interactions with the world.<br />
<br />
This embeddedness includes beliefs about one’s capabilities and ethical or moral valuations and obligations that constrain action (<a href="http://www.pdfwww.china-up.com:8080/international/case/case/1386.pdf">Granovetter 1985</a>). These are often bound up in a grand narrative whose feature reinforce these fundamental beliefs. In a similar manner, one's narrative includes beliefs about ability that also embed themselves in action. A woman who is tormented by self-doubt will be unable to act confidently. She tells herself stories that validate her belief that the world can in no way offer her the things that her heart desires. A man who is prideful will have a difficult time integrating new information that discounts his high self-evaluation into his knowledge. All action is guided by logic contained in the acting agent’s knowledge set. Over time this logic becomes ingrained in habits. <br />
<br />
The structure of artificial intelligence can help inform our understanding of this aspect of human action. Artificial intelligence relies on classifier systems. These are programs that sense and evaluate an environment, using information present in it to classify or rank potential strategies and parameter values governing those strategies. Action guiding elements that receive the highest ranking are chosen by a classifier system. The classifier system represents one interface by which an acting agent interacts with its environment. It guides the choosing of a strategy which is itself an interface that enables a particular mode of action in the environment. In the same way, a user of a computer program can only interact with the program in ways enabled by the program itself. A basic word processor cannot be used as a calculator, neither can a calculator be used to compose an essay. One program lacks the categories and functions necessary to enable the features provided by the other. Agents with artificial intelligence can only interact with the environment in a manner that is enabled by their programming.<a href="https://www.blogger.com/blogger.g?blogID=1240730580083032584#_ftn1">[1]</a> They require the ability to sense particular phenomena in their environment and the categories necessary to interpret this information. A lack of information from the environment or the perceptive framework required for behavior that conforms to context will inhibit agent functioning. <br />
<br />
The structure implied by the narrative with which a person identifies governs her perception and guides her response to the environment. In economics, we postulate that agents act as to attain a state that she most prefers. She cannot do this directly. She requires structure in the form of a rule. You may think of this as a strategy. <br />
<br />
We can begin to understand how rules affect our behavior by thinking about wardrobe choice in regards to the weather. In choosing what clothes to wear for the day, a person may follow the following set of rules concerning the expected high temperature (degrees Fahrenheit) for the day: <br />
<blockquote class="tr_bq">
If expected high temperature ≥ 70: wear shirt with short sleeves <br />
If expected high temperature < 70: wear shirt with long sleeves <br />
If expected high temperature < 60: wear a sweater and shirt with long sleeves <br />
If expected high temperature < 40: wear a coat, sweater, and shirt with long sleeves </blockquote>
Rules like these serve as guide rails for action. They make decisions making less burdensome for the choosing agent. If I follow these rules and the high tomorrow is 65, I will wear long sleeves. If it is 35, I will wear long sleeves, a sweater, and a coat. I choose to obey this rule set, an observer can surmise that feeling cold brings me substantial disutility. An observer may be able to surmise the rules followed by an agent on average by analyzing past agent action in light of conditions. <br />
<br />
A person must choose a higher level rule that facilitates her choosing of a lower level rule. Just as a classifier system selects the rule governing action according to some ranking identified by the system, so too the human agent must choose higher level rules that guide the selection of lower level rules. Examples of such rules include moral and ethical systems, though not all rules are equally functional. One has no option but to select such a system or at least choose to accept the system that is provided her. Free will exists at this level of choosing. No rule system can itself do the ultimate choosing (<a href="http://williamnava.com/assets/carroll_tortoise.pdf">Carroll 1895</a>). One may choose to defer the ultimate choosing of action to a passion (<a href="http://www.jstor.org/stable/2254478">Blackburn 1995</a>). Such an embrace of a particular form of ends selection is itself a choice. Free will and the power for personal transformation that it enables exists most radically at this level. Action that results from the rule structure that manifests from this high level decision becomes embedded in habit over time. Thus our action evidences our beliefs. Our works evidence who we are to those who cannot know in detail what we believe. <br />
<br />
<a href="https://www.blogger.com/blogger.g?blogID=1240730580083032584#_ftnref1">[1]</a> It is often the case that the results potentiated by a particular program are not fully knowable beforehand. <br />
<br />
<b>Rationality - A description of a system guided by logic. Such a system includes a model of elements believed to be significant to guiding action and a means to ranking potential action in light of the state of the environment as identified by the model. The system for ranking ends must itself be chosen.</b><br />
<b><br /></b>
<b>Mental Model - The protypical model that acting men and women use to interpret and interact with their environment.</b><br />
<br />
<b>Embeddedness - A description of social capital where knowledge held in a system is contained within the relationships and interlocking mental models of agents. This knowledge is inseparable from interaction, and is thus <i>embedded </i>in the social system<i>.</i></b><br />
<div class="notranslate" id="kpm_content_wrapper">
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1240730580083032584.post-49069236510080896782017-02-07T15:48:00.000-08:002017-08-22T06:59:33.227-07:00A brief theory of goods and pricesEconomics is the study human action in light of a budget constraint. It observes action in terms of means and ends. The agent perceives her environment and is able to imagine how she may acquire some end. We assume that the agent values any end that she seeks to realize. Traditionally, this valuation reflects utility that the agent expects to receive. By hypothesizing that the agent measures value in terms of homogeneous units of utility, we have been able to employ the metaphor of calculus to understand rationality in the economic system. No such units exist in reality. Rather, the agent ranks ends in light of the magnitude of desire, which reflects the benefit that the agents expects to receive from the good in light of its cost. Monetary prices, however, reinforce the metaphor of an optimizing calculus as agents are forced to compare valuations of goods by allocating wealth in terms of monetary prices. <br />
<br />
We observe action by agents who are attempting to realize states that they prefer more over those they prefer less. Those are state-goods. State-goods include goods that are discrete objects and functions. If I decide to join a friend for an early morning coffee, I have acted to attain a state-good. I forgo spending the morning in bed and also incur the monetary cost of coffee and transportation. <br />
<br />
All valuations occur in the present. If I act to attain a candy bar, the candy bar is a good as I attain it. I assume that I am better off with the candy bar than without it. It is possible that the candy bar will be a link in a long chain of consumption that degrades my health, but in the moment of action, I choose the candy bar whose utility from consumption is realized for me in the short term over good health that I would receive in the long term if I chose to abstain from these habits. <br />
<br />
Goods can also be functions or, in other words, a service or a process. Some men will pay to talk to a woman on the phone who is a complete stranger simply to alleviate their loneliness. They have paid for a good that exists only at the time of consumption. Others pay significant amounts of money to play videogames and may even buy artifacts in the game that have no existence outside of the game. Others will pay for characters in the game that have been matured by another player. Still others, when able, will pay for a surrogate mother (Kuchar 2016). All of these are things that the consumer prefers over other options that they might otherwise choose. <br />
<br />
Agent preferences for goods comprise an ordering. At any moment, the agent must choose one good over another. When he receives his pay for the week, he must choose which food to buy. Over the course of a year he knows that he must purchase some new clothes. He must choose a means of transportation to facilitate other actions. Ludwig von Mises argues that these choices evidence a preference ordering. Only action can evidence preferences. Ordering is itself a challenge. On a week to week basis, a typical preference may include food and energy. On a month to month basis, we may add housing to the list. On a yearly basis, we add clothes and vehicle repairs. Those goods that are not typically purchased in a shorter period must be accounted for by savings or debt. It is in this sense that we think of an agent’s planned expenditures. They can only purchase goods for which they have the wealth necessary to acquire them. <br />
<br />
Concepts from programming languages can inform our modeling of the agent. We may create an agent in a program who has a list of goods that he purchases every day. Another list of goods that he purchases every week. Another that he purchases every month and so on. The agent could systematically purchase certain goods at particular times during each cycle. Or perhaps there is a 1 in 30 chance, for example, that the agent buys a good on his monthly list on any given day. Any goods not purchased on a given day but purchased at a later point exist either in the form of savings or future income. <br />
<br />
Economic goods are all subject to scarcity. That is, not everyone who wants to use them is able to use them. A standard example of a non-economic (free) good is air. While it is true that air is available to anyone who would like to take a breath, the quality of air will be priced into land values much as parking that is supposedly free is priced into the value of commercial real estate (Demsetz 1964). Air is free to anyone who is willing to suffer the cost of living without a claim to a warm bed, but for others, free goods become an attribute of value attached to the other goods for which they pay, as we observe in a theory of hedonic pricing. <br />
<br />
<b>Property, ownership, and prices </b><br />
In order to deal with scarcity, some form of ownership must exist. An economic good requires the assignment of right of use over it. An agent’s scope of action is delimited by her property rights. The extent of her property rights will determine her preferred course of action. How long can she expect to control a piece of property? Can she sell the property? What are legitimate uses of the property? Any economic system must define the possible space of terms of ownership if any order is to arise at all in the economic system. If they are not already known, they are discovered through a process of trial error in the legal system. <br />
<br />
In absence of the right of private property, the political structure governs the use of resources. In this case, ownership is nominally in the hands of the state or some other political apparatus and practically shared by bureaucrats and managers. The value they can extract from this ownership is a rent. A man who manages farmland for the state may allocate use to an agent who will later reciprocate the manager’s actions. Systems that disallow for personal ownership make planning for use of property more difficult. One cannot be certain whether he will have access to property and revenues generated from it in year or decade’s time. Rather, personal relationships centered around power become the dominant mode of economic planning for individuals. These relationships are not subject to contract, but rather the continuance of goodwill which is itself dependent upon incentives embedded in the economic system. They fall under the category of reciprocal relationships, which economists so often disregard in their analysis but which are integral to any description of institutions. <br />
<br />
Under a system of private property, agents are able to make better use of their resources. Owners of property are allowed to collect revenue from some use or sale of the property. This alienability of property rights is fundamental in the formation of expectations, which include market prices that reflect the value of the land according to its estimation of its most profitable use. If the owner is allowed to sell the land, buyers will only be willing to buy the land if it is offered at a price that is lower than the value they expect to derive from its purchase. Competition among buyers will tend to move prices more quickly toward this value in light of existing economic conditions. If I am a landowner who is not generating the highest possible value from the use of my property, I have incentive to sell it for the value it will fetch in the market. If I so value the land that I am willing to offer it for sale, I value the proceeds more greatly than I value maintaining control over the particular asset. <br />
<br />
Under a system of alienable property rights and competition, prices play a fundamental role in communicating to users and potential users the scarcity of a good in light of the cost of the good’s supply. By cost we refer to the value of the opportunity cost of the good’s use. If the current owner of a good derives value from the good that is higher than the monetary value of the next best use, we expect that the current owner will not relinquish control. It is possible that the current use actually generates less revenue than the next most valuable use. The owner could be made to have greater material wealth as valued by the market – other men and women. If he fails to sell it at this price, then he values his ownership and use of it more than the extra revenue he would receive by the property’s sale. <br />
<br />
Prices operate in a fractal manner. A person may be willing to pay a certain price for a good. That person offers some amount and is successful in purchasing the good. If the seller notices that buyers are usually willing to pay prices that are relatively higher than he had been selling, he may increase his asking price. If he has correctly sensed that consumers are willing to pay a higher price, he will earn higher revenues for his sale. Assuming that he has not raised price due to an increase in costs, he earns a profit. This increase in price will encourage the producer to produce more than he had before at the lower price. He and others like him will provide a greater quantity of the product to market, producing to the extent that the producers expect will be profitable. If consumers are not willing to pay a higher price, then the entrepreneur will come to regret his decision.<br />
<br />
<div class="MsoNormal">
<b>Supply and Demand <o:p></o:p></b></div>
<div class="MsoNormal">
Perhaps the most recognized tool of economists, supply and
demand curves express core principles that underlie economic analysis. A demand
curve can represent the quantities demanded for a particular good at different
prices from an individual, a group, or for all consumers. Likewise, a supply
curve can represent that combinations of prices and the quantity of a good
produced at the price from a single firm, a group of firms, or all firms in the
market. The point at which the supply and demand curves cross indicates the
equilibrium price and quantities for the good provided by the market in light
of consumer demand and supply constraints. <o:p></o:p><br />
<br /></div>
<div class="MsoNormal">
Both supply and demand curves are a manifestation of
marginal analysis. We assume that all action is a result of decision-making at
the margin. We do not assume that, for each individual, the value attributed to
consumption or possession of one unit of a good is equal to the value attributed
to consumption or possession of an additional unit of that good. Here we assume
that value of one unit is not dependent upon possession of another unit, as in
the case of chess pieces. A set of chess pieces that is missing one piece, say
the black rook, gains aesthetic and functional value by the possession of that
final piece. In most cases, value attributed to the possession of an additional
unit of a good is lower than the value attributed to possession of the previous
unit. <o:p></o:p><br />
<br /></div>
<div class="MsoNormal">
Consider the decision to purchase a thumb drive to transfer
files between to computers. If you have 4 gigabytes of data to transfer, we can
assume that you will positively value a 16 gigabyte thumb drive. If all files
fit on this drive, however, we can expect that a second drive of the same size
will be less valued by you. Likewise, consider that you can only attain thumb
drives that are one gigabyte in size. We can expect that you will load files
that you most value – i.e., that you most need – on the first thumb drive. As
you attain additional drives, you will transfer files that you value less or,
in other words, that you less urgently need.<o:p></o:p><br />
<br /></div>
<div class="MsoNormal">
In economics, we assume that acting men and women act in the
way that they believe will bring them the most value. This holds for Mother
Theresa, who valued a life of servitude, as much as it does for <i>Wall Street’s </i>Gordon Gekko. Economics
says nothing about what a person values or should value. It accepts that people
value some goods and states of the world more than others and that their
actions are an attempt at realizing value according to their beliefs and
preferences.</div>
<div class="MsoNormal">
<o:p></o:p></div>
<div>
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Both supply and demand curves are a manifestation of
marginal analysis. We assume that all action is a result of decision-making at
the margin. We do not assume that, for each individual, the value attributed to
consumption or possession of one unit of a good is equal to the value attributed
to consumption or possession of an additional unit of that good. Here we assume
that value of one unit is not dependent upon possession of another unit, as in
the case of chess pieces. A set of chess pieces that is missing one piece, say
the black rook, gains aesthetic and functional value by the possession of that
final piece. In most cases, value attributed to the possession of an additional
unit of a good is lower than the value attributed to possession of the previous
unit. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Consider the decision to purchase a thumb drive to transfer
files between to computers. If you have 4 gigabytes of data to transfer, we can
assume that you will positively value a 16 gigabyte thumb drive. If all files
fit on this drive, however, we can expect that a second drive of the same size
will be less valued by you. Likewise, consider that you can only attain thumb
drives that are one gigabyte in size. We can expect that you will load files
that you most value – i.e., that you most need – on the first thumb drive. As
you attain additional drives, you will transfer files that you value less or,
in other words, that you less urgently need.<o:p></o:p></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3yioTnfazMeWX-_qUj3zdDzUkInYTdE0Ub-nlRQGqn-jsiT7nLy26P82DQCAf19P_N-3ctnj9bV2xwU0rflz-LQSAf1KVBLeOOPSHouhc5FIfpcrcoKrP4-RiVEjslLppLQPTPtGxOm0/s1600/Budget+Constraint.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="948" data-original-width="1581" height="191" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3yioTnfazMeWX-_qUj3zdDzUkInYTdE0Ub-nlRQGqn-jsiT7nLy26P82DQCAf19P_N-3ctnj9bV2xwU0rflz-LQSAf1KVBLeOOPSHouhc5FIfpcrcoKrP4-RiVEjslLppLQPTPtGxOm0/s320/Budget+Constraint.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<b>Figure 1</b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
<b>Action and Value<o:p></o:p></b></div>
<div class="MsoNormal">
In economics, we assume that acting men and women act in the
way that they believe will bring them the most value. This holds for Mother
Theresa, who valued a life of servitude, as much as it does for <i>Wall Street’s </i>Gordon Gekko. Economics
says nothing about what a person values or should value. It accepts that people
value some goods and states of the world more than others and that their
actions are an attempt at realizing value according to their beliefs and
preferences.<o:p></o:p><br />
<br /></div>
<div class="MsoNormal">
When this assumption is attributed to analysis that employs
supply and demand curves, we express this as utility maximization. Economic
agents allocate their budgets toward the consumption and possession of goods
that they believe will yield them the greatest satisfaction per currency unit
spent. It also happens that this assumption allows economists to employ
calculus to estimate demand curves from past observations.<o:p></o:p></div>
<br />
<div class="MsoNormal">
Demand curves are constructed from the decisions of agents
to spend wealth. When someone chooses to purchase a particular good, he or she
is choosing that good at the cost of all other goods that he or she could buy.
This is represented in Figure 1 by the point (Q<sub>A</sub>*, W<sub>A</sub>*).</div>
<blockquote class="tr_bq">
Where<br />
<blockquote class="tr_bq">
<span style="text-indent: 0.5in;">Q</span><sub style="text-indent: 0.5in;">A </sub><span style="text-indent: 0.5in;">=
Quantity Purchased of Good A</span> </blockquote>
</blockquote>
<blockquote class="tr_bq">
<blockquote class="tr_bq">
W<sub>A</sub> = Wealth Remaining for Purchase of Other Goods</blockquote>
</blockquote>
<div class="MsoNormal" style="margin-left: .5in;">
<o:p></o:p></div>
<div class="MsoNormal">
Notice that this person could choose to spend the total
budget on the good A, on which case that person will receive the quantity M/P<sub>A</sub>.
Conversely, this person can choose not to spend any of his or her wealth on
this good, in which case, wealth will remain in the form of money or be spent
on other goods.</div>
</div>
<div class="MsoNormal">
<o:p></o:p></div>
<br />
<div class="MsoNormal">
The agent making this purchase believes that the gain in
value, or utility, per dollar spent is maximized in comparison to other
purchases he or she could make. This goes on such that the agent continues to
purchase goods so long as the utility gained from that purchase exceeds the
value gained from purchasing other goods as well as the utility gained from
holding a unit wealth in the form of money. In Figure 1, the agent has
remaining $(M – P<sub>A</sub> Q*<sub>A</sub>). In other words, the money not
spent on good A can be spent on other goods.</div>
<br />
If it is true that individuals purchase goods that provide them the greatest amount of value per dollar spent, then it is also true that consumers will respond to changes in prices. The quantity demanded of a good is inversely correlated with the price of the good. If, for example, the price of the toothpaste that I typically use to brush my teeth doubles, then it I will likely consider using another toothpaste. If the price of gas doubles, I may consider spending less time traveling or choose more often to ride my bicycle or walk when I visit places nearby. Demand curves reflect this attribute of preferences as they are downward sloping on a plane where the horizontal axis is the quantity demanded and the vertical axis is the price. For a market, they represent the sum of agent preferences for the good in question. The points of a demand curve represent the different quantities of a good that will be purchased across different prices.<br />
<br />
Supply curves are upward sloping. This is derived from the fundamental concepts of opportunity cost and action. Tautologically, action attempts to create the greatest value for the agent. Agents take action that will bring him to a state of being that he prefers over other possible states. This means that, given the agent’s wealth, he will attempt to trade things that are less valuable for those that are more valuable. Likewise, production of goods come at some cost. The highest cost producers tend to produce at the market price. If consumer demand for a good increases, then the price consumers are willing to pay increases. Higher cost suppliers can therefore enter the market profitably.<br />
<div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb-ApyVFTLCYnBuV0lueKTIv1lLh4_9WG_KHPFGsk1rjp5PZ83PQ2zTBhf3hRfcxfHUpc4H_-JHTPpZuVF3DZHZUc5hG7GmFcRjEPGgsT5ZGeCujVAA5a88tH4R0X0DDAQvfvFh5nEcUo/s1600/Supply+and+Demand.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="948" data-original-width="1581" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb-ApyVFTLCYnBuV0lueKTIv1lLh4_9WG_KHPFGsk1rjp5PZ83PQ2zTBhf3hRfcxfHUpc4H_-JHTPpZuVF3DZHZUc5hG7GmFcRjEPGgsT5ZGeCujVAA5a88tH4R0X0DDAQvfvFh5nEcUo/s400/Supply+and+Demand.png" width="400" /></a><br />
<div>
<div style="text-align: center;">
<b>Figure 2</b></div>
<div style="text-align: center;">
<br /></div>
<b>Understanding prices with supply and demand curves </b><br />
A price may rise for two reasons and only two reasons. Either, there has been an increase in demand for the product, as in the case of the discussion above. Price may also increase if the cost of supply increases. This may occur if the price of an input for the goods production increases. <br />
<br />
A rise in price of a good systematically leads to a decrease in the quantity consumed. If the government implements a 5% tax on oil revenues in effort to reduce consumption of oil, it will likely be successful in the goal as less oil will be produced in the area subject to the tax. Similarly, if the price of oils falls as a result of the introduction of cost reducing technology, more oil will be consumed. <br />
<br />
To say that there has been an increase in demand (Figure 3) is to say that there is an increase in the consumer’s willingness to pay for a product. Likewise, a drop in demand is a lowering of a consumer’s willingness to pay. As sentiment of consumers tend to move together, on average, we often refer to an increase in demand in the market for the good. When smart phones first became available, not everybody was interested in owning one. The value to early users was likely novelty and status, in addition to convenience. But as the use of this technology spread, those who lacked the ability to be more accessible found advantage in using this technology to communicate with friends, family, and coworkers. Utility gained from the use of these phones increased due to a network effect, and demand thus increased (Figure 4). <br />
<br />
In the case of supply, we refer to movements in the price that suppliers are willing to accept for sale of a good. In a competitive market, this price tends toward the cost of provision, as the lowest cost suppliers will be able to undercut less efficient providers of a good. Competition in an environment with relatively free flow of information will tend to remove suppliers who fail to adopt cost saving technologies adopted by the most innovative competitors. Producers who decided that they will only provide landline phones when cell phones first came into use are likely struggling if they have managed to survive the last decade. The cost of supply may fall, and therefor the supply increase (Figure 4), due to an improvement of conditions. For example, if an area occupied by corn farmers becomes more rainy, farmers will be able to produce more corn at the same cost.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBRTwUWHmhOPRRktX1AImIDQLtLH0XkjWVXE2rG-H0_x7GlByo1fTruq0sRUj1WcNaxAhs18Lta76lqitSdipaIQNNtltqo6viS6NPKtfNpzYqLfCbzkum5U-w9sO7BaGUs2V4CYgOHgw/s1600/Increase+in+Demand.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBRTwUWHmhOPRRktX1AImIDQLtLH0XkjWVXE2rG-H0_x7GlByo1fTruq0sRUj1WcNaxAhs18Lta76lqitSdipaIQNNtltqo6viS6NPKtfNpzYqLfCbzkum5U-w9sO7BaGUs2V4CYgOHgw/s400/Increase+in+Demand.png" width="400" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
<b>Figure 3</b></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqqR63Rnd48kJHrGuMa1V131XzYM59Dwv65NsTJC_arsosHfCt2HHYtwuPtM-eYkUA3opC-Yj0GJqxRSCBCvfS8r7HPDK0MS-bAUgw4XXNJwahVcAnmNCk4UFhAI92FpYPINuqANq7sLc/s1600/Increase+in+Supply.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqqR63Rnd48kJHrGuMa1V131XzYM59Dwv65NsTJC_arsosHfCt2HHYtwuPtM-eYkUA3opC-Yj0GJqxRSCBCvfS8r7HPDK0MS-bAUgw4XXNJwahVcAnmNCk4UFhAI92FpYPINuqANq7sLc/s400/Increase+in+Supply.png" width="400" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
<b>Figure 4</b></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
To better understand supply and demand, we employ supply and demand curves. We say that demand curves slope downward and supply curves slope upward. As the price of a good falls relative to other goods, consumers are willing to purchase more of the good. We explain this phenomenon in two ways. Agents always have a limited budget constraint. A decision to purchase one good is necessarily a decision to go without another good. Therefore, as the price of a good rises, our agent’s real income falls. Of course it is possible that a single agent will always buy a certain good if the price is not too high. At some point, the quantity the agent is capable of purchasing may fall to zero if the price rises too high. Acting in light of a budget constraint, agents must choose to purchases goods that they believe will provide more value to them, as opposed to less. This is a necessary condition for the downward sloping demand curve. The agent will eventually reach a point of consumption where an increase in consumption of the desired good will be accompanied by relatively less utility with each unit consumed. This is the principle of decreasing marginal utility. As an agent’s budget constraint shrinks, or in other words as the relative price expenditure increases, those goods that provide relatively less utility per dollar spent will be forgone for those that provide more.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcAko1TfYFNSqj5hJ595jCq7rv74wzW5dGfikXS3hMzsq21WVhPwjUnktChDaxifuIEsBuW_DX4rNcqFMxnJW05wU1YWvDgQvMUrBCKbnJSpWy5-oN-8sgJdVflVsYDQVMz066nWKzBm0/s1600/Smartphone+Demand+Increases.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcAko1TfYFNSqj5hJ595jCq7rv74wzW5dGfikXS3hMzsq21WVhPwjUnktChDaxifuIEsBuW_DX4rNcqFMxnJW05wU1YWvDgQvMUrBCKbnJSpWy5-oN-8sgJdVflVsYDQVMz066nWKzBm0/s400/Smartphone+Demand+Increases.png" width="400" /></a></div>
<div style="text-align: center;">
<b>Figure 5</b></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyu164jMmnKLHaKo8oyM6kRO5tx_tFbH2EFCKH1liMopcYIiku7tsGelgBSrP6HRmxjjLi_iUsZZZ-ln5H8tdDRxd2Y9lfi7O-Eh2DWL-W-ShQyvraMGLdMsfrRDe14xUIPPiYUjK1FKo/s1600/Smartphone+Supply+Increases.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyu164jMmnKLHaKo8oyM6kRO5tx_tFbH2EFCKH1liMopcYIiku7tsGelgBSrP6HRmxjjLi_iUsZZZ-ln5H8tdDRxd2Y9lfi7O-Eh2DWL-W-ShQyvraMGLdMsfrRDe14xUIPPiYUjK1FKo/s400/Smartphone+Supply+Increases.png" width="400" /></a></div>
<div style="text-align: center;">
<b>Figure 6</b></div>
<div style="text-align: center;">
<br /></div>
We assume that supply and demand are independent of one another, but it is possible to show their interaction via the price mechanism. That is, it is possible that demand affects supply over time. Much modern technology has shown this pattern. Smartphones, which were relatively expensive when they were first introduced have proliferated in industry and can be purchased for relatively cheap, so long as the phone desired is not the newest and fastest model available (Figure 6). We see a general description of this phenomenon with Moore’s law: the speed of processors tends to double every one to two years (Figure 7).<a href="https://www.blogger.com/blogger.g?blogID=1240730580083032584#_ftn1">[1]</a> Thus, we increasing processor speeds and a continual fall in the price of processing power and memory for a computer. Producers respond to technological demand from business who are willing to pay a high price for the fastest and best functioning computers. These businesses must remain competitive or else be removed from the market through bankruptcy. The same principle holds for tech savvy consumers who find value in using the latest technology. Demand from these agents push up the price of new technology so as to make innovation profitable and thus incentivize reduction in the cost for a unit of memory or processing power.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiBIo3F_2QkBMahj_mCkbw4NVEnagfUHvxgwFiPSVCXEnpM1DxVEX9zcvtuF-4-PDtEcmG4Mdzmtt7erfsQj-QaLWxRsDtAlJOGJ1PUbYSl6H29EqsQTFkUHIgANXybVbE2HKsstY-07E/s1600/Trend+of+Ram+Prices.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiBIo3F_2QkBMahj_mCkbw4NVEnagfUHvxgwFiPSVCXEnpM1DxVEX9zcvtuF-4-PDtEcmG4Mdzmtt7erfsQj-QaLWxRsDtAlJOGJ1PUbYSl6H29EqsQTFkUHIgANXybVbE2HKsstY-07E/s400/Trend+of+Ram+Prices.png" width="400" /></a></div>
<div style="text-align: center;">
<b>Figure 7</b></div>
<br />
<b>The Law of One Price </b><br />
Movement toward an equilibrium price in a market is implied by the principle of human action. Humans act to move the world toward a state they prefer. They do this subject to a budget constraint, which represents the resource at their disposal. From this we surmise that if there are gains from trade potentiated by discrepancies between prices of some like goods, these discrepancies will be offset so long as they are profitable. We call the act of exploiting gains that arise from price discrepancies, arbitrage. <br />
<br />
If the price of an ounce of gold in England is $1500 and the price of an ounce of gold the U.S. is $1505, there exist an opportunity to profit by buying gold from England and selling it in the United States. If the cost of buying an ounce of gold in the U.S. and selling it in England is less than five dollars, we expect that the final price in either country will lie somewhere between $1500 and $1505. If the cost of buying and selling and ounce of gold is zero dollars, then we expect that both countries will reach exactly the same price. <br />
<br />
A similar process occurs when shares are bought on an exchange, however, a layer of complexity is added. Imagine that instead of the price of an ounce of gold, we observe the price of a share of gold worth one ounce from a gold exchange trade fund (ETF) is worth $1505 in the U.S. and that a share in Britain is worth $1500. The shares from Britain cannot be bought in the United States, however, investors will shift demand instead of moving supply. Those invested in the ETF in the U.S. will sell shares and can reinvest them in Britain. Demand for shares of the U.S. based ETF falls and demand for the ETF based in Britain rises. <br />
<br />
There are cases where the law of one price appears to be violated, however, this is always due either to transaction costs or subjective valuations of acquiring a good. Consider two apartments that are identical in every way except location. If the apartment in New York is worth four times the value of the price in Omaha, it is not because the law of one price has been violated. The goods are commonly referred to as being non-tradable. One good cannot be used for the same purpose of another. Not only are transportation costs especially high for real estate, the conditions that exist in one area, including scarcity, cannot be transported to another area. <br />
<br />
There also exists discrepancies between observed prices. A gas station on one street corner may charge a higher price than one on the opposite corner and still not lose customers. Often, this may occur because the price discrepancy is small and drivers are willing to pay this cost in order to stay in the comfortable zone delineated by their habits. But if the price of gas at one station increases high enough, its profits will shrink as drivers choose to purchase gas at the station across the street. <br />
<br />
The profit mechanism, driven by the desire of human agents to improve the state of the world that they inherit – most patently when the choice is between having more or having less of something for the same cost – drives the market process. This drive when in operation in a competitive environment at least approximately subject to the rule of law promotes the convergence of expectations, allowing for a high level of coordination where plans of economic actors come to fit together. This is Adam Smith’s invisible hand and what Daniel Klein refers to as concatenate coordination. <br />
<br />
<br />
<br />
<b>Good </b>– An object or state toward which an agent attributes positive value. <br />
<br />
<b>Scarcity </b>– A state in which an agent must choose between ends due to there being limited quantities of goods desired. <br />
<br />
<b>Opportunity cost</b> – The next best use of a good or action. In a market, agents are able to measure the value of an opportunity cost in terms of a currency unity. <br />
<br />
<b>Economic good </b>– A good that can that is subject to scarcity and that can be bought and sold. Economic goods are sold for a positive price. <br />
<br />
<b>Price </b>– That which is given up by an agent in exchange for something that he believes is more valuable. <br />
<br />
<b>Monetary prices</b> – Prices denominated in a currency. An agent must give up an amount of currency equal to the monetary price in order to attain a good desired. <br />
<br />
<b>Human action</b> – Action by a man or woman is always aimed at replacing an incumbent future state with an expected state that the agent values more highly. <br />
<br />
<b>Property rights </b>– Property rights serve to legitimate ownership of an object and delineate the use that is allowed by such ownership. Rights over a property may be divided, such as the case where ownership of a piece of land is maintained by one owner and the rights to minerals beneath the property are sold to another. <br />
<br />
<b>Preference ordering</b> – At any given time, an agent prefers to spend his wealth on some goods as compared to others. Those goods that an agent chooses to purchase during a finite span of time are represent those goods toward which he attributes the greatest value. <br />
<br />
<b>Budget constraint </b>– An agent has only a finite amount of wealth. The value of this wealth, whether it exists in currency or assets that may be sold, represents the agent’s budget constraint. <br />
<br />
<b>Demand</b> – An agent’s willingness (and ability) to pay for some good represents his demand for the good. If the agent experiences diminishing marginal utility from consumption of the good, the price he is willing to pay for each addition unit of the good falls. <br />
<br />
<b>Supply </b>– Production of a good always implies opportunity cost. The value of opportunity cost tends to increase with the quantity of the good produced once efficiency increases from mass production have been exhausted. <br />
<br />
<b>Endogenous</b> – As being generated within a model. If an increase in demand for a good raises its price such that it promotes new investment in cost reducing technology, the increase in supply that results is an endogenous increase in supply. <br />
<br />
<b>Law of one price</b> – The observation that the price of like goods tend toward equality in light of transaction costs. <br />
<br />
<b>Expectations</b> – Predictions of agents concerning the future. Expectations is a broad category that includes both price expectations – predictions of future price – along with plans and strategies that agents use to adapt to a changing environment, and institutions whose logic help coordinate agent interaction and plan execution. <br />
<br />
<b>Invisible hand </b>– The observed tendency for competitive markets to make efficient use of resources and promote the dovetailing of plans acted on by disparate actors. <br />
<br />
<br />
<br />
<a href="https://www.blogger.com/blogger.g?blogID=1240730580083032584#_ftnref1">[1]</a> Moore's law refers to an observation made by Intel co-founder Gordon Moore in 1965. He noticed that the number of transistors per square inch on integrated circuits had doubled every year since their invention. Moore's law predicts that this trend will continue into the foreseeable future (<a href="https://en.wikipedia.org/wiki/Moore%27s_law">From Wikipedia</a>). <br />
<div class="notranslate" id="kpm_content_wrapper">
</div>
</div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1240730580083032584.post-3980767775356704162017-01-18T12:19:00.000-08:002017-01-20T14:38:02.280-08:00A theory of social economy II: reformulating a framework for economic analysis<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-outline-level: 3;">
<span style="font-family: inherit;"><span style="color: #444444; font-size: 10pt;">In his </span><i style="color: #444444; font-size: 10pt;">Principles
of Economics</i><span style="color: #444444; font-size: 10pt;">, Carl Menger tells us that his goal is to “reduce the
complex phenomena of human economic activity to the simplest elements that can
still be subjected to accurate observation, to apply to these elements the
measure corresponding to their nature, and constantly adhering to this measure,
to investigate the manner in which the more complex economic phenomena evolve
from their elements according to definite principles (<a href="https://mises.org/sites/default/files/Principles%20of%20Economics_5.pdf">46-7</a>).” To create a
theory of the economy, we must first identify </span><span style="color: #444444; font-size: 10pt;">what are our most
basic categories of theoretical objects and the attributes of these objects. As a theory of economics is a fundamental component of a more general social
theory, the human agent is our fundamental unit of analysis. As such, we begin
by identifying fundamental attributes of the human agent and the implications
of these attributes both for the individual alone as well as for interaction
between agents.</span></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">By identifying the
objects and attributes of interest to economic theory, we identify the minimal
extent of a domain of interest. The goal of theory is to compress a significant
amount of information into a minimal set of general objects. In doing so, we
develop a language and structure that we can continually reference while
telling a story about the world around us. Theory allows us to tell stories
with scientific precision. A brief skeleton of this theory includes:</span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoListParagraphCxSpFirst" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: .25in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;">1.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><span style="color: #444444; font-size: 10.0pt;">Human Agents<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: .75in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;">a.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Action<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 1.25in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.25in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;"><span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span>i.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Opportunity Cost<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 1.25in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.25in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;"><span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span>ii.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Profit <o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 1.25in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.25in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;"><span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span>iii.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Uncertainty<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 1.25in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.25in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;"><span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span>iv.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Entrepreneurship<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: .75in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;">b.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Means and ends<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 1.25in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.25in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;"><span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span>i.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Goods<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 1.75in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level4 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;">1.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Means as goods<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 2.25in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level5 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;">a.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Labor<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 2.25in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level5 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;">b.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Capital<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 2.75in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level6 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -2.75in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;"><span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span>i.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Physical<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 2.75in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level6 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -2.75in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;"><span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span>ii.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Land<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 2.75in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level6 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -2.75in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;"><span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span>iii.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Social<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 2.25in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level5 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;">c.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Technology <o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 2.75in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level6 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -2.75in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;"><span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span>i.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Embedded in Capital<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 1.75in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level4 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;">2.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Final goods<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 1.75in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level4 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;">3.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Structure of
Production<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: .75in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;">c.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Knowledge<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 1.25in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.25in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;"><span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span>i.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Preferences<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 1.25in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.25in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;"><span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span>ii.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Strategy<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 1.25in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.25in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;"><span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span>iii.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Expectations<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 1.75in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level4 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;">1.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Institutions<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 2.25in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level5 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;">a.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Rules <o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 2.75in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level6 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -2.75in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;"><span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span>i.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">norms <o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 2.75in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level6 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -2.75in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;"><span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span>ii.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">laws<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 2.25in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level5 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;">b.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Institutions of prime
interest<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 2.75in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level6 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -2.75in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;"><span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span>i.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Property Rights<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 3.25in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level7 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;">1.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Exchange<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 3.25in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level7 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;">2.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Money<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 3.25in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l0 level7 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><b><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;">3.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Prices<o:p></o:p></span></span></b></div>
<div class="MsoListParagraphCxSpLast" style="background: white; line-height: normal; margin-bottom: 3.0pt; margin-left: 2.75in; margin-right: 0in; margin-top: 0in; mso-add-space: auto;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">When you tell a story
about a family member, you employ your theory and language from that theory in
your telling of the story. The story evidences your theory of the family member.
Likewise, these terms and the structure they comprise will allow you to begin
telling your own story about current events and will even inform the narrative
of your own life. By the time you have finished, you will know that you have
absorbed these concepts simply in light of the new way that you see the world
and the new language that you use to describe it.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">We will review key
terms one at a time and will later investigate many of these features as we develop
our theory.</span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;"><b>1. Human agents</b></span></div>
<span style="font-family: inherit;"><br /></span>
<br />
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">The economy is
comprised of real-life human beings. Social theory abstracts from the
particular features that are not shared by all agents. Our agents interact with
the environment. In order for this occur, agents themselves need some theory of
the environment. They need a mental model that represents what the agents
believe to be the logic of the environment. This allows them to predict the
effects of their action and, therefore, to act with the intention of
transforming to their liking the future state that they will inherit.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Our agents are
ecologically rational. Although a theoretical agent is herself a high level
abstraction, agents do not reason only by means of high level abstraction. They
relate their thought processes to the webs of objects that comprise their
reality (<a href="https://www.amazon.com/Rationality-Mortals-Uncertainty-Evolution-Cognition/dp/0199747091">Gigerenzer 2008</a>). Most decisions are made using heuristics – rules of
thumb – that allow the agent to arrive a decision for action by use of a
limited amount of information. The ability to reduce the sensing and
computation required for decision making down to the attributes of one or a few
elements in the environment have been shown to be efficient (<a href="http://www.dangoldstein.com/papers/FastFrugalPsychReview.pdf">Gigerenzer and Goldstein 1996</a>) – i.e., cost minimizing in light of payoffs. These rules
comprise a significant portion of agent knowledge. <o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Agents do not act in isolation.
They interact with others, exchanging both resources and knowledge. Models used
by agents to interact with their environment must therefore include other
agents. Agents that interact with one another must employ shared or
interlocking mental models in order for their actions to lead to coherent
outcomes (<a href="https://www.cambridge.org/core/journals/journal-of-institutional-economics/article/economics-for-a-creative-world/93B247BAF7A501A47C4243F10545318C">Koppl, Kauffman, Felin, and Longo 2015</a>).</span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 91.8pt;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">a. Action<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 91.8pt;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 91.8pt;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">All agents act. Action exists so long as intervention into the
current state of affairs by the agent in question is possible (<a href="http://oll.libertyfund.org/titles/mises-human-action-a-treatise-on-economics-vol-1-lf-ed">Mises 1949, 13</a>). Absent
intervention, some series of future states are expected by observing agents and
necessarily implied by the logic that governs the physical world. Action is aimed at affecting the future. By acting the agent casts his vote for the
future. If he intervenes, the agent hopes to replace the future states that he
would otherwise inherit with some other array of future states that he expects
he will prefer. <o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 91.8pt;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 91.8pt;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">i. Opportunity cost<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 91.8pt;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 91.8pt;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Any particular action must be chosen over other possible
actions. The action that a person would otherwise perform had he not performed
the action he chose is the agent’s opportunity cost. It is the next best course
of action that he would have taken. It is possible that, in hindsight, the opportunity
cost of an action actually exceeds the value gained from the action. This
represents a loss (negative profit). <o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 91.8pt;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 91.8pt;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">ii. Profit<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 91.8pt;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 91.8pt;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">At a fundamental level, profit is a feeling of gain or
improvement. It is a purely psychical phenomenon that arises from perception of
improvement of one’s state (Mises 1949, 11-29). The drive for profit motivates all action. This is
true whether a person chooses to intervene in the world or to continue act as
he has always acted. At the time of action, a person chooses the action that
one believes will promote a state of the world that the agent perceives as the
greatest improvement. <o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 91.8pt;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 91.8pt;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Profit takes a concrete form as monetary profits. Monetary
profits allow for the comparison of revenues and costs, enabling the
entrepreneur to calculate the value generated by her labor and to compare this
value to other uses of her time. We know that an increase in wealth leads to a feeling
of gain. Even for the ascetic who has developed an indifference to material
wealth, a windfall profit can be donated to a charitable end that he values and
would certainly be viewed as a positive development. <o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 91.8pt;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 91.8pt;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">iii. Uncertainty<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 91.8pt;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 91.8pt;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">All action occurs under conditions of uncertainty. There exists
no perfect model of the future. Those models that better predict the future enable
action that is more profitable than models that promote agent ends in a
relatively costly manner. Profits are evidence that the model guiding the action
of an agent or the operation of a firm has proved successful at overcoming uncertainty
in the process of providing consumers with the goods they desire.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 91.8pt;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 91.8pt;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">One element of uncertainty that entrepreneurs face in the market
lies in the developing tastes of consumers. When an entrepreneur brings an
innovation to market, he cannot know for sure whether or not consumers will
value the product enough to make its production possible. Thus, uncertainty
exists not only in light of objective circumstances that could potentially be
definable beforehand, but also in light of the inherent subjectivity of the
human agent. There is no perfect way to gauge the course that consumer
preferences will follow or whether or not those preferences can be guided in a manner
that yields monetary profit for a market entrepreneur. <o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 91.8pt;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 91.8pt;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">iv. Entrepreneurship<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 91.8pt;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;"> <o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 91.8pt;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Entrepreneurship is action that is aimed at profit. Thus, all
action is entrepreneurial, though not all action succeeds in its aims. More
commonly, we refer to market entrepreneurs when we use the word entrepreneur. These
entrepreneurs seek monetary profit greater than can be earned by the average
return on investment in the market, often referred to as the risk-free rate of
return. This excess profit we refer to as economic profit. In a competitive
environment, market entrepreneurs tend to compete away economic profits in
light of available information. Economic profits accrue to those market entrepreneurs
who successfully confront uncertainty. These entrepreneurs enlarge the extent
of human knowledge in a manner that serves the wants and needs
of others.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 91.8pt;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;"> <o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><b><span style="color: #444444; font-size: 10.0pt;">b.</span></b><b><span style="color: #444444; font-size: 7.0pt;"> </span></b><b><span style="color: #444444; font-size: 10.0pt;">Means and ends</span></b><span style="color: #444444; font-size: 10.0pt;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">All action implies
opportunity cost. Some ends are chosen at the cost of others. The use of some
means to attain a given end precludes the use of other means to attain that
end. This use may also enable the later use of some means or acquirement of
some ends that otherwise would not be available. Likewise, it may preclude the
later use of some means or acquirement of some ends. Thus, means and ends are
integral to action and imply opportunity cost entailed in action.<br />
<!--[if !supportLineBreakNewLine]--><br />
<!--[endif]--><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><b><span style="color: #444444; font-size: 10.0pt;">i. Goods</span></b><span style="color: #444444; font-size: 10.0pt;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Carl Menger defines a
good in his <i>Principles</i>:<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Things that can be placed in a causal
connection with the satisfaction of human needs we term <i>useful things</i>.
If, however, we both recognize this causal connection, and have the power
actually to direct the useful things to the satisfaction of our needs we call
them goods (52).<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">A thing is a good if
the following prerequisites are met:<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoListParagraphCxSpFirst" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .75in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l1 level1 lfo2; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;">1.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">A human need [desire]<o:p></o:p></span></span></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .75in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l1 level1 lfo2; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;">2.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Such properties as render
the thing capable of being brought into a causal connection with the
satisfaction of this need [desire].<o:p></o:p></span></span></div>
<div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .75in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l1 level1 lfo2; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;">3.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Human knowledge of
this causal connection.<o:p></o:p></span></span></div>
<div class="MsoListParagraphCxSpLast" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .75in; margin-right: 0in; margin-top: 0in; mso-add-space: auto; mso-list: l1 level1 lfo2; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: inherit;"><span style="color: #444444; font-size: 10.0pt;">4.<span style="font-size: 7pt; font-stretch: normal; line-height: normal;">
</span></span><!--[endif]--><span style="color: #444444; font-size: 10.0pt;">Command of the thing
sufficient to direct it to the satisfaction of the need [desire]. (52)<o:p></o:p></span></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">A good is an entirely
subjective category of object. Humans act to attain goods. Agents expect that a
good will aid in the fulfillment some desire. Action to attain a good requires knowledge of
how and the resources required to acquire the good. If a person finds herself
sick, she may desire a medicine that she believes will heal her sickness. The
medicine is good because it will bring the woman a state that she prefers over
the state she would otherwise inherit without the medicine. If the woman learns
that the medicine is actually poison, she will correctly treat it as a bad if
she values her health.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">We may also conceive
of the state desired as a good. We may call this a state-good. The state may be
associated with objects that are goods, such as the medicine that the women
hopes will heal her ailment and bring her to a state of good health. Or the
state-good may simply represent a reordering of one’s surroundings. If I
rearrange the furniture in my house to create more useable floor space or to
change the functionality of a given area, I acquired a unique good, but this
good is solely a state-good as no new object has actually been acquired that
can be deemed a good. I have increased my contentment (removed uneasiness) in
light of the change.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">A good may lose its
goods character if a change occurs that prevents the fulfillment of the four
requirements described above. It is possible that an object or state may be treated as a good when
“attributes . . . are erroneously ascribed to things that do not really possess
them” and when needs or desires “are mistakenly assumed existent (53).”<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">There are many ways
that we may categorize goods. As economics studies human action in terms of
means and ends and in light of opportunity cost, analysis will continue with
this schema.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">1. Means as goods.<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">When goods are used as
means of acquiring other goods, they are often referred to as productive
factors. These are intermediate goods whose value is derived from what they
produce, not their consumption. Productive factors are, as the classical
economists argued, land, labor and capital where land is a special form of
capital.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">a. Labor<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">At its core, labor is
action. In relationship to production, we say that labor earns a wage. Labor is
contracted by some organizer of activity – an entrepreneur – and paid a wage. Labor
tends to be paid the value of its revenue product. If labor is underpaid, it
can migrate to a new firm who will still realize a profit by paying it
marginally more than it earned at the previous firm, so long as the wage paid
is less than or equal to the value of labor – its marginal revenue product. If
it is overpaid, the company paying it will incur losses that inhibit its
function in the long run. <o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">b. Capital<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">i. Physical Capital<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Capital is any asset
that might be used in a manner that generates revenue. Instances of capital
include trucks, homes, roads, computers, among many other objects. Often,
capital embodies technology, as is the case in each of the capital-objects just
referenced. An incomplete list of technology embodied in a computer include circuits,
micro-processors, graphics cards, and cooling systems. Capital serves as a
means to some end, whether that end is the production of other goods, as is the
case of a computer for a professional programmer, or the consumption of
entertainment, as is the case of a computer for a person who watches movies on
it. The value imbued to the functions of capital in light of competing uses
generate capitals price. In the case of productive capital, the price tends
toward the discounted value of the sum of revenues that the capital is expected
to earn. In the case that capital is itself consumed for the direct realization
of utility, the price of capital in equilibrium represents the discounted value
of the utility that is expected to be realized by the user.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">The revenue earned by
capital is a rent. In equilibrium this rent is equal to the value of the
capital’s marginal revenue product, which is a way of saying that the price of capital
tends to match the value that the capital generates.</span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">ii. Land<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Land is a special form
of capital. Land receives its own category as it is the fundamental unit upon
which all activity is dependent. Resources come from land. Productive activity
must occur on land. Space is limited, and so must be put toward one of many
competing uses. Classical economists referred to the revenue derived from
ownership of the land, by virtue of the value of the land’s use, as a rent.
Within a competitive market, excess rents are competed away so as to reflect
the market rate of return. In reality, rents tend to accrue to land by virtue
of its inherent scarcity as well as increasing efficiency in use. This leads to
a tendency for the price of land to increase over time. Though, over short
periods of time – i.e., decades – the value of land fluctuates, its value will
increase so long as population increases or efficiency of production that
depends upon the land increases. These rents accrue to owners who bear the
costs that arise due to uncertainty. Defined in this manner, land’s rent is a
manifestation of profit.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">iii. Social Capital<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Of all concepts in
economics and the study of society, social capital is one of the most complex .When
we observe social capital, we observe particular instances of social
organization. There are many phrases we may use to describe instances of social
capital: institutions, firms, networks of affiliation, shared language, etc…. Social
capital is very often non-transferable as it is embedded in interaction (<a href="https://xa.yimg.com/kq/groups/88442839/849318659/name/Granovetter+embeddeness.pdf">Granovetter 1985</a>; <a href="http://link.springer.com/article/10.1007%2Fs11138-007-0033-1?LI=true">Lewis and Chamlee-Wright 2008</a>) . Eugene cannot sell his friendship with
Samson. Neither can a successful entrepreneur perfectly transfer the confidence
that he has developed among venture capitalists. Nor can the particular, and often private, language
or mode of interaction within a club or firm be learned costlessly or without a
minimal level of consent among some members. Social capital is embedded in the
web of relationships, formal and informal, in which we continually participate.
It provides a medium of communication that promotes convergent actions and expectations
between players who participate in common and overlapping sets of social
capital.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">c. Technology<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Technology is embedded
in capital. For physical capital, technology is like a blueprint that describes
the organization of different physical components and the functions that emerge
from this organization. In social capital, technology is the abstract
description of organization. French as it is spoken represents social capital.
The language, as discussed without reference to a particular organization, is
itself technology. The technology is embedded in social capital when it is
shared and used to coordinate activity.</span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">2. Final Goods<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Final goods are goods that are consumed. If a woman purchases an apple
for consumption, it is, in its original form, a final good. It is possible that
a good may fulfill the requirements of both an intermediate and a final good. An
apple purchased for use in an apple pie is an intermediate good upon
creation of the pie, and part of a final good upon the pie's consumption. Similarly, a
computer that is used both for work and for entertainment is an intermediate
good when used for work and a final good when used for entertainment.</span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">3. Capital structure<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">a. Order of a good<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;"><br /></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Capital structure is a
formal description of the arrangement of economic goods. We can describe a good
by its order: its position in the process of production. Final goods are always
of the first order. Intermediate goods are always of the second order or
higher. We call capital a higher order good (say machinery) when it is used to
produce another good. But if that same good is consumed with expectation that
consumption will improve the welfare of the agent consuming it, then the good
is a first order good. Thus, if a man derives pleasure from destroying a piece of
machinery, its use to this end is as a final good. There is nothing intrinsic
about the order of a good. It is a description relative position in the
structure of production.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">b. Network structure<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Capital structure can
be described in terms of a network. Firms tend to employ higher order goods to
produce lower order goods. A firm does not exist in isolation, but is embedded
in a network of other firms. As was the case with the pencil, resources flow
from their source point to firms that transform and combine them. Along each
step of the way, revenues earned by firms must at least cover the costs of
operation. The structure of production is continually transforming as changes
in profit margins, whether due to changes in demand and supply of inputs and outputs or changes in strategies
employed by firms, drive reconfiguration in the network.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">c. Knowledge <o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Humans attempt to
understand the world by identifying objects within it and their attributes,
including their relationships between one another, and process that transform
these objects. <o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">i. Mental Model<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">The mental model is a
personal ontology (<a href="http://www.jstor.org/stable/685677?seq=1#page_scan_tab_contents">Hayek 1955</a>; <a href="http://onlinelibrary.wiley.com/doi/10.1207/s15516709cog0401_4/pdf">Johnson-Larid 1980</a>; <a href="http://onlinelibrary.wiley.com/doi/10.1111/j.1467-6435.1994.tb02246.x/abstract">Denzau and North 1994</a>). “Ontology” comes from the Greek root, meaning, “existence”. Acting
men and women attempt to create a simplified representation of their reality,
existence with which they are concerned, in their minds. In some cases, this may
be a detailed representation. Such is often the case with scientific models. More
often, the representation is simplified in light of the costs of acquiring new
information. For example, when asked which city has more residents, respondents
typically choose the city with which they are more familiar (<a href="http://pubman.mpdl.mpg.de/pubman/item/escidoc:2102900/component/escidoc:2102899/GG_The_Recognition_1999.pdf">Goldstein and Gigerenzer 1999</a>). This is known as the recognition heuristic. It is imperfect,
but it works better on average than guessing, and therefore economizes on
information in regard to answering the question. An agent’s mental model is
likely to include some mixture of detailed representation and simplified rules
that guide decision-making.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">1. Rationality and Preferences<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Rationality contains
two components. One is the representation of reality. In regard to the agent,
this is the mental model. The other component is a selection mechanism. In a
particular circumstance, the rule chooses the end selected in light of the
environment. Selection also occurs at a higher level. It is this higher level
selection that is most significant to the pattern of behavior exhibited by an
agent. Mises (1949, 19) refers to this as the agent’s “ultimate end”: the
fulfillment of “some desires of acting man”. While any particular action may
fulfill a particular desire, the pattern of actions exhibited by a human agent
reflect the ultimate ends of that agent.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Rationality includes
the process of learning. As agent knowledge changes, so too does the expression
of preference. Changes in knowledge can affect preferences in one of two ways.
Either the agent, in light of new knowledge, realizes that his former
preferences are inferior, and so adopts new desires. Or the agent realizes that
she could more efficiently fulfill her preferences. In either case, we will
observe a change in the pattern of actions for a learning agent. In the first
case, the ends implied by the pattern of action change, in the second, the
costs incurred by action are, for the sensing agent, reduced.<b><o:p></o:p></b></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">3. Strategy<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Agent knowledge expresses itself as strategy. Just as the pattern of
agent action may reflect changes in regard to ends, so too can a change imply a
change in strategy. Strategy aims at producing some end efficiently (<a href="https://www.amazon.com/Evolutionary-Theory-Economic-Change-Belknap/dp/0674272285">Nelson and Winter 1982</a>). A change
in strategy represents, at least on the margin, a change in the process of production,
if not a change in the end produced altogether. Strategy is significant in our discussion
of firms as strategies that are more efficient at producing a given end are
more likely to survive so long as that end provides profit to the agent
employing the strategy.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">4. Expectations<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Agents form expectations according to their knowledge. Agents build
models of the world in order to be able to predict their environment and
interact with it in the future. They extend the logic implied in their mental
models into the future. If an agent believes that there will be an increase in
demand for some product tomorrow, he will expect that the product will increase
in price. If he believes that the price does not sufficiently represent this
increase in demand, he can himself express this demand by investing in the
product and its production with expectation of profit when he sells it at a
higher price. <o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">1. Institutions<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Institutions structure
interaction between agents, either formally or informally. Agents who
participate in an institution acquire duties and rights according to roles and/or
offices filled by the agent (Searle 2005). Institutions make interaction between
agents more predictable for each involved. <o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">a. Rules <o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Rules constrain and guide agent action. Agents interact by adhering to a
common rule structure. Rules that are shared may be implied or explicit. Violation of
either of these types of rules may be returned with disapproval by other
agents, and in extreme cases, overt punishment. Punishment takes the form of
imposition of costs on the violator where either benefits received by the
violator are reduced or some cost must be paid directly.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">i. Norms<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Norms are rules of behavior that are commonly observed within a group,
but that are not necessarily identified explicitly. When students wait in a line
in the cafeteria, they do not need to be told that it is a rule that they do
so. They confirm to the pattern of behavior that they observe. Failure to
comply with the pattern may lead to conflict – i.e., if a woman steps ahead of you in line, you,
and maybe others as well, will probably express your discontent toward her. <o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">ii. Laws<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Laws are rules of behavior that are codified and backed by the use of
force. Law enforcement, in its ultimate instance, is performed by the state. This
is the network of institutions that share a monopoly on the legitimized use of
coercion. When I walk on the right side of the sidewalk, I follow a norm. When
I drive on the right side of a road that is managed by the state, I follow a
law that evolved from a norm. No one can justifiably punish me with a ticket or
the threat of physical force if I fail to walk on the right side of the sidewalk.
If I violate the law that governs the use of a state owned highway, I will find yourself paying a
stiff penalty.<b><o:p></o:p></b></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">b. Institutions of
interest<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Some institutions are of special interest to the study of social economy.
The most fundamental is a system of property rights. Upon this depend the
institutions of exchange, money, and money prices. <o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><b><span style="color: #444444; font-size: 10.0pt;">i. </span></b><b><span style="color: #444444; font-size: 7.0pt;"> </span></b><b><span style="color: #444444; font-size: 10.0pt;">Property rights</span></b><span style="color: #444444; font-size: 10.0pt;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Assumed in our
analysis is an organization of ownership described as private property. Menger
describes property rights:<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">The entire sum of goods at an economizing
individual’s command for the satisfaction of his needs, we call his <i>property</i>.
His property is not, however, an arbitrarily combined quantity of goods, but a
direct reflection of his needs, an integrated whole, no essential part of which
can be diminished or increased without affecting realization of the end it
serves.” (76)<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Having a property
right ensures an agent’s command over the object owned and the attributes over
which he has rights. In our model of the economy, as well as in real life,
agents are empowered by their ownership of goods. When an agent owns a good,
that good is under his control. Thus, property ownership provides a space for a
property owner to experiment with the use of goods at his disposal. <o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">1. Exchange<o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Exchange occurs between owners of property. In an exchange some quantity
of a good is exchanged for some quantity of another good. So long as coercion
is not involved, that which an agent receives in an exchange is valued more
highly by him than that which is given up. <o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">The earliest exchanges were barter exchanges. Goods could only be traded
directly for other goods. Imagine that our agent wanted a good, good C, but could not find a party
that was willing to accept the good that he was able to offer, good A. That agent
would have to exchange the good in his possession for a good, good B, that was desired
by a party willing to offer the good originally desired. This is costly as our
agent would have to spend time learning what goods each trading partner desired
and perform a series of exchanges if he finds that he must iterate the process.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><b><span style="color: #444444; font-size: 10.0pt;">2. Money</span></b><span style="color: #444444; font-size: 10.0pt;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Money arises as a
means of reducing the costs of exchange. Commodities that come be used as money
usually have the following characteristics.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">1. Durability<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">2. Divisibility<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">3. Relative scarcity<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">4. Saleability<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">5. Portability<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit;"><span style="font-size: 10pt;">These </span><span style="font-size: 13.3333px;">characteristics</span><span style="font-size: 10pt;"> allow money to serve as<o:p></o:p></span></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">1. A
medium of exchange.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">2. A
store of value.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">3. A
common unit of account.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">4. A
standard of deferred payment.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Money significantly
reduces the cost of exchange and allows for value of goods to be measured in a
common unit. These are, money prices.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #444444; font-family: inherit; font-size: 10.0pt;">3. Prices <o:p></o:p></span></b></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">Prices denominate in a given currency allow agents
to compare the value of goods. So long as the supply and demand for money are
relatively stable, prices rise and fall in light of changes in demand for and
supply of the good in question. Prices promote the development of more accurate
expectations. Agents can look at past transactions and objectively measure
their profitability. Likewise, agents can estimate future revenues and costs in
an attempt to engage in business that is profitable and avoid business that is
unprofitable. <o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;">When the price of a
good rises due to an increase in demand for it – a willingness of the average
consumer to pay more for some quantity of the good – sensing entrepreneurs are
incentivized to produce more of the good. Likewise if the price falls due to a
fall in demand, sensing entrepreneurs are incentivized to produce less of it. As
with price of other goods, the price of money is affected by factors of supply
and demand for money. Suppose the price of money, money’s average price in
terms of other goods, rises. More money will be produced. If the price falls,
less money will be produced.</span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10.0pt;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10pt;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10pt;"><br /></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: #444444; font-family: inherit; font-size: 10pt;">Adapted from "<a href="http://moneymarketsandmisperceptions.blogspot.com/2015/01/formulating-framework-for-economic.html">Formulating a Framework for Economic Analysis</a>"</span></div>
<div class="MsoNormal">
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1240730580083032584.post-53078151609883624462017-01-17T15:19:00.000-08:002017-08-22T07:19:14.020-07:00A theory of social economy I: what is theory?<div class="MsoNormal" style="text-align: left;">
<div class="MsoNormal">
Many approach macroeconomics as a combination of the study of the sum of all economic activity and of trade between persons from different and across large regions. If microeconomics is, as it is so often
formulated, the study of economic decision making and economic activity at the
levels of the firm and industry, then it is understandable that you may think
of macroeconomics as the study of economic activity in aggregate. Topics that often come
up in a macroeconomics class include composition and significance of total income
measures such as gross domestic product (GDP) and gross national product (GNP),
international trade, and money, banking, and monetary policy. We will cover many issues
related to these, but we will also spend time thinking about the composition of
these measures and the role of a theory of economic evolution in understanding
the development of modern markets. In this course, we will divide analysis between a theory of action and agent <i>understanding </i>and emergence with the market system<i>. </i>To the extent that we study macroeconomics, we will include money, banking, and the emergence of extended orders promoted by specialization and market exchange.<o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
<b style="text-align: left;"><br /></b></div>
<div class="MsoNormal" style="text-align: justify;">
<b style="text-align: left;">The role of theory</b></div>
<div class="MsoNormal" style="text-align: justify;">
<b style="text-align: left;"><br /></b></div>
<div class="MsoNormal">
Before we
begin, we must ask, why do we need economic theory in the first place? To
arrive at an answer to this question, let's engage in a thought
experiment. Imagine the morning that preceded you coming to this class.
Perhaps you woke up early and scanned through the first assigned reading in
preparation for the class. Or perhaps, more likely, you woke up with just
enough time to make yourself presentable and travel to class. How would you
explain the process of waking to someone without using words? Of driving? Of
sitting down and preparing your mind to receive a lecture? Now that you have imagined
how to do this, imagine how you would explain this to a 3 year old who has no
concept of education or learning. How do you explain this to a 3 year old who
may not even understand that driving requires the following of the rules of the
road? How do you explain the material that you read to this 3 year old? The
answer is, simply, that doing any of this would require creative use of language that the 3 year old can understand and use to build
some conception of the events that comprise your morning.</div>
<div class="MsoNormal">
<span style="text-indent: 0.5in;"><br /></span></div>
<div class="MsoNormal">
<span style="text-indent: 0.5in;">Now imagine that this 3 year old
speaks Spanish and only Spanish. Most of you would have to find another way to
communicate with this child. Maybe you draw pictures of yourself, but without a spoken language to help the child build his or her own understanding of the events of
your morning, the child may remain confused. Maybe it seems to the child that the
picture of you sitting next to hundreds of other students is actually you
sitting in the audience of a game show. The challenge of communication is to
convey new concepts to one another using terms and scenarios that the receiver
can use to relate what they already know to the new concepts without
attributing in whole the attributes of these concepts. For the child, going to
a lecture hall is </span><i style="text-indent: 0.5in;">kind of</i><span style="text-indent: 0.5in;"> like
sitting in the audience of a game show, except that instead of going to be
entertained, the primary goal of the student is to learn (and if they are lucky
they will find the lectures entertaining).</span></div>
<div class="MsoNormal">
<span style="text-indent: 0.5in;"><br /></span></div>
<div class="MsoNormal">
<span style="text-indent: 0.5in;">We learn by metaphor. Some
metaphors are better than others. In science, we create metaphors with the goal
of making the attributes of the metaphor and relations between those attributes
precise. We abstract away from details that do not directly bear upon the
details in which we are interested. By abstracting in this manner, we model the
world around us. The power of our models are indicated by their ability to 1)
coherently explain the events in which we are interested and 2) to predict
likely outcomes of the category of events that we study.</span></div>
<div class="MsoNormal">
<span style="text-indent: 0.5in;"><br /></span></div>
<div class="MsoNormal">
<span style="text-indent: 0.5in;">Science expresses abstraction <i>par excellence</i>. Let’s think of the abstraction that is used in everyday social knowledge. In particular,
imagine the knowledge that you have of your mother or of your brother or
sister, or of your best friend. How do you frame your interactions with them? Are
there certain words, actions, or events that you know will make your mother feel content. Are there others that will make your best friend laugh? Your ability to
imagine this indicates that you have a theory of the people in your life who
are significant to you. Is your theory of your mother the same as your theory
of your father or of your friend or sibling? Most likely it is not. There may
exist some common features, but the characters that make up the musical that is
your life have many unique facets that are not shared between them.</span></div>
<div class="MsoNormal">
<span style="text-indent: 0.5in;"><br /></span></div>
<div class="MsoNormal">
<span style="text-indent: 0.5in;">We can take this exercise further.
How do you imagine that you interact with persons that you do not know? Take,
for instance, a cashier. What is your model of a cashier? What is your model of
an elderly person? Of a man or woman? Do you have a model of a third category
for gender? I can ask you, “How do you interact with a cashier that is an
elderly woman?”, and you will probably be able to provide a well reasoned response.</span></div>
<div class="MsoNormal">
<span style="text-indent: 0.5in;"><br /></span></div>
<div class="MsoNormal">
<span style="text-indent: 0.5in;">Simply by thinking, you have shown yourself that you model the social world around you. The models you use are quite elaborate. They can be combined and adjusted to create new models
in the course of new scenarios that we encounter. You can use these models to
have discussions about these scenarios. And the beauty is that nearly </span><span style="text-indent: 0.5in;">everyone</span><span style="text-indent: 0.5in;"> is capable of performing these
operations. People are far more intelligent than we give them credit for.</span></div>
<div class="MsoNormal">
<span style="text-indent: 0.5in;"><br /></span></div>
<div class="MsoNormal">
<span style="text-indent: 0.5in;">Is every model just as good as
every other model? We can inform this question with a more particular question.
If I want to learn to be a successful car salesman, should I attempt to learn
from my father who has practically zero experience selling anything or should I
find a car salesman who appears to be successful and is willing to allow me to
shadow him on occasion? I want to emulate the model that the successful car
salesman follows. Likewise, if I want to become more personable, I should spend
time with a person who is naturally social and who is a pleasure to be around.
We learn by attempting to copy the model, in part or in whole, of people whose
actions and lives we would like to emulate.</span></div>
<div class="MsoNormal" style="text-indent: .5in;">
<o:p></o:p></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
<b>What is social economy?<o:p></o:p></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
A theory
of social economy represents an attempt to create a theory of society comprised
of actors that is of the highest level of abstraction. It is a theory that can
define, at the most general level, the features that comprise our social world.
We deal with a theory of social economy, not just a theory of economy. We will
cover pure economic theory in this class, but it would be inappropriate to <i>only </i>cover economic theory as economic
action always occurs in light of a particular <i>understanding</i> of an agent. Just as you have a theory of your family
members and may even have theories about their theories of the world, all
acting agents have theories about the world around them.</div>
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
At the
most fundamental level, when we act we ask ourselves, “Will this action make me
better off?” A more sophisticated actor may ask, "Will this action create a state of affairs that I prefer over what would exist otherwise? If the answer is yes for a particular act, we follow through with
it. When a person acts to make themselves better off, we say that the person
acts to gain utility. Utility is a purely subjective phenomenon. It cannot be
measured directly, though as we will later see it, money prices help us to
estimate the value imbued to a particular act or resource in light of the
income of the demanders and the supply of the good or action in light of the
cost of inputs. From the fundamental principle of action, we are able to
explain general features that arise during the course of action in society. We will
learn, as is the case in other domains of study, the whole of society is
greater than the sum of its parts.</div>
<div class="MsoNormal">
<span style="text-indent: 0.5in;"><br /></span></div>
<div class="MsoNormal">
<span style="text-indent: 0.5in;">Underlying many topics that we investigate are institutions. Institutions arise during the
course of interaction between agents. Institutions are coordination devices
that include shared or interlocking rules that guide interaction. Agent </span><i style="text-indent: 0.5in;">understanding</i><span style="text-indent: 0.5in;"> is shaped by these institutions.
They allow us to form expectations concerning the results of our actions, which
includes the response of others. They provide concepts for agents to anchor their thinking. In forming a theory of social economy, we will
develop a deeper understanding of these general features with which we interact
daily.</span></div>
<div class="MsoNormal" style="text-indent: .5in;">
<o:p></o:p></div>
</div>
<div class="MsoNormal" style="text-indent: .5in;">
<o:p></o:p></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1240730580083032584.post-32476465348091951552017-01-13T08:33:00.002-08:002017-08-22T06:30:23.281-07:00What can a pencil teach us about economic theory?<br />
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
How is a pencil
created? This question was posited by Leonard Read in his popular story, “<a href="http://www.econlib.org/library/Essays/rdPncl1.html">I, Pencil</a>”. A
pencil is a relatively simple product – relatively meaning, in comparison to
other products. Still, it would be impossible for any one person to oversee the
entire process of producing a pencil. Where does the wood for the pencil come
from? How is it processed? How do the lumberjacks acquire sustenance? Where
does the graphite lead come from? How is it processed? Who makes the lacquer?
Where does the rubber for the eraser come from? Who brings all of these
elements together? "I, Pencil" is a
foray into the world of economic complexity.</div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br /></div>
<div style="text-align: center;">
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/IYO3tOqDISE" width="560"></iframe> </div>
<br />
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
Richard Wagner describes the
economy as including an ecology of plans (<a href="https://www.amazon.com/Mind-Society-Human-Action-Foundations/dp/0415750016">2010</a>). Bryan Arthur describes the
complexity paradigm as an accounting of continual emergence in an economy as
plans of agents are constantly upset and readjusted (<a href="http://tuvalu.santafe.edu/~wbarthur/Papers/Comp.Econ.SFI.pdf">2013</a>).
Not every plan that exists can be executed. Some plan to use scarce resources
must be chosen over other plans. Economic theory identifies certain regularities that arise as plans of actors compete for resources.<br />
<br />
Economics is the study of human action. Action entails the execution of a plan or plans.
Categorically, a human agent acts to improve one’s state of well-being, however
the agent defines this. We may say, more generally, that action is aimed at
improving the state of the world that the acting agent will inherit in the
future. While all action occurs at the level of the individual, interaction
between agents requires coordination. This requires that agents come to share and interact with knowledge that impinges upon their decisions. As F. A. Hayek noted, “the
empirical element in economic theory . . . consists of propositions about the
acquisition of knowledge (<a href="https://mises.org/sites/default/files/Individualism%20and%20Economic%20Order_4.pdf">33, 1937</a>).” <span style="mso-spacerun: yes;"> </span></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
Under a system of
private property, much of the work of knowledge transmission is performed by
market prices. Prices help coordinate economic activity. Having a finite
budget, each agent must choose what he will and will not consume. He must
choose which inputs to use. He must plan accordingly so that his flow of income
at least offsets expenditures. Agents all follow some form of this rule, and
must change their approach if the rule is violated. Otherwise, they will go
bankrupt. </div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
For a price to exist,
there must be an exchange executed between two parties. We know that this price
will lie somewhere above the willingness to accept of the seller and below the
willingness to pay of the bidder. As long as the price lies somewhere between
these two points, markets will approximate the efficient outcome predicted by
neoclassical economic theory (<a href="http://opim.wharton.upenn.edu/~sok/papers/g/gode-sunder-1993.pdf">Gode and Sunder 1993</a>; <a href="https://pdfs.semanticscholar.org/0017/feb3037358b5c24d85435b55a42aa93e535b.pdf">Axtell 2005</a>) and we will
observe coordination at the system level (<a href="http://jameslcaton.com/CatonEntrepreneurshipABM.pdf">Caton 2016</a>). The price I pay in an
exchange is simply that which is given up in order to gain the good I desire. If
I am willing to pay a price that is greater than the price willing to be paid
by any competing bidder, I can assure control of the desired good. Consider a
house that is for sale. If I and another person both desire the house, we will
both have to guess at the bid price that will secure the house. One of us will
earn claim to this physical capital with a higher bid, the other will not. </div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
The party who owns a
resource is the one who is able to choose how the resource will be used and
toward what end. Thus, in constructing a theoretical system of exchange, we must
include a theory of property rights. The parameters of such rights depend upon the community in which a person operates and are set by beliefs of actors in the community and the incentives that reinforce certain patterns action. Ownership starts with the body. If you do
not own yourself, how can you own anything at all? A person can choose the
manner in which he invests his labor. Likewise, a person’s use of resources
represents an extension of the will. You can only make plans using resources
that you own or that the other owners are willing to share through contract or an
implied reciprocal relationship. We will mostly concentrate on the use of
resources that depend upon contract, though reciprocal relationships are of
special importance to a theory of entrepreneurship and can be analyzed through
the lens of economic theory. </div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
Who gets to plan is simply
a result of one’s budget constraint, whose growth or lack thereof is a function
of one’s ability to perceive the needs of other actors and act in a
manner that coheres with the future. Not every plan that is executed will
succeed in achieving the end that the plan is believed to promote. I may buy a
home with expectation that its price will rise and allow me to resell it for a monetary
profit 5%. However, if upon resale, I only received 95% of the value that I
paid for the home, I have in fact suffered a loss (negative profit). Prices
represent the value of a good and allow an economic agent to perceive whether
or not her action is profitable. Prices allow for accounting and, thus, for
agents to make more efficient use of their resources.</div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
In the world that we
observe, the economy is comprised of relationships that are profitable for each
party involved. Employees of each firm in this process offer their service at a
price amenable to both themselves and their employer. These inputs are combined
within a firm to offer wood to companies that process that wood for a profit. Those
companies will offer the refined wood to the pencil manufacturers in Leonard
Reed’s story of the pencil. If the relationship between firms ceases to be
profitable, the firms will either have to reorient their internal structure,
their relationship with one another, or, failing a profitable orientation, cease to have a
relationship. </div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
We can imagine firms as
forming a network that is the structure of production. Each node in the network is a firm employs a particular bundle of resources that is positively valued. In order to be maintained, the
structure of production must contain firms whose revenues exceed their
expenditures.In the long run, the structure of production will tend to lose any nodes/firms that are not at least earning the average (market) rate of
return. In that case, the capital dedicated to this process can be more profitably invested elsewhere. This reinvestment is facilitated by financial markets where the interest rate tends to match the market rate of return.<br />
<br /></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
A simple rule organizes
production without a single overseer. Total revenue must equal or exceed total costs (TR => TC). Firms do not have the
privilege of attempting to guarantee that marginal revenues equal or exceed marginal costs (MR => MC) for each process of production except over a discrete
period where they reevaluate their actions at the end of that period. A firm
must choose a strategy for production and reevaluate at some later date. At the end of each period, a firm can continue
employing its previous strategy, revise its plans, or exit the pool of
competing firms. Likewise, a laborer will compare the costs incurred for work
with the revenue currently earned from her labor. If she can earn a greater wage elsewhere,
she has incentive to alter the employment of her labor.</div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
This structure of
economic action, both at the individual and system levels, contain knowledge
that promotes the ends of consumers - this class includes, ultimately, those actors who act and produce profitably.
This structure, based upon a system of property rights, simplifies reality
sufficiently enough for agents to form expectations among one another. They provide
a medium through which production and exchange can occur. With common
expectations regarding interactions sufficiently realized, profit and loss
guide agents in the system. Those who have foresight will quickly adjust to
changing agent preferences, technologies, and flows of revenue and capital in
order to increase the likelihood of earning a profit. Those who don't will
likely incur economic losses.<br />
<br />
The production of the pencil follows this general
process. The firm that processes the timber, like the firm that creates rubber
erasers or that produces yellow paint, will continue to produce as long as
revenues remain sufficiently high. As long as entrepreneurs find a way to
profit from each step of production, they will, in piecemeal fashion,
successfully coordinate the resources and labor necessary to produce the final
good. In a single, brief
exposition, Leonard Reed’s story of the pencil has shown the mysteries that
can be uncovered by economic theory.</div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br />
<b>Key Terms:</b></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal; tab-stops: 193.25pt;">
<b>Profit
</b>– The difference between the value of the object or state acquired and the
value of the object or state given up in an exchange. At its foundation, this
is a feeling of gain or of loss. Monetary prices allow us to calculate an
objective measure of profit.<span style="mso-tab-count: 1;"> </span></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br />
<b>Efficiency</b> – A criterion
of action representing the lowest cost means of achieving a particular outcome</div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br />
<b>Exchange</b> – The trading of
resources between agents where the value of the object gained by each agent is
valued more highly than the object that is given up.</div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br />
<b>Labor</b> – Action offered
by an economic agent either for a contracted income. The value of labor tends
toward the value added to goods produced by that labor.</div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br />
<b>Capital</b> – Goods owned
by agents that can be used toward production. Markets tend to value capital
according to the sum of discounted expected income that it will earn in the
course of its life.</div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br />
<b>Technology</b> - The structure of organization of elements, both physical and social. Technology is contained in capital For example, a physical hammer is capital that embodies technology that we may think of, in abstract, as a hammer. Likewise, a the structure of production itself includes social and physical capital, both of which embody technology.</div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<br /></div>
<div class="MsoNormalCxSpMiddle" style="line-height: normal;">
<b>Structure of Production</b> - The network of activity comprised by firms and their capital. These existence of firms and relationships between one another depend upon exchange that promotes the profit of each party involved.<br />
<br />
Adapted from "'<a href="http://moneymarketsandmisperceptions.blogspot.com/2015/01/i-pencil-complexity-and-economic.html">I, Pencil', Complexity, and Economic Coordination</a>"</div>
<div class="notranslate" id="kpm_content_wrapper">
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1240730580083032584.post-79201957594020074792016-12-03T11:53:00.000-08:002016-12-03T11:59:47.344-08:00Objects with Functions in PythonI've learned the hard way that using classes makes programming much easier to work with. I had developed a habit of not creating classes when I make a function. While this can be useful for a simple program, I ran into difficulties when I would attempt to import functions from other py files. Building classes makes this process much easier.<br />
<br />
A typical example of a class from an introductory book does not make clear the uses of classes and objects instantiated from them. Consider this Cat class that I have made:<!-- HTML generated using hilite.me --><br />
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #888888;"># cat class</span>
<span style="color: #008800; font-weight: bold;">class</span> <span style="color: #bb0066; font-weight: bold;">Cat</span>():
<span style="color: #008800; font-weight: bold;">def</span> <span style="color: #0066bb; font-weight: bold;">__init__</span>(<span style="color: #007020;">self</span>, name, color):
<span style="color: #007020;">self</span><span style="color: #333333;">.</span>name <span style="color: #333333;">=</span> name
<span style="color: #007020;">self</span><span style="color: #333333;">.</span>color <span style="color: #333333;">=</span> color
<span style="color: #008800; font-weight: bold;">def</span> <span style="color: #0066bb; font-weight: bold;">helloKitty</span>(<span style="color: #007020;">self</span>):
<span style="color: #008800; font-weight: bold;">print</span>(<span style="background-color: #fff0f0;">"My name is "</span> <span style="color: #333333;">+</span> <span style="color: #007020;">self</span><span style="color: #333333;">.</span>name <span style="color: #333333;">+</span> <span style="background-color: #fff0f0;">". I am a "</span> <span style="color: #333333;">+</span> <span style="color: #007020;">self</span><span style="color: #333333;">.</span>color <span style="color: #333333;">+</span> <span style="background-color: #fff0f0;">" cat."</span>)
<span style="color: #008800; font-weight: bold;">def</span> <span style="color: #0066bb; font-weight: bold;">petCat</span>(<span style="color: #007020;">self</span>):
<span style="color: #008800; font-weight: bold;">print</span>(<span style="color: #007020;">self</span><span style="color: #333333;">.</span>name <span style="color: #333333;">+</span> <span style="background-color: #fff0f0;">" purred. This cat likes when you pet it."</span>)
cat <span style="color: #333333;">=</span> Cat(name <span style="color: #333333;">=</span> <span style="background-color: #fff0f0;">"Milo"</span>, color <span style="color: #333333;">=</span> <span style="background-color: #fff0f0;">"orange"</span>)
cat<span style="color: #333333;">.</span>helloKitty()
cat<span style="color: #333333;">.</span>petCat()
</pre>
</div>
<br />
Running this will return:
<!-- HTML generated using hilite.me --><br />
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;">runfile(<span style="background-color: #fff0f0;">'C:/Users/James/Google Drive/Python Scripts/Lessons/CatObject.py'</span>, wdir<span style="color: #333333;">=</span><span style="background-color: #fff0f0;">'C:/Users/James/Google Drive/Python Scripts/Lessons'</span>)
My name <span style="color: black; font-weight: bold;">is</span> Milo<span style="color: #333333;">.</span> I am an orange cat<span style="color: #333333;">.</span>
Milo purred<span style="color: #333333;">.</span> This cat likes when you pet it<span style="color: #333333;">.</span>
</pre>
</div>
<br />
What do we get from this? Well, the basic pieces are present. We have a class, which includes all indented text beneath the text, "class Cat():". We have two objects that we pass when we call the function, defined in "def __init__(self, name, color):" These will be used when we call the functions "helloKitty()" and "petCat()". To call these functions, it is best if we first instantiate a Cat object. I have called this object, "cat". I call the functions owned by "cat" by adding a "." and the function name. Thus, cat.helloKitty() and cat.petCat() call the two lines you see above.<br />
<br />
Classes like Cat are boring. It doesn't help me to internalize the significance of objects and functions. I have made a class, MathOperations, for this purpose. MathOperations will let you sum, multiply, raise a base to an exponent and multiply a base by 10 to the specified exponent:<br />
<br />
<!-- HTML generated using hilite.me --><br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #888888;"># Math Functions</span>
<span style="color: #008800; font-weight: bold;">class</span> <span style="color: #bb0066; font-weight: bold;">MathOperations</span>():
<span style="color: #008800; font-weight: bold;">def</span> <span style="color: #0066bb; font-weight: bold;">__init__</span>(<span style="color: #007020;">self</span>):
<span style="color: #007020;">self</span><span style="color: #333333;">.</span>num <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">0</span>
<span style="color: #008800; font-weight: bold;">def</span> <span style="color: #0066bb; font-weight: bold;">add</span>(<span style="color: #007020;">self</span>, a, b):
<span style="color: #007020;">self</span><span style="color: #333333;">.</span>num <span style="color: #333333;">=</span> a <span style="color: #333333;">+</span> b
<span style="color: #008800; font-weight: bold;">return</span> <span style="color: #007020;">self</span><span style="color: #333333;">.</span>num
<span style="color: #008800; font-weight: bold;">def</span> <span style="color: #0066bb; font-weight: bold;">multiply</span>(<span style="color: #007020;">self</span>, a, b):
<span style="color: #007020;">self</span><span style="color: #333333;">.</span>num <span style="color: #333333;">=</span> a <span style="color: #333333;">*</span> b
<span style="color: #008800; font-weight: bold;">return</span> <span style="color: #007020;">self</span><span style="color: #333333;">.</span>num
<span style="color: #008800; font-weight: bold;">def</span> <span style="color: #0066bb; font-weight: bold;">power</span>(<span style="color: #007020;">self</span>, a, b):
<span style="color: #007020;">self</span><span style="color: #333333;">.</span>num <span style="color: #333333;">=</span> a <span style="color: #333333;">**</span> b
<span style="color: #008800; font-weight: bold;">return</span> <span style="color: #007020;">self</span><span style="color: #333333;">.</span>num
<span style="color: #008800; font-weight: bold;">def</span> <span style="color: #0066bb; font-weight: bold;">exp</span>(<span style="color: #007020;">self</span>, a, b):
<span style="color: #007020;">self</span><span style="color: #333333;">.</span>num <span style="color: #333333;">=</span> a <span style="color: #333333;">*</span> <span style="color: #0000dd; font-weight: bold;">10</span> <span style="color: #333333;">**</span> b
<span style="color: #008800; font-weight: bold;">return</span> <span style="color: #007020;">self</span><span style="color: #333333;">.</span>num
math <span style="color: #333333;">=</span> MathOperations()
m <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">8</span>
n <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">4</span>
add <span style="color: #333333;">=</span> math<span style="color: #333333;">.</span>add(m, n)
multiply <span style="color: #333333;">=</span> math<span style="color: #333333;">.</span>multiply(m, n)
power <span style="color: #333333;">=</span> math<span style="color: #333333;">.</span>power(m, n)
exp <span style="color: #333333;">=</span> math<span style="color: #333333;">.</span>exp(m, n)
names <span style="color: #333333;">=</span> [<span style="background-color: #fff0f0;">'add'</span>, <span style="background-color: #fff0f0;">'multiply'</span>, <span style="background-color: #fff0f0;">'power'</span>, <span style="background-color: #fff0f0;">'exp'</span>]
array <span style="color: #333333;">=</span> [add, multiply, power, exp]
<span style="color: #008800; font-weight: bold;">for</span> i <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #007020;">len</span>(array)):
<span style="color: #008800; font-weight: bold;">print</span>(names[i], <span style="color: #007020;">str</span>(m), <span style="color: #007020;">str</span>(n), <span style="background-color: #fff0f0;">'</span><span style="background-color: #fff0f0; color: #666666; font-weight: bold;">\n</span><span style="background-color: #fff0f0;">'</span>, <span style="color: #007020;">str</span>(array[i]))
</pre>
</div>
<br />
At the bottom of this file, I create a MathOperations() object and use its function with numbers 8 and 4 (in that order). I want to show what values these numbers yield in conjunction with the functions and organize the results. Final results return:<br />
<!-- HTML generated using hilite.me --><br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;">runfile(<span style="background-color: #fff0f0;">'C:/Users/James/Google Drive/Python Scripts/Lessons/MathFunctionLesson.py'</span>, wdir<span style="color: #333333;">=</span><span style="background-color: #fff0f0;">'C:/Users/James/Google Drive/Python Scripts/Lessons'</span>)
add <span style="color: #0000dd; font-weight: bold;">8</span> <span style="color: #0000dd; font-weight: bold;">4</span>
<span style="color: #0000dd; font-weight: bold;">12</span>
multiply <span style="color: #0000dd; font-weight: bold;">8</span> <span style="color: #0000dd; font-weight: bold;">4</span>
<span style="color: #0000dd; font-weight: bold;">32</span>
power <span style="color: #0000dd; font-weight: bold;">8</span> <span style="color: #0000dd; font-weight: bold;">4</span>
<span style="color: #0000dd; font-weight: bold;">4096</span>
exp <span style="color: #0000dd; font-weight: bold;">8</span> <span style="color: #0000dd; font-weight: bold;">4</span>
<span style="color: #0000dd; font-weight: bold;">80000</span>
</pre>
</div>
<br />
Alternately, I can achieve the same output by importing MathOperations from a different file:<br />
<br />
<!-- HTML generated using hilite.me --><br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #008800; font-weight: bold;">from</span> <span style="color: #0e84b5; font-weight: bold;">MathFunctionLesson</span> <span style="color: #008800; font-weight: bold;">import</span> <span style="color: #333333;">*</span>
math <span style="color: #333333;">=</span> MathOperations()
m <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">8</span>
n <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">4</span>
add <span style="color: #333333;">=</span> math<span style="color: #333333;">.</span>add(m, n)
multiply <span style="color: #333333;">=</span> math<span style="color: #333333;">.</span>multiply(m, n)
power <span style="color: #333333;">=</span> math<span style="color: #333333;">.</span>power(m, n)
exp <span style="color: #333333;">=</span> math<span style="color: #333333;">.</span>exp(m, n)
names <span style="color: #333333;">=</span> [<span style="background-color: #fff0f0;">'add'</span>, <span style="background-color: #fff0f0;">'multiply'</span>, <span style="background-color: #fff0f0;">'power'</span>, <span style="background-color: #fff0f0;">'exp'</span>]
array <span style="color: #333333;">=</span> [add, multiply, power, exp]
<span style="color: #008800; font-weight: bold;">for</span> i <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #007020;">len</span>(array)):
<span style="color: #008800; font-weight: bold;">print</span>(names[i], <span style="color: #007020;">str</span>(m), <span style="color: #007020;">str</span>(n), <span style="background-color: #fff0f0;">'</span><span style="background-color: #fff0f0; color: #666666; font-weight: bold;">\n</span><span style="background-color: #fff0f0;">'</span>, <span style="color: #007020;">str</span>(array[i]))
</pre>
</div>
<br />
<br />
This barely scratches the surface of the topic, but it is more interesting and memorable than Cat.<br />
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1240730580083032584.post-8772409660269882762016-11-18T18:39:00.002-08:002016-11-18T18:41:14.293-08:00HeatSpace for NetLogoI have put up a beta version of heatspace. This program generates visualizations for Netlogo's BehaviorSpace. Find the program and manual <a href="http://jameslcaton.com/Research.html">here</a>:<br />
<blockquote class="tr_bq">
NetLogo is an agent-based modeling platform whose ease of use and functionality are hard to beat. The goal of this manual is to succinctly show how to generate visualizations that present significant portions of a model's parameter space. Those who are not accustomed to agent-based modeling may expect visualizations to come in the form of line plots. Line plots are an easy way to convey a limited amount of information to a user, but it is difficult to convey more than a few lines without confusing the observer. Instead of representing the value of an output spatially, heatmaps represent value using color.<br />
<br />
When we visualize the parameter space, it is not enough to represent this space only using a single run for each combination of parameters. Each combination must be mapped using a substantial number of runs. Usually 20 runs may produce a large enough sample to faithfully represent the parameter space. More is better. If generating data from model of interest is not a high cost endeavor, use more runs.<br />
<br />
HeatSpace averages the values generated at each time period during a run. These values can then mapped onto two axes whose values are fixed throughout a run . A single map can be generated for each time period of a run, creating series of frames analogous to a movie. Alternately, the <i>x</i>-axis of a heatmap can represent time so that the change in the value of an output in light of a change in either the <i>x</i> or <i>y</i> parameter value at period <i>t</i> can be represented.<br />
<div style="-qt-block-indent: 0; -qt-paragraph-type: empty; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;">
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbH6PdsKYJqJUskrEz3jIV7937gd6tDxKYxQqXUGZfnUgUGpGYymo1vVngq63DwEixJwUSIJ6qfFzpQAQHd83hu7ZYAEtgCxPrSe_10dEGRe6KEct549rrgxSaD1TaLZ_1rY-TKUEgMHY/s1600/expanded-gui.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="146" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbH6PdsKYJqJUskrEz3jIV7937gd6tDxKYxQqXUGZfnUgUGpGYymo1vVngq63DwEixJwUSIJ6qfFzpQAQHd83hu7ZYAEtgCxPrSe_10dEGRe6KEct549rrgxSaD1TaLZ_1rY-TKUEgMHY/s400/expanded-gui.png" width="400" /></a></div>
</blockquote>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1240730580083032584.post-81745742719798326092016-11-15T13:23:00.002-08:002016-11-15T13:23:21.267-08:00JamesLCaton.com<span style="font-family: arial, helvetica, sans-serif;">Check out <a href="http://jameslcaton.com/">my personal website</a>:</span><br />
<blockquote class="tr_bq">
<span style="font-family: arial, helvetica, sans-serif;">I am a graduate lecturer and candidate for a Ph.D. in economics at George Mason University. I have been recipient of the F. A. Hayek Fellowship from Mercatus, the I.H.S. Humane Studies Fellowship, and their Summer Research Fellowship. I hold an M.A. in Economics from San Jose State University where I was a participant in the Student Faculty Partnership and received the Award for Excellence in Economics. I have co-edited </span><i style="font-family: arial, helvetica, sans-serif;">Macroeconomics</i><span style="font-family: arial, helvetica, sans-serif;">, a 2 volume set which is a collection of essays and primary sources that represent the core of macroeconomic thought. I have also published articles in the </span><i style="font-family: arial, helvetica, sans-serif;">Review of Austrian Economics</i><span style="font-family: arial, helvetica, sans-serif;"> and </span><i style="font-family: arial, helvetica, sans-serif;">Advances in Austrian Economics</i><span style="font-family: arial, helvetica, sans-serif;"> and published book reviews for </span><i style="font-family: arial, helvetica, sans-serif;">EH.net</i><span style="font-family: arial, helvetica, sans-serif;">, </span><i style="font-family: arial, helvetica, sans-serif;">The Journal of Markets and Morality</i><span style="font-family: arial, helvetica, sans-serif;"> and </span><i style="font-family: arial, helvetica, sans-serif;">History: Review of New Books.</i></blockquote>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1240730580083032584.post-90034691197300351202016-11-02T10:34:00.001-07:002016-11-27T16:34:02.246-08:00Ex Ante, Ex Post: Making Sense of Rational Expectations and the Efficient Market HypothesisThe move from a predominantly Keynesian paradigm in macroeconomics to the success of monetarist and the new classical macroeconomics that followed represents a shift from a general skepticism of markets within economics to a belief in market efficiency. The most extreme version of this is represented by real business cycle theorists who model the macroeconomy without using an upward sloping short-run aggregate supply curve. (This is actually how I prefer to teach disequilibrium effects associated with changes in aggregate demand.) The emphasis of these models is equilibrium which is, on average, reached in the economic system these models are built on. The results obtained from these models have been successful. In the long-run, the quantity theory holds true. In the long-run, the economy tends to grow at a steady rate, affected mostly by impediments to production and exchange driven by policy. What could be wrong about a field that has generated a tremendous amount of explanatory power?<br />
<br />
John Maynard Keynes objected to long-run analysis of the classical economists, meaning most economists who preceded him. This included many of his contemporaries. He claimed that the agents of economic theory were assumed to have higher quality knowledge and decision-making abilities than they actually had. In a sense, Keynes was correct, but he overstated his case. "In the long-run, we're all dead" is a catchy slogan. It is also an abuse of economic ontology. The efficacy of the assumption of rational expectations and of the efficient market hypothesis depend on this distinction between long-run and short-run. Given time for adjustment and a lack of external perturbations, we expect markets will reach equilibrium prices and outputs for different goods. In the long-run, markets select for agents whose knowledge, as reflected by their action, is superior in light of the outcomes these actions generate. In the long-run, agent action is tightly constrained by one's budget constraint. In the short-run, an agent can act with little regard for one's budget constraint. This may be unwise, especially if taken to the extreme case, but eventually, bills must be paid or else that agent loses his power. Second, we must consider the rate of feedback that economic agents receive concerning their investments. Information cascades dominate human decision-making (<a href="https://www.aeaweb.org/articles?id=10.1257/jep.12.3.151">Bikchandani, Hirshleifer, and Welch, 1998</a>; <a href="http://www.sciencedirect.com/science/article/pii/S0167487006000845">Earl, Peng, and Potts, 2007</a>). That is, agents learn from one another, copying those who appear to be successful and what appears to be common wisdom. The intelligence of one or a few are shared among many. Think about responses of investors, lay and professional, to perceived opportunities in the last two booms that dominated U.S. financial markets. Common perception went something like:<br />
<br />
<blockquote class="tr_bq">
"The housing market is looking good and remember that the average price of real estate almost never falls!" </blockquote>
<blockquote class="tr_bq">
"Have you heard about investments in tech? Better profit from the rise of the internet while we still can!"</blockquote>
<br />
Why didn't investors see these "bubbles" coming if markets are truly rational?<br />
<br />
Markets are rational, but we sometimes forget to ask what it is that makes them rational. Failure makes them rational. Rational expectations and the efficient market hypothesis reflect the equilibrium arrived at by the market process. If there are above market rates of profit to be gained by pursuing one investment over another, those who invest in those markets will grow their total wealth and, in the process, push the rate of profit for that investment back down toward the market average. Those who miss out on these opportunities will grow at a lower rate relative to those who gained from them. Likewise, those whose investments return a below average rate of profit will be encouraged to pursue other avenues in light of opportunity cost. Those from this category whose profits are actually negative receive a strong signal to scale down their efforts or leave the market. In this process, many agents may guess wrong.<br />
<br />
Ex post, after the fact, the market tends to select out those whose efforts fail. This tends to empower agents whose expectations ex ante, before hand, are more correct. Market selection make rational expectations and efficient market hypotheses hold in the long-run. The existence of short-run fluctuations are well observed. In the short-run, changes in stock prices follow a Cauchy distribution (<a href="https://www.jstor.org/stable/2350752?seq=1#page_scan_tab_contents">Fama 1965</a>). Whatever their form, we do not experience these distributions themselves. Rather, we experience states that, over time, comprise these distributions. Rational expectations and the efficient market hypothesis don't dispute this. The long-run models derived from them acknowledge that markets are, on average, right, even if they are unstable at times. <br />
<br />
<div>
How do we describe the short-run? Criteria for efficiency hold constant agent belief, but it is this belief that can experience tremendous flux in the short-run.Without a theory of agent knowledge and the market process driven by this knowledge, a robust theory of the short-run in economics lies out of reach. History matters. Changes in nominal aggregates may not affect real aggregates in equilibrium, but they do affect the structure of society and they matter outside of equilibrium. We must take care in elaborating the implications of macroeconomic models. Short-run deviations can have long-run affects on capital structure. This is true in terms of physical capital in markets as well as social capital. Thus, the Great Depression radically changed economic, political, and academic landscape. In our own field, it allowed for the "<a href="http://onlinelibrary.wiley.com/doi/10.1111/j.1465-7295.1973.tb01999.x/abstract">Keynesian Diversion</a>" that lasted for several decades! From a given point of departure, it may lead to a realization of an inferior adjacent possible, which economic theory should consider.</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1240730580083032584.post-8520460631458382622016-10-31T06:12:00.004-07:002016-10-31T06:12:41.589-07:00The Magic of a One Percent Increase in Growth<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqQymu-z5_GNPDD2W2vYdyR5oNXatq_wRgPLlh6XdTBnB23J0LKhjQ5jq-J6mVGGrgab6aGP5WQXIl973qM964RPsU69Q34v6afqAmWBTmMiceqSo9YBVd3fVwM7pfOZ2LCCyIBviEs7U/s1600/Growth+Over+a+Century+at+different+Rates.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqQymu-z5_GNPDD2W2vYdyR5oNXatq_wRgPLlh6XdTBnB23J0LKhjQ5jq-J6mVGGrgab6aGP5WQXIl973qM964RPsU69Q34v6afqAmWBTmMiceqSo9YBVd3fVwM7pfOZ2LCCyIBviEs7U/s400/Growth+Over+a+Century+at+different+Rates.png" width="400" /></a></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1240730580083032584.post-23342715879851046022016-10-11T13:06:00.003-07:002016-10-11T13:15:43.340-07:00Knowledge, Lanugage and Coordination<a href="http://politicalentrepreneurs.com/?p=1475&preview=true">Check out my latest post at <i>Political Entrepreneurs</i></a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1240730580083032584.post-75790336710481122672016-10-04T15:11:00.000-07:002016-10-04T16:14:34.378-07:00Visualize the Behavior Space in Netlogo: 1.1Last month, <a href="http://moneymarketsandmisperceptions.blogspot.com/2016/09/how-to-succinctly-visualize-behavior.html">I posted code for visualizing the behavior-space using Python to process data from NetLogo</a>. See that post for the netlogo template you will want to use. The <i>py </i>file I posted before was not the easiest to interpret or to work with. It required that a programmer plan ahead, noting the position of runs with particular values for exogenously determined parameters. I rewrote the code so that the data processing is more efficient and easier to work with. The instance I am posting works with a behavior space where only two variables have been set exogenously across runs. However, if it was necessary, a third or fourth variable could be altered in the same set of runs so long as that third and/or fourth variable was assigned a particular value as runs are collected in <b>lines 196-209</b>. Also note that I have reduced the variety of heatmaps presented since only one is required to convey the process. I loop the image generator code to create a series of frames.<br />
<div>
<br /></div>
<div>
I may eventually post such an extension of the code if I generate output that requires this in the future. For now, I wanted to leave you with something easier to work with. Remember, you should end up with something that looks like this (from earlier post):<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipFqee6Kj3sPIFh7R8XK4QXFbwAKHSfXyfq-oxtxUd56K2F80c8xlvRiPCTj9BKix5LqhqOI3do-a2ljjzbGMaDx6BLsXYVxS1-wTHSFEOZIuhy3TpnOf-YXIUYSXh54yBnXxPx6Uod7g/s1600/WPC+Sugarscape.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipFqee6Kj3sPIFh7R8XK4QXFbwAKHSfXyfq-oxtxUd56K2F80c8xlvRiPCTj9BKix5LqhqOI3do-a2ljjzbGMaDx6BLsXYVxS1-wTHSFEOZIuhy3TpnOf-YXIUYSXh54yBnXxPx6Uod7g/s320/WPC+Sugarscape.png" width="320" /></a></div>
<br />
<br /></div>
<!-- HTML generated using hilite.me -->See the updated code below:<br /><br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<table><tbody>
<tr><td><pre style="line-height: 125%; margin: 0;"> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265</pre>
</td><td><pre style="line-height: 125%; margin: 0;"><span style="color: #008800; font-weight: bold;">from</span> <span style="color: #0e84b5; font-weight: bold;">__future__</span> <span style="color: #008800; font-weight: bold;">import</span> print_function
<span style="color: #008800; font-weight: bold;">import</span> <span style="color: #0e84b5; font-weight: bold;">numpy</span> <span style="color: #008800; font-weight: bold;">as</span> <span style="color: #0e84b5; font-weight: bold;">np</span>
<span style="color: #008800; font-weight: bold;">import</span> <span style="color: #0e84b5; font-weight: bold;">matplotlib.pyplot</span> <span style="color: #008800; font-weight: bold;">as</span> <span style="color: #0e84b5; font-weight: bold;">plt</span>
<span style="color: #008800; font-weight: bold;">import</span> <span style="color: #0e84b5; font-weight: bold;">matplotlib.cm</span> <span style="color: #008800; font-weight: bold;">as</span> <span style="color: #0e84b5; font-weight: bold;">cm</span>
<span style="color: #008800; font-weight: bold;">import</span> <span style="color: #0e84b5; font-weight: bold;">pandas</span> <span style="color: #008800; font-weight: bold;">as</span> <span style="color: #0e84b5; font-weight: bold;">pd</span>
<span style="color: #008800; font-weight: bold;">from</span> <span style="color: #0e84b5; font-weight: bold;">matplotlib.backends.backend_pdf</span> <span style="color: #008800; font-weight: bold;">import</span> PdfPages
<span style="color: #888888;"># of csv files generated by netlogo = # of runs</span>
files <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">1280</span>
<span style="color: #888888;"># length of each run of the model</span>
ticks <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">50</span>
<span style="color: #888888;"># these are the values of interest</span>
<span style="color: #888888;"># in this case we adjusted water metabolism and sugar metabolism</span>
axis_values <span style="color: #333333;">=</span> np<span style="color: #333333;">.</span>array([<span style="color: #333333;">.</span><span style="color: #0000dd; font-weight: bold;">45</span>, <span style="color: #333333;">.</span><span style="color: #0000dd; font-weight: bold;">5</span>, <span style="color: #333333;">.</span><span style="color: #0000dd; font-weight: bold;">55</span>, <span style="color: #333333;">.</span><span style="color: #0000dd; font-weight: bold;">6</span>, <span style="color: #333333;">.</span><span style="color: #0000dd; font-weight: bold;">65</span>, <span style="color: #333333;">.</span><span style="color: #0000dd; font-weight: bold;">7</span>, <span style="color: #333333;">.</span><span style="color: #0000dd; font-weight: bold;">75</span>, <span style="color: #333333;">.</span><span style="color: #0000dd; font-weight: bold;">8</span>])
<span style="color: #888888;"># length of x-axis and y-axis for heatmap</span>
num_x <span style="color: #333333;">=</span> <span style="color: #007020;">len</span>(axis_values)
num_y <span style="color: #333333;">=</span> num_x
runs_per_setting <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">20</span>
<span style="color: #888888;"># min and max x and y parameters for heatmap</span>
min_sugar_metabolism <span style="color: #333333;">=</span> <span style="color: #333333;">.</span><span style="color: #0000dd; font-weight: bold;">45</span>
max_sugar_metabolism <span style="color: #333333;">=</span> <span style="color: #333333;">.</span><span style="color: #0000dd; font-weight: bold;">8</span>
min_water_metabolism <span style="color: #333333;">=</span> <span style="color: #333333;">.</span><span style="color: #0000dd; font-weight: bold;">45</span>
max_water_metabolism <span style="color: #333333;">=</span> <span style="color: #333333;">.</span><span style="color: #0000dd; font-weight: bold;">8</span>
<span style="color: #888888;"># increments tested (here we assume constant increment, could be logged, quadratic, etc...)</span>
inc_sugar <span style="color: #333333;">=</span> <span style="color: #333333;">.</span><span style="color: #4400ee; font-weight: bold;">05</span>
inc_water <span style="color: #333333;">=</span> <span style="color: #333333;">.</span><span style="color: #4400ee; font-weight: bold;">05</span>
<span style="color: #888888;"># set up names of each column of data from csv</span>
names <span style="color: #333333;">=</span> pd<span style="color: #333333;">.</span>Series([
<span style="background-color: #fff0f0;">'sugar_metabolism_rate'</span>,
<span style="background-color: #fff0f0;">'water_metabolism_rate'</span>,
<span style="background-color: #fff0f0;">'sugar'</span>,
<span style="background-color: #fff0f0;">'water'</span>,
<span style="background-color: #fff0f0;">'mean_price'</span>,
<span style="background-color: #fff0f0;">'price_variance'</span>,
<span style="background-color: #fff0f0;">'population'</span>,
<span style="background-color: #fff0f0;">'basic_only'</span>,
<span style="background-color: #fff0f0;">'basic_herder'</span>,
<span style="background-color: #fff0f0;">'basic_arbitrageur'</span>,
<span style="background-color: #fff0f0;">'basic_herder_arbitrageur'</span>,
<span style="background-color: #fff0f0;">'switcher_only'</span>,
<span style="background-color: #fff0f0;">'switcher_herder'</span>,
<span style="background-color: #fff0f0;">'switcher_arbitrageur'</span>,
<span style="background-color: #fff0f0;">'switcher_herder_arbitrageur'</span>,
<span style="background-color: #fff0f0;">'percent_basic'</span>,
<span style="background-color: #fff0f0;">'percent_arbitrageur'</span>,
<span style="background-color: #fff0f0;">'percent_herder'</span>,
<span style="background-color: #fff0f0;">'percent_switcher'</span>,
<span style="background-color: #fff0f0;">'basic_only_wealth'</span>,
<span style="background-color: #fff0f0;">'basic_herder_wealth'</span>,
<span style="background-color: #fff0f0;">'basic_arbitrageur_wealth'</span>,
<span style="background-color: #fff0f0;">'basic_herder_arbitrageur_wealth'</span>,
<span style="background-color: #fff0f0;">'switcher_only_wealth'</span>,
<span style="background-color: #fff0f0;">'switcher_herder_wealth'</span>,
<span style="background-color: #fff0f0;">'switcher_arbitrageur_wealth'</span>,
<span style="background-color: #fff0f0;">'switcher_herder_arbitrageur_wealth'</span>,
<span style="background-color: #fff0f0;">'sugar_flow'</span>,
<span style="background-color: #fff0f0;">'water_flow'</span>,
<span style="background-color: #fff0f0;">'distance_from_equilibrium_price'</span>,
<span style="background-color: #fff0f0;">'fifty_period_RAP'</span>,
<span style="background-color: #fff0f0;">'mean_rate_of_price_change'</span>])
<span style="color: #888888;"># names dict used to instantiate an m X n array that will be used</span>
<span style="color: #888888;"># to keep track of the average value of each variable at each tick for each category</span>
<span style="color: #888888;"># will be inserted into mean_values dataframe</span>
names_dict <span style="color: #333333;">=</span> {
<span style="background-color: #fff0f0;">'sugar_metabolism_rate'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'water_metabolism_rate'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'sugar'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'water'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'mean_price'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'price_variance'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'population'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'basic_only'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'basic_herder'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'basic_arbitrageur'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'basic_herder_arbitrageur'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'switcher_only'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'switcher_herder'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'switcher_arbitrageur'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'switcher_herder_arbitrageur'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'percent_basic'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'percent_arbitrageur'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'percent_herder'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'percent_switcher'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'basic_only_wealth'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'basic_herder_wealth'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'basic_arbitrageur_wealth'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'basic_herder_arbitrageur_wealth'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'switcher_only_wealth'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'switcher_herder_wealth'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'switcher_arbitrageur_wealth'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'switcher_herder_arbitrageur_wealth'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'sugar_flow'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'water_flow'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'distance_from_equilibrium_price'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'fifty_period_RAP'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'basic_only_wealth_per_capita'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'basic_herder_wealth_per_capita'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'basic_arbitrageur_wealth_per_capita'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'basic_herder_arbitrageur_wealth_per_capita'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'switcher_only_wealth_per_capita'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'switcher_herder_wealth_per_capita'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'switcher_arbitrageur_wealth_per_capita'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'switcher_herder_arbitrageur_wealth_per_capita'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'percent_basic_only'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'percent_basic_herder'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'percent_basic_arbitraguer'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'percent_basic_herder_arbitraguer'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'percent_switcher_only'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'percent_switcher_herder'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'percent_switcher_arbitraguer'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'percent_switcher_herder_arbitraguer'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
}
<span style="color: #888888;"># Lists for used to generate new categories of data</span>
new_category <span style="color: #333333;">=</span> pd<span style="color: #333333;">.</span>Series([
<span style="background-color: #fff0f0;">'basic_only_wealth_per_capita'</span>,
<span style="background-color: #fff0f0;">'basic_herder_wealth_per_capita'</span>,
<span style="background-color: #fff0f0;">'basic_arbitrageur_wealth_per_capita'</span>,
<span style="background-color: #fff0f0;">'basic_herder_arbitrageur_wealth_per_capita'</span>,
<span style="background-color: #fff0f0;">'switcher_only_wealth_per_capita'</span>,
<span style="background-color: #fff0f0;">'switcher_herder_wealth_per_capita'</span>,
<span style="background-color: #fff0f0;">'switcher_arbitrageur_wealth_per_capita'</span>,
<span style="background-color: #fff0f0;">'switcher_herder_arbitrageur_wealth_per_capita'</span>,
<span style="background-color: #fff0f0;">'percent_basic_only'</span>,
<span style="background-color: #fff0f0;">'percent_basic_herder'</span>,
<span style="background-color: #fff0f0;">'percent_basic_arbitrageur'</span>,
<span style="background-color: #fff0f0;">'percent_basic_herder_arbitrageur'</span>,
<span style="background-color: #fff0f0;">'percent_switcher_only'</span>,
<span style="background-color: #fff0f0;">'percent_switcher_herder'</span>,
<span style="background-color: #fff0f0;">'percent_switcher_arbitrageur'</span>,
<span style="background-color: #fff0f0;">'percent_switcher_herder_arbitrageur'</span>])
numerator_category <span style="color: #333333;">=</span> pd<span style="color: #333333;">.</span>Series([
<span style="background-color: #fff0f0;">'basic_only_wealth'</span>,
<span style="background-color: #fff0f0;">'basic_herder_wealth'</span>,
<span style="background-color: #fff0f0;">'basic_arbitrageur_wealth'</span>,
<span style="background-color: #fff0f0;">'basic_herder_arbitrageur_wealth'</span>,
<span style="background-color: #fff0f0;">'switcher_only_wealth'</span>,
<span style="background-color: #fff0f0;">'switcher_herder_wealth'</span>,
<span style="background-color: #fff0f0;">'switcher_arbitrageur_wealth'</span>,
<span style="background-color: #fff0f0;">'switcher_herder_arbitrageur_wealth'</span>,
<span style="background-color: #fff0f0;">'basic_only'</span>,
<span style="background-color: #fff0f0;">'basic_herder'</span>,
<span style="background-color: #fff0f0;">'basic_arbitrageur'</span>,
<span style="background-color: #fff0f0;">'basic_herder_arbitrageur'</span>,
<span style="background-color: #fff0f0;">'switcher_only'</span>,
<span style="background-color: #fff0f0;">'switcher_herder'</span>,
<span style="background-color: #fff0f0;">'switcher_arbitrageur'</span>,
<span style="background-color: #fff0f0;">'switcher_herder_arbitrageur'</span>])
denominator_category <span style="color: #333333;">=</span> pd<span style="color: #333333;">.</span>Series([
<span style="background-color: #fff0f0;">'basic_only'</span>,
<span style="background-color: #fff0f0;">'basic_herder'</span>,
<span style="background-color: #fff0f0;">'basic_arbitrageur'</span>,
<span style="background-color: #fff0f0;">'basic_herder_arbitrageur'</span>,
<span style="background-color: #fff0f0;">'switcher_only_wealth'</span>,
<span style="background-color: #fff0f0;">'switcher_herder_wealth'</span>,
<span style="background-color: #fff0f0;">'switcher_arbitrageur_wealth'</span>,
<span style="background-color: #fff0f0;">'switcher_herder_arbitrageur'</span>,
<span style="background-color: #fff0f0;">'population'</span>,
<span style="background-color: #fff0f0;">'population'</span>,
<span style="background-color: #fff0f0;">'population'</span>,
<span style="background-color: #fff0f0;">'population'</span>,
<span style="background-color: #fff0f0;">'population'</span>,
<span style="background-color: #fff0f0;">'population'</span>,
<span style="background-color: #fff0f0;">'population'</span>,
<span style="background-color: #fff0f0;">'population'</span>])
<span style="color: #008800; font-weight: bold;">def</span> <span style="color: #0066bb; font-weight: bold;">process_data</span>():
<span style="color: #888888;"># Dataframe will house the average values of each variable across runs for some given </span>
<span style="color: #888888;"># pair of parameters</span>
mean_values <span style="color: #333333;">=</span> pd<span style="color: #333333;">.</span>DataFrame(columns <span style="color: #333333;">=</span> [np<span style="color: #333333;">.</span>arange(num_x)], index <span style="color: #333333;">=</span> [np<span style="color: #333333;">.</span>arange(num_y)])
<span style="color: #008800; font-weight: bold;">for</span> x <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #0000dd; font-weight: bold;">0</span>,num_x):
<span style="color: #008800; font-weight: bold;">for</span> y <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #0000dd; font-weight: bold;">0</span>,num_y):
mean_values[x][y] <span style="color: #333333;">=</span> pd<span style="color: #333333;">.</span>DataFrame(names_dict)
<span style="color: #888888;"># import csvs using names array as headers for each column</span>
<span style="color: #888888;"># order of elements in names array should match order of objects recorded</span>
<span style="color: #888888;"># during runs in NetLogo</span>
<span style="color: #008800; font-weight: bold;">for</span> i <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #0000dd; font-weight: bold;">1</span>, files <span style="color: #333333;">+</span> <span style="color: #0000dd; font-weight: bold;">1</span>):
filename <span style="color: #333333;">=</span> <span style="color: #007020;">str</span>(i) <span style="color: #333333;">+</span> <span style="background-color: #fff0f0;">'sugarscapeGlobalTradeBasics.csv'</span>
runs <span style="color: #333333;">=</span> pd<span style="color: #333333;">.</span>read_csv(filename, names <span style="color: #333333;">=</span> names)
<span style="color: #008800; font-weight: bold;">for</span> x <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #007020;">len</span>(new_category)):
add_per_capita_categories(runs, new_category[x], numerator_category[x], denominator_category[x])
c <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">0</span>
<span style="color: #888888;"># Find runs whose fixed parameter values match the values for the target</span>
<span style="color: #888888;"># coordinates in mean values, will eventually transfer to heatmap</span>
<span style="color: #008800; font-weight: bold;">for</span> a <span style="color: black; font-weight: bold;">in</span> axis_values:
<span style="color: #008800; font-weight: bold;">if</span> runs<span style="color: #333333;">.</span>iloc[<span style="color: #0000dd; font-weight: bold;">0</span>][<span style="background-color: #fff0f0;">'sugar_metabolism_rate'</span>] <span style="color: #333333;">==</span> a: <span style="color: #888888;"># round(a,2):</span>
<span style="color: #008800; font-weight: bold;">for</span> b <span style="color: black; font-weight: bold;">in</span> axis_values:
<span style="color: #008800; font-weight: bold;">if</span> runs<span style="color: #333333;">.</span>iloc[<span style="color: #0000dd; font-weight: bold;">0</span>][<span style="background-color: #fff0f0;">'water_metabolism_rate'</span>] <span style="color: #333333;">==</span> b: <span style="color: #888888;"># round(b,2):</span>
x <span style="color: #333333;">=</span> <span style="color: #007020;">int</span>(<span style="color: #007020;">round</span>(((b <span style="color: #333333;">-</span> min_water_metabolism) <span style="color: #333333;">/</span> inc_water),<span style="color: #0000dd; font-weight: bold;">0</span>))
y <span style="color: #333333;">=</span> <span style="color: #007020;">int</span>(<span style="color: #007020;">round</span>(((a <span style="color: #333333;">-</span> min_sugar_metabolism) <span style="color: #333333;">/</span> inc_sugar),<span style="color: #0000dd; font-weight: bold;">0</span>))
<span style="color: #008800; font-weight: bold;">if</span> c <span style="color: #333333;"><</span> <span style="color: #0000dd; font-weight: bold;">1</span>:
<span style="color: #888888;"># avoid error in 0th element of each category </span>
mean_values[x][y] <span style="color: #333333;">=</span> runs
<span style="color: #008800; font-weight: bold;">else</span>:
<span style="color: #888888;"># once the first run data has been placed </span>
mean_values[x][y] <span style="color: #333333;">=</span> mean_values[x][y]<span style="color: #333333;">.</span>add(runs, fill_value <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">0</span>)
c <span style="color: #333333;">+=</span> <span style="color: #0000dd; font-weight: bold;">1</span>
mean_values <span style="color: #333333;">=</span> mean_values <span style="color: #333333;">/</span> runs_per_setting
print_behavior_space_representation(mean_values)
<span style="color: #888888;">############################################################################################## </span>
<span style="color: #888888;">##############################################################################################</span>
<span style="color: #008800; font-weight: bold;">def</span> <span style="color: #0066bb; font-weight: bold;">add_per_capita_categories</span>(target_array, per_capita_name, per_capita_numerator, population_denominator):
target_array[per_capita_name] <span style="color: #333333;">=</span> target_array[per_capita_numerator] <span style="color: #333333;">/</span> target_array[population_denominator]
<span style="color: #008800; font-weight: bold;">def</span> <span style="color: #0066bb; font-weight: bold;">initialize_image</span>(num_x, num_y):
image <span style="color: #333333;">=</span> []
<span style="color: #008800; font-weight: bold;">for</span> i <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(num_y):
x_colors <span style="color: #333333;">=</span> []
<span style="color: #008800; font-weight: bold;">for</span> j <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(num_x):
x_colors<span style="color: #333333;">.</span>append(<span style="color: #0000dd; font-weight: bold;">0</span>)
image<span style="color: #333333;">.</span>append(x_colors)
<span style="color: #008800; font-weight: bold;">return</span> image
<span style="color: #008800; font-weight: bold;">def</span> <span style="color: #0066bb; font-weight: bold;">color_points</span>(title, filename, category, mean_values,pp, tick, min_val, max_val):
<span style="color: #888888;"># x_p = num_x</span>
<span style="color: #888888;"># y_p = num_y</span>
image <span style="color: #333333;">=</span> initialize_image(num_x, num_y)
<span style="color: #008800; font-weight: bold;">for</span> i <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #0000dd; font-weight: bold;">0</span>, num_x):
<span style="color: #008800; font-weight: bold;">for</span> j <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #0000dd; font-weight: bold;">0</span>, num_y):
image[i][j] <span style="color: #333333;">=</span> mean_values[i][j]<span style="color: #333333;">.</span>iloc[tick][category]
<span style="color: #008800; font-weight: bold;">print</span>(image)
plt<span style="color: #333333;">.</span>imshow(image, origin<span style="color: #333333;">=</span><span style="background-color: #fff0f0;">'lower'</span>, extent<span style="color: #333333;">=</span>(min_sugar_metabolism, max_sugar_metabolism, min_water_metabolism, max_water_metabolism),
cmap<span style="color: #333333;">=</span>cm<span style="color: #333333;">.</span>Greys_r, interpolation <span style="color: #333333;">=</span> <span style="background-color: #fff0f0;">'nearest'</span>)
plt<span style="color: #333333;">.</span>colorbar()
plt<span style="color: #333333;">.</span>clim(min_val, max_val)
plt<span style="color: #333333;">.</span>xlabel(<span style="background-color: #fff0f0;">'Water Consumption Rate'</span>)
plt<span style="color: #333333;">.</span>ylabel(<span style="background-color: #fff0f0;">'Sugar Consumption Rate'</span>)
plt<span style="color: #333333;">.</span>title(title <span style="color: #333333;">+</span> <span style="background-color: #fff0f0;">" "</span> <span style="color: #333333;">+</span> <span style="color: #007020;">str</span>(tick <span style="color: #333333;">+</span> <span style="color: #0000dd; font-weight: bold;">1</span>) <span style="color: #333333;">+</span> <span style="background-color: #fff0f0;">" Ticks"</span>)
fig <span style="color: #333333;">=</span> plt<span style="color: #333333;">.</span>gcf()
plt<span style="color: #333333;">.</span>show()
plt<span style="color: #333333;">.</span>draw()
pp<span style="color: #333333;">.</span>savefig(fig)
<span style="color: #888888;"># fig.savefig(filename + ".pdf")</span>
<span style="color: #008800; font-weight: bold;">def</span> <span style="color: #0066bb; font-weight: bold;">print_behavior_space_representation</span>(data):
interval <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">1</span>
pp <span style="color: #333333;">=</span> PdfPages(<span style="background-color: #fff0f0;">'population_local_basic_tick_50.pdf'</span>)
<span style="color: #008800; font-weight: bold;">for</span> q <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #0000dd; font-weight: bold;">1</span>, ticks, interval):
color_points(<span style="background-color: #fff0f0;">"Population</span><span style="background-color: #fff0f0; color: #666666; font-weight: bold;">\n</span><span style="background-color: #fff0f0;">Global Trade Basic"</span>,<span style="background-color: #fff0f0;">"Population Global Trade Basic"</span>, <span style="background-color: #fff0f0;">"population"</span>, data, pp, q, <span style="color: #0000dd; font-weight: bold;">0</span>, <span style="color: #0000dd; font-weight: bold;">300</span>)
plt<span style="color: #333333;">.</span>close(<span style="background-color: #fff0f0;">'all'</span>)
pp<span style="color: #333333;">.</span>close()
<span style="color: #008800; font-weight: bold;">if</span> __name__ <span style="color: #333333;">==</span> <span style="background-color: #fff0f0;">'__main__'</span>:
np<span style="color: #333333;">.</span>save(<span style="background-color: #fff0f0;">'data'</span>, process_data())
np<span style="color: #333333;">.</span>load(<span style="background-color: #fff0f0;">'data.npy'</span>)
</pre>
</td></tr>
</tbody></table>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1240730580083032584.post-4644484157999149602016-09-24T10:08:00.002-07:002016-09-24T20:18:06.479-07:00Cleaner CodeIn light of <a href="http://gene-callahan.blogspot.com/">Gene Callahan's</a> comment yesterday, I have posted some cleaner code below. Those who are not programmers may not understand the process of passing objects through multiple methods (i.e., "plotLines (. . .)). If you don't get it, don't worry about it. Those who prefer tighter organization should use this code.
<br />
<br />
<!-- HTML generated using hilite.me --><br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<table><tbody>
<tr><td><pre style="line-height: 125%; margin: 0;"> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53</pre>
</td><td><pre style="line-height: 125%; margin: 0;"><span style="color: #008800; font-weight: bold;">from</span> <span style="color: #0e84b5; font-weight: bold;">__future__</span> <span style="color: #008800; font-weight: bold;">import</span> print_function
<span style="color: #008800; font-weight: bold;">import</span> <span style="color: #0e84b5; font-weight: bold;">numpy</span> <span style="color: #008800; font-weight: bold;">as</span> <span style="color: #0e84b5; font-weight: bold;">np</span>
<span style="color: #008800; font-weight: bold;">import</span> <span style="color: #0e84b5; font-weight: bold;">matplotlib.pyplot</span> <span style="color: #008800; font-weight: bold;">as</span> <span style="color: #0e84b5; font-weight: bold;">plt</span>
<span style="color: #008800; font-weight: bold;">from</span> <span style="color: #0e84b5; font-weight: bold;">matplotlib.backends.backend_pdf</span> <span style="color: #008800; font-weight: bold;">import</span> PdfPages
pp <span style="color: #333333;">=</span> PdfPages(<span style="background-color: #fff0f0;">'SupplyAndDemandFloor.pdf'</span>)
<span style="color: #008800; font-weight: bold;">def</span> <span style="color: #0066bb; font-weight: bold;">supplyAndDemandFloor</span>(supply, demand, floor, equilibrium):
fig <span style="color: #333333;">=</span> plt<span style="color: #333333;">.</span>figure(dpi<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">128</span>, figsize<span style="color: #333333;">=</span>(<span style="color: #0000dd; font-weight: bold;">10</span>,<span style="color: #0000dd; font-weight: bold;">6</span>))
plotLines(supply, demand, equilibrium, floor)
frame <span style="color: #333333;">=</span> plt<span style="color: #333333;">.</span>gca()
plt<span style="color: #333333;">.</span>title(<span style="background-color: #fff0f0;">'Pizza Market'</span>, fontsize <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">32</span>)
placeText()
setupAxes(frame)
pp<span style="color: #333333;">.</span>savefig(fig)
pp<span style="color: #333333;">.</span>close()
<span style="color: #008800; font-weight: bold;">def</span> <span style="color: #0066bb; font-weight: bold;">placeText</span>():
<span style="color: #888888;">#plt.text(x,y,text,fontsize)</span>
plt<span style="color: #333333;">.</span>text(<span style="color: #333333;">-</span><span style="color: #0000dd; font-weight: bold;">500</span>, <span style="color: #0000dd; font-weight: bold;">10000</span>, <span style="background-color: #fff0f0;">"$p$"</span>, fontsize<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">24</span>)
plt<span style="color: #333333;">.</span>text(<span style="color: #333333;">-</span><span style="color: #0000dd; font-weight: bold;">550</span>, <span style="color: #0000dd; font-weight: bold;">7900</span>, <span style="background-color: #fff0f0;">"$p_s$"</span>, fontsize<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">24</span>)
plt<span style="color: #333333;">.</span>text(<span style="color: #333333;">-</span><span style="color: #0000dd; font-weight: bold;">550</span>, <span style="color: #0000dd; font-weight: bold;">5000</span>, <span style="background-color: #fff0f0;">"$p_e$"</span>, fontsize<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">24</span>)
plt<span style="color: #333333;">.</span>text(<span style="color: #0000dd; font-weight: bold;">8200</span>, <span style="color: #0000dd; font-weight: bold;">8800</span>,<span style="background-color: #fff0f0;">"$S$"</span>, fontsize <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">24</span>)
plt<span style="color: #333333;">.</span>text(<span style="color: #0000dd; font-weight: bold;">8200</span>, <span style="color: #0000dd; font-weight: bold;">2000</span>,<span style="background-color: #fff0f0;">"$D$"</span>, fontsize <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">24</span>)
plt<span style="color: #333333;">.</span>text(<span style="color: #0000dd; font-weight: bold;">1800</span>, <span style="color: #333333;">-</span><span style="color: #0000dd; font-weight: bold;">650</span>, <span style="background-color: #fff0f0;">"$Q_d$"</span>, fontsize<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">24</span>)
plt<span style="color: #333333;">.</span>text(<span style="color: #0000dd; font-weight: bold;">7800</span>, <span style="color: #333333;">-</span><span style="color: #0000dd; font-weight: bold;">650</span>, <span style="background-color: #fff0f0;">"$Q_s$"</span>, fontsize<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">24</span>)
plt<span style="color: #333333;">.</span>text(<span style="color: #0000dd; font-weight: bold;">4800</span>, <span style="color: #333333;">-</span><span style="color: #0000dd; font-weight: bold;">650</span>, <span style="background-color: #fff0f0;">"$Q_e$"</span>, fontsize<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">24</span>)
plt<span style="color: #333333;">.</span>text(<span style="color: #0000dd; font-weight: bold;">10000</span>, <span style="color: #333333;">-</span><span style="color: #0000dd; font-weight: bold;">650</span>, <span style="background-color: #fff0f0;">"$Q$"</span>, fontsize<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">24</span>)
<span style="color: #008800; font-weight: bold;">def</span> <span style="color: #0066bb; font-weight: bold;">plotLines</span>(supply, demand, equilibrium, floor):
<span style="color: #888888;"># plt.plot((x1,x2), (y1,y2), linestyle/color, linewidth)</span>
plt<span style="color: #333333;">.</span>plot((<span style="color: #0000dd; font-weight: bold;">2000</span>, <span style="color: #0000dd; font-weight: bold;">2000</span>), (<span style="color: #0000dd; font-weight: bold;">0</span>, <span style="color: #0000dd; font-weight: bold;">8000</span>), <span style="background-color: #fff0f0;">'r--'</span>, linewidth<span style="color: #333333;">=</span><span style="color: #6600ee; font-weight: bold;">1.5</span>)
plt<span style="color: #333333;">.</span>plot((<span style="color: #0000dd; font-weight: bold;">8000</span>, <span style="color: #0000dd; font-weight: bold;">8000</span>), (<span style="color: #0000dd; font-weight: bold;">0</span>, <span style="color: #0000dd; font-weight: bold;">8000</span>), <span style="background-color: #fff0f0;">'r--'</span>, linewidth<span style="color: #333333;">=</span><span style="color: #6600ee; font-weight: bold;">1.5</span>)
plt<span style="color: #333333;">.</span>plot((<span style="color: #0000dd; font-weight: bold;">5000</span>, <span style="color: #0000dd; font-weight: bold;">5000</span>), (<span style="color: #0000dd; font-weight: bold;">0</span>, <span style="color: #0000dd; font-weight: bold;">5000</span>), <span style="background-color: #fff0f0;">'k--'</span>, linewidth<span style="color: #333333;">=</span><span style="color: #6600ee; font-weight: bold;">1.5</span>)
plt<span style="color: #333333;">.</span>plot(supply, <span style="background-color: #fff0f0;">'k-'</span>, linewidth<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">3</span>)
plt<span style="color: #333333;">.</span>plot(demand, <span style="background-color: #fff0f0;">'k-'</span>, linewidth<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">3</span>)
plt<span style="color: #333333;">.</span>plot(equilibrium, <span style="background-color: #fff0f0;">'k--'</span>, linewidth<span style="color: #333333;">=</span><span style="color: #6600ee; font-weight: bold;">1.5</span>)
plt<span style="color: #333333;">.</span>plot(floor, <span style="background-color: #fff0f0;">'r--'</span>,label<span style="color: #333333;">=</span> <span style="background-color: #fff0f0;">"Price Floor"</span>, linewidth<span style="color: #333333;">=</span><span style="color: #6600ee; font-weight: bold;">1.5</span>)
<span style="color: #008800; font-weight: bold;">def</span> <span style="color: #0066bb; font-weight: bold;">setupAxes</span>(frame):
frame<span style="color: #333333;">.</span>axes<span style="color: #333333;">.</span>get_xaxis()<span style="color: #333333;">.</span>set_visible(<span style="color: #007020;">False</span>)
frame<span style="color: #333333;">.</span>axes<span style="color: #333333;">.</span>get_yaxis()<span style="color: #333333;">.</span>set_visible(<span style="color: #007020;">False</span>)
plt<span style="color: #333333;">.</span>xlabel(<span style="background-color: #fff0f0;">"Labor"</span>, fontsize<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">20</span>)
plt<span style="color: #333333;">.</span>ylabel(<span style="background-color: #fff0f0;">"Wage"</span>, fontsize <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">20</span>)
plt<span style="color: #333333;">.</span>tick_params(axis<span style="color: #333333;">=</span><span style="background-color: #fff0f0;">'both'</span>, which<span style="color: #333333;">=</span><span style="background-color: #fff0f0;">'major'</span>, labelsize<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">16</span>)
Supply <span style="color: #333333;">=</span> np<span style="color: #333333;">.</span>arange(<span style="color: #0000dd; font-weight: bold;">10000</span>)
Demand <span style="color: #333333;">=</span> np<span style="color: #333333;">.</span>arange(<span style="color: #0000dd; font-weight: bold;">10000</span>,<span style="color: #0000dd; font-weight: bold;">0</span>, <span style="color: #333333;">-</span><span style="color: #0000dd; font-weight: bold;">1</span>)
priceFloor <span style="color: #333333;">=</span> np<span style="color: #333333;">.</span>arange(<span style="color: #0000dd; font-weight: bold;">1</span>, <span style="color: #0000dd; font-weight: bold;">10000</span>)
priceFloor[priceFloor <span style="color: #333333;">></span> <span style="color: #0000dd; font-weight: bold;">0</span>] <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">8000</span>
priceEquilibrium <span style="color: #333333;">=</span> np<span style="color: #333333;">.</span>arange(<span style="color: #0000dd; font-weight: bold;">1</span>, <span style="color: #0000dd; font-weight: bold;">5000</span>)
priceEquilibrium[priceEquilibrium <span style="color: #333333;">></span> <span style="color: #0000dd; font-weight: bold;">0</span>] <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">5000</span>
supplyAndDemandFloor(Supply, Demand, priceFloor, priceEquilibrium)
</pre>
</td></tr>
</tbody></table>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1240730580083032584.post-12647527973585022982016-09-23T11:05:00.000-07:002016-09-24T10:20:05.030-07:00Building Supply and Demand Graphs in PythonWhen I first started teaching, I grew frustrated with the process of creating visualizations. Microsoft office graphs look tacky. I wanted something that is can be standardized for making graphs of supply and demand. I also wanted it to be customizable and not be corrupted by the name of the company that provided the means for creating the graph (see <a href="http://moneymarketsandmisperceptions.blogspot.com/2015/03/the-nature-and-role-of-interest-rates.html">here</a>). After having used Python and the matplot library to make other visualizations, I realized that I could use similar code for making a generic supply and demand graph. You can customize Matplotlib's graphs to a significant degree.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVxsl_BK81Af3Hyvkgv1NwsIxhrBZS8khnb9C19QPTdvRGrjefttbhlzBVd0w0JCZY2MCgn9jAgYapFhyphenhyphen7MHdG8ftJSAZJbOQgGdYQpRhLj7_G-yRtY0So1q96FgQBQ3lqTK3qkN_gQVI/s1600/Pizza+Supply+and+Demand+Graph.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="258" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVxsl_BK81Af3Hyvkgv1NwsIxhrBZS8khnb9C19QPTdvRGrjefttbhlzBVd0w0JCZY2MCgn9jAgYapFhyphenhyphen7MHdG8ftJSAZJbOQgGdYQpRhLj7_G-yRtY0So1q96FgQBQ3lqTK3qkN_gQVI/s400/Pizza+Supply+and+Demand+Graph.png" width="400" /></a></div>
<br />
<br />
If you are afraid of programming, never fear. This is a great place to start. Just <a href="https://www.continuum.io/downloads">download Anaconda</a> and use this template. The code below is filled with notes to help you fill out the template. The final graph is depicted above:
<!-- HTML generated using hilite.me --><br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<table><tbody>
<tr><td><pre style="line-height: 125%; margin: 0;"> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103</pre>
</td><td><pre style="line-height: 125%; margin: 0;"><span style="color: #008800; font-weight: bold;">from</span> <span style="color: #0e84b5; font-weight: bold;">__future__</span> <span style="color: #008800; font-weight: bold;">import</span> print_function
<span style="color: #008800; font-weight: bold;">import</span> <span style="color: #0e84b5; font-weight: bold;">numpy</span> <span style="color: #008800; font-weight: bold;">as</span> <span style="color: #0e84b5; font-weight: bold;">np</span>
<span style="color: #008800; font-weight: bold;">import</span> <span style="color: #0e84b5; font-weight: bold;">matplotlib.pyplot</span> <span style="color: #008800; font-weight: bold;">as</span> <span style="color: #0e84b5; font-weight: bold;">plt</span>
<span style="color: #008800; font-weight: bold;">from</span> <span style="color: #0e84b5; font-weight: bold;">matplotlib.backends.backend_pdf</span> <span style="color: #008800; font-weight: bold;">import</span> PdfPages
pp <span style="color: #333333;">=</span> PdfPages(<span style="background-color: #fff0f0;">'LaborSupplyAndDemandFloor.pdf'</span>)
<span style="color: #888888;"># "supply", "demand", "floor" and "equilibrium" are all numpy arrays</span>
<span style="color: #888888;"># created at the bottom of the script.</span>
<span style="color: #888888;"># the supplyAndDemandFloor method is also called at the bottom of the script</span>
<span style="color: #008800; font-weight: bold;">def</span> <span style="color: #0066bb; font-weight: bold;">supplyAndDemandFloor</span>(supply, demand, floor, equilibrium):
fig <span style="color: #333333;">=</span> plt<span style="color: #333333;">.</span>figure(dpi<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">128</span>, figsize<span style="color: #333333;">=</span>(<span style="color: #0000dd; font-weight: bold;">10</span>,<span style="color: #0000dd; font-weight: bold;">6</span>))
<span style="color: #888888;"># Plot supply and demand curves</span>
<span style="color: #888888;"># Must instantiate numpy arrays -- see lines 85 and 87</span>
plt<span style="color: #333333;">.</span>plot(supply, <span style="background-color: #fff0f0;">'k-'</span>, linewidth<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">3</span>)
plt<span style="color: #333333;">.</span>plot(demand, <span style="background-color: #fff0f0;">'k-'</span>, linewidth<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">3</span>)
<span style="color: #888888;"># The length of the equilibrium line must match the horizontal coordinate </span>
<span style="color: #888888;"># of the equilibrium quanity -- see lines 98, 100</span>
plt<span style="color: #333333;">.</span>plot(equilibrium, <span style="background-color: #fff0f0;">'k--'</span>, linewidth<span style="color: #333333;">=</span><span style="color: #6600ee; font-weight: bold;">1.5</span>)
<span style="color: #888888;"># The floor is a horizontal line -- see lines 90, 94</span>
plt<span style="color: #333333;">.</span>plot(floor, <span style="background-color: #fff0f0;">'r--'</span>,label<span style="color: #333333;">=</span> <span style="background-color: #fff0f0;">"Price Floor"</span>, linewidth<span style="color: #333333;">=</span><span style="color: #6600ee; font-weight: bold;">1.5</span>)
<span style="color: #888888;"># plt plt takes the form like:</span>
<span style="color: #888888;"># plt.plot((x1,x2)),(y1,y2), 'r-', linewidth = x)</span>
<span style="color: #888888;"># e.g., for command on line ##:</span>
<span style="color: #888888;"># create a vertical line at x1 = 2000, y2 = 2000, y1 = 0, y2 = 8000</span>
plt<span style="color: #333333;">.</span>plot((<span style="color: #0000dd; font-weight: bold;">2000</span>, <span style="color: #0000dd; font-weight: bold;">2000</span>), (<span style="color: #0000dd; font-weight: bold;">0</span>, <span style="color: #0000dd; font-weight: bold;">8000</span>), <span style="background-color: #fff0f0;">'r--'</span>, linewidth<span style="color: #333333;">=</span><span style="color: #6600ee; font-weight: bold;">1.5</span>)
plt<span style="color: #333333;">.</span>plot((<span style="color: #0000dd; font-weight: bold;">8000</span>, <span style="color: #0000dd; font-weight: bold;">8000</span>), (<span style="color: #0000dd; font-weight: bold;">0</span>, <span style="color: #0000dd; font-weight: bold;">8000</span>), <span style="background-color: #fff0f0;">'r--'</span>, linewidth<span style="color: #333333;">=</span><span style="color: #6600ee; font-weight: bold;">1.5</span>)
plt<span style="color: #333333;">.</span>plot((<span style="color: #0000dd; font-weight: bold;">5000</span>, <span style="color: #0000dd; font-weight: bold;">5000</span>), (<span style="color: #0000dd; font-weight: bold;">0</span>, <span style="color: #0000dd; font-weight: bold;">5000</span>), <span style="background-color: #fff0f0;">'k--'</span>, linewidth<span style="color: #333333;">=</span><span style="color: #6600ee; font-weight: bold;">1.5</span>)
<span style="color: #888888;"># frame = plt.gca() required to use commands for removing</span>
<span style="color: #888888;"># values on axes </span>
frame <span style="color: #333333;">=</span> plt<span style="color: #333333;">.</span>gca()
<span style="color: #888888;"># remove axis values</span>
frame<span style="color: #333333;">.</span>axes<span style="color: #333333;">.</span>get_xaxis()<span style="color: #333333;">.</span>set_visible(<span style="color: #007020;">False</span>)
frame<span style="color: #333333;">.</span>axes<span style="color: #333333;">.</span>get_yaxis()<span style="color: #333333;">.</span>set_visible(<span style="color: #007020;">False</span>)
plt<span style="color: #333333;">.</span>title(<span style="background-color: #fff0f0;">'Pizza Market'</span>, fontsize <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">32</span>)
<span style="color: #888888;"># p variable on top of y-axis</span>
plt<span style="color: #333333;">.</span>text(<span style="color: #333333;">-</span><span style="color: #0000dd; font-weight: bold;">500</span>, <span style="color: #0000dd; font-weight: bold;">10000</span>, <span style="background-color: #fff0f0;">"$p$"</span>, fontsize<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">24</span>)
<span style="color: #888888;"># surplus price variable</span>
plt<span style="color: #333333;">.</span>text(<span style="color: #333333;">-</span><span style="color: #0000dd; font-weight: bold;">550</span>, <span style="color: #0000dd; font-weight: bold;">7900</span>, <span style="background-color: #fff0f0;">"$p_s$"</span>, fontsize<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">24</span>)
<span style="color: #888888;"># equilibrium price variable</span>
plt<span style="color: #333333;">.</span>text(<span style="color: #333333;">-</span><span style="color: #0000dd; font-weight: bold;">550</span>, <span style="color: #0000dd; font-weight: bold;">5000</span>, <span style="background-color: #fff0f0;">"$p_e$"</span>, fontsize<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">24</span>)
<span style="color: #888888;"># identify supply curve </span>
plt<span style="color: #333333;">.</span>text(<span style="color: #0000dd; font-weight: bold;">8200</span>, <span style="color: #0000dd; font-weight: bold;">9000</span>,<span style="background-color: #fff0f0;">"$S_p$"</span>, fontsize <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">24</span>)
<span style="color: #888888;"># identify demand curve </span>
plt<span style="color: #333333;">.</span>text(<span style="color: #0000dd; font-weight: bold;">8200</span>, <span style="color: #0000dd; font-weight: bold;">2000</span>,<span style="background-color: #fff0f0;">"$D_p$"</span>, fontsize <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">24</span>)
<span style="color: #888888;"># quantity demanded at surplu price</span>
plt<span style="color: #333333;">.</span>text(<span style="color: #0000dd; font-weight: bold;">1800</span>, <span style="color: #333333;">-</span><span style="color: #0000dd; font-weight: bold;">650</span>, <span style="background-color: #fff0f0;">"$Q_d$"</span>, fontsize<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">24</span>)
<span style="color: #888888;"># quantity supplied at surplus price</span>
plt<span style="color: #333333;">.</span>text(<span style="color: #0000dd; font-weight: bold;">7800</span>, <span style="color: #333333;">-</span><span style="color: #0000dd; font-weight: bold;">650</span>, <span style="background-color: #fff0f0;">"$Q_s$"</span>, fontsize<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">24</span>)
<span style="color: #888888;"># Qs = Qd at equilibrium price</span>
plt<span style="color: #333333;">.</span>text(<span style="color: #0000dd; font-weight: bold;">4800</span>, <span style="color: #333333;">-</span><span style="color: #0000dd; font-weight: bold;">650</span>, <span style="background-color: #fff0f0;">"$Q_e$"</span>, fontsize<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">24</span>)
<span style="color: #888888;"># mark that Q is represented on horizontal axis</span>
plt<span style="color: #333333;">.</span>text(<span style="color: #0000dd; font-weight: bold;">10000</span>, <span style="color: #333333;">-</span><span style="color: #0000dd; font-weight: bold;">650</span>, <span style="background-color: #fff0f0;">"$Q$"</span>, fontsize<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">24</span>)
<span style="color: #888888;"># label the axes</span>
plt<span style="color: #333333;">.</span>xlabel(<span style="background-color: #fff0f0;">"Pizza"</span>, fontsize<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">20</span>)
plt<span style="color: #333333;">.</span>ylabel(<span style="background-color: #fff0f0;">"Price"</span>, fontsize <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">20</span>)
plt<span style="color: #333333;">.</span>tick_params(axis<span style="color: #333333;">=</span><span style="background-color: #fff0f0;">'both'</span>, which<span style="color: #333333;">=</span><span style="background-color: #fff0f0;">'major'</span>, labelsize<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">16</span>)
<span style="color: #888888;"># plt.legend(floor, loc='upper right')</span>
<span style="color: #888888;"># save PDF of figure</span>
<span style="color: #888888;"># you can also save to image file</span>
<span style="color: #888888;"># pdf is useful if multiple graphs are created</span>
pp<span style="color: #333333;">.</span>savefig(fig)
<span style="color: #888888;"># close PDF</span>
pp<span style="color: #333333;">.</span>close()
<span style="color: #888888;"># Instantiate array with supply curve points</span>
supply <span style="color: #333333;">=</span> np<span style="color: #333333;">.</span>arange(<span style="color: #0000dd; font-weight: bold;">10000</span>)
<span style="color: #888888;"># ... demand curve points</span>
demand <span style="color: #333333;">=</span> np<span style="color: #333333;">.</span>arange(<span style="color: #0000dd; font-weight: bold;">10000</span>,<span style="color: #0000dd; font-weight: bold;">0</span>, <span style="color: #333333;">-</span><span style="color: #0000dd; font-weight: bold;">1</span>)
<span style="color: #888888;"># ... for price floor line</span>
priceFloor <span style="color: #333333;">=</span> np<span style="color: #333333;">.</span>arange(<span style="color: #0000dd; font-weight: bold;">1</span>, <span style="color: #0000dd; font-weight: bold;">10000</span>)
<span style="color: #888888;"># set value of all points value of price floor</span>
<span style="color: #888888;"># value of prices are arbitrary since we dropped</span>
<span style="color: #888888;"># axis values</span>
priceFloor[priceFloor <span style="color: #333333;">></span> <span style="color: #0000dd; font-weight: bold;">0</span>] <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">8000</span>
<span style="color: #888888;"># ... for equilibrium price, length of this array </span>
<span style="color: #888888;"># is equal to the equilibrium quantity</span>
priceEquilibrium <span style="color: #333333;">=</span> np<span style="color: #333333;">.</span>arange(<span style="color: #0000dd; font-weight: bold;">1</span>, <span style="color: #0000dd; font-weight: bold;">5000</span>)
<span style="color: #888888;"># set all values to the equilibrium price</span>
priceEquilibrium[priceEquilibrium <span style="color: #333333;">></span> <span style="color: #0000dd; font-weight: bold;">0</span>] <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">5000</span>
<span style="color: #888888;"># finally, call method to produce the graph</span>
supplyAndDemandFloor(supply,demand, priceFloor, priceEquilibrium)
</pre>
</td></tr>
</tbody></table>
</div>
Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-1240730580083032584.post-24852719506169170332016-09-01T10:04:00.001-07:002016-09-03T13:44:33.352-07:00How to Succinctly Visualize the BehaviorSpace from NetLogo using PythonWhen I first programmed a heuristic rendition of Sugarcape, I was impressed by the results. Time and again, they were consistent across the behavior-space. But how does one convey results that take many hours to observe into simple visualizations? Is it possible to condense the data in such a manner?<br />
<br />
First, I needed to generate data that could be read easily by Python. NetLogo's standard data generator does not do this well. Here is the code that I used instead:<br />
<!-- HTML generated using hilite.me --><br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<table><tbody>
<tr><td><pre style="line-height: 125%; margin: 0;"> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78</pre>
</td><td><pre style="line-height: 125%; margin: 0;">to setup
. . .
prep-csv-name
reset-ticks
end
. . .
to go
. . .
write-csv csv-name final-output
tick
end
. . .
to prepare-behavior-space-output
set final-output (list
total-sugar
total-water
mean-price-current-tick
price-variance
population
basic-only
basic-herder
basic-arbitrageur
basic-herder-arbitrageur
switcher-only
switcher-herder
switcher-arbitrageur
switcher-herder-arbitrageur
current-percent-basic
current-percent-arbitrageur
current-percent-herder
current-percent-switcher
wealth-basic-only
wealth-basic-herder
wealth-basic-arbitrageur
wealth-basic-herder-arbitrageur
wealth-switcher-only
wealth-switcher-herder
wealth-switcher-arbitrageur
wealth-switcher-herder-arbitrageur
sugar-consumed-this-tick
water-consumed-this-tick
distance-from-equilibrium-price
mean-price-50-tick-average
mean [endogenous-rate-of-price-change] of turtles
)
end
to write-csv [ #filename #items ]
;; #items is a list of the data (or headers!) to write.
if is-list? #items and not empty? #items
[ file-open #filename
;; quote non-numeric items
set #items map quote #items
;; print the items
;; if only one item, print it.
ifelse length #items = 1 [ file-print first #items ]
[file-print reduce [ (word ?1 "," ?2) ] #items]
;; close-up
file-close
]
end
to prep-csv-name
set csv-name "ssugarscapeLocalTradeAllClassesFinal.csv"
set csv-name replace-item 0 csv-name (word behaviorspace-run-number)
end
to-report quote [ #thing ]
ifelse is-number? #thing
[ report #thing ]
[ report (word "\"" #thing "\"") ]
end
</pre>
</td></tr>
</tbody></table>
</div>
<br />
This creates csvs for each run that print out the value of objects described in and in the order presented in the list. This order is important as the same ordering is used in Python when I collect data from the csvs.<br />
<br />
The setup looked like this:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJMVdzHh6-NaPj5kpQG114uJ3Rx8HIJ1FK9A7LNqOkZVJbaXAJGU0NoUDK6h2CuX37AngNb9_YzjQhbP-VHQxK5-TbXtoxrrnIfOkHDovz6DNbEIvtvYmtxqfRJ_iBjVBDSuznr8pxjLo/s1600/Netlogo+BehaviorSpace+Setup.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJMVdzHh6-NaPj5kpQG114uJ3Rx8HIJ1FK9A7LNqOkZVJbaXAJGU0NoUDK6h2CuX37AngNb9_YzjQhbP-VHQxK5-TbXtoxrrnIfOkHDovz6DNbEIvtvYmtxqfRJ_iBjVBDSuznr8pxjLo/s400/Netlogo+BehaviorSpace+Setup.png" width="303" /></a></div>
<br />
[Late Add] I used 8 different settings for sugar and water metabolism. this is reflected in the python code under "num_x" and "num_y". 64 settings were used. Each setting was run 10 times to produce 640 runs, each of whose length were 15000 periods.<br />
<br />
Below is the Python code that I used to generate visualizations that look like this (which were used in <a href="http://link.springer.com/article/10.1007/s11138-016-0351-2">this article</a>):<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0v9qwS1VFf53ZUGnIpWHkR90FS04ly6id7PQc-L9zsyuiDICUo89ywqHiDNDMpY8_NdbS0ttNb7QLFtFJYmZ0E4v5YooiHhSMlbrtR0CZjTtcrulnkGzgucozgv0A4pUl8b_Sg36IDb4/s1600/WPC+Sugarscape.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="271" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0v9qwS1VFf53ZUGnIpWHkR90FS04ly6id7PQc-L9zsyuiDICUo89ywqHiDNDMpY8_NdbS0ttNb7QLFtFJYmZ0E4v5YooiHhSMlbrtR0CZjTtcrulnkGzgucozgv0A4pUl8b_Sg36IDb4/s400/WPC+Sugarscape.png" width="400" /></a></div>
Each column and row show a pair of values representing the rate of consumption for each by the agents. In this case, I was capturing the change in wealth per capita, defined as units of time the agent can survive given his current stock of goods. "initialize_image(num_x, num_y):" and "color_points(title, filename, category, mean_values,pp, tick, min_val, max_val):" are the methods that generalize the output.<br />
<br />
Please note that this code will fail if the size of your data set is too large to be held by your RAM. In that case, you will need to use the dask library to instantiate the dataframes held by the elements in the "runs" and/or "mean_values" dataframes.<br />
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<table><tbody>
<tr><td><pre style="line-height: 125%; margin: 0;"> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247</pre>
</td><td><pre style="line-height: 125%; margin: 0;"><span style="color: #008800; font-weight: bold;">from</span> <span style="color: #0e84b5; font-weight: bold;">__future__</span> <span style="color: #008800; font-weight: bold;">import</span> print_function
<span style="color: #008800; font-weight: bold;">import</span> <span style="color: #0e84b5; font-weight: bold;">numpy</span> <span style="color: #008800; font-weight: bold;">as</span> <span style="color: #0e84b5; font-weight: bold;">np</span>
<span style="color: #008800; font-weight: bold;">import</span> <span style="color: #0e84b5; font-weight: bold;">matplotlib.pyplot</span> <span style="color: #008800; font-weight: bold;">as</span> <span style="color: #0e84b5; font-weight: bold;">plt</span>
<span style="color: #008800; font-weight: bold;">import</span> <span style="color: #0e84b5; font-weight: bold;">matplotlib.cm</span> <span style="color: #008800; font-weight: bold;">as</span> <span style="color: #0e84b5; font-weight: bold;">cm</span>
<span style="color: #008800; font-weight: bold;">import</span> <span style="color: #0e84b5; font-weight: bold;">pandas</span> <span style="color: #008800; font-weight: bold;">as</span> <span style="color: #0e84b5; font-weight: bold;">pd</span>
<span style="color: #008800; font-weight: bold;">from</span> <span style="color: #0e84b5; font-weight: bold;">matplotlib.backends.backend_pdf</span> <span style="color: #008800; font-weight: bold;">import</span> PdfPages
files <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">640</span>
ticks <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">15000</span>
run_period <span style="color: #333333;">=</span> []
<span style="color: #888888;">#np.empty((ticks))</span>
num_x <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">8</span>
num_y <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">8</span>
runs_per_setting <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">10</span>
<span style="color: #008800; font-weight: bold;">for</span> j <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #0000dd; font-weight: bold;">0</span>, ticks):
run_period<span style="color: #333333;">.</span>insert(j, j <span style="color: #333333;">+</span> <span style="color: #0000dd; font-weight: bold;">1</span>)
run_period <span style="color: #333333;">=</span> pd<span style="color: #333333;">.</span>Series(run_period)
<span style="color: #008800; font-weight: bold;">def</span> <span style="color: #0066bb; font-weight: bold;">prepare_lists</span>(files):
<span style="color: #888888;"># # number of elements recorded in csv by netlogo</span>
num_categories <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">30</span>
<span style="color: #888888;"># # number of elements created using data from netlogo</span>
additional_categories <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">16</span>
total_categories <span style="color: #333333;">=</span> num_categories <span style="color: #333333;">+</span> additional_categories
runs <span style="color: #333333;">=</span> pd<span style="color: #333333;">.</span>Series([np<span style="color: #333333;">.</span>arange(files)])
names <span style="color: #333333;">=</span> pd<span style="color: #333333;">.</span>Series([<span style="background-color: #fff0f0;">'sugar'</span>,
<span style="background-color: #fff0f0;">'water'</span>,
<span style="background-color: #fff0f0;">'mean_price'</span>,
<span style="background-color: #fff0f0;">'price_variance'</span>,
<span style="background-color: #fff0f0;">'population'</span>,
<span style="background-color: #fff0f0;">'basic_only'</span>,
<span style="background-color: #fff0f0;">'basic_herder'</span>,
<span style="background-color: #fff0f0;">'basic_arbitrageur'</span>,
<span style="background-color: #fff0f0;">'basic_herder_arbitrageur'</span>,
<span style="background-color: #fff0f0;">'switcher_only'</span>,
<span style="background-color: #fff0f0;">'switcher_herder'</span>,
<span style="background-color: #fff0f0;">'switcher_arbitrageur'</span>,
<span style="background-color: #fff0f0;">'switcher_herder_arbitrageur'</span>,
<span style="background-color: #fff0f0;">'percent_basic'</span>,
<span style="background-color: #fff0f0;">'percent_arbitrageur'</span>,
<span style="background-color: #fff0f0;">'percent_herder'</span>,
<span style="background-color: #fff0f0;">'percent_switcher'</span>,
<span style="background-color: #fff0f0;">'basic_only_wealth'</span>,
<span style="background-color: #fff0f0;">'basic_herder_wealth'</span>,
<span style="background-color: #fff0f0;">'basic_arbitrageur_wealth'</span>,
<span style="background-color: #fff0f0;">'basic_herder_arbitrageur_wealth'</span>,
<span style="background-color: #fff0f0;">'switcher_only_wealth'</span>,
<span style="background-color: #fff0f0;">'switcher_herder_wealth'</span>,
<span style="background-color: #fff0f0;">'switcher_arbitrageur_wealth'</span>,
<span style="background-color: #fff0f0;">'switcher_herder_arbitrageur_wealth'</span>,
<span style="background-color: #fff0f0;">'sugar_flow'</span>,
<span style="background-color: #fff0f0;">'water_flow'</span>,
<span style="background-color: #fff0f0;">'distance_from_equilibrium_price'</span>,
<span style="background-color: #fff0f0;">'fifty_period_RAP'</span>,
<span style="background-color: #fff0f0;">'mean_rate_of_price_change'</span>])
names_dict <span style="color: #333333;">=</span> {<span style="background-color: #fff0f0;">'sugar'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'water'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'mean_price'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'price_variance'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'population'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'basic_only'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'basic_herder'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'basic_arbitrageur'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'basic_herder_arbitrageur'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'switcher_only'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'switcher_herder'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'switcher_arbitrageur'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'switcher_herder_arbitrageur'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'percent_basic'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'percent_arbitrageur'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'percent_herder'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'percent_switcher'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'basic_only_wealth'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'basic_herder_wealth'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'basic_arbitrageur_wealth'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'basic_herder_arbitrageur_wealth'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'switcher_only_wealth'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'switcher_herder_wealth'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'switcher_arbitrageur_wealth'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'switcher_herder_arbitrageur_wealth'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'sugar_flow'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'water_flow'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'distance_from_equilibrium_price'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'fifty_period_RAP'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="color: #888888;"># Categories to be generated within python </span>
<span style="background-color: #fff0f0;">'basic_only_wealth_per_capita'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'basic_herder_wealth_per_capita'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'basic_arbitrageur_wealth_per_capita'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'basic_herder_arbitrageur_wealth_per_capita'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'switcher_only_wealth_per_capita'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'switcher_herder_wealth_per_capita'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'switcher_arbitrageur_wealth_per_capita'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'switcher_herder_arbitrageur_wealth_per_capita'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'percent_basic_only'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'percent_basic_herder'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'percent_basic_arbitraguer'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'percent_basic_herder_arbitraguer'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'percent_switcher_only'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'percent_switcher_herder'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'percent_switcher_arbitraguer'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
<span style="background-color: #fff0f0;">'percent_switcher_herder_arbitraguer'</span>: [np<span style="color: #333333;">.</span>arange(ticks)],
}
<span style="color: #008800; font-weight: bold;">for</span> i <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #0000dd; font-weight: bold;">1</span>, files <span style="color: #333333;">+</span> <span style="color: #0000dd; font-weight: bold;">1</span>):
filename <span style="color: #333333;">=</span> <span style="color: #007020;">str</span>(i) <span style="color: #333333;">+</span> <span style="background-color: #fff0f0;">'sugarscapeLocalTradeBasics.csv'</span>
runs[i] <span style="color: #333333;">=</span> pd<span style="color: #333333;">.</span>read_csv(filename, names <span style="color: #333333;">=</span> names)
<span style="color: #888888;"># , sep = None,engine='python')</span>
<span style="color: #888888;"># Add categories generated from data manipulation</span>
runs[i][<span style="background-color: #fff0f0;">'basic_only_wealth_per_capita'</span>] <span style="color: #333333;">=</span> runs[i][<span style="background-color: #fff0f0;">'basic_only_wealth'</span>] <span style="color: #333333;">/</span> runs[i][<span style="background-color: #fff0f0;">'basic_only'</span>]
runs[i][<span style="background-color: #fff0f0;">'basic_herder_wealth_per_capita'</span>] <span style="color: #333333;">=</span> runs[i][<span style="background-color: #fff0f0;">'basic_herder_wealth'</span>] <span style="color: #333333;">/</span> runs[i][<span style="background-color: #fff0f0;">'basic_herder'</span>]
runs[i][<span style="background-color: #fff0f0;">'basic_arbitrageur_wealth_per_capita'</span>] <span style="color: #333333;">=</span> runs[i][<span style="background-color: #fff0f0;">'basic_arbitrageur_wealth'</span>] <span style="color: #333333;">/</span> runs[i][<span style="background-color: #fff0f0;">'basic_arbitrageur'</span>]
runs[i][<span style="background-color: #fff0f0;">'basic_herder_arbitrageur_wealth_per_capita'</span>] <span style="color: #333333;">=</span> runs[i][<span style="background-color: #fff0f0;">'basic_herder_arbitrageur_wealth'</span>] <span style="color: #333333;">/</span> runs[i][<span style="background-color: #fff0f0;">'basic_herder_arbitrageur'</span>]
runs[i][<span style="background-color: #fff0f0;">'switcher_only_wealth_per_capita'</span>] <span style="color: #333333;">=</span> runs[i][<span style="background-color: #fff0f0;">'switcher_only_wealth'</span>] <span style="color: #333333;">/</span> runs[i][<span style="background-color: #fff0f0;">'switcher_only'</span>]
runs[i][<span style="background-color: #fff0f0;">'switcher_herder_wealth_per_capita'</span>] <span style="color: #333333;">=</span> runs[i][<span style="background-color: #fff0f0;">'switcher_herder_wealth'</span>] <span style="color: #333333;">/</span> runs[i][<span style="background-color: #fff0f0;">'switcher_herder'</span>]
runs[i][<span style="background-color: #fff0f0;">'switcher_arbitrageur_wealth_per_capita'</span>] <span style="color: #333333;">=</span> runs[i][<span style="background-color: #fff0f0;">'switcher_arbitrageur_wealth'</span>] <span style="color: #333333;">/</span> runs[i][<span style="background-color: #fff0f0;">'switcher_arbitrageur'</span>]
runs[i][<span style="background-color: #fff0f0;">'switcher_herder_arbitrageur_wealth_per_capita'</span>] <span style="color: #333333;">=</span> runs[i][<span style="background-color: #fff0f0;">'switcher_herder_arbitrageur_wealth'</span>] <span style="color: #333333;">/</span> runs[i][<span style="background-color: #fff0f0;">'switcher_herder_arbitrageur'</span>]
runs[i][<span style="background-color: #fff0f0;">'percent_basic_only'</span>] <span style="color: #333333;">=</span> runs[i][<span style="background-color: #fff0f0;">'basic_only'</span>] <span style="color: #333333;">/</span> runs[i][<span style="background-color: #fff0f0;">'population'</span>]
runs[i][<span style="background-color: #fff0f0;">'percent_basic_herder'</span>] <span style="color: #333333;">=</span> runs[i][<span style="background-color: #fff0f0;">'basic_herder'</span>] <span style="color: #333333;">/</span> runs[i][<span style="background-color: #fff0f0;">'population'</span>]
runs[i][<span style="background-color: #fff0f0;">'percent_basic_arbitrageur'</span>] <span style="color: #333333;">=</span> runs[i][<span style="background-color: #fff0f0;">'basic_arbitrageur'</span>] <span style="color: #333333;">/</span> runs[i][<span style="background-color: #fff0f0;">'population'</span>]
runs[i][<span style="background-color: #fff0f0;">'percent_basic_herder_arbitrageur'</span>] <span style="color: #333333;">=</span> runs[i][<span style="background-color: #fff0f0;">'basic_herder_arbitrageur'</span>] <span style="color: #333333;">/</span> runs[i][<span style="background-color: #fff0f0;">'population'</span>]
runs[i][<span style="background-color: #fff0f0;">'percent_switcher_only'</span>] <span style="color: #333333;">=</span> runs[i][<span style="background-color: #fff0f0;">'switcher_only'</span>] <span style="color: #333333;">/</span> runs[i][<span style="background-color: #fff0f0;">'population'</span>]
runs[i][<span style="background-color: #fff0f0;">'percent_switcher_herder'</span>] <span style="color: #333333;">=</span> runs[i][<span style="background-color: #fff0f0;">'switcher_herder'</span>] <span style="color: #333333;">/</span> runs[i][<span style="background-color: #fff0f0;">'population'</span>]
runs[i][<span style="background-color: #fff0f0;">'percent_switcher_arbitrageur'</span>] <span style="color: #333333;">=</span> runs[i][<span style="background-color: #fff0f0;">'switcher_arbitrageur'</span>] <span style="color: #333333;">/</span> runs[i][<span style="background-color: #fff0f0;">'population'</span>]
runs[i][<span style="background-color: #fff0f0;">'percent_switcher_herder_arbitrageur'</span>] <span style="color: #333333;">=</span> runs[i][<span style="background-color: #fff0f0;">'switcher_herder_arbitrageur'</span>] <span style="color: #333333;">/</span> runs[i][<span style="background-color: #fff0f0;">'population'</span>]
<span style="color: #888888;"># Keep track of run # processesed</span>
<span style="color: #008800; font-weight: bold;">print</span>(i)
<span style="color: #888888;"># will be used to record mean parameter values for particular settings </span>
<span style="color: #888888;"># across the behavior space</span>
mean_values <span style="color: #333333;">=</span> pd<span style="color: #333333;">.</span>DataFrame(columns <span style="color: #333333;">=</span> [np<span style="color: #333333;">.</span>arange(num_x)], index <span style="color: #333333;">=</span> [np<span style="color: #333333;">.</span>arange(num_y)])
<span style="color: #888888;"># run_name = np.empty((num_x, num_y, runs_per_setting), dtype = np.dtype((str,32))) </span>
<span style="color: #008800; font-weight: bold;">for</span> x <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #0000dd; font-weight: bold;">0</span>,num_x):
<span style="color: #008800; font-weight: bold;">for</span> y <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #0000dd; font-weight: bold;">0</span>,num_y):
mean_values[x][y] <span style="color: #333333;">=</span> pd<span style="color: #333333;">.</span>DataFrame(names_dict)
<span style="color: #008800; font-weight: bold;">for</span> x <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #0000dd; font-weight: bold;">0</span>,num_x):
<span style="color: #008800; font-weight: bold;">for</span> y <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #0000dd; font-weight: bold;">0</span>,num_y ):
<span style="color: #008800; font-weight: bold;">for</span> z <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #0000dd; font-weight: bold;">0</span>,runs_per_setting):
<span style="color: #888888;"># Add 1 because file index starts at 1</span>
<span style="color: #888888;"># run_name[x][y][z] = 'Cs = ' + str(.5 + x * .025) + ' Cw = ' + str(.5 + y * .025) + ' run ' + str(z + 1) + ' of ' + str(runs_per_setting)</span>
run_number <span style="color: #333333;">=</span> x <span style="color: #333333;">*</span> num_y <span style="color: #333333;">*</span> runs_per_setting <span style="color: #333333;">+</span> y <span style="color: #333333;">*</span> runs_per_setting <span style="color: #333333;">+</span> z <span style="color: #333333;">+</span> <span style="color: #0000dd; font-weight: bold;">1</span>
mean_values[x][y] <span style="color: #333333;">=</span> mean_values[x][y]<span style="color: #333333;">.</span>add(runs[run_number], fill_value<span style="color: #333333;">=</span><span style="color: #0000dd; font-weight: bold;">0</span>)
<span style="color: #008800; font-weight: bold;">print</span>(<span style="background-color: #fff0f0;">"processing: "</span> <span style="color: #333333;">+</span> <span style="color: #007020;">str</span>(run_number))
mean_values <span style="color: #333333;">=</span> mean_values <span style="color: #333333;">/</span> runs_per_setting
print_behavior_space_representation(mean_values)
<span style="color: #888888;">############################################################################################## </span>
<span style="color: #888888;">##############################################################################################</span>
<span style="color: #008800; font-weight: bold;">def</span> <span style="color: #0066bb; font-weight: bold;">initialize_image</span>(num_x, num_y):
image <span style="color: #333333;">=</span> []
<span style="color: #008800; font-weight: bold;">for</span> i <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(num_y):
x_colors <span style="color: #333333;">=</span> []
<span style="color: #008800; font-weight: bold;">for</span> j <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(num_x):
x_colors<span style="color: #333333;">.</span>append(<span style="color: #0000dd; font-weight: bold;">0</span>)
image<span style="color: #333333;">.</span>append(x_colors)
<span style="color: #008800; font-weight: bold;">return</span> image
<span style="color: #008800; font-weight: bold;">def</span> <span style="color: #0066bb; font-weight: bold;">color_points</span>(title, filename, category, mean_values,pp, tick, min_val, max_val):
image <span style="color: #333333;">=</span> initialize_image(num_x, num_y)
<span style="color: #008800; font-weight: bold;">for</span> i <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #0000dd; font-weight: bold;">0</span>, num_x):
<span style="color: #008800; font-weight: bold;">for</span> j <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #0000dd; font-weight: bold;">0</span>, num_y):
image[i][j] <span style="color: #333333;">=</span> mean_values[i][j]<span style="color: #333333;">.</span>iloc[tick][category]
<span style="color: #008800; font-weight: bold;">print</span>(image)
plt<span style="color: #333333;">.</span>imshow(image, origin<span style="color: #333333;">=</span><span style="background-color: #fff0f0;">'lower'</span>, extent<span style="color: #333333;">=</span>(<span style="color: #333333;">.</span><span style="color: #0000dd; font-weight: bold;">45</span>, <span style="color: #333333;">.</span><span style="color: #0000dd; font-weight: bold;">8</span>, <span style="color: #333333;">.</span><span style="color: #0000dd; font-weight: bold;">45</span>, <span style="color: #333333;">.</span><span style="color: #0000dd; font-weight: bold;">8</span>),
cmap<span style="color: #333333;">=</span>cm<span style="color: #333333;">.</span>Greys_r, interpolation <span style="color: #333333;">=</span> <span style="background-color: #fff0f0;">'nearest'</span>)
plt<span style="color: #333333;">.</span>colorbar()
plt<span style="color: #333333;">.</span>clim(min_val, max_val)
plt<span style="color: #333333;">.</span>xlabel(<span style="background-color: #fff0f0;">'Water Consumption Rate'</span>)
plt<span style="color: #333333;">.</span>ylabel(<span style="background-color: #fff0f0;">'Sugar Consumption Rate'</span>)
plt<span style="color: #333333;">.</span>title(title <span style="color: #333333;">+</span> <span style="background-color: #fff0f0;">" Period "</span> <span style="color: #333333;">+</span> <span style="color: #007020;">str</span>(tick <span style="color: #333333;">+</span> <span style="color: #0000dd; font-weight: bold;">1</span>))
fig <span style="color: #333333;">=</span> plt<span style="color: #333333;">.</span>gcf()
plt<span style="color: #333333;">.</span>show()
plt<span style="color: #333333;">.</span>draw()
pp<span style="color: #333333;">.</span>savefig(fig)
<span style="color: #008800; font-weight: bold;">def</span> <span style="color: #0066bb; font-weight: bold;">print_behavior_space_representation</span>(data):
interval <span style="color: #333333;">=</span> <span style="color: #0000dd; font-weight: bold;">500</span>
pp <span style="color: #333333;">=</span> PdfPages(<span style="background-color: #fff0f0;">'population_local_basic_tick_15000.pdf'</span>)
<span style="color: #008800; font-weight: bold;">for</span> q <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #0000dd; font-weight: bold;">999</span>, ticks, interval):
color_points(<span style="background-color: #fff0f0;">"Population</span><span style="background-color: #fff0f0; color: #666666; font-weight: bold;">\n</span><span style="background-color: #fff0f0;">Local Trade Basics"</span>,<span style="background-color: #fff0f0;">"Population Local Trade Basics"</span>, <span style="background-color: #fff0f0;">"population"</span>, data, pp, q,<span style="color: #0000dd; font-weight: bold;">250</span>,<span style="color: #0000dd; font-weight: bold;">1800</span>)
plt<span style="color: #333333;">.</span>close(<span style="background-color: #fff0f0;">'all'</span>)
pp<span style="color: #333333;">.</span>close()
pp <span style="color: #333333;">=</span> PdfPages(<span style="background-color: #fff0f0;">'PV_local_basic_tick_15000.pdf'</span>)
<span style="color: #008800; font-weight: bold;">for</span> q <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #0000dd; font-weight: bold;">999</span>, ticks, interval):
color_points(<span style="background-color: #fff0f0;">"Price Variance</span><span style="background-color: #fff0f0; color: #666666; font-weight: bold;">\n</span><span style="background-color: #fff0f0;">Local Trade Basics"</span>, <span style="background-color: #fff0f0;">"Price Variance Local Trade Basics"</span>, <span style="background-color: #fff0f0;">"price_variance"</span>, data, pp, q,<span style="color: #0000dd; font-weight: bold;">0</span> , <span style="color: #0000dd; font-weight: bold;">8</span>)
plt<span style="color: #333333;">.</span>close(<span style="background-color: #fff0f0;">'all'</span>)
pp<span style="color: #333333;">.</span>close()
pp <span style="color: #333333;">=</span> PdfPages(<span style="background-color: #fff0f0;">'MP_local_basic_tick_15000.pdf'</span>)
<span style="color: #008800; font-weight: bold;">for</span> q <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #0000dd; font-weight: bold;">999</span>, ticks, interval):
color_points(<span style="background-color: #fff0f0;">"Mean Price (Logged)</span><span style="background-color: #fff0f0; color: #666666; font-weight: bold;">\n</span><span style="background-color: #fff0f0;">Local Trade Basics"</span>,<span style="background-color: #fff0f0;">"Mean Price Local Trade Basics"</span>, <span style="background-color: #fff0f0;">"mean_price"</span>, data, pp, q, <span style="color: #333333;">-</span><span style="color: #0000dd; font-weight: bold;">1</span>, <span style="color: #0000dd; font-weight: bold;">8</span>)
plt<span style="color: #333333;">.</span>close(<span style="background-color: #fff0f0;">'all'</span>)
pp<span style="color: #333333;">.</span>close()
pp <span style="color: #333333;">=</span> PdfPages(<span style="background-color: #fff0f0;">'DfEP_local_basic_tick_15000.pdf'</span>)
<span style="color: #008800; font-weight: bold;">for</span> q <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #0000dd; font-weight: bold;">999</span>, ticks, interval):
color_points(<span style="background-color: #fff0f0;">"Distance From Predicted Equilibrium Price</span><span style="background-color: #fff0f0; color: #666666; font-weight: bold;">\n</span><span style="background-color: #fff0f0;">Local Trade Basics"</span>, <span style="background-color: #fff0f0;">"Distance From Predicted Equilibrium Price Local Trade Basics"</span>, <span style="background-color: #fff0f0;">"distance_from_equilibrium_price"</span>, data, pp, q, <span style="color: #333333;">-</span><span style="color: #0000dd; font-weight: bold;">1</span>, <span style="color: #0000dd; font-weight: bold;">8</span>)
plt<span style="color: #333333;">.</span>close(<span style="background-color: #fff0f0;">'all'</span>)
pp<span style="color: #333333;">.</span>close()
pp <span style="color: #333333;">=</span> PdfPages(<span style="background-color: #fff0f0;">'FPAMP_local_basic_tick_15000.pdf'</span>)
<span style="color: #008800; font-weight: bold;">for</span> q <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #0000dd; font-weight: bold;">999</span>, ticks, interval):
color_points(<span style="background-color: #fff0f0;">"Fifty Period Average Moving Price (Logged) </span><span style="background-color: #fff0f0; color: #666666; font-weight: bold;">\n</span><span style="background-color: #fff0f0;">Local Trade Basics"</span>, <span style="background-color: #fff0f0;">"Fifty Period Average Moving Price (Logged) Local Trade Basics"</span>, <span style="background-color: #fff0f0;">"fifty_period_RAP"</span>, data, pp, q, <span style="color: #333333;">-</span><span style="color: #0000dd; font-weight: bold;">1</span>, <span style="color: #0000dd; font-weight: bold;">8</span>)
plt<span style="color: #333333;">.</span>close(<span style="background-color: #fff0f0;">'all'</span>)
pp<span style="color: #333333;">.</span>close()
pp <span style="color: #333333;">=</span> PdfPages(<span style="background-color: #fff0f0;">'MRoPC_local_basic_tick_15000.pdf'</span>)
<span style="color: #008800; font-weight: bold;">for</span> q <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #0000dd; font-weight: bold;">999</span>, ticks, interval):
color_points(<span style="background-color: #fff0f0;">"Mean Rate of Price Change</span><span style="background-color: #fff0f0; color: #666666; font-weight: bold;">\n</span><span style="background-color: #fff0f0;">Local Trade Basics"</span>, <span style="background-color: #fff0f0;">"Mean Rate of Price Change Local Trade Basics"</span>, <span style="background-color: #fff0f0;">"mean_rate_of_price_change"</span>, data, pp, q, <span style="color: #0000dd; font-weight: bold;">0</span>, <span style="color: #0000dd; font-weight: bold;">1</span>)
plt<span style="color: #333333;">.</span>close(<span style="background-color: #fff0f0;">'all'</span>)
pp<span style="color: #333333;">.</span>close()
pp <span style="color: #333333;">=</span> PdfPages(<span style="background-color: #fff0f0;">'PB_local_basic_tick_15000.pdf'</span>)
<span style="color: #008800; font-weight: bold;">for</span> q <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #0000dd; font-weight: bold;">999</span>, ticks, interval):
color_points(<span style="background-color: #fff0f0;">"Percent Basic </span><span style="background-color: #fff0f0; color: #666666; font-weight: bold;">\n</span><span style="background-color: #fff0f0;">Local Trade Basics"</span>, <span style="background-color: #fff0f0;">"Percent Basic Local Trade Basics"</span>, <span style="background-color: #fff0f0;">"percent_basic"</span>, data, pp, q, <span style="color: #0000dd; font-weight: bold;">0</span>, <span style="color: #0000dd; font-weight: bold;">1</span>)
plt<span style="color: #333333;">.</span>close(<span style="background-color: #fff0f0;">'all'</span>)
pp<span style="color: #333333;">.</span>close()
pp <span style="color: #333333;">=</span> PdfPages(<span style="background-color: #fff0f0;">'WPC_local_basic_tick_15000.pdf'</span>)
<span style="color: #008800; font-weight: bold;">for</span> q <span style="color: black; font-weight: bold;">in</span> <span style="color: #007020;">range</span>(<span style="color: #0000dd; font-weight: bold;">999</span>, ticks, interval):
color_points(<span style="background-color: #fff0f0;">"Wealth Per Capita </span><span style="background-color: #fff0f0; color: #666666; font-weight: bold;">\n</span><span style="background-color: #fff0f0;">Local Trade Basics"</span>, <span style="background-color: #fff0f0;">"Wealth Per Capita Local Trade Basics"</span>, <span style="background-color: #fff0f0;">"basic_only_wealth_per_capita"</span>, data, pp, q, <span style="color: #0000dd; font-weight: bold;">50</span>, <span style="color: #0000dd; font-weight: bold;">400</span>)
plt<span style="color: #333333;">.</span>close(<span style="background-color: #fff0f0;">'all'</span>)
pp<span style="color: #333333;">.</span>close()
<span style="color: #008800; font-weight: bold;">if</span> __name__ <span style="color: #333333;">==</span> <span style="background-color: #fff0f0;">'__main__'</span>:
np<span style="color: #333333;">.</span>save(<span style="background-color: #fff0f0;">'data'</span>, prepare_lists(files))
np<span style="color: #333333;">.</span>load(<span style="background-color: #fff0f0;">'data.npy'</span>)
</pre>
</td></tr>
</tbody></table>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1240730580083032584.post-13946292326972750682016-07-23T10:33:00.000-07:002016-07-23T10:33:10.276-07:00New Austrian Macroecomics Issue for the Review of Austrian Economics<div style="background-color: white; color: #1d2129; font-family: helvetica, arial, sans-serif; font-size: 14px; line-height: 19.32px; margin-bottom: 6px;">
Articles for the coming <a href="http://link.springer.com.mutex.gmu.edu/journal/11138/onlineFirst/page/1">RAE issue on New Austrian Macroeconomics </a>are posted online. An early excerpt from <a href="http://mason.gmu.edu/~rwagner/">Richard Wagner</a> and <a href="http://www.kcl.ac.uk/sspp/departments/politicaleconomy/people/academic/lewis.aspx">Paul Lewis</a> explain the contribution of each paper contained in the issue:</div>
<blockquote class="tr_bq" style="background-color: white; color: #1d2129; font-family: helvetica, arial, sans-serif; font-size: 14px; line-height: 19.32px; margin-bottom: 6px; margin-top: 6px;">
In “Toward a New Austrian Macroeconomics,” <a href="http://grad.mercatus.org/vipin-veetil">Vipin P. Veetil </a>and <a href="http://mason.gmu.edu/~lwhite11/">Lawrence H. White</a> present a wide-ranging comparison of points of similarity and difference between their vision of a New Austrian macroeconomics and standard macro framework grounded in the DSGE (Dynamic Stochastic Gen<span class="text_exposed_show" style="display: inline; font-family: inherit;">eral Equilibrium) model of a macroeconomy. In “Playing at Markets: A New Austrian Perspective on Macroeconomic Policy,” <a href="http://www.awsalter.com/">Alexander William <span style="color: #365899; font-family: inherit;"><span style="cursor: pointer;">Salter</span></span></a> explains how orthodox expositions of macro policy create a form of shell game in deflecting the attention of observers away from the micro-level interactions out of which macro variables emerge. In “Dynamic Coordinating Non-Equilibrium,” <a href="http://calculusofdissent.com/about/">Santiago Gangotena</a> sets forth an alternative to the DSGE model wherein generally coordinated patterns of economic activity arise within a generative or non-equilibrium scheme of modeling. In “The Unresolved Problem of Gratuitous Credit in Austrian Banking Theory,” <a href="http://ppe.mercatus.org/raymond-niles">Raymond Niles</a> probes some points of controversy in Austrian banking theory over whether elasticity in the supply of money is a modest or a severe source of economic discoordination, or whether it might actually have socially beneficial properties in facilitating experimentation. In “Entrepreneurship, Search Costs, and Ecological Rationality in an Agentbased Economy,” James Caton explores different approaches to rationality in individual action in a manner that is congruent with continual experimentation and the injection of novelty into non-equilibrium but generally coordinated processes.</span></blockquote>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1240730580083032584.post-69785824659637942842016-04-25T16:00:00.002-07:002016-04-26T05:57:51.835-07:00Entrepreneurship, Search Costs, and Ecological Rationality in an Agent-based Economy<span class="tr_bq"><span style="background-color: white; font-family: "trebuchet" , "tahoma" , "myriad roman" , "arial" , "helvetica" , sans-serif; font-size: x-small;">New paper</span>, <a href="http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2752464" style="background-color: white; font-family: Trebuchet, Tahoma, 'Myriad Roman', Arial, Helvetica, sans-serif; font-size: small;">"Entrepreneurship, Search Costs, and Ecological Rationality in an Agent-based Economy"</a><span style="font-family: "trebuchet" , "tahoma" , "myriad roman" , "arial" , "helvetica" , sans-serif; font-size: x-small;"><span style="background-color: white;">, forthcoming in the </span></span><a href="http://link.springer.com/journal/11138" style="background-color: white; font-family: Trebuchet, Tahoma, 'Myriad Roman', Arial, Helvetica, sans-serif; font-size: small;">Review of Austrian Economics</a><span style="font-family: "trebuchet" , "tahoma" , "myriad roman" , "arial" , "helvetica" , sans-serif; font-size: x-small;"><span style="background-color: white;">:</span></span></span><br />
<blockquote>
<span style="background-color: white; font-family: "trebuchet" , "tahoma" , "myriad roman" , "arial" , "helvetica" , sans-serif; font-size: x-small;">Since Coase’s paper on the firm, transaction costs have occupied much attention as a field of economic inquiry. Yet, with few exceptions, neoclassical theory has failed to integrate transaction costs into its core. The dominant mode of theorizing depends upon Brouwer fixed points which cannot integrate transaction costs in more than a superficial manner. Agent-based modeling presents an opportunity for researchers to investigate the nature of transaction costs and integrate them into the core of economic theory.</span></blockquote>
<blockquote>
<span style="background-color: white; font-family: "trebuchet" , "tahoma" , "myriad roman" , "arial" , "helvetica" , sans-serif; font-size: x-small;">To the extent that transaction costs reduce economic efficiency, these costs provide opportunities for entrepreneurs to earn a profit by reducing these costs. We employ an extension of Epstein and Axtell’s (1996) Sugarscape to demonstrate this point one type of transaction costs: search costs. When agents do not face the cost of finding a trading partner, the system quickly reaches a steady state with tightly constrained prices regardless of agent production strategies. When search costs are present, entrepreneurs may use competing strategies for production and exchange that allow them to earn higher revenues than they would earn otherwise. These cost reducing innovations tend to promote concatenate coordination (Klein 2012). In our model, search costs are tied to consumption rates of our agents. The agent’s production strategies represent technology in the form of mental models (Denzau and North 1994) that shape agent action with regard to the agent’s environment. The success of these are dependent on their ability to overcome search costs. Finally, we find that the average profit, or market return, earned by each of these mental structures tends to equalize as a result of competition.</span></blockquote>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9plo3ww6Da0tr5TuwstkZtF_NQRrwGxVCRjZekOozWPbNjX5KeVFSdEvhceCOwWOq9mfylONcC2jtd5NIqxkFrhH6bGADdIiQPvxJmZsmyho0uWABNRzlNXfm6BV-YZS5EEVJ3zt8WbA/s1600/Market+Rate+of+Return+Sugarscape.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9plo3ww6Da0tr5TuwstkZtF_NQRrwGxVCRjZekOozWPbNjX5KeVFSdEvhceCOwWOq9mfylONcC2jtd5NIqxkFrhH6bGADdIiQPvxJmZsmyho0uWABNRzlNXfm6BV-YZS5EEVJ3zt8WbA/s400/Market+Rate+of+Return+Sugarscape.png" width="400" /></a></div>
Unknownnoreply@blogger.com0