Mavaron's Twitter

    follow me on Twitter

    2007-01-31

    China stocks

    A fund manager wouldn't care much about the high volatility of china stocks when their prices are super low. But when they rise too much, it would come into play.

    If the market is efficient, would be hard to predict; however, regulations or human behaviors are easier to hack. Just need experience to make a good timing.

    2007-01-27

    预言的起源

    预测通常都是很难的,尤其是对未来的预测。

    ----Anonymous

    忘了是从哪本书上看到的这句话,也记不清是谁说的了,不过每次想起来,总是觉得很有趣。

    无所不在的预言

    从古至今,我们都不缺少预言,不过有趣的是很多出名的预言往往是因为它们后验的“愚蠢”,而非“准确”,尤其是这些愚蠢的预言和预言者的地位似乎不太符合。比如:

    "I think there is a world market for about five computers"

    --Thomas J. Watson

    "640K ought to be enough for anybody"

    --Bill Gates

    这里没有嘲笑Watson或者Gates的意思,因为从GRE逻辑的角度来说,他们这些错误的预言之所以出名正是因为他们所达到的成就,而这些绝非来源于错误。像我每天都有成吨的错误的预言,但是who cares

    当然我们也不乏很多美妙的预言,比如在凡尔纳,阿西莫夫的科幻小说中。而在工程领域,摩尔定律算是一个很著名的例子,谁也说不清在一个连WatsonGates都会作出“愚蠢”预言的领域,为什么这样一个简单的统计规则会在数十年间保持它的活力。也许Moore先生是火星人安插在我们中间的一个Agent Smith

    其实预言远比我们所想的广泛,我们通常所理解的“预言”只不过是一小部分,实际上来说预言无处不在,在我们写paper的时候,创立自己的事业时,接电话的时候,拿板砖和人对拍的时候,我们都和预言为伴。

    尽管预言的对象是未来,但预言的目的是为了现在。比如我们预言将来搜索引擎是否仍然火热是为了决定今天自己的前途,而赌徒预言将来中奖的号码则是为了确定现在手中该填写上的数字。而这里,让我感兴趣的倒不是某个具体的预言,而是我们为什么会有预言这项功能?

    预言并不是人类所特有的,有很多高级动物都有这项功能,比如一头猪。但似乎只有人类发展出如此复杂和高级的预言系统,我们可以有预报,猜想,推断,臆想,幻想,白日梦,真正特立独行的不是猪,而只能是人。

    了解预言系统的目的

    Webster里面Prediction(当然有很多词有预言的含义,without loss of generality,这里只选择一个有代表性的)的定义是“a declaration that something will happen in the future”,这也是我们所熟悉的定义,然而如果更进一步呢?我们怎么样做出的这样一个“declaration”?答案是基于我们的推断。问题再进一步就分化成两个子问题:1.我们怎么样作推断?2.我们为什么如此乐于作推断?

    我们崇拜EulerFermat,因为他们具有出众的预言系统,或者说推断系统,而同时我们也想解答这样一个问题,当我们躺在床上瞧着天花板的时候,我们和一只停止了进食活动的猪的脑部活动有什么本质区别?

    尽管达尔文主义有种种的缺陷,但它的“用进废退”原则确实是分析时非常有用的工具,我们作预言是因为它有用,那么它和Marvin MinskyEmotion Machine有什么共性么?AI现阶段的终极目的是发展出human intelligence,而无疑最好的办法就是从人类的思维方式找线索,而预言系统是人类思维系统不可或缺的一个重要特征。了解它的机制有助于设计出更好的AI系统。而从更深远的角度来说,我们将来就可能可以设计出能做更好预言的,或者阿西莫夫式的新人类。

    预言系统的机理

    在计算机科学或者生物领域近年来的进步都加深了我们对于人类大脑运作机理的理解,但仍然算不上完全破译,所以下面我可以部分肆无忌惮的进行个人的猜测。

    设想第一个类人猿,它的思维体系和我们有什么不同么?毫无疑问,它没有我们现代人这么丰富的知识,不能把许多现象作客观的解释,它更没有抽象的概念,不会去讨论数论或者宇宙的起源。

    然而尽管我们可以确定自己相对于第一个类人猿的优越性,我们却无法确定自己比几千年前的古希腊人或者春秋战国的诸子百家更富有思想性,从这点来看,似乎人类的进化并不是一个线性的过程。

    达尔文的进化论并没有告诉我们上面这个现象怎样解释,我还记得中学是讲授进化论的时候,一个问题就是为什么现代的大猩猩进化不成人类?教材的解释是环境改变了。这个解释很牵强,似乎只是为了把存在的事实套入一个已有的理论框架而强加的。

    现实世界中的种种物种似乎是类似于cryptography中的trap-door functions。我们并不能在任意两个物种之间连一条直线,然后取之间的任意点对应到现实世界中的某个物种。正如直到今天,我们仍然没有发现次人类,亚人类之类的物种,尽管世界上没有两个人是两样的,我们还是能判断这个世界上最高等的物种只有一个。正如Hardy所说的数学比物理更加realistic一样,在物种的多样性后面,似乎也是一个简单的原理,这和数论有些类似,简单而又复杂,也许我们里发现生物的“数论”并不远了。

    人类的推断是基于记忆的,也就是人类的“数据库”,正如很多失忆症患者就是因为失去了与“数据库”的连接而失去了自我意识。可以想见,在人类进化的最初阶段,我们得到的知识大部分是来源于基本的感觉的,比如视觉,听觉,触觉,味觉等等,这些和其他高等动物并没有什么基本的不同,但随着我们知识的积累,我们从这些知识中进行关联,并且把感觉进行规范化形成比如语言,然而这并不能把我们和其他高等动物区分开来,因为一只猫也能形成条件反射,而动物也是有自己的语言的。更为关键的是,我们能够进行推广,并且发展出独立于实际世界的抽象思维系统,这些我称作人类的“chemical math”,这和我们大脑中的化学物质是有关系的,也许也是只有人类才特有的。就好比三个层次的数学系统,底层只是简单的列举,{123...},而中间层则是加上了lookup table1+1可以直接映射到2而不用再进行计算,而最高的层次则是能够从2+2=4之类的运算得出“偶数+偶数=偶数”这样的抽象结果。

    预言系统的进化我想则可以用达尔文的理论进行诠释,正如一个初生婴儿在其成长中过程中接触外界从而发展出其思维系统一样,尽管有预言系统的能力,但需要锻炼和发掘才能完善它,而这些我想也是一个收益反馈系统,当我们的“预言”在实际中得到反馈的时候,就会得到相应的加强或者削弱,有点像一个constrained optimization问题。这样的约束当然不是没有用处的,它符合所谓的“人类进步”需求,当然,有时候,我们也会被它束缚住思想。

    最后

    当我们了解了机理之后,就可以利用它来提高。正如一个孩子成长环境不同,他成年后的预言系统也不一样,这些都在教育体制设计中可以考虑到。

    而对于AI系统设计来说,仍然有两个问题不能够解决,第一自然是所谓的“chemical math”如何进行计算机化的表达,而第二,如何建立有效的反馈机制帮助筛选。也许,如果我们将来能够在生物领域有新的突破的时候,也能伴随着找到新的答案。

    About GOTO

    goto,日语对应“后藤”, may be the most "notorious" instruction in the computer language because of Dijkstra's criticism on its use. but somehow, people are enjoying arguing about this which really makes the topic become a trivial technical trick. as Dijkstra said: "Please don't fall into the trap of believing that I am terribly dogmatical about [the goto statement]. I have the uncomfortable feeling that others are making a religion out of it, as if the conceptual problems of programming could be solved by a single trick, by a simple form of coding discipline!" from his words, his intention may be lost.

    i misunderstood too at the beginning. but thanks to [2], whose author is close to the origin of the debate and familiar with the whole progress of such an idea, gives me another chance to think a little deeper on this problem and get something really helpful.

    a program is actually a tree structure. expanded and circulated. but too many artificial variables are created which are just beds for bugs. think about your bugs, i guess most of them are due to deadlock in recursive statements. as Dijkstra said, why we need to add another dimension?

    this is just an ideal for the abstraction of high-level language as Dijkstra said. as high-level language, the goto is really somewhat weired. this can also be regarded as the origin of OOP, i.e., an object should have its property and specific operations.

    I guess this is what Dijkstra wants to say. but maybe the misunderstanding will last for long.

    references:
    [1]: E.W. Dijkstra, Personal Communication (Jan 3, 1973)
    [2]: Literate Programming, D.E.Knuth
    [3]: E.W. Dijkstra. Go to statement considered harmful. Communications of the ACM, 11(3):147-148, 1968

    Move

    转移一些原来写的东西

    2007-01-26

    OTM and Doubling Strategies

    Option trading is more interesting than stock trading since it possesses some its own properties. Of course, liquidation risk a problem, but long term, who cares that. I would talk a little about OTM strategy today.

    1. OTM Philosophy:

    Option is more volatile and risky. But this is to say under the assumption that we invest same amount of money. What if we look at the following case. Stock A we buy 1,000 share at price $20. Within 3 months, we expect it to move between 18-22. Then you expected result is -2,000 - +2,000. Let's do this by another way. We buy 20 contracts call options with strike price 21 at $0.1 each. This costs $2,000. So your expected result now is -2,000 - +20,000.

    Yes, this is too weak a case to show some dominance. We can attack from many angles such as "you can't find so cheap OTM options if that information is priced in, you can't do this without consideration of operational risk which might lift the price much, it should be more prone to go down if OTM is so cheap, etc".

    For small investors, I hardly believe so called statistics would take effect. We are betting anyway and most of the time, worse case analysis is more proper. However, portfolio holding or long-term investment do give us some confidence in using econometric methods. But this seems prohibitive considering quite limited budget.

    OTM gives you hope.

    Doubling strategies, which were adopted by Leeson at Barings Bank, can be used as a demonstration. By using the same policy, OTM can achieve the same P/L as betting on stocks. Moreover, OTM distribution is asymmetric and often fat tailed. I would say it's even a better bed for doubling strategy than real-meaning stocks and also this is what Leeson actually did. For academics, you can refer to Shreve's example.

    So now you can use portfolio analysis and numerous econometric methods. Essential but still superficial. Since it doesn't answer one question: Where are you finding these OTMs?

    2. OTM Pick:

    Several experiences to share.

    1) Pick one which is OTM due to macro- but NOT individual factors:

    Like some retailing brand goes down because of macro factors like the warm winter causes the sales down in holiday season. Since all other go down as well, it's still yet not enough to say it loses its advantage. And are you expecting this seasonal effect or abnormality to last? Even abnormality does last, given a better company, it should adjust better than others. However, if a company is down due to individual reasons, it's a little risky. Like USG, it has been around $55 for a long time. Only catalyst during this period is Buffett's stake raise. This helped a short wave and faded quickly. Anyway, 99% are not Buffett and not passive fund managers.

    2) Watch out time decaying:

    Even you are lucky (at least you should think so yourself) to find some candidates. Don't rush into them before you make some investigation. You have to know how much time it may take to turn you OTM into God-blessed treasury. Don't overlook time decaying effect even you are not rejecting short-term play. And of course, if you are more academic, you can do periodic review and form some first or second order hedge portfolios.

    3. Some Principles:

    Though I am not a principle believer, seemingly it indeed has some psychological effect.

    1) Asset allocation:

    Let's say we make following allocation: 50% as reserve, left assigned 10-20% to each bet. So if you have $20,000. Then you can reserve $10,000 and make 10 bets, each with $1,000.

    To keep reserve is to capture new opportunities when appeared. To assigned small proportion to each bet is to assure you are not absorbed by zero state too soon.

    2) Early Bird:

    Historical data shows overreaction often appears at heavy volume moments. And so does OTMs. So to find good candidates, keep an eye on news and a regular watch list.