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,输入tensor的shape为(batch_size, timestep, feature_num)
    RNN(x, input_shape=(timestep, feature_num))
    timestep为bp gradient descent的步数(即RNN网络unroll为普通NN的长度)


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 absorb 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.

Top 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

Factors to be considered when making a investment decision

  1. Do I have more information than my trading counterparty ?
  2. Do I know this company as well as I thought to be ?
  3. How much should this security go up to make even taking into account the tax and trading cost ?

Avoid Losses

Taking a 95% loss is much easier than making a 95% gain, let alone a 95% gain is not enough to make up the previous loss

Bull&Bear Market and Security Riskiness

Common stock is frequently considered as risky in bear market and "safe investment" in bull market when the reality is the exact opposite.

Component of Stock Market Growth

  1. Real Growth
  2. Inflationary Growth
  3. Speculative Growth


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