We are a boutique financial service firm specializing in quantitative analysis, derivatives valuation and risk management.
In a previous post, we demonstrated the mean-reverting and trending properties of SP500. We subsequently developed a trading system based on the mean-reverting behavior of the index. In this installment, we will develop a trend-following trading strategy. http://tech.harbourfronts.com/trend-following-trading-system-quantitative-trading-in-python/
We develop a simple trading system exploiting the mean-reverting behaviour of the SP500 market index. To generate buy and sell signals, we will use simple moving averages as noise filters. Since we know that the SP500 is mean-reverting in a short term, we will use short-term moving averages. http://tech.harbourfronts.com/mean-reverting-trading-system-quantitative-trading-in-python/
We are going to examine the mean-reverting and trending properties of SP500 directly using the autocorrelation functions. We do so with the goal of designing quantitative trading systems on stock indices. http://tech.harbourfronts.com/autocorrelation-properties-of-sp500-quantitative-trading-in-python/
We discuss ways to determine the dividend yield accurately. We use traded options to determine the implied dividend yield. Specifically, if the options are of European-style exercise, then we can use the put-call parity to create a synthetic single stock future. http://tech.harbourfronts.com/how-to-determine-implied-dividend-yield-derivative-valuation-in-excel/
We use the Exponential Weighted (EW) historical volatility that assigns bigger weights to the recent returns, and smaller weights to the past ones. The EWHV is more responsive than the equally weighted historical volatility. Also, the decline of the EWHV from its peak is smoother than that of the equally weighted HV. http://tech.harbourfronts.com/exponentially-weighted-historical-volatility-in-excel-volatility-analysis-in-excel/
We are going to perform some numerical experiments. Specifically, we are going to use the portfolio optimization program developed in the previous post in order to study the effect of diversification. http://tech.harbourfronts.com/modern-portfolio-theory-effect-of-diversification-on-the-optimal-portfolio-portfolio-management-in-python/
We are going to search for the optimal portfolio, i.e. one that has the highest risk-adjusted return. To do so, we will maximize the portfolio’s Sharpe ratio. The Sharpe Ratio is a financial metric that helps investors determine the return of an investment compared to its risk. The higher the Sharpe Ratio of a portfolio, the better it is in terms of risk-adjusted return. http://tech.harbourfronts.com/modern-portfolio-theory-searching-for-the-optimal-portfolio-portfolio-management-in-python/
Harry M. Markowitz is the founder of Modern Portfolio Theory (MPT) which originated from his 1952 essay on portfolio selection. In this post, we are going to provide a concrete example of implementing MPT in Python. Our portfolio consists of 3 Exchange Traded Funds (ETF): SPY, TLT, and GLD which track the S&P500, long-term Treasury bond, and gold respectively. http://tech.harbourfronts.com/trading/modern-portfolio-theory-portfolio-management-python/
Pair trading, or statistical arbitrage, is one of the oldest forms of quantitative trading. We are going to present some relevant statistical tests for analyzing the Australia/Canada pair. We chose this pair because these countries’ economies are tied strongly to the commodity sector, therefore they share similar characteristics and could be a good candidate for pair trading http://tech.harbourfronts.com/trading/statistical-analysis-etf-pair-quantitative-trading-python/
We are a boutique financial service firm specializing in quantitative analysis, derivative valuation and risk management. Our clients range from asset management firms to industrial, non-financial companies. Our services include: Valuation of financial derivatives such as convertible bonds, mortgage backed securities, variance swaps, credit default swaps, collateral debt obligation http://tech.harbourfronts.com/
In a previous post, we presented theory and a practical example of calculating implied volatility for a given stock option. In this post, we are going to implement a model for forecasting the implied volatility. Specifically, we are going to use the Autoregressive Integrated Moving Average (ARIMA) model to forecast the volatility index VIX. http://tech.harbourfronts.com/trading/forecasting-implied-volatility-arima-model-volatility-analysis-python/
In a previous post, we presented an example of volatility analysis using Close-to-Close historical volatility. In this post, we are going to use the Generalized Autoregressive Conditional Heteroskedasticity (GARCH) model to forecast volatility. http://tech.harbourfronts.com/trading/forecasting-volatility-garch-model-volatility-analysis-python/
There are two types of volatility: historical volatility and implied volatility. In a series of previous posts, we presented methods and provided Python programs for calculating historical volatilities. In this post, we are going to discuss implied volatility and provide a concrete example of implied volatility calculation in Python. http://tech.harbourfronts.com/trading/implied-volatility-options-volatility-analysis-python/
In a previous post, we presented a method for calculating a stock beta and implemented it in Python. In this follow-up post, we are going to implement the calculation in Excel. We continue to use Facebook as an example. http://tech.harbourfronts.com/trading/calculate-stock-beta-excel-replicating-yahoo-stock-beta/
We are going to discuss valuation of a callable bond. We chose the Hull-White model to describe the interest rate dynamics. We then use a Python program to build a trinomial tree for the risk-free rates http://tech.harbourfronts.com/derivatives/valuation-callable-puttable-bonds-derivative-pricing-python/
A warrant is a financial derivative instrument that is similar to a regular stock option except that when it is exercised, the company will issue more stocks and sell them to the warrant holder. The valuation of warrants is similar to the valuation of stock options except that the effect of dilution should be considered. http://tech.harbourfronts.com/derivatives/valuation-warrants-derivative-pricing-python/
Performance share units are hypothetical share units that are granted to you based mainly on corporate and/or individual performance. Structurally, they are very similar to restricted stock units except these are more focused on your performance. They are designed to mirror share ownership and you will generally be granted additional units having the same value as dividends being paid on the regular shares http://tech.harbourfronts.com/derivatives/performance-share-units-derivative-valuation-python/
Valuation of Employee Stock Options is different from regular stock options. In this post, we are going to implement the approach proposed by Hull and White. Specifically, we are going to implement the vesting and forfeiture rate features. Other features can also be implemented without difficulty http://tech.harbourfronts.com/derivatives/employee-stock-options-derivative-pricing-python/
We are going to present a method for valuing American options using Monte Carlo simulation. This method will allow us to implement more complex option payoffs with greater flexibility, even if the payoffs are path-dependent. Specifically, we use the Least-Squares Method of Longstaff and Schwartz in order to take into account the early exercise feature. The stock price is assumed to follow the Geometrical Brownian Motion. http://tech.harbourfronts.com/derivatives/valuing-american-options-using-monte-carlo-simulation-derivative-pricing-python/
We present an extension of the Garman-Klass volatility estimator that also takes into consideration overnight jumps. Garman-Klass-Yang-Zhang (GKYZ) volatility estimator consists of using the returns of open, high, low, and closing prices in its calculation. It also uses the previous day’s closing price. http://tech.harbourfronts.com/trading/garman-klass-yang-zhang-historical-volatility-calculation-volatility-analysis-python/
In the previous post, we introduced the Parkinson volatility estimator that takes into account the high and low prices of a stock. In this follow-up post, we present the Garman-Klass volatility estimator that uses not only the high and low but also the opening and closing prices. http://tech.harbourfronts.com/trading/garman-klass-volatility-calculation-volatility-analysis-python/
A disadvantage of using the CCHV is that it does not take into account the information about intraday prices. The Parkinson volatility extends the CCHV by incorporating the stock’s daily high and low prices. http://tech.harbourfronts.com/trading/parkinson-historical-volatility-calculation-volatility-analysis-python/
In this post, we are going to discuss historical volatilities of a stock in more details. There are various types of historical volatilities such as close to close, Parkinson, Garman-KIass, Yang-Zhang, etc. Here we will discuss the close-to-close historical volatility. It’s observed that the volatility is a mean-reverting process. http://tech.harbourfronts.com/trading/close-close-historical-volatility-calculation-volatility-analysis-python/
In finance, beta measures a stock’s volatility with respect to the overall market. It is used in many areas of financial analysis and investment, for example in the calculation of the Weighted Average Cost of Capital, in the Capital Asset Pricing Model and market-neutral trading. In this post, we present a concrete example of calculating the beta of Facebook, a technology stock. As for the market benchmark, we utilize SPY. http://tech.harbourfronts.com/trading/stock-beta-calculate-stock-beta-python/
The VIX index is an important market indicator that everyone is watching. VVIX, on the other hand, receives less attention. In this post, we are going to take a look at the relationship between the VIX and VVIX indices. http://blog.harbourfronts.com/2020/03/25/correlation-vvix-vix-indices/
Value at risk (VaR) is a measure of the risk of loss for investments. It estimates how much a set of investments might lose (with a given probability), given normal market conditions, in a set time period such as a day. The method presented in this post is suitable for calculating the VaR in a normal market condition. More advanced approaches such as Expected Tail Loss have been developed that can better take into account the tail risk. http://tech.harbourfronts.com/risk-management/value-risk-financial-risk-management-python/
To price the options, we first simulate the price paths using the following Stochastic Differential Equation. The simulation is carried out until the options’ maturity. We then apply the terminal payoff functions and calculate the mean values of all the payoffs. Finally, we discount the mean values to the present and thus obtain the option values. http://tech.harbourfronts.com/derivatives/valuing-european-options-using-monte-carlo-simulation-derivative-pricing-python/
In this post, we focus on the implementation of the Black-Scholes-Merton option pricing model in Python. Closed-form formula for European call and put are implemented in a Python code. We compare the results to the ones obtained by using third-party software and notice that they are in good agreement. http://tech.harbourfronts.com/derivatives/black-scholes-merton-option-pricing-model-derivative-pricing-python/
In a previous post, we presented a theoretical framework for pricing convertible bonds and preferred shares. We also provided an example of pricing a convertible bond in Excel. In this installment, we present an example of pricing a convertible bond in Python. http://tech.harbourfronts.com/derivatives/valuing-convertible-bond-derivative-pricing-python/
As negative interest rates started popping up around the world, quantitative analysts and traders have been asking a mundane but fundamental question: How to price trillions of dollars of financial instruments when their complex pricing models don’t work with negative numbers? http://tech.harbourfronts.com/derivatives/how-negative-interest-rates-affect-derivative-pricing-models/
This installment is a follow-up to the previous one on a simple system for hedging long exposure during a market downturn. It was inspired by a research paper on the power-law behaviour of the equity indices. http://blog.harbourfronts.com/2018/07/27/simple-hedging-system-time-exit/
Previously we showed that the spot volatility index, VIX, has a strong mean reverting tendency. In this follow-up installment we’re going to further investigate the mean reverting properties of the VIX. Our primary goal is to use this study in order to aid options traders in positioning or hedging their portfolios. http://blog.harbourfronts.com/2018/04/29/vix-mean-reversion-volatility-spike/
We present a trading system with the goal of using it as a hedge for long equity exposure. To this end, we test a simple, short-only momentum system. http://blog.harbourfronts.com/2018/03/31/simple-system-hedging-long-portfolios/
In February of last year , the SP500 experienced a drop of 4% in a day. We ask ourselves the question: is a one-day 4% drop a common occurrence? http://blog.harbourfronts.com/2018/02/28/4-day-black-swan/
In the previous post, we looked at some statistical properties of the empirical distributions of spot SPX and VIX. In this post, we are going to investigate the mean reverting and trending properties of these indices. To do so, we are going to calculate their Hurst exponents. http://blog.harbourfronts.com/2017/12/29/mean-reverting-trending-properties-spx-vix/
VIX related products (exchange traded notes, futures and options) are becoming popular financial instruments for both hedging and speculation. The volatility index VIX was developed in the early 90’s. In its early days, it led the derivative markets. Today the dynamics has changed. Now there is strong evidence that the VIX futures market leads the cash index. In this installment we are going to look at some statistical properties of the spot VIX index. We used data from January 1990 to May 2017. http://blog.harbourfronts.com/2017/11/30/statistical-distributions-volatility-index/
This installment is the continuation of the previous one on the riskiness of out-of-the-money vs. at-the-money short put options and the effect of leverage on the risk measures. Here we’re going to perform similar studies with the only exception that from inception until maturity the short options are dynamically hedged. The simulation methodology and parameters are the same as in the previous study. http://blog.harbourfronts.com/2017/09/28/short-money-put-options-risky-part-2-dynamic-case/
We quantify and compare the risks of short out-of-the-money and at-the-money put options. We do so by performing Monte Carlo simulations and calculating the Value at Risk (VaR at 95% confidence interval) and variance of the return distribution. http://blog.harbourfronts.com/2017/08/23/are-short-out-of-the-money-put-options-risky/
In the previous installment, we discussed the use of a popular market timing rule to size a short option position. The strategy did not work well as it was the case in traditional asset allocation. As a follow up, we will apply the 10M SMA rule to a static, unhedged position. http://blog.harbourfronts.com/2017/06/30/using-market-timing-rule-size-option-position-static-case/
We previously presented 2 volatility trading strategies: one strategy is based on the volatility risk premium and the other on the volatility term structure, or roll yield. Here we present a detailed comparison of these 2 strategies and analyze their performance. http://blog.harbourfronts.com/2016/12/20/volatility-trading-strategies-a-comparison-of-volatility-risk-premium-and-roll-yield-strategies/
Position sizing and portfolio allocation have not received much attention in the options trading community. Here, we are going to apply a simple position sizing rule and see how it performs within the context of volatility trading. http://blog.harbourfronts.com/2017/04/30/use-market-timing-rule-size-option-position/
In the previous post, we presented a system for trading VXX, a volatility Exchange Traded Note. The trading system was built based on simple moving averages. In this post, we are going to examine the time series properties of VXX in more details. http://tech.harbourfronts.com/trading/stationarity-autocorrelation-functions-vxx-time-series-analysis-python/
When trading options, we often use the volatility index, VIX, as a measure of volatility in order to enter and manage positions. This works most of the time. However, there exist some differences between the VIX index and at-the-money implied volatility. In this post, we are going to show such a difference through an example. Specifically, we study the relationship between the implied volatility and forward realized volatility of the SP500 http://blog.harbourfronts.com/2019/03/28/differences-vix-index-money-implied-volatility/
A lot of research has been devoted to answering the question: do options price in the volatility risks correctly? The most noteworthy phenomenon (or bias) is called the volatility risk premium, i.e. options implied volatilities tend to overestimate future realized volatilities. Much less attention is paid, however, to the underlying asset dynamics, i.e. to answering the question: do options price in the asset dynamics correctly? http://blog.harbourfronts.com/2018/12/31/asset-dynamics-priced-correctly-black-scholes-merton-model/
Robert Merton published a seminal paper that laid the foundation for the development of structural credit risk models. We’re going to provide an example of how it can be used for managing credit risks. We are going to present a case study based on the Merton credit risk model. http://tech.harbourfronts.com/risk-management/merton-credit-risk-model-case-study/
We have provided examples of pricing European and American options in Excel. For pricing the European option, we utilized the Black-Scholes formula, and for pricing the American option we utilized the binomial approach. Here, we are going to implement these methods in Python. http://tech.harbourfronts.com/derivatives/valuation-european-american-options-derivative-pricing-python/
We are going to provide an example of interest rate swap pricing in Python. We are going to use the USD Libor swap curve as at December 31 2018. Note that we utilize the deposit and swap rates only and ignore the futures prices in the bootstrapping process. The values of the fixed, floating legs and the interest rate swap are calculated using a Python program. http://tech.harbourfronts.com/derivatives/interest-rate-swap-derivative-pricing-python/
The weighted average cost of capital (WACC) is the rate that a company is expected to pay on average to all its security holders to finance its assets. The WACC is commonly referred to as the firm's cost of capital. For illustration purposes, we are going to calculate the WACC of Barrick Gold, a major Canadian mining company. http://tech.harbourfronts.com/derivatives/weighted-average-cost-of-capital-wacc-business-valuation-calculator-in-excel/
A convertible bond (or preferred share) is a hybrid security, part debt and part equity. Its valuation is derived from both the level of interest rates and the price of the underlying equity. Several modeling approaches are available to value these complex hybrid securities such as Binomial Tree, Partial Differential Equation and Monte Carlo simulation. One of the earliest approaches was the Binomial Tree model originally developed by Goldman Sachs and this model allows for an efficient implementation with high accuracy. http://tech.harbourfronts.com/derivatives/derivative-valuation-how-to-price-a-convertible-bond/
Debt instruments are an important part of the capital market. In this post, we are going to provide an example of pricing a fixed-rate bond. We are going to price a hypothetical bond as at October 31, 2018. We first build a zero coupon curve, then use it to price a hypothetical fixed rate bond. http://tech.harbourfronts.com/derivatives/valuing-fixed-rate-bond-derivative-pricing-python/
An interest rate swap is a financial derivative instrument that involves an exchange of a fixed interest rate for a floating interest rate. Interest rate swaps are often used to hedge the fluctuation in the interest rate. To value an interest rate swap, fixed and floating legs are priced separately using the discounted cash flow approach. http://tech.harbourfronts.com/derivatives/interest-rate-swap-derivative-pricing-excel/