Portfolio Diversification Analysis with PCA

In this article I will analyze my (long only) stock portfolio using Principal Component Analysis or PCA to see whether it is properly diversified or not. I will then use my findings to make an educated decision as to how to enhance the portfolio’s diversification if required.

Read More

Pair Trading GLD and GDX

When the correlation between the two securities temporarily weakens, i.e. one stock moves up while the other moves down, the pairs trade would be to short the outperforming stock and to long the underperforming one, betting that the “spread” between the two would eventually converge. The divergence within a pair can be caused by temporary supply/demand changes, large buy/sell orders for one security, reaction for important news about one of the companies, and so on.

Read More

Testing for Cointegration of GLD and GDX for use in a Pair Trading Strategy

In this research I am going to test whether the price series of two securities GLD (Gold Price) and GDX (Gold Miners Equity ETF) are cointegrated. This is crucial if we want to develop a pair trading strategy around those two securities. I want to test if the spread between the two series is stationary around its mean. For my pair trading strategy I want the two securities to be cointegrated. For my research I am using Python.

Read More

How to Derive The Bond Pricing Formula

When you calculate the price of a bond, you are determining the maximum price you would want to pay for the bond, based on how its coupon rate compares to the average rate most investors are currently receiving in the bond market.

Read More

Calculating Stock Beta

The Beta of an asset is a measure of the sensitivity of its returns relative to a market benchmark (usually a market index). How sensitive/insensitive is the returns of an asset to the overall market returns (usually a market index like S&P 500 index). What happens when the market jumps, do the returns of the asset jump accordingly?

Read More

Calculate Present Value Of Perpetuity

In a previous post I have described what perpetuity is and how we can derive the formula for the present value of perpetuity. In this article I describe how it can be used in combination with the discounted value of cash flows model.

Read More

How the US Federal Reserve sets Interest Rates

Unless you have been living under a rock, you’ll have heard news about the FED lowering interest rates numerous times. What does this actually mean and how does the FED manage to do that? This article describes how interest rates work and how the FED is able to raise or lower interest rates through its FOMC meetings.

Read More

Deriving The Perpetuity Formula

Perpetuity refers to an infinite amount of time. In finance, perpetuity is a constant stream of identical cash flows, C, with no end. In this post I explain how one can derive the Perpetuity Formula.

Read More

Solve for Number of Periods - PV & FV

Often times when you read something like “Annual increases at a 10% rate would lead to the doubling of prices every seven years”, you might be wondering how one would go about calculating the length of time required for a single cash flow(present value) to reach a certain amount(future value) based on the given rate.

Read More

Pair Trading S1 and S2

This is a generic Notebook, similar to the one Pair Trading GLD and GDX, where I am going to pair trade two securities. The backtesting also includes broker fees. All I have to do is adjust my input parameters such as ticker symbols and dates. The algorithm then fetches the 10 year historical price data from Nasdaq and simulates the pair trading strategy.

Read More

Find Cointegrating Pairs To Trade

In this research I am going to search for cointegrating security pairs that can potentially be used in a pair trading strategy. I am going to fetch the data from the NASDAQ official web site.

Read More

Apple DCF Model

In this post I calculate the intrinsic value of Apple (AAPL) using a Discounted Cash Flow (DCF) model. As of this writing (31. Oct. 2018) AAPL is trading at USD 218.86. I used Jupyter Notebook for my analysis. According to my model, Apple’s intrinsic value per share is USD 229. That is, currently it trades at a 4% discount or margin of safety.

Read More