Publications by systematicinvestor

Borrowing Ideas from Timely Portfolio

15.04.2012

I want to highlight two great Visualization techniques I discovered by reading the fine blog from Timely Portfolio. First method is based on the lm System on Nikkei with New Chart. Let’s visualize Strategy’s Long/Short/Not Invested periods by highlighting the underlying (i.e. buy & hold) with green/red/gray. Following is a sample code that im...

1473 sym R (3071 sym/3 pcs) 22 img

Intraday Backtest

22.04.2012

I came across a free source of Intraday Forex data while reading Forex Trading with R : Part 1 post. You can download either Daily or Hourly historical Forex data from the FXHISTORICALDATA.COM. The outline of this post: Download and Import Forex data Reference and Plot Intraday data Daily Backtest Intraday Backtest First,I created a getSymbols....

1999 sym R (3481 sym/6 pcs) 28 img

Volatility Position Sizing to improve Risk Adjusted Performance

30.04.2012

Today I want to show how to use Volatility Position Sizing to improve strategy’s Risk Adjusted Performance. I will use the Average True Range (ATR) as a measure of Volatility and will increase allocation during low Volatility periods and will decrease allocation during high Volatility periods. Following are two good references that explain thes...

1307 sym R (2214 sym/2 pcs) 20 img

Cross Sectional Correlation

07.05.2012

Diversification is hard to find nowadays because financial markets are becoming increasingly correlated. I found a good visually presentation of Cross Sectional Correlation of stocks in the S&P 500 index in the Trading correlation by D. Varadi and C. Rittenhouse article. Let’s compute and plot the average correlation among stocks in the S&P 500...

1157 sym R (2694 sym/1 pcs) 18 img

Classical Technical Patterns

21.05.2012

In my presentation about Seasonality Analysis and Pattern Matching at the R/Finance conference, I used examples that I have previously covered in my blog: Month of the Year Seasonality – I introduced the Seasonality charts in the Historical Seasonality Analysis: What company in DOW 30 is likely to do well in January? post. I also developed the...

4218 sym R (3719 sym/6 pcs) 20 img

Backtesting Classical Technical Patterns

28.05.2012

In the last post, Classical Technical Patterns, I discussed the algorithm and pattern definitions presented in the Foundations of Technical Analysis by A. Lo, H. Mamaysky, J. Wang (2000) paper. Today, I want to check how different patterns performed historically using SPY. I will follow the rolling window procedure discussed on pages 14-15 of the...

1425 sym Python (3129 sym/3 pcs) 22 img

Volatility Quantiles

04.06.2012

Today I want to examine the performance of stocks in the S&P 500 grouped into Quantiles based on one year historical Volatility. The idea is very simple: each week we will form Volatility Quantiles portfolios by grouping stocks in the S&P 500 into Quantiles using one year historical Volatility. Next we will backtest each portfolio and check if lo...

1738 sym R (3215 sym/3 pcs) 20 img

Volatility Position Sizing 2

11.06.2012

I have discussed Volatility Position Sizing in the Volatility Position Sizing to improve Risk Adjusted Performance post using the Average True Range (ATR) as a measure of Volatility. Today I want show how to use historical volatility to adjust portfolio leverage. Let’s start with Buy and Hold strategy using SPY and rescale it to the target vol...

2165 sym R (7931 sym/4 pcs) 36 img

Factor Attribution

19.06.2012

I came across a very descriptive visualization of the Factor Attribution that I will replicate today. There is the Three Factor Rolling Regression Viewer at the mas financial tools web site that performs rolling window Factor Analysis of the “three-factor model” of Fama and French. The factor returns are available from the Kenneth R French: D...

1717 sym R (4581 sym/5 pcs) 18 img

Factor Attribution 2

26.06.2012

I want to continue with Factor Attribution theme that I presented in the Factor Attribution post. I have re-organized the code logic into the following 4 functions: factor.rolling.regression – Factor Attribution over given rolling window factor.rolling.regression.detail.plot – detail time-series plot and histogram for each factor factor.roll...

1753 sym R (3342 sym/3 pcs) 30 img