- 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.
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
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:
- Share-based compensation (options, etc)
FCF (Free Cash Flow) Formula
FCF = (Sales - OPEXP - DEPEXP)(1-tao) + DEPEXP - Delta WC - CAPEXP
Marketable Securities: Intransic Value v.s. Market Price
The intransic value of a stock often reveals when negotiated at a merger or acquisition.
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.
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.
- Non-voting shares as the certificate of beneficial interest
As opposed to controlling interest.
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
- The ability to service debt interest
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.
- 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.
- Debt to Income Ratio
- 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.
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
- Source of Income (dividend, earnings)
- Marketable Security
The underlying substance of knowledge
- Cause-and-effect relationship among events
- Distribution of possible outcomes on certain event
The underlying utility of knowledge
- Analysis of the past, revealing what happened.
Economic Downturn Periods
- 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
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
货币贬值 --> 金价大涨(保值)
- 国内: 通货膨胀
- 国外: 大宗商品价格上涨（黄金、石油等），对一揽子货币贬值
The Underlying Cause of 2008-2011 financial crisis
- Tremendous misestimation and Ignorance of the Risk related to mortage related financial assets.
- 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.
It is organization, not medium of storage, that really matters in periodical recording of information.
Bonus Army Conflict
- 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
The state of the RNN cell is different from the output of the cell. The LSTM cell has a seperate output gate.
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.
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 definition of "Subsidiary"
A subsidiary is a corporation, that another corporation, referred to as "parent company", controls, usually through majority ownership of its common stock.
"Control" relates to the ability to direct policies and management.
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
- The indicated value by appraisal is at least 50% more than the current market price
- The value of the business to a private owner, the realizable value of the assets.
Tow major sources of undervaluation
- Currently disappointing results
- Protracted neglect or unpopularity.
- The market's failure to recognize its true earnings picture.
Timing and Pricing
- Timing: The endeavor to anticipate the actions of the stock market
- 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
- New conditions has emerged that is not in the old formular over time
- 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
The speculator's primary interest lies in anticipating and profiting from market fluctuations. (Price Orinted)
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
- Operating Performance: operating margin
- Financial Performance: net margin
- 成交价总是order book里的卖1或买1价格