Berkshire Hathaway Letter

  1. Capital Gain
    It is improper to include capital gains and losses when evaluating the performance of a company for a single year, they are an important component of the longer term record.

Apache Spark Note

  1. spark-submit提交有第三方依赖的python脚本
    First off, I'll assume that your dependencies are listed in requirements.txt. To package and zip the dependencies, run the following at the command line:

pip install -t dependencies -r requirements.txt
cd dependencies
zip -r ../dependencies.zip .
Above, the cd dependencies command is crucial to ensure that the modules are the in the top level of the zip file. Thanks to Dan Corin's post for heads up.

Next, submit the job via:

spark-submit --py-files dependencies.zip spark_job.py
The --py-files directive sends the zip file to the Spark workers but does not add it to the PYTHONPATH (source of confusion for me). To add the dependencies to the PYTHONPATH to fix the ImportError, add the following line to the Spark job, spark_job.py:

sc.addPyFile("dependencies.zip")

2018年11月随笔

  1. Share-based compensation (options, etc)
    不消耗公司资金,但增加了流通股数量,降低公司EPS, 同时增大了股票下行压力(被奖励人套现)

  2. FCF (Free Cash Flow) Formula
    FCF = (Sales - OPEXP - DEPEXP)(1-tao) + DEPEXP - Delta WC - CAPEXP

  3. 宏观经济的研究框架
    以利率为出发点,通过把握整体信贷环境、银根的松紧程度、宏观信用和债务风险来评估当前所处的债务周期阶段;进一步引申出制造业和第三产业的投资以及扩张意愿。
    制造业和第三产业的投资及扩张意愿会直接影响中产收入增长和消费意愿,从而引导下游终端企业的生产和投资计划,形成闭环。

  4. Marketable Securities: Intransic Value v.s. Market Price
    The intransic value of a stock often reveals when negotiated at a merger or acquisition.

  5. Buffet's long-term value investing is under the assumption that excellent business results by corporations will translate over the long term into correspondingly excellent market value and dividend results for owners, minority as well as majority. This assumption is very unlikely to be true for most public companies in China.

  6. Price Volatility can be represented by Coefficient of Variance, which avoids the maginitude effect when using std/variance as measurement. Price Volatility can be compared over an aggregated long-term period, or over the average of the separate daily cov result.

Moreover, the price volatility is shown by observing the daily percentage change of the quote.

Std/Variance or cov is designed to measure a statistical population which may or may not observed from a single entity. When the research objective is a single entity with periodically continueous value (hourly, daily, etc), percentage change is a more understandable measurement.

  1. Non-voting shares as the certificate of beneficial interest
    As opposed to controlling interest.

My Investment Philosophy

Intransic Value

Intransic value only concerns about the earning power of the business, not including the growth potential. Value investing is about buying at a bargin price (compared to intransic value) with enough margin of safety. Invest in certainty.

Investing in growth potential is speculation and add more factors on top of the intransic value and current price level (bargin or not). More factors, higher uncertainties.

Evaluation of An entities'ability to pay back debt

  1. The ability to service debt interest

EBIT/Interest Payment
Net Cash Inflow/Interest Payment
2. The ability to service debt principle

Net Income/Debt Principle

Maintaining a long-term short position should be avoided.

  1. As long-term short position does not offer possible dividend income and foregone the trend of long-term economic growth, it should be avoided.

Distinction Between Inflationary Debt Cycle and Deflationary Debt Cycle

Inflationary debt cycle and deflationary debt cycle diffes in the deleveraging phase. Inflationary debt cycle refers to a debt cycle with a deleveraging process that is inflationary. Deflationary debt cycle likewise.

做空的理由

做空的理由是股票价格被严重高估(相对于intransic value),而不是股价即将下跌。

A-template-for-understanding-big-debt-crises读书笔记

债务周期的长期负面影响

  1. 债权人的损失
  2. 债务人的未来收入和支出削减

观测债务周期的关键指标

  1. Debt to Income Ratio
  2. Debt Service Payment to Income Ratio

