Finances 101

The exercises presented throughout this book are related to historical financial data and require the reader to have some basic understanding of financial markets and reports.

Fundamental analysis

Fundamental analysis is a set of techniques to evaluate a security—stock, bond, currency, or commodity—that entails attempting to measure its intrinsic value by examination related to both macro and micro, financial and economy reports. Fundamental analysis is usually applied to estimate the optimal price of a stock using a variety of financial ratios.

Numerous financial metrics are used throughout this book. Here are the definitions of the most commonly used metrics [A:16]:

  • Earnings per share (EPS): This is the ratio of net earnings to the number of outstanding shares.
  • Price/Earnings ratio (PE): This is the ratio of the market price per share to earnings per share.
  • Price/Sales ratio (PS): This is the ratio of market price per share over gross sales or revenue.
  • Price/Book value ratio (PB): This is the ratio of market price per share over total balance sheet value per share.
  • Price to Earnings/Growth (PEG): This is the ratio of price/earnings per share (PE) over annual growth of earnings per share.
  • Operating income: This is the difference between the operating revenue and operating expenses.
  • Net sales: This is the difference between the revenue or gross sales and cost of goods or cost of sales.
  • Operating profit margin: This is the ratio of the operating income over net sales.
  • Net profit margin: This is the ratio of net profit over net sales (or net revenue).
  • Short interest: This is the quantity of shares sold short and not yet covered.
  • Short interest ratio: This is the ratio of the short interest over total number of shares floated.
  • Cash per share: This is the ratio of the value of cash per share over market price per share.
  • Pay-out ratio: This is the percentage of the primary/basic earnings per share excluding extraordinary items paid to common stockholders in the form of cash dividends.
  • Annual dividend yield: This is the ratio of sum of dividends paid during the previous 12-month rolling period, over the current stock price. Regular and extra dividends are included.
  • Dividend coverage ratio: This is the ratio of income available to common stockholders, excluding extraordinary items, for the most recent trailing twelve months, to gross dividends paid to common shareholders, expressed as percent.
  • Gross Domestic Product (GDP): This is the aggregate measure of the economic output of a country. It actually measures the sum of value added by the production of goods and delivery of services.
  • consumer price index (CPI): This is an indicator that measures the change in the price of an arbitrary basket of goods and services used by the Bureau of Labor Statistics to evaluate the inflationary trend.
  • Federal Fund rate: This is the interest rate at which banks trade balances held at the Federal Reserve. The balances are called Federal Funds.

Technical analysis

Technical analysis is a methodology used to forecast the direction of the price of any given security through the study of past market information derived from price and volume. In simpler terms, it is the study of price activity and price patterns in order to identify trade opportunities [A:17]. The price of a stock, commodity, bond, or financial future reflects all the information publicly known about that asset as processed by the market participants.

Terminology

  • Bearish or bearish position: A bear position attempts to profit by betting that the prices of the security will fall.
  • Bullish or bullish position: A bull position attempts to profit by betting that the price of the security will rise.
  • Long position: This is the same as bullish.
  • Neutral position: A neutral position attempts to profit by betting the price of the security will not change significantly.
  • Oscillator: An oscillator is a technical indicator that measures the price momentum of a security using some statistical formulae.
  • Overbought: A security is overbought when its price rises too fast as measured by one or several trading signals or indicators.
  • Oversold: A security is oversold when its price drops too fast as measured by one or several trading signals or indicators.
  • Relative strength index (RSI): The RSI is an oscillator that computes the average of number of trading sessions for which the closing price is higher than the opening price over the average of number of trading sessions for which the closing price is lower than the opening price. The value is normalized over [0, 1] or [0, 100%].
  • Resistance: A resistance level is the upper limit of the price range of a security. The price falls back as soon as it reaches the resistance level.
  • Short position: This is the same as bearish.
  • Support: A support level is the lower limit of the price range of a security over a period of time. The price bounces back as soon as it reaches the support level.
  • Technical indicator: A technical indicator is a variable derived from the price of a security and possibly its trading volume.
  • Trading range: The trading range for a security over a period of time is the difference between the highest and lowest price for this period of time.
  • Trading signal: A signal is triggered when a technical indicator reaches a predefined value, upwards or downwards.
  • Volatility: This is the variance or standard deviation of the price of a security over a period of time.

Trading signals and strategy

The purpose is to create a set variable x, derived from price and volume; x = f (price, volume) then generate predicates, x op c, where op is a Boolean operator, such as > or =. The op operator compares the value of x to a predetermined threshold c.

Let's consider one of the most common technical indicators derived from price: the relative strength index RSI, or the normalized RSI; nRSI, whose formulation is provided here for reference:

Note

The RSI for a period of T sessions, with opening price po, and closing price pc is given by:

Trading signals and strategy

A trading signal is a predicate using a technical indicator nRSI(t) < 0.2. In trading terminology, a signal is emitted for any time period, t, for which the predicate is true. Have a look at the following graph:

Trading signals and strategy

Traders do not usually rely on a single trading signal to make a rational decision.

As an example, if G is the price of gold, I10 is the current rate of the 10-year Treasury bond, and RSIsp500 is the relative strength index of the S&P 500 index, then we can conclude that the increase in the exchange rate of the US$ to the Japanese Yen maximizes for the trading strategy: {G < $1170 and I10 > 3.9% and RSIsp500 > 0.6 and RSIsp500 < 0.8}.

Price patterns

Technical analysis assumes that historical prices contain some recurring albeit noisy patterns that can be discovered using the statistical method. The most common patterns used in the book are the trend, support, and resistance levels [A:18], as illustrated in the following chart:

Price patterns

Illustration of trend, support, and resistance levels in technical analysis

Options trading

An option is a contract that gives the buyer the right but not the obligation to buy or sell a security at a specific price on or before a certain date [A:19].

The two types of options are calls and puts:

  • A call gives the holder the right to buy a security at a certain price within a specific period of time. Buyers of calls expect that the price of the security will increase substantially over the strike price before the option expires.
  • A put option gives the holder the right to sell a security at a certain price within a specific period of time. Buyers of puts expect that the price of the stock will fall below the strike price before the option expires.

Let's consider a call option contract on 100 shares at a strike price of $ 23 for a total cost of $ 270 ($ 2.7 per option). The maximum loss the holder of the call can incur is the loss of premium or $270 when the option expires. However, the profit can be potentially almost unlimited. If the price of the security reaches $ 36 when the call option expires, the owner will have a profit of ($ 36 - $ 23)*100 - $ 270 = $ 1030. The return on investment is 1030/270 = 380 percent. Buying and then selling the stock would have generated a return on investment of 36/24 - 1= 50 percent. This example is simple and does not take into account transaction fee or margin cost [A:20]. Have a look at the following graph:

.

Options trading

Financial data sources

There are numerous sources of financial data available to experiment with machine learning and validation models [A:21].

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset