关于投资的几点个人看法

May 17th, 2016

总有朋友问我怎么投资。这东西其实很难说清,下面是我的一些看法吧。

  1. 主流的投资建议是持续买入追踪股票市场的指数基金。因为:
    1. 现有数据表明股票市场回报整体高于其它投资–所以选择股票。
    2. 绝大部分基金表现输给大盘–所以选择指数基金。
    3. 入市时间无法确定–所以选择持续买入。
  2. 按照这个思路,最无脑的投资建议就是持续买入VT。实际上有些经济学家也是这样建议的,比如写经济学原理的曼昆。
  3. 实际操作中,通过控制不同市场的持股比例可以一定程度控制风险。所以选择基于区域股票市场的指数基金,自己控制比例来控制风险也是很主流的投资建议–年轻时可以选择相对高风险,快退休前应降低风险。
  4. 风险(variance)和回报(expectation)成正比。在区域上,主流看法是成熟市场风险与回报相对低,新兴市场风险与回报相对高。
  5. 如果在美国基于避税考虑,可以在年末卖掉亏损的基金,换成相同的替代产品–tax loss harvesting。
  6. 债券,房地产,能源等基金可以用来分散投资风险,但不应大比例持有。

以上应该是主流教科书式的投资建议了。

    Better Call Saul观后

    February 10th, 2016

    最近有那么一段时间,我都无法投入或专注的去享受虚构类的作品。不管看电影,电视,或者小说,脑海里都有这么一种想法:这都是编出来的,为什么要浪费时间在这上面。或者换一个角度来说,暴力,血腥,恐怖,猎奇种种以前能吸引我的元素已经对我没有太大的吸引力了。

    但是在这之后,我还是陆续看了Breaking Bad,和最近的前传Better Call Saul。好像有人说过金庸和古龙小说的区别在于,金庸的小说主角有成长性而古龙没有,所以金庸的小说更吸引人。我觉得Breaking Bad就是一部少有让我看到了主角成长和变化的美剧。和第一季开始时的Walter White比,局终时的Walter White已经俨然一个完全不同的人了。这种造化弄人,社会改变人的过程,甚至让我想到了Rome这个完全不同的剧集。

    (剧透预警)

    Read the rest of this entry »

    Installing Emacs on Mac

    October 12th, 2015

    This is my own technical notes on how to install and config Emacs on Mac OS X.
    Read the rest of this entry »

    Some Updates

    March 12th, 2015

    I recently switched a job internally after working on Hadoop and Azure for about 3 years at Microsoft. The followings are cited from the farewell note I sent to my old colleagues.

    I thought mapreduce was interesting when I first learned Hadoop in school on Linux. When I joined Microsoft after school, it never occurred to me Microsoft would have anything to do with Hadoop let alone Linux. Incredibly, this is where HdInsight is at now, and I was part of it. It is a great and humble learning experience for me to build and grow the first hosted Azure service of open source software and then Linux from very beginning, and I felt lucky for that.

    Now begin to build something new!

    C# Links

    December 9th, 2014

    Periodic Execution in .NET: This is the best implementation note I found of the common pattern to run tasks periodically.

    Implementing the Singleton Pattern in C#: I actually found singleton not all that useful. The article is a good discussion of many C# features nonetheless.

    MADlib Paper Review

    December 1st, 2014

    I only read the paper The MADlib Analytics Library or MAD Skills, the SQL recently after it has published for almost two years. In short, I like it a lot. Most mainstream relational databases do not support even the most common machine learning tasks like linear regression. In order to run machine learning algorithms on the data inside the databases, one has to first export the data, then use statistics or machine learning tools, e.g. R, to get insight from the data. This is really cumbersome in my opinion. As machine learning becoming more and more common place nowadays. Most major database processing platforms include some kind machine libraries. For example, Mahout for Hadoop and MLlib for Spark. How do we address the apparent machine learning tool gap in relational databases? This paper introduces an implementation of machine libraries inside RDBMS. It builds on top of existing RDBMS, and requires no altering of any of the database internals like storage engine or extra SQL syntax. Some of my observations if taking a closer look.

    • Some functions like linear regression seem very natural and intuitive to use. However, some functions like LDA does not seem to fit in databases as naturally.
    • The implementation relies heavily on the array feature. This is a well supported feature in PostgreSQL but not in some other databases like MySQL and SQL Server. “Array” is actually defined in SQL 2003 standard, and can be very useful in other ways I can image. So I hope the widespread of MADlib or equivalent technologies can drive the adoption of arrays in other major database products; or the other way around.

    2013 Work in Retrospect

    December 25th, 2013

    Depending on one’s perspective of Microsoft’s attitude towards Java and open source, it may considered an rather odd case that I mostly worked on Java and open source at Microsoft in the past year. Or more specifically, I worked on the Apache Hadoop project. I fixed some test and product issues, participated in some research/incubation project, as well as certain aspects of the Microsoft’s service offering of Hadoop — Azure HdInsight. I am not sure what I can say or cannot say about my work without violate the company policy. But all my work on Apache Hadoop is public and can be viewed here.

    Beyond the work around Hadoop, I did not make much progress in some other projects that I am interested. I did not get the chance to study the deep learning which seems an interesting new trend in machine learning which also got some traction in industry. This will definitely be on my todo list for the coming weeks.

    Gravity

    November 22nd, 2013

    最近看了Gravity这部电影。不知道你有没有这样的经历,生活里遭遇了一些不幸或挫折,就想离开伤心之地,去到一个新的地方。电影里的女科学家Ryan Stone经历过丧女之痛,第一次参与太空任务,修复哈勃望远镜。离开地球,在太空中,对她也许就像是这样一种解脱和逃离。所以当另一个宇航员Matt Kowalski问她最喜欢太空中的什么时,她回答说宁静。但是这宁静之后,危机却不期而至。

    太空碎片袭来,宁静被打破,本能的求生欲望被激发,Ryan的太空历险才真正开始。一开始是束手无策,然后被Matt从无际的太空飘移中拉回。之后发现航天飞机和其它乘员全部遇难。于是只有飞向向国际空间站。在燃料和氧气都快用尽的时候,虽然命悬一线抓住了空间站的降落伞,但是却失去了同行的Matt。

    Matt是一个理智乐观的男人。他在Ryan心里埋下了希望和乐观的种子。在关键时刻,他更是果断牺牲了自己。这电影后半段,我一直再想Matt后来在想些什么。坦然接受死亡,仔细体验生命逝去的过程?也许他会像费曼那样说到「I’d hate to die twice. It’s so boring.」

    最终,电影遵循了好莱坞式的结局,女主角最终成功回到了地球。从太空回到地球,对她也许是一次重生。当Sandra Bullock回到地面,慢慢站起来走向前方的时候,我的心里也有一种感动。

    其实后来觉得,Ryan有没有生还也许并没有那么重要,她从难过和消极的情绪中走出来,开始从新追寻新的生命,这本身就是一种胜利。成长的过程里,听到太多人说过程比结局重要,但现实生活里,多数人还是只着迷于那一个结局。

    ——————–

    Gravity有一个伴生短片叫Aningaaq也非常有意思。

    另外这部电影居然打破了George Clooney和Sandra Bullock的票房纪录。他们可都是五十上下的人了。

    Whidbey Island Century

    July 3rd, 2013

    It was my first time on the island. The weather was great — sunshine, clear sky, and not as hot as Seattle; full of scenic views on the route as well. Ride strong most of the part with avg speed > 16 mi/h. Towards the end, I felt a little tired and was dropped by the group. Forgetting my GPS on the day, I took a shortcut to finish the ride. The whole length was about the same, though elevation was about 1000ft short. Still, both distance (105.9mi) and elevation (6,538ft) broke my past records. A really memorable century ride this year!

    highres_253777972

    读书:The Emperor of All Maladies

    August 19th, 2012

    最近读完了The Emperor of All Maladies: A Biography of Cancer这本书。作者,Siddhartha Mukherjee(former Rhodes Scholar,Stanford,Oxford,HMS) ,自己就是在哥伦比亚大学医学中心和医学院从事癌症治疗和研究的医生和学者。作者以相对通俗和生动的文字勾勒人类对癌症认知的历史,治疗手段发展的过程,期间还穿插了他自身的工作经验和与病人的交往。这本书资料详实,比如,注释就有467条,附录于书后的文献提要差不多有5页之多。但是文字数字之外,作者付出了更多的努力其采访了亲身参与癌症作斗争的医生,学者和病人。比如,作者辗转多方,最终通过互联网,找到了一位在1964年接受白血病VAMP疗程的幸存者Ella。接受VAMP疗程的病人只有5%的一年以上存活率。而这个采访不光让作为读者的我意识到早期癌症治疗虽然成功率低,但并非没有意义,而且也提供了癌症长期幸存者对疾病和治疗的感知。

    作为一名中国读者,上世纪至今和癌症斗争的主战场无疑是在美国,但是中国医生也做出了一些有意义的贡献。本书写到了两例。李敏求(Min Chu Li)医生在NCI工作期间第一个用化疗彻底治愈了一种不常见的癌症(Choriocacinoma)。这也是人类第一次采用化疗彻底治愈癌症。瑞金医院的王振义(Zhen Yi Wang)医生与法国医生Laurent Degos是最早在临床实践中发现和使用了针对一种白血病(APL)细胞的化学药物:trans-retinoic acid。这种药物是第一个被临床证明有效,而且只对癌细胞有特殊针对作用的化学药物。

    评价:5/5