Credit is "Money"

Most of what people think is money is really credit, and credit does appear out of thin air during good times and then disappear at bad times.

A big part of the deleveraging process is people discovering that much of what they thought of as their wealth was merely people's promises to give them money.

债务危机的根源

举债投资的边际效用减弱,收入增长不及债务成本增长

How to deleverage the Economy

Make income grow faster than debt, lowering the debt-to-income ratio. For the burdens from existing debt not to increase, nominal income growth must be higher than nominal interest rate.

2018年10月随笔

The limitation of Market Valuation

Market valuation by stock price * number of shares is misleading, because not all shares can be sold on the same quoted market price at the same time. Once large volume of dumping emerged, the stock price is definitely going to drop significantly.

An estimation can be made by multiplying market value by a factor, say 0.7.

The Nature of Equity Investment

  1. Source of Income (dividend, earnings)
  2. Marketable Security

The underlying substance of knowledge

  1. Facts
  2. Cause-and-effect relationship among events
  3. Distribution of possible outcomes on certain event

The underlying utility of knowledge

  1. Prediction
  2. Analysis of the past, revealing what happened.

Economic Downturn Periods

  1. Financial Crisis of 2007 - 2008 (2008 Financial Crisis, lead to the Great Recession)

Strong Foreigh Capital Inflow can help keep long-term interest rate low despect the Fed kept raising short-term rate.

The Inherent Inevitability of Crisis

If the danger of crisis was fully recognized by related party, it would never happen. Crisi usually happens when situation looks good, when the potential of crisis was not be foreseen by the authority. Therefore, crisis is very likely to happen even when authority claims everything will be fine (out of true heart or not).

Financial Crisis happens when Big Financial Giant cannot meet obligations (fulfill contracts). To meet these obligations, large amount of financial assets have to be sold, which drives down asset price.

When yield curve flatten, holding short-term assets becomes attractive since their yield increases.

The contagious of 2008 financial crisis

European banks invested in the U.S. subprime mortage market sufferred great losses. The tightening money market in U.S. crippled some European banks who rely on the U.S. financial market to raise short-term fund and maintain liquidity.

Structured Investment Vehicle

Borrowing short-term to invest long-term, by entities established off-shore to avoid regulations

Mezzanine Capital

Any subordinate debt or preferred equity instructment that represents a claim on a company's assets which is senior only to that of the common shares.

The U.S government saved U.S. auto industry by providing loans from government fund

The ultimate Loss

Government assistantace and the act of bail out will ultimately impose the loss on taxpayers, non the less the currency depreciation. Those suffers also includes foreign U.S. currency and bond holers

2009年3月18日,在美国政府宣布将加大量化宽松操作时,金价为何大涨

货币贬值 --> 金价大涨(保值)
预期驱动交易

货币走弱的两个表现

  1. 国内: 通货膨胀
  2. 国外: 大宗商品价格上涨(黄金、石油等),对一揽子货币贬值

做空的风格选择

  1. 短线为主,适合做空的股票往往波动性较大,大幅下跌后经常回撤上涨,短线宜以波动性即得收益为主。预期下跌后平仓等待股票回撤。待有合适回撤后继续做空。波段性操作。

The Underlying Cause of 2008-2011 financial crisis

  1. Tremendous misestimation and Ignorance of the Risk related to mortage related financial assets.
  2. Leveraged Investing

Classic Sign of Buble

New buyers flooded the market, many of them have no prior experience.

The Substance of Financial Crisis

The deveraging process is the process of contracting balance sheet for every participants in the credit market, as large scale credit defaults occuried.

As the overall capital in the economy stay unchanged, the real impack to the market is investor faith and the failure of systematically important institutions.

The collapse of faith is usually followed by a strain of liquidity, which spread the crisis to non-financial sectors.

Recording

It is organization, not medium of storage, that really matters in periodical recording of information.

Bonus Army Conflict

1932年7月28日,美国华盛顿武装驱离抗议人群,出动坦克

