Exploring the rsims package for fast backtesting in R

rsims is a new package for fast, realistic (quasi event-driven) backtesting of trading strategies in R. Really?? Does the world really need another backtesting platform…?? It’s hard to argue with that sentiment. Zipline, QuantConnect, Quantstrat, Backtrader, Zorro… there are certainly plenty of good options out there. But allow me to offer a justification for why …

Read more

How to Lose Money Trading (and how not to)

It’s easy to lose money trading if you do certain things: Trade too much (paying fees and market impact on each transaction) Size positions too big (high volatility hurts compounding ability, and in the extreme can cause you to blow up) Short positive drift/risk premia Perhaps surprisingly, it’s actually quite hard to lose money consistently …

Read more

What P&L Swings Can I Expect as a Trader?

Many beginner traders don’t realize how variable the p&l of a high-performing trading strategy really is. Here’s an example… I simulated ten different 5 year GBM processes with expected annual returns of  20% and annualized volatility of 10%. (If you speak Sharpe Ratios, I’m simulating a strategy within known Sharpe 2 characteristics.) I plotted the …

Read more

How do I know if I have an edge?

I’ve been helping a family friend with his trading. I’ve given him a simple systematic strategy to trade by hand. First, we set expectations We can plot the distribution of historic trade returns from past trading or a backtest as a histogram.   This is useful because it gives us a hint as to what …

Read more

Three types of systematic strategy that “work”

Broadly, there are three types of systematic trading strategy that can “work.” In order of increasing turnover they are: Risk premia harvesting Economically-sensible, statistically-quantifiable slow-converging inefficiencies Trading fast-converging supply/demand imbalances This post provides an overview of each. 1. Risk Premia Harvesting Risk Premia Harvesting is typically the domain of wealth management, but it’s important to …

Read more

Exporting Zorro Data to CSV

Earlier versions of Zorro used to ship with a script for converting market data in Zorro binary format to CSV. That script seems to have disappeared with the recent versions of Zorro, so I thought I’d post it here. When you run this script by selecting it and pressing [Test] on the Zorro interface, you …

Read more

Evolving Thoughts on Data Mining

Several years ago, I wrote about some experimentation I’d done with data mining for predictive features from financial data. The article has had several tens of thousands of views and nearly 100 comments. I think the popularity of the article lay in its demonstration of various tools and modeling frameworks for doing data mining in R …

Read more