<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">

<channel>
	<title>张志强的网络日志</title>
	
	<link>http://zhiqiang.org/blog</link>
	<description>理工科背景的证券从业人员</description>
	<lastBuildDate>Sun, 05 Feb 2012 03:59:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/zhiqiang" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="zhiqiang" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><itunes:explicit>no</itunes:explicit><itunes:subtitle>理工科背景的证券从业人员</itunes:subtitle><image><link>http://zhiqiang.org/blog</link><url>http://zhiqiang.org/favicon.ico</url><title>???</title></image><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">zhiqiang</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>乌镇和杭州</title>
		<link>http://zhiqiang.org/blog/activity/wuzhen-and-hangzhou-2012.html</link>
		<comments>http://zhiqiang.org/blog/activity/wuzhen-and-hangzhou-2012.html#comments</comments>
		<pubDate>Sun, 05 Feb 2012 03:24:38 +0000</pubDate>
		<dc:creator>zhiqiang</dc:creator>
				<category><![CDATA[旅游笔记]]></category>
		<category><![CDATA[乌镇]]></category>
		<category><![CDATA[杭州]]></category>

		<guid isPermaLink="false">http://zhiqiang.org/blog/?p=4151</guid>
		<description><![CDATA[博客 » 旅游笔记 » 乌镇 » 春节后休假五天，游玩了乌镇和杭州。先写一些文字： 1. 江南地区的公共交通很发达，乌镇的汽车站往来周边城市的大巴车次很多。管理也很好，到站买票，准点发车，没有超载和拉客的现象。 2. 乌镇地方不大，东珊很小，门票却很贵。推荐一日游完，下午先看老街或东珊，晚上去西珊看夜景。 3. 乌镇的老街离东珊很近，有很多三轮车司机在东珊...]]></description>
			<content:encoded><![CDATA[<p id="breadcrumb" class="breadcrumb"><a href="http://zhiqiang.org/blog/">博客</a> » <a href="http://zhiqiang.org/blog/category/activity">旅游笔记</a> » <a href='http://zhiqiang.org/blog/tag/%e4%b9%8c%e9%95%87'>乌镇</a>  » </p><p>春节后休假五天，游玩了乌镇和杭州。先写一些文字：</p>
<p>1. 江南地区的公共交通很发达，乌镇的汽车站往来周边城市的大巴车次很多。管理也很好，到站买票，准点发车，没有超载和拉客的现象。</p>
<p>2. 乌镇地方不大，东珊很小，门票却很贵。推荐一日游完，下午先看老街或东珊，晚上去西珊看夜景。</p>
<p>3. 乌镇的老街离东珊很近，有很多三轮车司机在东珊门口拉客。可以坐车，自己走路也不远。坐三轮车的话，三轮车司机身兼导游、摄像职责。我们选择了坐车，一开始觉得亏了，后来发现物有所值，毕竟老街这种地方若不知道它的文化历史背景，这些破烂的街道实在没什么好看的。</p>
<p>4. 第一次到杭州，比较喜欢这里。这里的小吃很合口味，接触到的市民（主要是出租车司机）都很实在。街面干净整洁，景区规划很大气。</p>
<p>5. 这次我们绕了西湖两个整圈，第一圈是坐船+出租车+走路；第二圈是骑自行车。但两圈都是走马观花，主要是看看风景。</p>
<p>6. 杭州的自行车出租服务非常好，到处都是租车点。但办理租车的市民卡需要到专门的公交卡点去办，Google地图上搜索“公交”即可找到。租车一个小时内免费，不连续计价，所以你应该知道怎么省钱了吧。</p>
<p>7. 下次还想再游一次西湖，采取自行车+步行的方式，景点近就走路，远则现租现骑。</p>
<p>以下是一些照片：</p>
<div class="wp-caption aligncenter" style="width: 490px"><img title="乌镇西珊夜景人偶" src="https://lh3.googleusercontent.com/-cWkH8Mw5Q20/Ty3UIaR03BI/AAAAAAAAJ9E/h-N7ti_BHh0/s480/IMG_0252.JPG" alt="乌镇西珊夜景人偶" width="480" height="360" /><p class="wp-caption-text">乌镇西珊夜景人偶</p></div>
<div class="wp-caption aligncenter" style="width: 490px"><img title="乌镇西珊夜景合影" src="https://lh4.googleusercontent.com/-fKzTLqX-mL4/Ty3ljDB6poI/AAAAAAAAJ-c/jab8kW2nG5c/s480/IMG_0556.jpg" alt="乌镇西珊夜景合影" width="480" height="358" /><p class="wp-caption-text">乌镇西珊夜景合影</p></div>
<div class="wp-caption aligncenter" style="width: 394px"><img title="乌镇老街桥下合影" src="https://lh3.googleusercontent.com/-WnFDYI103Xc/Ty3mB-1miuI/AAAAAAAAKB4/McoWhuR95gA/s512/IMG_0589.jpg" alt="乌镇老街合影" width="384" height="512" /><p class="wp-caption-text">乌镇老街桥下合影</p></div>
<div class="wp-caption aligncenter" style="width: 490px"><img title="乌镇老街桥上" src="https://lh4.googleusercontent.com/-069HfgVsQx0/Ty3mAivwecI/AAAAAAAAKBY/G2AFFHP8XpM/s480/IMG_0583.jpg" alt="乌镇老街桥上" width="480" height="358" /><p class="wp-caption-text">乌镇老街桥上</p></div>
<div class="wp-caption aligncenter" style="width: 490px"><img title="西湖音乐喷泉" src="https://lh3.googleusercontent.com/-gw9-3vtCxOM/Ty3mFRZM7lI/AAAAAAAAKCg/fy5vZZizn1s/s480/IMG_0594.jpg" alt="西湖音乐喷泉" width="480" height="358" /><p class="wp-caption-text">西湖音乐喷泉</p></div>
<div class="wp-caption aligncenter" style="width: 394px"><img title="大爱杭州的小吃，奇异粉条" src="https://lh3.googleusercontent.com/-dIRcGd204_w/Ty3UXRFEKLI/AAAAAAAAJ9k/7acl-lLvWCc/s512/IMG_0260.JPG" alt="大爱杭州的小吃，奇异粉条" width="384" height="512" /><p class="wp-caption-text">大爱杭州的小吃，奇异粉条</p></div>
<div class="wp-caption aligncenter" style="width: 490px"><img class=" " title="从音乐喷泉坐船去西湖断桥" src="https://lh3.googleusercontent.com/-Ad-EllrGox4/Ty3nKYqMrJI/AAAAAAAAKHQ/LBDhMoxxQJw/s480/IMG_0616.jpg" alt="从音乐喷泉坐船去西湖断桥" width="480" height="358" /><p class="wp-caption-text">从音乐喷泉坐船去西湖断桥</p></div>
<div class="wp-caption aligncenter" style="width: 490px"><img title="西湖雷峰塔" src="https://lh5.googleusercontent.com/-xEP_gRZ4HiM/Ty3m3O4TjgI/AAAAAAAAKD0/B_g0n0YZbKI/s480/IMG_0646.jpg" alt="西湖雷峰塔" width="480" height="358" /><p class="wp-caption-text">西湖雷峰塔，门票太贵，没上去，就在下面合影</p></div>
<div class="wp-caption aligncenter" style="width: 490px"><img title="西湖边合影" src="https://lh3.googleusercontent.com/-zD8wMuafBrc/Ty3m8CBNEJI/AAAAAAAAKE0/-vGq9cM1Og8/s480/IMG_0656.jpg" alt="西湖边合影" width="480" height="358" /><p class="wp-caption-text">西湖边合影</p></div>
<div class="wp-caption aligncenter" style="width: 490px"><img title="1美元的作品" src="https://lh3.googleusercontent.com/-aX8SUywh_g4/Ty3nCN5pCOI/AAAAAAAAKHk/vnM91Ffq-mk/s480/IMG_0678.jpg" alt="1美元的作品" width="480" height="358" /><p class="wp-caption-text">1美元的作品</p></div>
<div class="wp-caption aligncenter" style="width: 490px"><img title="骑车绕西湖" src="https://lh3.googleusercontent.com/-f8FrFZgVvbQ/Ty3m-kWDOKI/AAAAAAAAKFY/5Jq_XyczUII/s480/IMG_0670.jpg" alt="骑车绕西湖" width="480" height="358" /><p class="wp-caption-text">断桥上合影。我们还骑车绕西湖转了一圈，并探访了品茶的梅家坞，可惜没找到。</p></div>
<div class="wp-caption aligncenter" style="width: 490px"><img title="西湖边上喝了一倍COSTA咖啡" src="https://lh3.googleusercontent.com/-IrSiM-Vn2Ag/Ty3m-1NGSwI/AAAAAAAAKFk/dWO0XRWw4po/s480/IMG_0671.jpg" alt="西湖边上喝了一倍COSTA咖啡" width="480" height="358" /><p class="wp-caption-text">西湖边上喝了一杯COSTA咖啡</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
    <p></p>
    <hr noshade style="margin:0;height:1px" />
    <p>&copy; zhiqiang for <a href="http://zhiqiang.org/blog">阅微堂</a>, 2012. | <a href="http://zhiqiang.org/blog/activity/wuzhen-and-hangzhou-2012.html">&#38142;&#25509;</a> | <a href="http://zhiqiang.org/blog/activity/wuzhen-and-hangzhou-2012.html#comments">9 &#26465;&#35780;&#35770;</a></p>]]></content:encoded>
			<wfw:commentRss>http://zhiqiang.org/blog/activity/wuzhen-and-hangzhou-2012.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>如何匿名统计平均收入</title>
		<link>http://zhiqiang.org/blog/science/compute-anonymous-statistics.html</link>
		<comments>http://zhiqiang.org/blog/science/compute-anonymous-statistics.html#comments</comments>
		<pubDate>Sat, 14 Jan 2012 03:49:00 +0000</pubDate>
		<dc:creator>zhiqiang</dc:creator>
				<category><![CDATA[自然科学]]></category>
		<category><![CDATA[头脑风暴]]></category>

		<guid isPermaLink="false">http://zhiqiang.org/blog/?p=2998</guid>
		<description><![CDATA[博客 » 自然科学 » 头脑风暴 » 系列：头脑风暴 查看该系列所有文章 网络的力量太大，这两次把问题放到网上不到半天，这些问题不但被解答，而且连出处都被翻出来了。这让我自己少了很多思考的乐趣。以后不能把问题太快放到网上。 简单情况 假设你参加一个大学同学的同学聚会，现在大家对毕业后大家的平均收入水平很感兴趣。但基于各种原因，每个人都不想让别人知...]]></description>
			<content:encoded><![CDATA[<p id="breadcrumb" class="breadcrumb"><a href="http://zhiqiang.org/blog/">博客</a> » <a href="http://zhiqiang.org/blog/category/science">自然科学</a> » <a href='http://zhiqiang.org/blog/tag/%e5%a4%b4%e8%84%91%e9%a3%8e%e6%9a%b4'>头脑风暴</a>  » </p><div class="series"><span>系列：<b>头脑风暴</b></span><br/>
<a href="http://zhiqiang.org/blog/tag/%e5%a4%b4%e8%84%91%e9%a3%8e%e6%9a%b4">查看该系列所有文章</a>
<div id='series'></div>
</div>  <p>网络的力量太大，这两次把问题放到网上不到半天，这些问题不但被解答，而且连出处都被翻出来了。这让我自己少了很多思考的乐趣。以后不能把问题太快放到网上。</p>
<h3>简单情况</h3>
<p>假设你参加一个大学同学的同学聚会，现在大家对毕业后大家的平均收入水平很感兴趣。但基于各种原因，每个人都不想让别人知道自己的收入水平。能否有一个方法，每个人都不会泄漏自己收入的情况下，大家一块儿算出一起的平均收入呢？</p>
<p>答案是存在的：假设大家围坐在一桌，先随便挑出一个人，这个人在心里生成一个随机数，加上自己的收入后传递给邻座，旁边这个人在接到这个数后再传给下一个人，依次下去，最后一个人在收到的数上加上自己的收入后传给第一个人。第一个人从收到的数里减去自己最开始使用的随机数，就能获得所有人的收入之和。该和除以参与人数就是大家的平均收入。</p>
<p>这种方法不只是上面这种生活上的应用，在真实的工作中也可以用到。比如现在很多证券公司的金融工程研究组用各种各样的方法试图统计基金的平均仓位，但得出的结果差异较大。为什么不直接发送调查问卷呢？因为没有基金经理愿意公开自己的具体仓位。而用上面的方法便可以在不泄漏每个基金的数据，并且统计出平均仓位的精确值。</p>
<p>上面是一本面试书里的题目。</p>
<h3><strong>解决合谋问题</strong></h3>
<p>上面所给的答案中，如果第一个人和第三个人串通（比如第一个人把自己告诉第二个人的数同时告诉第三个人，那么第二个人的收入就被泄露了。那么是否存在一种策略，使得，对每个人而言，除非其它所有人一起串通，否则自己的收入不会被泄露。<strong></strong></p>
<p>微博上<a href="http://weibo.com/signup/signup.php?inviteCode=1884105332">pmonkey</a>很快就给出了答案：</p>
<blockquote><p>假设共有n个人，每个人可以把自己的收入随机的分成n份，并把其中n-1份分别告诉其他人。每个人把其他人告知的部分与自己留的一份相加为m(i)，公开所有的m(i)再取平均值即可。</p></blockquote>
<p>网友zornlemma甚至翻出了这个问题的出处，在《蚁迹寻踪及其他数学探索》的第四章谈到了保护隐私的协议，所使用的例子跟上面是一模一样的。</p>
<h3>其它统计变量</h3>
<p>在《蚁迹寻踪及其他数学探索》的第四章讨论了这个问题并给出了结论：</p>
<p>1. 假设每个人的收入是一定范围内的整数，那么任何统计变量都存在少数人-保隐私算法。这里少数人-保隐私算法 是指只要参与合谋的人低于总人数的一半，那么合谋以外的人的信息就不会被泄露。</p>
<p>2. 平均数以及可以表示为平均数的函数的统计量，是唯一存在多数人-保隐私算法的统计量。即对于中位数、最大值这样的统计量，只要多数人参与合谋，其它人的信息就会暴露。</p>
<p>除了收入是取值于有限集合的限制以外，上述两条已经完全解决了我们提到的问题。</p>
<h3>安全多方计算和百万富翁问题</h3>
<p>与之相关的是研究领域是<a href="http://en.wikipedia.org/wiki/Secure_multi-party_computation">安全多方计算（Secure multi-party computation）</a>，指参与的各方在不泄漏自己信息的情况下进行计算。其中一个著名的问题是百万富翁问题，被姚先生最早在1982年的FOCS会议上解决（这里我必须要检讨一下之前没有通读姚老板的论文，在zornlemma提醒之前我都没听说过）：</p>
<blockquote><p>百万富翁问题是指两个百万富翁想知道谁更富，但两个人都不想透露自己的资产数量。问怎么才能做到这一点。</p>
<p>姚先生的解决方案发表在论文A.C.Yao, Protocols for secure computation, Proceeding FOCS, 1982, 160-164。维基百科上有详细的算法：<a href="http://en.wikipedia.org/wiki/Yao%27s_Millionaires%27_Problem">Yao's Millionaires' Problem</a>。</p></blockquote>
<div><h4>相关文章</h4><ul><li><a href="http://zhiqiang.org/blog/science/tcs-classroom-notes-the-best-dating-strategy.html">最佳约会策略</a></li><li><a href="http://zhiqiang.org/blog/science/game-one-hat.html">帽子游戏一</a></li><li><a href="http://zhiqiang.org/blog/science/game-two-hats.html">帽子游戏二</a></li><li><a href="http://zhiqiang.org/blog/science/strategy-games-doctors-and-patients-i.html">策略游戏：医生和病人（I）</a></li><li><a href="http://zhiqiang.org/blog/science/how-n-people-divide-a-cake-fairly.html">征集3个人分蛋糕的方法</a></li><li><a href="http://zhiqiang.org/blog/science/how-to-oil-airplain.html">飞机加油问题</a></li><li><a href="http://zhiqiang.org/blog/science/rotate-coin-games.html">硬币游戏</a></li><li><a href="http://zhiqiang.org/blog/science/a-tencent-interview-problem.html">一个腾讯游戏策划部门的面试题</a></li><li><a href="http://zhiqiang.org/blog/science/when-to-stop.html">何时适可而止?</a></li><li><a href="http://zhiqiang.org/blog/science/a-square-game.html">取格子游戏的构造性策略</a></li></ul></div>    <p></p>
    <hr noshade style="margin:0;height:1px" />
    <p>&copy; zhiqiang for <a href="http://zhiqiang.org/blog">阅微堂</a>, 2012. | <a href="http://zhiqiang.org/blog/science/compute-anonymous-statistics.html">&#38142;&#25509;</a> | <a href="http://zhiqiang.org/blog/science/compute-anonymous-statistics.html#comments">9 &#26465;&#35780;&#35770;</a></p>]]></content:encoded>
			<wfw:commentRss>http://zhiqiang.org/blog/science/compute-anonymous-statistics.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>引入年终奖之后的最优薪酬结构</title>
		<link>http://zhiqiang.org/blog/finance/bonus-rule-to-tax-avoidance.html</link>
		<comments>http://zhiqiang.org/blog/finance/bonus-rule-to-tax-avoidance.html#comments</comments>
		<pubDate>Tue, 10 Jan 2012 23:49:10 +0000</pubDate>
		<dc:creator>zhiqiang</dc:creator>
				<category><![CDATA[经济金融]]></category>
		<category><![CDATA[年终奖]]></category>
		<category><![CDATA[所得税]]></category>
		<category><![CDATA[税法]]></category>

		<guid isPermaLink="false">http://zhiqiang.org/blog/?p=2981</guid>
		<description><![CDATA[博客 » 经济金融 » 年终奖 » 上个月写的二逼年终奖扣税方法被果壳引用，甚受鼓舞。年终奖的扣税规则比较二逼，但我们在政府修改税法之前只能容忍它。相反地，我们可以充分利用其规则，进行一定程度的避税。 据我所知，IT从业人员基本工资较高，奖金相对较少；而金融从业人员的基本工资较低，奖金相对则多一点。但在适当的时候，这两者都有优化的可能性。下面举...]]></description>
			<content:encoded><![CDATA[<p id="breadcrumb" class="breadcrumb"><a href="http://zhiqiang.org/blog/">博客</a> » <a href="http://zhiqiang.org/blog/category/finance">经济金融</a> » <a href='http://zhiqiang.org/blog/tag/%e5%b9%b4%e7%bb%88%e5%a5%96'>年终奖</a>  » </p><p>上个月写的<a href="http://zhiqiang.org/blog/review/stupid-bonus-tax-method.html">二逼年终奖扣税方法</a>被<a href="http://www.guokr.com/article/87689/">果壳引用</a>，甚受鼓舞。年终奖的扣税规则比较二逼，但我们在政府修改税法之前只能容忍它。相反地，我们可以充分利用其规则，进行一定程度的避税。</p>
<p>据我所知，IT从业人员基本工资较高，奖金相对较少；而金融从业人员的基本工资较低，奖金相对则多一点。但在适当的时候，这两者都有优化的可能性。下面举两个例子：</p>
<p>假设一个IT工作者月工资为15000（扣除五险一金后，下同），每年有两个月奖金（一次性发放）。那么他的年总收入为21万，需扣税 25335 元，每年到手收入为 184665 元。</p>
<p>而另外一个金融从业人员的基本工资较低，只有8750元每月，但每年发十二个月奖金（一次性发放）。他的年收入还是21万，但需扣税 26385 元，每年到手收入为 183615 元。</p>
<p>这两者都不是最优的薪酬结构。事实上，在21万年收入的情况下，每个月月工资为13000元，年终发放54000元一次性奖金，这样每年只需要交纳税款21735元，到手收入为188265，比优化前分别多3500和4500元。</p>
<p>所以前述的IT从业人员应该将一部分工资挪到一起作为奖金发放，而前述的金融从业人员则应该提高每个月的固定工资，或者将当年奖金的一部分分到来年按照每月发放。具体应该怎么发放，可以参考下面的图。横左边是年总收入（扣除五险一金后），对应的值便是应该作为奖金发放的金额，剩余部分则分摊到每个月作为固定月薪发放。据我所知，某些公司就是这么干的。</p>
<p><img class="aligncenter size-full wp-image-2982" title="bonus rule to tax avoidance" src="http://zhiqiang.org/blog/wp-content/uploads/bonus-rule-to-tax-avoidance.jpg" alt="" width="467" height="269" /></p>
<p>这条线长得这么奇怪的原因是上篇文章提到的<a href="http://zhiqiang.org/blog/review/stupid-bonus-tax-method.html">二逼年终奖扣税方法</a>。</p>
<p>大家可以对照看看自己的薪酬结构是否合理，不合理的赶紧叫自己的人力资源部门修改。</p>
<div><h4>相关文章</h4><ul><li><a href="http://zhiqiang.org/blog/review/stupid-bonus-tax-method.html">二逼年终奖扣税方法</a></li></ul></div>    <p></p>
    <hr noshade style="margin:0;height:1px" />
    <p>&copy; zhiqiang for <a href="http://zhiqiang.org/blog">阅微堂</a>, 2012. | <a href="http://zhiqiang.org/blog/finance/bonus-rule-to-tax-avoidance.html">&#38142;&#25509;</a> | <a href="http://zhiqiang.org/blog/finance/bonus-rule-to-tax-avoidance.html#comments">5 &#26465;&#35780;&#35770;</a></p>]]></content:encoded>
			<wfw:commentRss>http://zhiqiang.org/blog/finance/bonus-rule-to-tax-avoidance.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Mr. Copper如何操纵铜市场</title>
		<link>http://zhiqiang.org/blog/finance/riskmanage/how-yasuo-hamanaka-manipulate-copper-market.html</link>
		<comments>http://zhiqiang.org/blog/finance/riskmanage/how-yasuo-hamanaka-manipulate-copper-market.html#comments</comments>
		<pubDate>Mon, 09 Jan 2012 23:41:52 +0000</pubDate>
		<dc:creator>zhiqiang</dc:creator>
				<category><![CDATA[风险管理]]></category>
		<category><![CDATA[风险管理失误的案例]]></category>
		<category><![CDATA[魔鬼交易员]]></category>

		<guid isPermaLink="false">http://zhiqiang.org/blog/?p=2687</guid>
		<description><![CDATA[Yasuo Hamanaka（滨中泰男）使用卖出看跌期权和回购协议进行融资，大量囤积金属铜现货，并控制期货市场，最高掌控超过10%的全球金属铜供应。情况败露后，铜价跳水，给日本Sumitomo公司造成26亿美元的损失，当事人也被判监8年。]]></description>
			<content:encoded><![CDATA[<p id="breadcrumb" class="breadcrumb"><a href="http://zhiqiang.org/blog/">博客</a> » <a href="http://zhiqiang.org/blog/category/finance/riskmanage">风险管理</a> » <a href='http://zhiqiang.org/blog/tag/risk-management-failures'>风险管理失误的案例</a>  » </p><div class="series"><span>系列：<b>风险管理失误的案例</b></span><br/>
<a href="http://zhiqiang.org/blog/tag/risk-management-failures">查看该系列所有文章</a>
<div id='series'></div>
</div>  <p>1970年，年仅22岁的Yasuo Hamanaka（滨中泰男）加盟日本Sumitomo公司（住友商社），后来成为有色金属的首席交易员。从1986年他开始征战LME（伦敦金属交易所）的金属铜。因为长期占据全球铜交易量的5%，江湖人称之Mr. 5%和Mr. Copper，又因为他姓Hamanaka且投资风格极其坚强，欧美同行称其 Mr. Hammer，“锤子先生”。</p>
<p>1996年，Hamanaka过去十年操纵铜价的行为露出水面，被调离职位后铜价跳水，其仓位给其公司造成26亿美金的损失。后来Hamanaka被告上法庭，并被判处8年监禁，实际服刑7年。</p>
<h3>操作手法</h3>
<p>这是一个老式的操作手法，在19世纪以及20世纪初经常会遇到。Hamanaka利用资金优势控制全世界的铜，包括期货以及现货。</p>
<p>Hamanaka控制铜的主要手段是不断囤积现货，同时买入期货多头。主要交易场所是LME（伦敦金属交易所），当时是世界上最大的金属铜交易市场，为全世界的现货和期货价格提供报价基准。</p>
<p>住友商社只授予Hamanaka交易铜的权限，并未允许他进行杠杆融资。为了期货头寸提供保证金的资金，Hamanaka还大量卖出了铜的看跌期权，这进一步放大了Hamanaka的敞口，以及当铜价下跌时的损失。Hamanaka的另一个融资的方法是逆回购，或者说远期协议。他将手中的铜现货以一定价格卖出，并承诺之后回购。这种方法能提供大量的资金，但当时融资成本相当高，资料显示当时的年化后融资成本最高达40%。这些都是非法的，事后大量交易对手被诉讼并被罚款（但罚款金额很小，只有百万美元量级）。</p>
<p>据估计，1994—1996年期间，Hamanaka通过各种手段控制的铜头寸在100—200万吨之间。这个数量有多大呢？当时全世界金属铜的产量大约是1000万吨，他一个人控制了其中的10%到20%，而且这都集中在同一个交易所里。在Hamanaka控盘后期，铜价居高不下，而在1996年Hamanaka被踢出市场之后，铜价一直萎靡不振，直到2004年价格才回升到原有水准。</p>
<p><a href="http://zhiqiang.org/blog/wp-content/uploads/copper.jpg"><img class="aligncenter size-full wp-image-2688" title="世界铜矿产量和价格走势图" src="http://zhiqiang.org/blog/wp-content/uploads/copper.jpg" alt="世界铜矿产量和价格走势图" width="455" height="342" /></a></p>
<p>1995年底，在市场最要紧的关头，CFTC（Commodity Futures Trading Commission）开始调查Hamanaka操纵市场的行为，并在1996年5月份和LME一起开始对Hamanaka采取限制措施。随后Hamanaka被调离职位 。缺乏Hamanaka的强力手腕，铜价从5月份2720美元/吨高位一路狂泄至6月份1700美元/吨左右，短短一个多月，跌幅超过1000美元。Hamanaka原有的敞口巨亏26亿美金。</p>
<h3>风险管理启示</h3>
<p>人们对于Sumitomo是否知情并默许了Hamanaka的行为一直存在争论。虽然Sumitomo事后将Hamanaka的行为定义为未授权的交易，但有一些证据显示公司至少是部分知情的，并进行过内部调查，但最后没有下文。一个正常的公司和生意，不会在一个方向性的判断上下达这么大的赌注。但也许Sumitomo只是过分相信Hamanaka的能力，毕竟他连续成功了十年。</p>
<p>操纵市场是一种可能的商业模式吗，到底风险有多大？在金融早期市场中，操纵市场是一件很平常的事情，但金融市场发展到现在，那种简单的、霸气外露的操作手法成功的概率越来越小。市场容量增大，操作所需要的资金量也很大。往往资金接不上之时，也是失败之时。</p>
<p>主要原因是交易对手越来越强大。现在市场上对决的都是金融大鳄，谁也别把谁当傻子。就在Hamanaka试图控制市场的时候，一大堆对冲基金以及国际投行在浑水摸鱼，它们躲在暗处吸Hamanaka的血。下面是一些不完全的列表，只统计了公开的数据，准确数量可能远远不止这个数。</p>
<table width="321" border="1" cellspacing="1" cellpadding="1">
<tbody>
<tr>
<td width="151">
<p align="center"><strong>公司</strong></p>
</td>
<td width="171">
<p align="center"><strong>给</strong><strong>Sumitomo</strong><strong>造成的损失</strong><strong></strong></p>
</td>
</tr>
<tr>
<td width="151">
<p align="center">Chase Manhattan</p>
</td>
<td rowspan="2" width="171">
<p align="center">1.25亿美元</p>
</td>
</tr>
<tr>
<td width="151">
<p align="center">Morgan Guaranty</p>
</td>
</tr>
<tr>
<td width="151">
<p align="center">Credit Lyonnais Rouse</p>
</td>
<td width="171">
<p align="center">3.1亿美元</p>
</td>
</tr>
<tr>
<td width="151">
<p align="center">Merrill Lynch</p>
</td>
<td width="171">
<p align="center">2.75亿美元</p>
</td>
</tr>
<tr>
<td width="151">
<p align="center">UBS</p>
</td>
<td width="171">
<p align="center">2.5亿美元</p>
</td>
</tr>
</tbody>
</table>
<p>即使没有官方机构CFTC的介入，Hamanaka的仓位也会越来越危险。因为他的控盘行为越来越明显，交易对手也越来越容易从中破坏，即使他还能够继续控盘，他的平均成本也会越来越高，持仓数量越来越大，风险在滚雪球一样累积，就差最后一根稻草。</p>
<h3>一些八卦</h3>
<p>1. 调查Hamanaka的CFTC是一个美国机构，CFTC下达的1.5亿美金罚款也是计入美国国库。考虑到Hamanaka的对手方很可能就是一些美国投行和对冲基金，这件事情很难不让人想到一些阴谋论。</p>
<p>2. Hamanaka控盘的手法并不简单，否则也不会持续十年之久。公开的资料很少。一些交易是通过英国同伙代为持有。有中国国有企业涉及到对于现货的操纵中（具体信息未透露）。</p>
<p>3. 有传言说索罗斯的量子基金是Hamanaka的交易对手方。事后索罗斯承认关注过，但否认参与到其中。一些资料显示，索罗斯曾经卖空过铜期货，后来被Hamanaka看似无限的资金能力吓坏了，很快就撤出了市场。</p>
<div><h4>相关文章</h4><ul><li><a href="http://zhiqiang.org/blog/finance/riskmanage/roger-tradar-nick-leeson-in-barings.html">魔鬼交易员之祖Nick Leeson弄垮巴林银行</a></li><li><a href="http://zhiqiang.org/blog/finance/how-rogue-trader-works.html">魔鬼交易员的操作手法</a></li><li><a href="http://zhiqiang.org/blog/finance/riskmanage/kidder-peabody-joseph-jett-details.html">Joseph Jett如何利用估值漏洞弄死Kidder Peabody</a></li><li><a href="http://zhiqiang.org/blog/finance/riskmanage/ltcm-fall.html">长期资本投资公司-风险计量模型的滑铁卢</a></li><li><a href="http://zhiqiang.org/blog/finance/riskmanage/liquidity-risk-killed-mgrm.html">MGRM：流动性的牺牲品</a></li></ul></div>    <p></p>
    <hr noshade style="margin:0;height:1px" />
    <p>&copy; zhiqiang for <a href="http://zhiqiang.org/blog">阅微堂</a>, 2012. | <a href="http://zhiqiang.org/blog/finance/riskmanage/how-yasuo-hamanaka-manipulate-copper-market.html">&#38142;&#25509;</a> | <a href="http://zhiqiang.org/blog/finance/riskmanage/how-yasuo-hamanaka-manipulate-copper-market.html#comments">3 &#26465;&#35780;&#35770;</a></p>]]></content:encoded>
			<wfw:commentRss>http://zhiqiang.org/blog/finance/riskmanage/how-yasuo-hamanaka-manipulate-copper-market.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>最大回撤和最大短期回撤的线性算法</title>
		<link>http://zhiqiang.org/blog/science/computer-science/max-drawdown-algorithm.html</link>
		<comments>http://zhiqiang.org/blog/science/computer-science/max-drawdown-algorithm.html#comments</comments>
		<pubDate>Sun, 08 Jan 2012 02:40:49 +0000</pubDate>
		<dc:creator>zhiqiang</dc:creator>
				<category><![CDATA[计算机科学]]></category>
		<category><![CDATA[drawdown]]></category>
		<category><![CDATA[我贡献的源代码]]></category>
		<category><![CDATA[算法]]></category>

		<guid isPermaLink="false">http://zhiqiang.org/blog/?p=2952</guid>
		<description><![CDATA[博客 » 计算机科学 » 算法 » 系列：我贡献的源代码 查看该系列所有文章 最大回撤是一个重要的风险指标。对于对冲基金和数量化策略交易，这个指标比波动率还重要。 最大回撤 定义：对于序列，定义最大回撤为 根据上述等式，很容易得到一个最大回撤的O(n)的算法。 最大短期回撤 最大回撤发生的时间跨度可以非常长。现在我们定义局部最大回撤，区别在于限制回撤发生...]]></description>
			<content:encoded><![CDATA[<p id="breadcrumb" class="breadcrumb"><a href="http://zhiqiang.org/blog/">博客</a> » <a href="http://zhiqiang.org/blog/category/science/computer-science">计算机科学</a> » <a href='http://zhiqiang.org/blog/tag/%e7%ae%97%e6%b3%95'>算法</a>  » </p><div class="series"><span>系列：<b>我贡献的源代码</b></span><br/>
<a href="http://zhiqiang.org/blog/tag/zhiqiangcodes">查看该系列所有文章</a>
<div id='series'></div>
</div>  <p>最大回撤是一个重要的风险指标。对于对冲基金和数量化策略交易，这个指标比波动率还重要。</p>
<h3>最大回撤</h3>
<p>定义：对于序列<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_26a08ad0cbf0629158a79712706adeb2.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt="x_1,x_2,\cdots,x_n " /></span><script type='math/tex'>x_1,x_2,\cdots,x_n </script>，定义最大回撤<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_552b2aafd01b198b5f59e621855f13ae.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt="d " /></span><script type='math/tex'>d </script>为</p>
<p><p style='text-align:center;'><span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_236089db9810a1b621ac10122d7e77c3.gif' style='vertical-align: middle; border: none;' class='tex' alt="d = \min_{i\leq j} (x_j - x_i) = \min_j (x_j - \max_{i\leq j} x_i) " /></span><script type='math/tex; mode=display'>d = \min_{i\leq j} (x_j - x_i) = \min_j (x_j - \max_{i\leq j} x_i) </script></p></p>
<p>根据上述等式，很容易得到一个最大回撤的O(n)的算法。</p>
<h3>最大短期回撤</h3>
<p>最大回撤发生的时间跨度可以非常长。现在我们定义局部最大回撤，区别在于限制回撤发生的时间跨度，对给定的跨度<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_585ec141563b1ad143178d444e0b654e.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt="k " /></span><script type='math/tex'>k </script>，定义最大短期回撤<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_80933509c433567443b9ac71f9fa3bdc.gif' style='vertical-align: middle; border: none; ' class='tex' alt="d_k " /></span><script type='math/tex'>d_k </script>为：</p>
<p><p style='text-align:center;'><span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_9edc3c405980466abda4d3222c7206c1.gif' style='vertical-align: middle; border: none;' class='tex' alt="d_k = \min_{0\leq j-i\leq k} (x_j - x_i)= \min_j (x_j - \max_{j-k\leq i\leq j} x_i) " /></span><script type='math/tex; mode=display'>d_k = \min_{0\leq j-i\leq k} (x_j - x_i)= \min_j (x_j - \max_{j-k\leq i\leq j} x_i) </script></p></p>
<p>这个问题在网上贴出来一个小时，Yangzhe1990和uni（其中uni是我7年前参加ACM的队友，这么多年过去他还宝刀未老）就给出了算法。具体方法这两位在留言处写得比较清楚了，这里不再阐述。</p>
<blockquote><p>最大短期回撤在风险度量上是有意义的。对于一个指数（或者产品），如果我们会长时间持有，那么直接考虑最大回撤。但若策略中限定了持有时间，最大短期回撤的指标会更合适一些。</p></blockquote>
<h3>VBA程序</h3>
<p>对上面的算法做了实现，见下面的Excel模板，内含函数演示。VBA代码有详细注释。</p>
Note: There is a file embedded within this post, please visit this post to download the file.
<p>&nbsp;</p>
<div><h4>相关文章</h4><ul><li><a href="http://zhiqiang.org/blog/it/date-series-in-matlab-excel-sql.html">Matlab、Excel、SQL中的日期的数字序列形式</a></li><li><a href="http://zhiqiang.org/blog/it/use-adodb-in-matlab.html">Matlab中使用ADODB访问数据库</a></li><li><a href="http://zhiqiang.org/blog/it/pivottable-in-matlab.html">Matlab里的PivotTable</a></li><li><a href="http://zhiqiang.org/blog/finance/riskmanage/var-excel-vba-code.html">计算VaR的VBA代码和Excel模板</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/an-algorithm-face-interviews-question-test.html">一个算法面试题 &#038; 面试题库</a></li><li><a href="http://zhiqiang.org/blog/science/mathmatics-in-rubik-cube-and-algorithm.html">魔方里的数学</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/graph-isomorphism-is-polynomial.html">图同构问题属于P？</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/programs-depend-on-date-struct-not-algorithm.html">编程的核心是数据结构，而不是算法</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/download-encyclopedia-of-algorithm.html">算法百科全书 - Encyclopedia of Algorithms</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/3-color-a-simple-graph.html">一个简单图的三染色算法问题</a></li></ul></div>    <p></p>
    <hr noshade style="margin:0;height:1px" />
    <p>&copy; zhiqiang for <a href="http://zhiqiang.org/blog">阅微堂</a>, 2012. | <a href="http://zhiqiang.org/blog/science/computer-science/max-drawdown-algorithm.html">&#38142;&#25509;</a> | <a href="http://zhiqiang.org/blog/science/computer-science/max-drawdown-algorithm.html#comments">8 &#26465;&#35780;&#35770;</a></p>]]></content:encoded>
			<wfw:commentRss>http://zhiqiang.org/blog/science/computer-science/max-drawdown-algorithm.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	<media:rating>nonadult</media:rating></channel>
</rss>