Recurrent Neural Network

  1. Simple RNN (Elman Network)
    The state of the Simple RNN cell is the output of the activation function, the output of the RNN cell is the same as the state

  2. LSTM
    The state of the RNN cell is different from the output of the cell. The LSTM cell has a seperate output gate.

  3. Batch Size

A batch contains the whole sequence in consideration, with all time steps included.
Batch size = 5, means 5 sentences, each with a number of #time_step features.

  1. Keras
    RNN class, model.fit()输入tensor的shape为(batch_size, timestep, feature_num)
    RNN(x, input_shape=(timestep, feature_num))
    timestep为bp gradient descent的步数(即RNN网络unroll为普通NN的长度)

The-Intelligent-Investor读书笔记

Two Policies that Must be Followed to beat the Average

a. Inherently Sound and Promising Prospects for A Security
b. Not Popular on Wall Street

The Restrictions of Security Analysis

a. The conclusion of the study is only a nearly correct version of the past
b. The information used in the analysis may have lost relevance by the time acquired
c. The conclusion may become obsolete by the time the market is ready to absorbe it.

Topics that Must be Covered in the Study of Corporate Income

a. Accounting aspect: What are the true earnings for the period studied ?
b. Business aspect: What indications does the earnings record carry as to the future earning power of the company ?
c. Invest Finance aspect: What elements in the earnings exhibit must be taken into account, and what standards must be followed, in endeavoring to arrive at a reasonable valuation of the shares ?

Tests for determining "bargin" issues

  1. The indicated value by appraisal is at least 50% more than the current market price
  2. The value of the business to a private owner, the realizable value of the assets.

Tow major sources of undervaluation

  1. Currently disappointing results
  2. Protracted neglect or unpopularity.
  3. The market's failure to recognize its true earnings picture.

Timing and Pricing

  1. Timing: The endeavor to anticipate the actions of the stock market
  2. Pricing: The endeavor to buy stocks when they are quoted below their fair value and to sell them when price rise above such value

About Market Timing

Market forcast is by itself meaningless.
The general market is unpredictable.

The Effectiveness of Investment Theory

  1. New conditions has emerged that is not in the old formular over time
  2. The popularity of a theory cast an adverse effect on its performance as more people applies it.

The paradox of market valuation

The more successful the company, the greater are likely to be the fluctuations in the price of its shares. The better the quality of a common stock, the more speculative it is likely to be. Gambling and speculation is about the betting on uncertainty with a potential high return. The uncertainty component can be if the company can succeed in the future, or if it is definitely going to succeed, how big success it can reach. The market price for hight quality stocks is highly speculative because the public can not reach consensus on the potential about the future of a company, even if they agree on genenral its success or failure future, they surely cannot agree on how success it will be.

Graham's Lifetime of Experience

The true investor scarcely ever is forced to sell his shares, and at all other times he is free to disregard the current price quotation. He need pay attention to it and act upon it only to the extent that it suits his book, and no more. Thus the investor who permits hisself to be stampeded or unduly worried by unjustified market declines in his holdings is perversely transforming his basic advantage into a basic disadvantage. That man would be better off if his stocks had no market quotation at all, for he would then be spared the mental anguish caused him by other persons' mistakes of judgment.

Distinction Between Investor and Speculator

Intention of Stock Purchase

  1. Speculator
    The speculator's primary interest lies in anticipating and profiting from market fluctuations. (Price Orinted)

  2. Investor
    The investor's primary interest lies in acquiring and holding suitable securities at suitable prices. (Earnings Orinted)

Although a change of earnings will eventually reflect on price movement, the intention is different.

For investors, the market quotations are there for his convenience, either to be taken advantage of or to be ignored.

The Two Components of Profitability

  1. Operating Performance: operating margin
  2. Financial Performance: net margin

2018年9月随笔

  1. 成交价总是order book里的卖1或买1价格
  2. 只考虑限价单,卖1大于买1则无成交
  3. 卖1是买入证券时的可能最低价,买1是卖出证券时的可能最高价