<?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>Step Away From the Fiat &#187; Engineering</title>
	<atom:link href="http://www.jeffreymclarty.com/jm/category/engineering/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jeffreymclarty.com/jm</link>
	<description>Just A blog, by J.N.McLarty - An Engineer, Derivative Trader and Austrian Economist</description>
	<lastBuildDate>Mon, 18 Apr 2011 16:17:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Solve for Implied Volatility in R</title>
		<link>http://www.jeffreymclarty.com/jm/2010/03/07/solve-for-implied-volatility-in-r/</link>
		<comments>http://www.jeffreymclarty.com/jm/2010/03/07/solve-for-implied-volatility-in-r/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 16:12:20 +0000</pubDate>
		<dc:creator>Jeffrey McLarty</dc:creator>
				<category><![CDATA[Engineering]]></category>

		<guid isPermaLink="false">http://www.jeffreymclarty.com/jm/?p=464</guid>
		<description><![CDATA[I have written a fairly basic &#8220;Effective Position &#038; Risk Management System&#8221; in R, for managing asset positions with several option legs.
Every morning, it paints me a pie chart of where I&#8217;m getting my theta decay, as well as my effective exposure to each of the major asset classes.
One of the requirements, is calculating the [...]]]></description>
			<content:encoded><![CDATA[<p>I have written a fairly basic &#8220;Effective Position &#038; Risk Management System&#8221; in R, for managing asset positions with several option legs.<br />
Every morning, it paints me a pie chart of where I&#8217;m getting my theta decay, as well as my effective exposure to each of the major asset classes.</p>
<p>One of the requirements, is calculating the Implied Volatility of each option.  I found some <a href="http://www.elitetrader.com/vb/attachment.php?s=f82add3d1ebd47a80cbdd9445b3bc5f4&#038;postid=816665">approximations</a>, interesting, but none seem to be as intelligent as using a <a href="http://www.gummy-stuff.org/implied-volatility.htm">brute force method or bi-section method</a>.</p>
<p>I wrote a recursive function and used it for a month, but it took forever, or got lost and produced errors.  Obviously, I was faced with playing with step size/factor and accuracy trade-offs.</p>
<p>So, I&#8217;m currently using a brute-force method, which seems to work well and faster than the recursive algorithm.  It&#8217;s not perfect, but it&#8217;s working.  If anybody out there on the interwebs has a better or more beautiful solution, let me know.  Here it is:</p>
<p><code>FindIV <- function(OptionMarketPrice, AssetPrice, Time, Strike, r, LowRange, HighRange, Right)<br />
{<br />
Range <- seq(LowRange,HighRange,by=((HighRange-LowRange)/100000))<br />
OptionBasedOnGuess <- GBSOption(Right,  AssetPrice, Strike, Time, r, 0.000, Range, "wtf", "xx")<br />
Error <- OptionBasedOnGuess@price - OptionMarketPrice<br />
Key <- which.min(abs(Error))<br />
Range[Key]<br />
}<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeffreymclarty.com/jm/2010/03/07/solve-for-implied-volatility-in-r/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Protected: I Have a Short Message to The Planet, Please Read It All</title>
		<link>http://www.jeffreymclarty.com/jm/2009/02/08/i-have-a-short-message-to-the-planet-please-read-it-all/</link>
		<comments>http://www.jeffreymclarty.com/jm/2009/02/08/i-have-a-short-message-to-the-planet-please-read-it-all/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 19:27:03 +0000</pubDate>
		<dc:creator>Jeffrey McLarty</dc:creator>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Leading]]></category>

		<guid isPermaLink="false">http://www.jeffreymclarty.com/jm/2009/02/08/i-have-a-short-message-to-the-planet-please-read-it-all/</guid>
		<description><![CDATA[There is no excerpt because this is a protected post.]]></description>
			<content:encoded><![CDATA[<form action="http://www.jeffreymclarty.com/jm/wp-pass.php" method="post">
<p>This post is password protected. To view it please enter your password below:</p>
<p><label for="pwbox-242">Password:<br />
<input name="post_password" id="pwbox-242" type="password" size="20" /></label><br />
<input type="submit" name="Submit" value="Submit" /></p></form>
]]></content:encoded>
			<wfw:commentRss>http://www.jeffreymclarty.com/jm/2009/02/08/i-have-a-short-message-to-the-planet-please-read-it-all/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Path of the Planet</title>
		<link>http://www.jeffreymclarty.com/jm/2009/01/03/path-of-the-planet/</link>
		<comments>http://www.jeffreymclarty.com/jm/2009/01/03/path-of-the-planet/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 19:34:18 +0000</pubDate>
		<dc:creator>Jeffrey McLarty</dc:creator>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Future]]></category>

		<guid isPermaLink="false">http://www.jeffreymclarty.com/jm/2009/01/03/path-of-the-planet/</guid>
		<description><![CDATA[This post will come as no surprise to Engineers who have studied controls, or to others like Nate Hagens and Gregor Macdonald.  But, looking at the earth like a multi-variable-non-linear system, with feedback loops designed to keep her in equilibrium, have been struck by the equivalent of a delta function it has never felt before.

See, when [...]]]></description>
			<content:encoded><![CDATA[<p>This post will come as no surprise to Engineers who have studied controls, or to others like <a href="http://www.theoildrum.com/node/4916#comment-453775">Nate Hagens and Gregor Macdonald</a>.  But, looking at the earth like a multi-variable-non-linear system, with feedback loops designed to keep her in equilibrium, have been struck by the equivalent of a <a href="http://en.wikipedia.org/wiki/Dirac_delta_function">delta</a> function it has never felt before.</p>
<p><a href="http://www.jeffreymclarty.com/jm/wp-content/uploads/2009/01/global-pop2.gif" title="Population"><img src="http://www.jeffreymclarty.com/jm/wp-content/uploads/2009/01/global-pop2.gif" alt="Population" /></a></p>
<p>See, when engineers go to model a problem, in order to create forecasts they use an impulse, or a step function, then measure the response.  For linear systems, these responses are additive.  That is, to create a forecast for what would happen if there were two impulses, you can simply add the two responses together.  This gets extremly math intensive, and &#8220;convoluted&#8221; would be the best appropriate pun, but what happens to some systems is &#8211; instability.  Unstable systems don&#8217;t have the appropriate feedback necessary for the system to find an equilibrium, or they have feedback that overshoots, only to cause overshoot in the other direction.</p>
<p>Applying this to earth, in a crude qualitative way, what you get is things like supply and demand problems, extreme weather and extinction&#8230;because natural systems, will attempt to find equilibrium.  Anyway, below is the basic mathematical template that instability often embodies.  My theory is that between the law of large numbers, a growing population, and information continuing to flow faster &#8211; this is the path we&#8217;re on&#8230;I can&#8217;t prove it, but there are many signs that oil, water, and other variables will follow a more complicated path, but one like this:</p>
<p><a href="http://www.jeffreymclarty.com/jm/wp-content/uploads/2009/01/path.GIF" title="Path"><img src="http://www.jeffreymclarty.com/jm/wp-content/uploads/2009/01/path.GIF" alt="Path" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeffreymclarty.com/jm/2009/01/03/path-of-the-planet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Markets, 3 mile Island &amp; Oil</title>
		<link>http://www.jeffreymclarty.com/jm/2008/06/27/markets-3-mile-island-oil/</link>
		<comments>http://www.jeffreymclarty.com/jm/2008/06/27/markets-3-mile-island-oil/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 18:26:05 +0000</pubDate>
		<dc:creator>Jeffrey McLarty</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Nuclear]]></category>

		<guid isPermaLink="false">http://www.jeffreymclarty.com/jm/2008/06/27/markets-3-mile-island-oil/</guid>
		<description><![CDATA[What does today&#8217;s market have to do with 3 mile Island? Oil.
I sat down with a top manager at Ontario Power Generation (the largest nuclear site in North America) late last night, a mechanical engineer and my girlfriend&#8217;s father. It is his opinion that the nuclear industry is a unique one, in the way that [...]]]></description>
			<content:encoded><![CDATA[<p>What does today&#8217;s market have to do with 3 mile Island? Oil.</p>
<p><img align="left" width="480" src="http://www.sprol.com/images/3mileisland1%20copy.jpg" height="369" />I sat down with a top manager at Ontario Power Generation (the largest nuclear site in North America) late last night, a mechanical engineer and my girlfriend&#8217;s father. It is his opinion that the nuclear industry is a unique one, in the way that competition actually share intelligence and research, rather than attempt to leverage it over the competition. The reason is that, any accident looks bad on the entire industry. It is his opinion that without the problems at 3 mile island, the US would today, have ~70% of their power from nuclear. Instead, American&#8217;s have a sever case of NIMBY syndrome, and it stems from lack of education about the sector.</p>
<p>You can see where, uranium prices would be higher, oil would be cheaper, and the markets would not be selling off on oil climbing.</p>
<p>Nuclear is one of the only answers, technologically, because of the requirement for the base load. Sure, wind and solar can offset the need, but a sustainable base load, is a feat of engineering.</p>
<p>The picture show above, is 3 mile island.</p>
<p>Blows my mind, that a major market force, can, in this day and edge be summed up with &#8220;People are scared of what they do not understand&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeffreymclarty.com/jm/2008/06/27/markets-3-mile-island-oil/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

