I have moved my website/blog there to centralize my coding / quant finance postings, which is also the web site of my company KKB Research and Development (KKB is my initials).

Hello all, It is Christmas time and that means family members wanting “stock market” advice. My usual response is not to do any analysis/advice for family members as I have a rather large extended family (by my last count over 100) and I just don’t think it’s appropriate. So I have worked up a quick […]

This post will aim to explore the effective number of bets (https://kylebalkissoon.wordpress.com/2014/04/15/effective-number-of-bets/) of various risk parity strategies (https://kylebalkissoon.wordpress.com/2014/04/14/risk-parity-using-various-risk-measures-volatility-expected-shortfall-semi-deviation-maximum-draw-down/). Why? Let’s see if it explains why some strategies outperform and others underperformed. If it is because we are not betting efficiently (ENB<Assets) relative to the other strategies it may indicate that a certain method or […]

Yesterday, I had a post on Risk Parity, however one of the drawbacks is if the assets are highly correlated the performance may not be the best. ( https://kylebalkissoon.wordpress.com/2014/04/14/risk-parity-using-various-risk-measures-volatility-expected-shortfall-semi-deviation-maximum-draw-down/ ). Today I will be analyzing the previous group from yesterday to see what was the effective number of bets. This is built off Attilio Meucci […]

A lot of people talk about equal risk contribution or balancing risk. This post aim’s to explore how a risk parity portfolio performs depending on the risk metric used in it’s calculation. I explore using Expected Shortfall. Volatility, Semi deviation and maximum drawdown as risk factors. The strategy is rebalanced monthly. Mathematically. Choose W such […]

Quick blog post about the sixty forty rule rebalanced annually. As always this is not investment advice. Whipped it up using SPY for stocks and BND for bonds, I used adjusted closes, you could use closes or whatever you like, you can also change rebal to a different number of days. library(quantmod) library(PerformanceAnalytics) getSymbols(“SPY”) getSymbols(“BND”) […]

The sharpe ratio can be viewed as a signal to noise ratio (when rf = 0), and this is a quick strategy to execute on “momentum” when the signal to noise ratio is appropriate, it appears to be profitable on the backtest. Here is quick example using the sharpe ratio to trade on. This is […]

Made an example using a basic autoregressive process (lags chosen by Yule Walker equations). This is a proof of concept to show how to build a basic AR process that acts as a way to predict the market, I created a spread between model prediction and market. When the market shifts away from the “smoothed […]

Quantstrat version of a reddit post: http://www.reddit.com/r/algotrading/comments/wrblb/not_enough_code_on_this_sub_check_out_my_first/ Two rules: 1. Buy when SMA(10) > SMA(100) 2. Hold Cash Otherwise *** THIS IS NOT INVESTMENT ADVICE, I AM NOT YOUR BROKER, ADVISOR, FUND MANAGER OR HAVE ANY DUTY OF CARE, FIDUCIARY DUTY OR ANYTHING SIMILAR. I AM NOT LIABLE FOR ANY LOSSES *** As always Credit […]

Whipped up something quick to test if stock X follows a random walk… GOOG apparently does not. #load libraries library(quantmod) library(vrtest) # get Data replace goog with your stock of choice symbol = “GOOG” currency(“USD”) stock(symbol, currency=”USD”, multiplier = 1) getSymbols(symbol,src=”yahoo”) #make returns rets<-ROC(Cl(GOOG)) #get rid of the NA for the first term rets2<-rets[2:length(rets)] #Variance […]