<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Museful</title>
	<atom:link href="http://www.museful.net/feed" rel="self" type="application/rss+xml" />
	<link>http://www.museful.net</link>
	<description>muses with uses</description>
	<lastBuildDate>Wed, 11 Apr 2012 18:24:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Some AVR Libraries</title>
		<link>http://www.museful.net/2011/software-development/some-avr-libraries?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=some-avr-libraries</link>
		<comments>http://www.museful.net/2011/software-development/some-avr-libraries#comments</comments>
		<pubDate>Tue, 01 Nov 2011 21:47:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[adc]]></category>
		<category><![CDATA[atmega]]></category>
		<category><![CDATA[atmega32]]></category>
		<category><![CDATA[atmega644]]></category>
		<category><![CDATA[atmel avr]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[avrgcc]]></category>
		<category><![CDATA[data acquisition]]></category>
		<category><![CDATA[fixed-point]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[lookup]]></category>
		<category><![CDATA[microcontroller]]></category>
		<category><![CDATA[spi]]></category>
		<category><![CDATA[spi master]]></category>
		<category><![CDATA[spi slave]]></category>
		<category><![CDATA[trigonometry]]></category>
		<category><![CDATA[uart]]></category>

		<guid isPermaLink="false">http://www.museful.net/?p=424</guid>
		<description><![CDATA[Here are a few commonly useful source code libraries intended to serve as hardware abstracting modules or general purpose modules for AVR microcontroller applications compiled with GCC. They are not guaranteed to be fit for any particular purpose, but I have used them over the years on a number of projects on ATmega32, ATmega64 and [...]]]></description>
			<content:encoded><![CDATA[<p>Here are a few commonly useful source code libraries intended to serve as hardware abstracting modules or general purpose modules for AVR microcontroller applications compiled with GCC. They are not guaranteed to be fit for any particular purpose, but I have used them over the years on a number of projects on ATmega32, ATmega64 and ATmega644 and related devices.</p>
<p>Some of the files seem to have been commented back in the day &#8211; others were not.</p>
<ul>
<li>uart &#8211; simple UART module</li>
<li>spim &#8211; SPI master module</li>
<li>spis &#8211; SPI slave module</li>
<li>daq &#8211; a module for streamed data acquisition using the ADC</li>
<li>lutrig &#8211; efficient fixed-point lookup-trigonometry module</li>
</ul>
<p>Download <a title="museful AVR C library" href="http://www.museful.net/other/musefulAVR111101.zip">musefulAVR111101.zip</a></p>
<p>Check back if you use them. If they are updated in future, the filename will change to reflect the new date.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.museful.net/2011/software-development/some-avr-libraries/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reliable Serial File Transport</title>
		<link>http://www.museful.net/2011/software-development/reliable-serial-file-transport?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=reliable-serial-file-transport</link>
		<comments>http://www.museful.net/2011/software-development/reliable-serial-file-transport#comments</comments>
		<pubDate>Sat, 29 Oct 2011 21:03:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[ARQ]]></category>
		<category><![CDATA[automatic repeat request]]></category>
		<category><![CDATA[best-effort]]></category>
		<category><![CDATA[comm port]]></category>
		<category><![CDATA[file transfer]]></category>
		<category><![CDATA[filepipe]]></category>
		<category><![CDATA[quality-of-service]]></category>
		<category><![CDATA[reliability layer]]></category>
		<category><![CDATA[reliable communications]]></category>
		<category><![CDATA[rs232]]></category>
		<category><![CDATA[serial link]]></category>
		<category><![CDATA[serial port]]></category>
		<category><![CDATA[transport layer]]></category>
		<category><![CDATA[unreliable connection]]></category>

		<guid isPermaLink="false">http://www.museful.net/?p=410</guid>
		<description><![CDATA[Here is a small command-line tool for transporting small files (up to 1MB) over an unreliable serial link. Internally, it uses a flexible automatic repeat request (ARQ) protocol to maximize efficiency while guaranteeing reliable transfer over a serial link of unspecified reliability and latency. (It was originally used to transfer pictures between military radios.) The [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a small command-line tool for transporting small files (up to 1MB) over an unreliable serial link. Internally, it uses a flexible automatic repeat request (ARQ) protocol to maximize efficiency while guaranteeing reliable transfer over a serial link of unspecified reliability and latency. (It was originally used to transfer pictures between military radios.)</p>
<p>The application is lightweight (10KB) and has no dependencies (other than the standard serial port WIN32 API). See the readme for more details.</p>
<p><a title="filepipe" href="http://www.museful.net/other/filepipe.zip">Download filepipe.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.museful.net/2011/software-development/reliable-serial-file-transport/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Information Theory Plots</title>
		<link>http://www.museful.net/2011/uncategorized/information-theory-plot?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=information-theory-plot</link>
		<comments>http://www.museful.net/2011/uncategorized/information-theory-plot#comments</comments>
		<pubDate>Mon, 03 Oct 2011 20:28:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[binary channel]]></category>
		<category><![CDATA[bits]]></category>
		<category><![CDATA[entropy]]></category>
		<category><![CDATA[information theory]]></category>
		<category><![CDATA[probability]]></category>
		<category><![CDATA[Shannon]]></category>
		<category><![CDATA[surprisal]]></category>

		<guid isPermaLink="false">http://www.museful.net/?p=380</guid>
		<description><![CDATA[When considering a matter in the light of both probability- and information theory, it sometimes becomes tiresome to switch between the two perspectives. Here is a little assistant for the mental juggling. (PDF)]]></description>
			<content:encoded><![CDATA[<p>When considering a matter in the light of both probability- and information theory, it sometimes becomes tiresome to switch between the two perspectives. Here is a little assistant for the mental juggling. (<a href="http://www.museful.net/other/information-theory-cheat-sheet.pdf">PDF</a>)</p>
<p><a href="http://www.optrolyte.co.za/wp/wp-content/uploads/2011/10/information-theory-cheat-sheet.png"><img class="aligncenter size-full wp-image-381" title="information-theory-cheat-sheet" src="http://www.optrolyte.co.za/wp/wp-content/uploads/2011/10/information-theory-cheat-sheet.png" alt="" width="656" height="458" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.museful.net/2011/uncategorized/information-theory-plot/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Profitability and Information</title>
		<link>http://www.museful.net/2011/quantitative-finance/profitability-and-information?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=profitability-and-information</link>
		<comments>http://www.museful.net/2011/quantitative-finance/profitability-and-information#comments</comments>
		<pubDate>Fri, 23 Sep 2011 21:46:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quantitative Finance]]></category>
		<category><![CDATA[efficient market hypothesis]]></category>
		<category><![CDATA[entropy]]></category>
		<category><![CDATA[forex]]></category>
		<category><![CDATA[geometric growth]]></category>
		<category><![CDATA[information theory]]></category>
		<category><![CDATA[Kullback-Leibler divergence]]></category>
		<category><![CDATA[lot size]]></category>
		<category><![CDATA[market]]></category>
		<category><![CDATA[random walk market]]></category>
		<category><![CDATA[Shannon]]></category>
		<category><![CDATA[trader]]></category>

		<guid isPermaLink="false">http://www.museful.net/?p=342</guid>
		<description><![CDATA[In the previous post (Optimal Market Exposure), we saw how trading requires information superior to the &#8220;outside world&#8217;s belief&#8221;, in order to be profitable. The trader may obtain this information by analyzing market fundamentals or technicals, or both. It is actually obvious that better information facilitates better trading, and more profits, but here we will [...]]]></description>
			<content:encoded><![CDATA[<p>In the previous post (<a href="http://www.museful.net/2011/quantitative-finance/optimal-market-exposure">Optimal Market Exposure</a>), we saw how trading requires information superior to the &#8220;outside world&#8217;s belief&#8221;, in order to be profitable. The trader may obtain this information by analyzing market fundamentals or technicals, or both.</p>
<p>It is actually obvious that better information facilitates better trading, and more profits, but here we will prove an exact equivalence between profitability and information. Specifically, we will prove that, for a standard fixed SL/TP trade, the optimal expected utility gain is equal to the information gain (Kullback Leibler divergence) relative to the &#8220;outside world&#8217;s&#8221; belief. In simpler words:</p>
<ul>
<li>1 bit of &#8220;inside information&#8221; can double the trader&#8217;s account. (2<sup>1</sup>)</li>
<li>0.5 bits can give the expected utility growth corresponding to 41% account growth. (2<sup>0.5</sup>)</li>
<li>0.1 bits can give the expected utility growth corresponding to 7% account growth. (2<sup>0.1</sup>)</li>
<li>etc.</li>
</ul>
<h2>Derivation</h2>
<p>As in the <a href="http://www.museful.net/2011/quantitative-finance/optimal-market-exposure">previous post</a></p>
<ul>
<li>we will consider the stereotypical trade, with two possible outcomes: SL and TP.</li>
<li><em>p</em> is the probability of a win, conditional on the efficient-market hypothesis. (i.e. according to the &#8220;outside world&#8217;s&#8221; belief).</li>
<li><em>b</em> is the probability of a win, according to the belief of the trader.</li>
</ul>
<p>In the previous post we mentioned that the efficient-market hypothesis (according to which the market exhibits a completely random walk) means that</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Clarge%7B%281-p%29%3Ap%3DT%3AS%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\large{(1-p):p=T:S}' title='\large{(1-p):p=T:S}' class='latex' /></p>
<ul>
<li>Let <em>r</em> be a variable proportional to the investment made (exposure taken) for the trade, such that a win amounts to <em>r(1-p)</em> of account size and a loss amounts to <em>rp</em> of account size. (In terms of the previous post&#8217;s variables <em>r=fS/pm</em>, but this is irrelevant.)</li>
</ul>
<p>Now, a random coin toss (which has 50-50 odds) generates one binary digit (bit) of Shannon information on each toss. If it is known that the coin is biased, then a reduced amount of information is generated because a fraction of that information is known before the coin is tossed.</p>
<p>Prior information = total information (1 bit) &#8211; toss information (entropy)</p>
<p>In the case of our trade the prior information is given by:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Clarge%7BI_p%3D%5Clog%282%29%20-p%20%5Clog%28%5Cfrac%7B1%7D%7Bp%7D%29%20-%20%281-p%29%20%5Clog%28%5Cfrac%7B1%7D%7B1-p%7D%29%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\large{I_p=\log(2) -p \log(\frac{1}{p}) - (1-p) \log(\frac{1}{1-p})}' title='\large{I_p=\log(2) -p \log(\frac{1}{p}) - (1-p) \log(\frac{1}{1-p})}' class='latex' /></p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Clarge%7BI_b%3D%5Clog%282%29%20-b%20%5Clog%28%5Cfrac%7B1%7D%7Bb%7D%29%20-%20%281-b%29%20%5Clog%28%5Cfrac%7B1%7D%7B1-b%7D%29%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\large{I_b=\log(2) -b \log(\frac{1}{b}) - (1-b) \log(\frac{1}{1-b})}' title='\large{I_b=\log(2) -b \log(\frac{1}{b}) - (1-b) \log(\frac{1}{1-b})}' class='latex' /></p>
<p><img src='http://s.wordpress.com/latex.php?latex=I_p&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='I_p' title='I_p' class='latex' /> is the information known by the &#8220;efficient market&#8221; (or &#8220;outside world&#8221;) about the outcome of our trade, at the time it is opened, while <img src='http://s.wordpress.com/latex.php?latex=I_b&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='I_b' title='I_b' class='latex' /> is the information known by the trader (if his information is good).</p>
<p>The posterior utility (assuming <a href="http://www.museful.net/2011/quantitative-finance/logarithmic-utility-of-wealth">logarithmic utility</a>) expected according to the trader&#8217;s belief, is given by</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Clarge%7BG%3Db%5Clog%281%2Br%281-p%29%29%2B%281-b%29%5Clog%281-rp%29%7D%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\large{G=b\log(1+r(1-p))+(1-b)\log(1-rp)} ' title='\large{G=b\log(1+r(1-p))+(1-b)\log(1-rp)} ' class='latex' /></p>
<p>By maximizing this w.r.t r (or by substituting the result from the previous post), we find that</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Clarge%7Br_%7Bbest%7D%20%3D%20%5Cfrac%7Bb-p%7D%7Bp%281-p%29%7D%7D%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\large{r_{best} = \frac{b-p}{p(1-p)}} ' title='\large{r_{best} = \frac{b-p}{p(1-p)}} ' class='latex' /></p>
<p>Therefore</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Clarge%7BG_%7Bmax%7D%20%3D%20b%20%5Clog%5Cfrac%7Bb%7D%7Bp%7D%2B%281-b%29%5Clog%5Cfrac%7B1-b%7D%7B1-p%7D%7D%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\large{G_{max} = b \log\frac{b}{p}+(1-b)\log\frac{1-b}{1-p}} ' title='\large{G_{max} = b \log\frac{b}{p}+(1-b)\log\frac{1-b}{1-p}} ' class='latex' /></p>
<p>which is called the Kullback-Leibler divergence (also called information gain, information divergence, or relative entropy), and measures the information &#8220;disagreement&#8221; between the trader and the efficient-market hypothesis.</p>
<p>It can also be written as:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Clarge%7BG_%7Bmax%7D%20%3D%20I_b%20-%20I_p%20-%20%28b-p%29%5Clog%5Cfrac%7Bp%7D%7B1-p%7D%7D%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\large{G_{max} = I_b - I_p - (b-p)\log\frac{p}{1-p}} ' title='\large{G_{max} = I_b - I_p - (b-p)\log\frac{p}{1-p}} ' class='latex' /></p>
<p style="text-align: left;">which shows that it is a close approximation of the difference between the information known by trader and that known by the &#8220;outside world&#8221;. Close inspection of original result above (the Kullback-Leibler divergence) shows that it is in fact exactly equal to the difference in information, but<em> in the estimation of the trader</em>. This allows us to express the result precisely in non-mathematical (but complicated) English:</p>
<h2 style="text-align: left;">Conclusion</h2>
<p>The optimal utility growth expected (by the trader) is equal to the prior information known about the outcome of the trade by the trader (according to the trader) minus the prior information known about the outcome of the trade by the &#8220;world&#8221;, according to the trader.</p>
<p>In different words:</p>
<blockquote><p>The utility growth expected by the trader is equal to how much more information the trader claims to have than an efficient-market hypothesis adherent.</p></blockquote>
<p>Of course, the concept that &#8220;information is money&#8221; is not surprising. What is more surprising is the exact mathematical equivalence between (<a href="http://www.museful.net/2011/quantitative-finance/logarithmic-utility-of-wealth">rational utility</a>) growth and (Shannon) information.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.museful.net/2011/quantitative-finance/profitability-and-information/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Optimal Market Exposure</title>
		<link>http://www.museful.net/2011/quantitative-finance/optimal-market-exposure?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=optimal-market-exposure</link>
		<comments>http://www.museful.net/2011/quantitative-finance/optimal-market-exposure#comments</comments>
		<pubDate>Mon, 29 Aug 2011 08:55:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quantitative Finance]]></category>
		<category><![CDATA[amount]]></category>
		<category><![CDATA[forex]]></category>
		<category><![CDATA[investment]]></category>
		<category><![CDATA[leverage]]></category>
		<category><![CDATA[lot size]]></category>
		<category><![CDATA[market exposure]]></category>
		<category><![CDATA[modern portfolio theory]]></category>
		<category><![CDATA[money management]]></category>
		<category><![CDATA[optimal leverage]]></category>
		<category><![CDATA[pips]]></category>
		<category><![CDATA[spread]]></category>
		<category><![CDATA[stop loss]]></category>
		<category><![CDATA[take profit]]></category>
		<category><![CDATA[trade]]></category>

		<guid isPermaLink="false">http://www.du-preez.com/?p=257</guid>
		<description><![CDATA[Having established in the previous post (Logarithmic Utility of Wealth) that the utility of a rational, small, long-term trader’s account is logarithmic in the account’s size, we are in a position to mathematically optimize how much risk (exposure) the trader should take on a given opportunity. We do this simply by maximizing expected utility with [...]]]></description>
			<content:encoded><![CDATA[<p>Having established in the previous post (<a href="http://www.museful.net/2011/quantitative-finance/logarithmic-utility-of-wealth">Logarithmic Utility of Wealth</a>) that the utility of a rational, small, long-term trader’s account is logarithmic in the account’s size, we are in a position to mathematically optimize how much risk (exposure) the trader should take on a given opportunity. We do this simply by maximizing expected utility with respect to investment size.</p>
<h2>Background</h2>
<p>Let us consider the typical trade, which has two possible outcomes: After opening the position, the market can move in the trader’s favor and hit the TP (take profit) level, or the market can move against the trader and hit the SL (stop loss) level. In either event, the position is closed with some predetermined profit or loss.</p>
<p>For a trade with given SL and TP levels, let <em>p</em> be the probability of a win if the efficient-market hypothesis is true (i.e. if the market had zero predictability, called a random walk, or Brownian motion). Then 1-p is the probability of a loss under the same condition.</p>
<p>Of course, trading on a market with zero predictability is always a pure gamble. More mathematically, it can be shown that any trade on a random walk market, yields zero expected profit**. That is to say:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Clarge%7BpT-%281-p%29S%20%3D%200%7D%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\large{pT-(1-p)S = 0} ' title='\large{pT-(1-p)S = 0} ' class='latex' /></p>
<p>where T is the TP and S is the SL, both positive and measured from the level where the position was opened. Solving for p, we get:</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Clarge%7Bp%3D%5Cfrac%7BS%7D%7BS%2BT%7D%7D%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\large{p=\frac{S}{S+T}} ' title='\large{p=\frac{S}{S+T}} ' class='latex' /></p>
<p>Loosely speaking, <em>p</em> represents the ”outside world’s belief” of the probability of a win, for the given trade. Let <em>b</em> be our belief of the probability of a win. If we believe in the efficient-market hypothesis, we agree with the “outside world”, and <em>b</em>=<em>p</em>. If we make a trade with the belief that the market’s future is biased in our trade’s favor, then <em>b</em>&gt;<em>p</em>.</p>
<h2>Optimization</h2>
<p>Before getting to the optimization, we summarize our definitions:</p>
<ul>
<li><em>T</em> =<em> TP</em> (measured in same unit as m, from opening position)</li>
<li><em>S</em> = <em>SL</em> (measured in same unit as m, from opening position)</li>
<li><em>p</em> = <em>S</em>/(<em>S</em>+<em>T</em>)</li>
</ul>
<p>And we need a few more definitions:</p>
<ul>
<li><em>x</em> is the account size (equity)</li>
<li><em>y</em> is the account utility</li>
<li><em>f</em> is the fraction (or multiple) of account size invested in the trade (this is bounded by leverage available)</li>
<li><em>m</em> is the market position (initially, the trade’s opening price)</li>
<li><em>s</em> is the spread and commission (in same unit as m)</li>
<li>∆&#8230; denotes change resulting from the trade</li>
<li>E{&#8230;} denotes expectation (probability-weighted average)</li>
</ul>
<p>We start with our logarithmic utility function of wealth (from previous post)</p>
<p style="text-align: center;"><img src='http://s.wordpress.com/latex.php?latex=%5Clarge%7By%3D%5Cln%20x%7D%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\large{y=\ln x} ' title='\large{y=\ln x} ' class='latex' /></p>
<p>The account utility after the trade is</p>
<p style="text-align: center;"> <img src='http://s.wordpress.com/latex.php?latex=%5Clarge%7By%2B%5CDelta%20y%20%3D%20%5Cln%28x%2B%5CDelta%20x%29%20%3D%20%5Cln%20x%20%2B%20%5Cln%281%2B%5Cfrac%7B%5CDelta%20x%7D%7Bx%7D%29%7D%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\large{y+\Delta y = \ln(x+\Delta x) = \ln x + \ln(1+\frac{\Delta x}{x})} ' title='\large{y+\Delta y = \ln(x+\Delta x) = \ln x + \ln(1+\frac{\Delta x}{x})} ' class='latex' /></p>
<p>So the change in utility is</p>
<p style="text-align: center;"> <img src='http://s.wordpress.com/latex.php?latex=%5Clarge%7B%5CDelta%20y%20%3D%20%5Cln%281%2B%5Cfrac%7B%5CDelta%20x%7D%7Bx%7D%29%7D%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\large{\Delta y = \ln(1+\frac{\Delta x}{x})} ' title='\large{\Delta y = \ln(1+\frac{\Delta x}{x})} ' class='latex' /></p>
<p>The fractional (%) change in account size is</p>
<p style="text-align: center;"> <img src='http://s.wordpress.com/latex.php?latex=%5Clarge%7B%5Cfrac%7B%5CDelta%20x%7D%7Bx%7D%3Df%20%5Cfrac%7B%5CDelta%20m-s%7D%7Bm%7D%7D%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\large{\frac{\Delta x}{x}=f \frac{\Delta m-s}{m}} ' title='\large{\frac{\Delta x}{x}=f \frac{\Delta m-s}{m}} ' class='latex' /></p>
<p style="text-align: left;">So substituting above, we have</p>
<p style="text-align: center;"> <img src='http://s.wordpress.com/latex.php?latex=%5Clarge%7B%5CDelta%20y%3D%5Cln%281%2Bf%20%5Cfrac%7B%5CDelta%20m-s%7D%7Bm%7D%29%7D%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\large{\Delta y=\ln(1+f \frac{\Delta m-s}{m})} ' title='\large{\Delta y=\ln(1+f \frac{\Delta m-s}{m})} ' class='latex' /></p>
<p style="text-align: center;"> <img src='http://s.wordpress.com/latex.php?latex=%5Clarge%7BE%5C%7B%5CDelta%20y%5C%7D%3Db%20%5Cln%281%2Bf%5Cfrac%7BT-s%7D%7Bm%7D%29%2B%281-b%29%20%5Cln%281%2Bf%5Cfrac%7B-S-s%7D%7Bm%7D%29%7D%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\large{E\{\Delta y\}=b \ln(1+f\frac{T-s}{m})+(1-b) \ln(1+f\frac{-S-s}{m})} ' title='\large{E\{\Delta y\}=b \ln(1+f\frac{T-s}{m})+(1-b) \ln(1+f\frac{-S-s}{m})} ' class='latex' /></p>
<p style="text-align: left;">In order to determine the optimal exposure, we need to maximize this (<img src='http://s.wordpress.com/latex.php?latex=E%5C%7B%5CDelta%20y%5C%7D%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E\{\Delta y\} ' title='E\{\Delta y\} ' class='latex' />) with respect to f. If <img src='http://s.wordpress.com/latex.php?latex=E%5C%7B%5CDelta%20y%5C%7D%20%3C%3D%200%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E\{\Delta y\} &lt;= 0 ' title='E\{\Delta y\} &lt;= 0 ' class='latex' /> then the trade should not be opened at all.</p>
<p style="text-align: left;">We find the maximum by locating the stationary point, where</p>
<p style="text-align: center;"> <img src='http://s.wordpress.com/latex.php?latex=%5Clarge%7B%5Cfrac%7BdE%5C%7B%5CDelta%20y%5C%7D%7D%7Bdf%7D%3D%5Cfrac%7Bb%28T-s%29%7D%7Bm%2Bf_%7Bbest%7D%28T-s%29%7D-%5Cfrac%7B%281-b%29%28S%2Bs%29%7D%7Bm%2Bf_%7Bbest%7D%28S%2Bs%29%7D%7D%3D0%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\large{\frac{dE\{\Delta y\}}{df}=\frac{b(T-s)}{m+f_{best}(T-s)}-\frac{(1-b)(S+s)}{m+f_{best}(S+s)}}=0 ' title='\large{\frac{dE\{\Delta y\}}{df}=\frac{b(T-s)}{m+f_{best}(T-s)}-\frac{(1-b)(S+s)}{m+f_{best}(S+s)}}=0 ' class='latex' /></p>
<p style="text-align: left;">yielding</p>
<p style="text-align: center;"> <img src='http://s.wordpress.com/latex.php?latex=%5Clarge%7Bf_%7Bbest%7D%3Dm%5Cfrac%7Bb%28T-s%29-%281-b%29%28S%2Bs%29%7D%7B%28T-s%29%28S%2Bs%29%7D%3Dm%5Cfrac%7BE%5C%7B%5CDelta%20m%5C%7D-s%5Ctext%7Bsgn%7D%20T%7D%7BTS%2Bs%28T-S%29-s%5E2%7D%7D%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\large{f_{best}=m\frac{b(T-s)-(1-b)(S+s)}{(T-s)(S+s)}=m\frac{E\{\Delta m\}-s\text{sgn} T}{TS+s(T-S)-s^2}} ' title='\large{f_{best}=m\frac{b(T-s)-(1-b)(S+s)}{(T-s)(S+s)}=m\frac{E\{\Delta m\}-s\text{sgn} T}{TS+s(T-S)-s^2}} ' class='latex' /></p>
<p style="text-align: left;">which answers our original question: how much exposure to take. This result is only valid if <img src='http://s.wordpress.com/latex.php?latex=%7CE%5C%7B%5CDelta%20m%5C%7D%7C%20%3E%20s%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='|E\{\Delta m\}| &gt; s ' title='|E\{\Delta m\}| &gt; s ' class='latex' />. Otherwise <img src='http://s.wordpress.com/latex.php?latex=E%5C%7B%5CDelta%20y%5C%7D%5Cleq%200%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='E\{\Delta y\}\leq 0 ' title='E\{\Delta y\}\leq 0 ' class='latex' /> and the trade should not be opened at all.</p>
<p style="text-align: left;">If spread and commission are small, then</p>
<p style="text-align: center;"> <img src='http://s.wordpress.com/latex.php?latex=%5Clarge%7Bf_%7Bbest%7D%5Capprox%20m%5Cfrac%7BE%5C%7B%5CDelta%20m%5C%7D%7D%7BTS%7D%7D%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\large{f_{best}\approx m\frac{E\{\Delta m\}}{TS}} ' title='\large{f_{best}\approx m\frac{E\{\Delta m\}}{TS}} ' class='latex' /></p>
<h2 style="text-align: left;">Application</h2>
<p>In order to use this result, you need to first know how confident you are in the trade. There are two equivalent alternative ways of expressing your confidence:</p>
<ul>
<li>What your belief is on the probability of success (b)</li>
<li>How many pips per trade you expect to make, in the long run, on trades such as this. (E{Δ<em>m</em>})</li>
</ul>
<p>The table below shows how to use this result in the EUR/USD market assuming</p>
<ul>
<li>that it is currently trading around 1.5</li>
<li>that our account size is $10000 (0.1 lots)</li>
<li>that we want to place TP of 0.0015 (15 pips)</li>
<li>that we want to place SL of 0.0015 (15 pips)</li>
<li>that the spread and commission amount to 1 pip on every trade</li>
</ul>

<table id="wp-table-reloaded-id-1-no-1" class="wp-table-reloaded wp-table-reloaded-id-1">
<thead>
	<tr class="row-1 odd">
		<th class="column-1">p (world's confidence)</th><th class="column-2">b (your confidence)</th><th class="column-3">E{Δm} (pips per trade)</th><th class="column-4">f (optimal leverage)</th><th class="column-5">optimal investment</th>
	</tr>
</thead>
<tbody class="row-hover">
	<tr class="row-2 even">
		<td class="column-1">50%</td><td class="column-2">50.00%</td><td class="column-3">0</td><td class="column-4">-67</td><td class="column-5">N/A</td>
	</tr>
	<tr class="row-3 odd">
		<td class="column-1">50%</td><td class="column-2">53.30%</td><td class="column-3">1</td><td class="column-4">0</td><td class="column-5">0.00 lots</td>
	</tr>
	<tr class="row-4 even">
		<td class="column-1">50%</td><td class="column-2">55.00%</td><td class="column-3">1.5</td><td class="column-4">33.5</td><td class="column-5">3.35 lots</td>
	</tr>
	<tr class="row-5 odd">
		<td class="column-1">50%</td><td class="column-2">56.70%</td><td class="column-3">2</td><td class="column-4">67</td><td class="column-5">6.70 lots</td>
	</tr>
	<tr class="row-6 even">
		<td class="column-1">50%</td><td class="column-2">58.30%</td><td class="column-3">2.5</td><td class="column-4">100.4</td><td class="column-5">10.04 lots</td>
	</tr>
	<tr class="row-7 odd">
		<td class="column-1">50%</td><td class="column-2">60.00%</td><td class="column-3">3</td><td class="column-4">133.9</td><td class="column-5">13.39 lots</td>
	</tr>
	<tr class="row-8 even">
		<td class="column-1">50%</td><td class="column-2">63.30%</td><td class="column-3">4</td><td class="column-4">200.9</td><td class="column-5">20.09 lots</td>
	</tr>
	<tr class="row-9 odd">
		<td class="column-1">50%</td><td class="column-2">100.00%</td><td class="column-3">15</td><td class="column-4">937.5</td><td class="column-5">93.75 lots</td>
	</tr>
</tbody>
</table>

<p>Remember that this entire table needs to be adjusted if the assumptions above it change. Also, you need to be careful to not overestimate confidence (or pips per trade) as this will quickly result in very high exposures. For example, if a particular scenario has given 60% wins in a finite history, it does not mean you can expect anywhere near 60% wins in future, but that is another whole statistical story, for another day.</p>
<p>In this post, we saw how trading requires superior information to the &#8220;outside world&#8217;s belief&#8221;, in order to be profitable. In the next post (<a href="http://www.museful.net/2011/quantitative-finance/profitability-and-information">Profitability and Information</a>), we will demonstrate that profitability (maximum achievable expected utility gain) is in fact exactly equivalent to information (in the Shannon entropy sense).</p>
<p>** if spread and commission are zero</p>
]]></content:encoded>
			<wfw:commentRss>http://www.museful.net/2011/quantitative-finance/optimal-market-exposure/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Logarithmic Utility of Wealth</title>
		<link>http://www.museful.net/2011/quantitative-finance/logarithmic-utility-of-wealth?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=logarithmic-utility-of-wealth</link>
		<comments>http://www.museful.net/2011/quantitative-finance/logarithmic-utility-of-wealth#comments</comments>
		<pubDate>Wed, 24 Aug 2011 21:36:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Quantitative Finance]]></category>
		<category><![CDATA[forex]]></category>
		<category><![CDATA[logarithmic utility]]></category>
		<category><![CDATA[money management]]></category>
		<category><![CDATA[trade]]></category>
		<category><![CDATA[trader]]></category>
		<category><![CDATA[utility function]]></category>
		<category><![CDATA[wealth utility]]></category>

		<guid isPermaLink="false">http://www.du-preez.com/?p=241</guid>
		<description><![CDATA[The previous post (Utility Function of Wealth) discussed and described the typical general shape of the utility function of wealth, and touched on some applications. Here, we will consider a special case, with an exact curve. Consider a rational trader – a trader that is emotionally detached from his account, and whose objective is to [...]]]></description>
			<content:encoded><![CDATA[<p>The previous post (<a href="http://www.museful.net/2011/quantitative-finance/utility-function-of-wealth">Utility Function of Wealth</a>) discussed and described the typical general shape of the utility function of wealth, and touched on some applications. Here, we will consider a special case, with an exact curve.</p>
<p>Consider a rational trader – a trader that is emotionally detached from his account, and whose objective is to maximize growth of his account in the long term. For such a trader, it is equally difficult to achieve some % growth on a small account, as it is to achieve that same % growth on a large account**. They are equal accomplishments. They are equally “good”.</p>
<p>The function that satisfies this observation is logarithmic. So our utility function is logarithmic in the account size, if we interpret this difficulty/accomplishment/”goodness” as utility. Optimizing expected change in logarithmic utility for each trade leads to optimal geometric growth, which leads to maximal account size in the long run.</p>
<div id="attachment_247" class="wp-caption aligncenter" style="width: 392px"><a href="http://www.optrolyte.co.za/wp/wp-content/uploads/2011/08/logarithmic-plot1.png"><img class="size-full wp-image-247" title="logarithmic plot" src="http://www.optrolyte.co.za/wp/wp-content/uploads/2011/08/logarithmic-plot1.png" alt="" width="382" height="283" /></a><p class="wp-caption-text">Logarithmic plot of utility vs wealth</p></div>
<p>We can make the following observations, which are in agreement with our logarithmic definition of utility:</p>
<ul>
<li>A loss of 1% balances a profit of about 1.0%</li>
<li>A loss of 5% balances a profit of 5.3% (because 0.95*1.053=1)</li>
<li>A loss of 10% balances a profit of 11% (because 0.90*1.11=1)</li>
<li>A loss of 20% balances a profit of 25% (because 0.80*1.25=1)</li>
<li>A loss of 50% balances a profit of 100% (because 0.50*2.00=1)</li>
</ul>
<p>Recall from the <a href="http://www.museful.net/2011/quantitative-finance/utility-function-of-wealth">previous post</a> that the curvature of utility discouraged gambling. Simply put, a win of, say, 20% does not recover a loss of 20%, and that is why taking a 50-50 gamble on 20% is a bad idea; you would lose in the long run. However, if the odds are tipped in your favor sufficiently, then taking the gamble becomes rational. How much should the odds be tipped before it becomes rational? Enough so that the expected change in utility (rather than the expected change in wealth) becomes positive.</p>
<p>But for a trader it is more useful to consider the matter from a different perspective: How much risk (exposure) should I take on this trading opportunity, where I know how much the odds are tipped in my favor?</p>
<p>This question will be addressed in the next post: <a title="Optimal Market Exposure" href="http://www.museful.net/2011/quantitative-finance/optimal-market-exposure">Optimal Market Exposure</a>.</p>
<p>&nbsp;</p>
<p>** assuming the account is not large enough for its trades to alter the market significantly</p>
]]></content:encoded>
			<wfw:commentRss>http://www.museful.net/2011/quantitative-finance/logarithmic-utility-of-wealth/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Information Argument</title>
		<link>http://www.museful.net/2011/philosophy/the-information-argument?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-information-argument</link>
		<comments>http://www.museful.net/2011/philosophy/the-information-argument#comments</comments>
		<pubDate>Wed, 24 Aug 2011 09:08:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Philosophy]]></category>
		<category><![CDATA[conscious experience]]></category>
		<category><![CDATA[dualism]]></category>
		<category><![CDATA[information theory]]></category>
		<category><![CDATA[objectivity]]></category>
		<category><![CDATA[philosophy of the mind]]></category>
		<category><![CDATA[physicalism]]></category>
		<category><![CDATA[sentience]]></category>
		<category><![CDATA[Shannon]]></category>
		<category><![CDATA[subjectivity]]></category>

		<guid isPermaLink="false">http://www.museful.net/?p=471</guid>
		<description><![CDATA[You may want to read these posts before continuing: Ineffability of Qualia What is Sentience? The Dualist’s Predicament Refuting Physicalism Subjectively &#160; Imagine a universe with two rooms, called room0 and room1. In each room, there is a note lying face-down on the floor. These rooms are similar, but room0&#8242;s note has &#8217;0&#8242; written on [...]]]></description>
			<content:encoded><![CDATA[<p>You may want to read these posts before continuing:</p>
<ol>
<li><a href="http://www.museful.net/2011/philosophy/ineffability-of-qualia">Ineffability of Qualia</a></li>
<li><a href="http://www.museful.net/2011/philosophy/what-is-sentience">What is Sentience?</a></li>
<li><a href="http://www.museful.net/2011/philosophy/the-dualists-predicament">The Dualist’s Predicament</a></li>
<li><a href="http://www.museful.net/2011/philosophy/refuting-physicalism-subjectively">Refuting Physicalism Subjectively</a></li>
</ol>
<p>&nbsp;</p>
<p>Imagine a universe with two rooms, called room0 and room1. In each room, there is a note lying face-down on the floor. These rooms are similar, but room0&#8242;s note has &#8217;0&#8242; written on it, and room1&#8242;s note has &#8217;1&#8242; written on it, although this difference is not visible until the note is turned over.</p>
<p>Also imagine that I have a doppelganger. Our physical bodies are identical to the quark.</p>
<p>I am now assigned randomly to one of the two rooms and he to the other.</p>
<p>Since we are doppelgangers, it makes no difference to the state of the physical universe, who was assigned to which room. Since the state of the physical universe is the same in both cases, it does not contain information about which room I was assigned to.</p>
<p>Yet, I can determine which room I was assigned to by walking over to the note in my room and picking it up.</p>
<p>If, through my subjective perspective, I have access to information (one binary digit) that is not expressed in the state of the physical universe, then where is this information coming from?</p>
<p>(<a href="http://www.museful.net/2011/philosophy/refuting-physicalism-subjectively">Here is a simpler version of the argument</a>.)</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.museful.net/2011/philosophy/the-information-argument/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Refuting Physicalism Subjectively</title>
		<link>http://www.museful.net/2011/philosophy/refuting-physicalism-subjectively?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=refuting-physicalism-subjectively</link>
		<comments>http://www.museful.net/2011/philosophy/refuting-physicalism-subjectively#comments</comments>
		<pubDate>Tue, 23 Aug 2011 19:09:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Philosophy]]></category>
		<category><![CDATA[conscious experience]]></category>
		<category><![CDATA[dualism]]></category>
		<category><![CDATA[objectivity]]></category>
		<category><![CDATA[philosophy of the mind]]></category>
		<category><![CDATA[physicalism]]></category>
		<category><![CDATA[sentience]]></category>
		<category><![CDATA[subjectivity]]></category>

		<guid isPermaLink="false">http://www.museful.net/?p=337</guid>
		<description><![CDATA[(The content that used to be on this page has been simplified. The original argument is linked at the end of the page.) You may want to read these posts before continuing: Ineffability of Qualia What is Sentience? The Dualist’s Predicament &#160; In the universe, there is a red room and a blue room. I [...]]]></description>
			<content:encoded><![CDATA[<p>(The content that used to be on this page has been simplified. The original argument is linked at the end of the page.)</p>
<p>You may want to read these posts before continuing:</p>
<ol>
<li><a href="http://www.museful.net/2011/philosophy/ineffability-of-qualia">Ineffability of Qualia</a></li>
<li><a href="http://www.museful.net/2011/philosophy/what-is-sentience">What is Sentience?</a></li>
<li><a href="http://www.museful.net/2011/philosophy/the-dualists-predicament">The Dualist’s Predicament</a></li>
</ol>
<p>&nbsp;</p>
<p style="text-align: center;"><em>In the universe, there is a red room and a blue room. I am randomly assigned to either the red room or the blue room, and a copy* of my body is placed in the other room. Since I can only be in one room or the other &#8211; I cannot be two people having two different experiences at the same time &#8211; there must be two possible states. Yet, according to physicalism, there are not, for both physical states** are the same.</em></p>
<p>&nbsp;</p>
<p>Footnotes (ignore if you don&#8217;t need them):</p>
<p style="padding-left: 30px;">* I call it &#8220;a copy&#8221; for brevity, but strictly speaking it is &#8220;a doppelganger with a brain pre-encoded to the state that mine would have been in, had I been placed in that room.&#8221;</p>
<p style="padding-left: 30px;">** Note: &#8220;both (physical universe) states&#8221;, NOT &#8220;both <em>rooms</em>&#8221; (or even &#8220;both <em>people</em>&#8220;).</p>
<p>(If you prefer it, try <a href="http://www.museful.net/2011/philosophy/refuting-physicalism-again">this version of the argument</a>.)</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.museful.net/2011/philosophy/refuting-physicalism-subjectively/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Dualist&#8217;s Predicament</title>
		<link>http://www.museful.net/2011/philosophy/the-dualists-predicament?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-dualists-predicament</link>
		<comments>http://www.museful.net/2011/philosophy/the-dualists-predicament#comments</comments>
		<pubDate>Sat, 20 Aug 2011 15:47:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Philosophy]]></category>
		<category><![CDATA[dualism]]></category>
		<category><![CDATA[materialism]]></category>
		<category><![CDATA[mind]]></category>
		<category><![CDATA[mind-body problem]]></category>
		<category><![CDATA[objectivity]]></category>
		<category><![CDATA[perspective]]></category>
		<category><![CDATA[philosophy of the mind]]></category>
		<category><![CDATA[physicalism]]></category>
		<category><![CDATA[sentience]]></category>
		<category><![CDATA[subjectivity]]></category>

		<guid isPermaLink="false">http://www.du-preez.com/?p=325</guid>
		<description><![CDATA[In philosophy of the mind, there are two major camps: The physicalists, who claim that everything is physical, and therefore mind is nothing more than physical brain: an extremely sophisticated biological computer. The dualists, who believe that mind consists of a physical brain, as well as a non-physical aspect, such as a soul, for example. [...]]]></description>
			<content:encoded><![CDATA[<p>In philosophy of the mind, there are two major camps:</p>
<ul>
<li>The physicalists, who claim that everything is physical, and therefore mind is nothing more than physical brain: an extremely sophisticated biological computer.</li>
<li>The dualists, who believe that mind consists of a physical brain, as well as a non-physical aspect, such as a soul, for example.</li>
</ul>
<p>The debate is roused by the problem of explaining sentience.</p>
<p>Physicalists like to consider themselves the “non-superstitious” camp. Physical science is after all what advanced human-kind and gave us cars, computers and rockets to the moon. So surely physical science must ultimately be capable of explaining <em>everything</em>.</p>
<p>Dualists, on the other hand, believe that sentience does not have a purely physical explanation, no matter how sophisticated, and no matter how many rockets we send to the moon. They believe that there is something physically inexplicable about the fact that we each have a first-person perspective/awareness.</p>
<p>You may wish to read these posts before continuing:</p>
<ol>
<li><a href="http://www.museful.net/2011/philosophy/ineffability-of-qualia">Ineffability of Qualia</a></li>
<li><a href="http://www.museful.net/2011/philosophy/what-is-sentience">What is Sentience?</a></li>
</ol>
<p>I believe that anyone who recognizes sentience for what it is, will immediately reject physicalism.</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="385">There are two types of people that cannot understand <span style="color: #ff6600;">orange</span>:</p>
<ul>
<li>Those who are blind</li>
<li>Those who refuse to open their eyes, insisting rather on a definition.</li>
</ul>
</td>
<td valign="top" width="385">There are two types of beings that cannot recognize <em>sentience </em>for what it is:</p>
<ul>
<li>Insentient beings</li>
<li>Sentient beings that insist on considering sentience objectively.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Physicalists adopt, from science, the habit of considering everything objectively. This is usually a good habit, and can become instinctive. However, from an objective perspective sentience is invisible. Sentience is a (or <em>the</em>) phenomenon that can be accessed only subjectively, by its subject.</p>
<p>Now, if an argument cannot be formulated objectively, then it cannot exist outside the subject’s mind, in the form of an effable proof, for example. For this reason, after you refute physicalism to yourself, it may still be impossible to refute it to a physicalist. Only the physicalist can refute it to himself (if he is sentient), by being willing to reason subjectively.</p>
<p>In the next post (<a href="http://www.museful.net/2011/philosophy/refuting-physicalism-subjectively">Refuting Physicalism Subjectively</a>), I will suggest such a subjective line of reasoning.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.museful.net/2011/philosophy/the-dualists-predicament/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>6-DOF Visual Positioning</title>
		<link>http://www.museful.net/2011/system-modelling/6-dof-visual-positioning?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=6-dof-visual-positioning</link>
		<comments>http://www.museful.net/2011/system-modelling/6-dof-visual-positioning#comments</comments>
		<pubDate>Sat, 20 Aug 2011 08:54:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[System Modelling]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[image-space]]></category>
		<category><![CDATA[orientation]]></category>
		<category><![CDATA[pose]]></category>
		<category><![CDATA[positioning system]]></category>
		<category><![CDATA[rotation quaternion]]></category>
		<category><![CDATA[visual positioning system]]></category>

		<guid isPermaLink="false">http://www.du-preez.com/?p=101</guid>
		<description><![CDATA[It is possible to position and orientate an object relative to a camera, given only three of its points (e.g. LEDs) in image-space. In fact, this is the minimal visual positioning system. It infers depth from the object&#8217;s size, rather than using a stereo camera system. It also infers the object&#8217;s 3-DOF orientation (with a [...]]]></description>
			<content:encoded><![CDATA[<p>It is possible to position and orientate an object relative to a camera, given only three of its points (e.g. LEDs) in image-space. In fact, this is the minimal visual positioning system. It infers depth from the object&#8217;s size, rather than using a stereo camera system. It also infers the object&#8217;s 3-DOF orientation (with a single 2-way ambiguity).</p>
<p><a href="http://www.optrolyte.co.za/wp/wp-content/uploads/2011/08/6-dof-visual-positioning-system-perception.png"><img class="size-full wp-image-315 aligncenter" title="6 dof visual positioning system perception" src="http://www.optrolyte.co.za/wp/wp-content/uploads/2011/08/6-dof-visual-positioning-system-perception.png" alt="" width="725" height="179" /></a>The pose (position + orientation) of an object is a 6-DOF system (see <a href="http://www.museful.net/2011/system-modelling/expressing-3-dof-rotation">Expressing Rotation</a>). The three points in image-space each provide 2 coordinate variable, giving 6 variables in total.</p>
<p>The transformation from the 3&#215;2 coordinate variables to 6-DOF pose is a non-trivial, non-linear transformation. By making a &#8220;far-field&#8221; approximation (that the object&#8217;s extent is much smaller than its distance from the camera) we can derive closed-form formulas that accomplish this transformation extremely efficiently.</p>
<p>These formulas provide the position in spherical coordinates (<img src='http://s.wordpress.com/latex.php?latex=%5Cphi%2C%20%5Ctheta%2C%20r%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\phi, \theta, r ' title='\phi, \theta, r ' class='latex' />) and the orientation as a quaternion (<img src='http://s.wordpress.com/latex.php?latex=a%20%2B%20b%20%5Cboldsymbol%7Bi%7D%20%2B%20c%20%5Cboldsymbol%7Bj%7D%20%2B%20d%20%5Cboldsymbol%7Bk%7D%20&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='a + b \boldsymbol{i} + c \boldsymbol{j} + d \boldsymbol{k} ' title='a + b \boldsymbol{i} + c \boldsymbol{j} + d \boldsymbol{k} ' class='latex' />)</p>
<p><a href="http://www.optrolyte.co.za/wp/wp-content/uploads/2011/08/6dof-positioning-system-formulae.png"><img class="size-full wp-image-314 aligncenter" title="6 dof visual positioning system formulae" src="http://www.optrolyte.co.za/wp/wp-content/uploads/2011/08/6dof-positioning-system-formulae.png" alt="" width="462" height="793" /></a>The video below demonstrates this positioning system in action. It uses 4 LEDs rather than 3. Within this set of 4 LEDs, there are four different triples of LEDs that can be positioned using the technique above. This redundancy gives the system additional reliability, in case it temporarily looses track of one of the LEDs.</p>
<div style="text-align: center;"><iframe src="http://www.youtube.com/embed/W6wSjXqUjAk?rel=0" frameborder="0" width="420" height="345"></iframe></div>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.museful.net/2011/system-modelling/6-dof-visual-positioning/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

