<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for hackinghat.com</title>
	<atom:link href="http://www.hackinghat.com/index.php/comments/feed" rel="self" type="application/rss+xml" />
	<link>http://www.hackinghat.com</link>
	<description></description>
	<lastBuildDate>Wed, 01 Feb 2012 14:27:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>Comment on Calculating peak-to-trough drawdown by Adam</title>
		<link>http://www.hackinghat.com/index.php/python/calculating-peak-to-trough-drawdown/comment-page-1#comment-45050</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Wed, 01 Feb 2012 14:27:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.hackinghat.com/index.php/python/calculating-peak-to-trough-drawdown#comment-45050</guid>
		<description>Just stumbled on this but I wanted to share my solution:
&lt;pre&gt;&lt;code&gt;
def bad(list):
    maxi = 0
    mini = 0
    loss = 0
    maxLoss = 0
    for i, x in enumerate(list):
        maxi = max(x, maxi)
        mini = min(list[i:])
        loss = maxi - mini
        maxLoss = max(maxLoss,loss)
    return maxLoss
&lt;/code&gt;&lt;/pre&gt;
This walks through the list, updating the maximum point it has been through, and comparingit to the minimum from the remaining list, calculating a maximum loss at every step through the list. The maxLoss also updates to be the biggest value yet reached as the walk continues.</description>
		<content:encoded><![CDATA[<p>Just stumbled on this but I wanted to share my solution:</p>
<pre><code>
def bad(list):
    maxi = 0
    mini = 0
    loss = 0
    maxLoss = 0
    for i, x in enumerate(list):
        maxi = max(x, maxi)
        mini = min(list[i:])
        loss = maxi - mini
        maxLoss = max(maxLoss,loss)
    return maxLoss
</code></pre>
<p>This walks through the list, updating the maximum point it has been through, and comparingit to the minimum from the remaining list, calculating a maximum loss at every step through the list. The maxLoss also updates to be the biggest value yet reached as the walk continues.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Calculating peak-to-trough drawdown by Steve Knight</title>
		<link>http://www.hackinghat.com/index.php/python/calculating-peak-to-trough-drawdown/comment-page-1#comment-37117</link>
		<dc:creator>Steve Knight</dc:creator>
		<pubDate>Mon, 18 Jul 2011 10:45:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.hackinghat.com/index.php/python/calculating-peak-to-trough-drawdown#comment-37117</guid>
		<description>&lt;strong&gt;Gonz&lt;/strong&gt; Thanks for your comment.   Yes, I agree it&#039;s not the greatest of measures.    But it does appear quite a lot in hedge-fund prospectuses and the meaning I&#039;ve given is the one that investors expect.   Whether they place any weight behind it is another matter!</description>
		<content:encoded><![CDATA[<p><strong>Gonz</strong> Thanks for your comment.   Yes, I agree it&#8217;s not the greatest of measures.    But it does appear quite a lot in hedge-fund prospectuses and the meaning I&#8217;ve given is the one that investors expect.   Whether they place any weight behind it is another matter!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Calculating peak-to-trough drawdown by Gonz</title>
		<link>http://www.hackinghat.com/index.php/python/calculating-peak-to-trough-drawdown/comment-page-1#comment-37115</link>
		<dc:creator>Gonz</dc:creator>
		<pubDate>Mon, 18 Jul 2011 07:27:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.hackinghat.com/index.php/python/calculating-peak-to-trough-drawdown#comment-37115</guid>
		<description>Hmmm, this is interesting but I&#039;m not sure imposing temporal order on the data will satisfy your investors requirements. I would think most investors want to know what could be not what would have been if they had have done something (bought x time ago) that they didn&#039;t actually do. In that case it becomes a question of variability regardless of temporal order. As you point out assumptions of historical prices (and events surrounding them) repeating over time is not all that sound but if the assumption is made (eg the highest high could happen again) then I would have thought the biggest difference looking at all the trends (either high to low or low to high remember we&#039;re assuming rightly or wrongly the highs and lows are repeatable so if something has been so low before it can/will be again)is the worst case scenario.</description>
		<content:encoded><![CDATA[<p>Hmmm, this is interesting but I&#8217;m not sure imposing temporal order on the data will satisfy your investors requirements. I would think most investors want to know what could be not what would have been if they had have done something (bought x time ago) that they didn&#8217;t actually do. In that case it becomes a question of variability regardless of temporal order. As you point out assumptions of historical prices (and events surrounding them) repeating over time is not all that sound but if the assumption is made (eg the highest high could happen again) then I would have thought the biggest difference looking at all the trends (either high to low or low to high remember we&#8217;re assuming rightly or wrongly the highs and lows are repeatable so if something has been so low before it can/will be again)is the worst case scenario.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on cl-mysql by Steve Knight</title>
		<link>http://www.hackinghat.com/index.php/cl-mysql/comment-page-1#comment-37096</link>
		<dc:creator>Steve Knight</dc:creator>
		<pubDate>Sat, 16 Jul 2011 21:39:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.hackinghat.com/index.php/cl-mysql/#comment-37096</guid>
		<description>You&#039;re welcome!   I have to admit that I haven&#039;t done a lot to it recently.   I was trying to get parameterized SQL working and support for a few more Common Lisp variants.   Perhaps I&#039;ll dust it off ...

Steve</description>
		<content:encoded><![CDATA[<p>You&#8217;re welcome!   I have to admit that I haven&#8217;t done a lot to it recently.   I was trying to get parameterized SQL working and support for a few more Common Lisp variants.   Perhaps I&#8217;ll dust it off &#8230;</p>
<p>Steve</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on cl-mysql by Daniel Collin</title>
		<link>http://www.hackinghat.com/index.php/cl-mysql/comment-page-1#comment-37095</link>
		<dc:creator>Daniel Collin</dc:creator>
		<pubDate>Sat, 16 Jul 2011 21:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.hackinghat.com/index.php/cl-mysql/#comment-37095</guid>
		<description>Thanks a lot for your work on this!

In my opinion CLSQL has always been a bit bulky and hard to get working correctly so what I did was to write my own smallish wrapper above the mysql C API.

Your lib seems to be very nice though and fit my needs perfectly.

I have only done some initial testing but it seems to work just fine under Mac OS X which I use as primary system.

Cheers!</description>
		<content:encoded><![CDATA[<p>Thanks a lot for your work on this!</p>
<p>In my opinion CLSQL has always been a bit bulky and hard to get working correctly so what I did was to write my own smallish wrapper above the mysql C API.</p>
<p>Your lib seems to be very nice though and fit my needs perfectly.</p>
<p>I have only done some initial testing but it seems to work just fine under Mac OS X which I use as primary system.</p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Decline of Hewlett-Packard by Ruben</title>
		<link>http://www.hackinghat.com/index.php/rant/the-decline-of-hewlett-packard/comment-page-1#comment-35541</link>
		<dc:creator>Ruben</dc:creator>
		<pubDate>Wed, 25 May 2011 23:48:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.hackinghat.com/index.php/rant/the-decline-of-hewlett-packard#comment-35541</guid>
		<description>WOW. Well put, I recently bought an HP laptop and it is one of the worst experiences of my life, poor build construction and it is probably hot enough to cook an egg. I&#039;ve recently switched to Alienware for computing, and Texas Instruments for graphing calculators. Thank you for writing this article, what is happening to this once proud and reputable brand.</description>
		<content:encoded><![CDATA[<p>WOW. Well put, I recently bought an HP laptop and it is one of the worst experiences of my life, poor build construction and it is probably hot enough to cook an egg. I&#8217;ve recently switched to Alienware for computing, and Texas Instruments for graphing calculators. Thank you for writing this article, what is happening to this once proud and reputable brand.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Calculating peak-to-trough drawdown by Jogster</title>
		<link>http://www.hackinghat.com/index.php/python/calculating-peak-to-trough-drawdown/comment-page-1#comment-34853</link>
		<dc:creator>Jogster</dc:creator>
		<pubDate>Fri, 22 Apr 2011 21:40:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.hackinghat.com/index.php/python/calculating-peak-to-trough-drawdown#comment-34853</guid>
		<description>Great article, as you say its the edge case that are difficult.</description>
		<content:encoded><![CDATA[<p>Great article, as you say its the edge case that are difficult.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Calculating peak-to-trough drawdown by Steve Knight</title>
		<link>http://www.hackinghat.com/index.php/python/calculating-peak-to-trough-drawdown/comment-page-1#comment-34791</link>
		<dc:creator>Steve Knight</dc:creator>
		<pubDate>Wed, 20 Apr 2011 19:14:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.hackinghat.com/index.php/python/calculating-peak-to-trough-drawdown#comment-34791</guid>
		<description>Hi Chris,

Yes, that&#039;s easier, but this is not peak-to-trough draw-down as I defined it.   This procedure will find the largest price difference.    

To appreciate the difference, consider what would happen if the minimum value is &lt;b&gt;before&lt;/b&gt; the highest point.    This is not draw-down because an investor could never &#039;experience&#039; this loss.

Once you bear this in mind you will realise that the peak-to-trough may not actually involve the highest point in the series at-all.   Any local maximum can be the highest point as long as it&#039;s followed by a local minimum that is low enough.

Hope that helps

Steve</description>
		<content:encoded><![CDATA[<p>Hi Chris,</p>
<p>Yes, that&#8217;s easier, but this is not peak-to-trough draw-down as I defined it.   This procedure will find the largest price difference.    </p>
<p>To appreciate the difference, consider what would happen if the minimum value is <b>before</b> the highest point.    This is not draw-down because an investor could never &#8216;experience&#8217; this loss.</p>
<p>Once you bear this in mind you will realise that the peak-to-trough may not actually involve the highest point in the series at-all.   Any local maximum can be the highest point as long as it&#8217;s followed by a local minimum that is low enough.</p>
<p>Hope that helps</p>
<p>Steve</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Calculating peak-to-trough drawdown by crew</title>
		<link>http://www.hackinghat.com/index.php/python/calculating-peak-to-trough-drawdown/comment-page-1#comment-34477</link>
		<dc:creator>crew</dc:creator>
		<pubDate>Fri, 08 Apr 2011 20:26:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.hackinghat.com/index.php/python/calculating-peak-to-trough-drawdown#comment-34477</guid>
		<description>It is not nearly that complicated, it can also be done in excel in seconds.
Step 1) Take first data point set as high
Step 2) run if statement that if n+1 data point is &gt; than n data point, n+1 data point is new high
Step 3) take [(n / step 2) - 1] this gives you your % drawdown
Step 4) take the minimum value achieved from Step 3</description>
		<content:encoded><![CDATA[<p>It is not nearly that complicated, it can also be done in excel in seconds.<br />
Step 1) Take first data point set as high<br />
Step 2) run if statement that if n+1 data point is &gt; than n data point, n+1 data point is new high<br />
Step 3) take [(n / step 2) - 1] this gives you your % drawdown<br />
Step 4) take the minimum value achieved from Step 3</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Programming Like It&#8217;s 1995 by Ben</title>
		<link>http://www.hackinghat.com/index.php/programming/programming-like-its-1995/comment-page-2#comment-32701</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Tue, 01 Feb 2011 09:29:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.hackinghat.com/?p=208#comment-32701</guid>
		<description>It makes me happy to see so much people not using OOP. Ahh, let them fail! In the mean time I rush past them with my nice...err I mean useless ... business objects.</description>
		<content:encoded><![CDATA[<p>It makes me happy to see so much people not using OOP. Ahh, let them fail! In the mean time I rush past them with my nice&#8230;err I mean useless &#8230; business objects.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

