Publications by The R Trader

Using Genetic Algorithms in Quantitative Trading

14.03.2014

The question one should always asked him/herself when using technical indicators is what would be an objective criteria to select indicators parameters (e.g., why using a 14 days RSI rather than 15 or 20 days?). Genetic algorithms (GA) are well suited tools to answer that question. In this post I’ll show you how to set up the problem in R. Bef...

6049 sym 1 tbl

Date formating in R

18.04.2014

As I often manipulate time series from different sources, I rarely come across the same date format twice. Having to reformat the dates every time is a real waste of time because I never remember the syntax of the as.Date function. I put below a few examples that turn strings into standard R date format. Besides the usual transformations, two tri...

1437 sym R (842 sym/1 pcs)

A Simple Shiny App for Monitoring Trading Strategies

25.06.2014

In a previous post I showed how to use  R, Knitr and LaTeX to build a template strategy report. This post goes a step further by making  the analysis  interactive. Besides the interactivity, the Shiny App also solves two problems : I can now access all my trading strategies from a single point regardless of the instrument traded. Coupled w...

1600 sym 4 img

A Simple Shiny App for Monitoring Trading Strategies – Part II

07.08.2014

This is a follow up on my previous post “A Simple Shiny App for Monitoring Trading Strategies“.  I added a few improvements that make the app a bit better (at least for me!). Below is the list of new features : A sample  .csv file (the one that contains the raw data) A “EndDate”  drop down box allowing to specify the end of the period...

3272 sym

Installing R/RStudio on Ubuntu 14.04

21.09.2014

My last experience with Linux was back in 2002/2003. At that time pretty much everything on Linux was done in the console. I remmember struggling for days with a simple Wifi connection because drivers were not readily available. Things have changed dramatically since then. Last week I installed Linux (Ubuntu 14.04)  on an old Windows laptop. It...

2901 sym R (83 sym/2 pcs)

Risk as a “Survival Variable”

08.12.2014

I come across a lot of strategies on the blogosphere some are interesting some are a complete waste of time but most share a common feature: people developing those strategies do their homework in term of analyzing the return but much less attention is paid to the risk side its random nature. I’ve seen comment like “a 25% drawdown in 2011 b...

3230 sym 2 img

Factor Evaluation in Quantitative Portfolio Management

23.03.2015

When it comes to managing a portfolio of stocks versus a benchmark the problem is very different from defining an absolute return strategy. In the former one has to hold more stocks than in the later where no stocks at all can be held  if there is not good enough opportunity.  The reason for that is the tracking error. This is defined as t...

6682 sym R (2430 sym/3 pcs) 10 img

R financial time series tips everyone should know about

07.07.2015

There are many R time series tutorials floating around on the web this post is not designed to be one of them. Instead I want to introduce a list of the most useful tricks I came across when dealing with financial time series in R. Some of the functions presented here are incredibly powerful but unfortunately buried in the documentation hence...

3022 sym R (773 sym/6 pcs)

The Rise of the Robots (Advisors…)

15.08.2015

The Asset Management industry is on the verge of a major change. Over the last couple of years Robots Advisors (RA) have emerged as new players. The term itself is hard to define as it encompasses a large variety of services. Some are designed to help traditional advisers to better allocate their clients money and some are real “black box”....

3739 sym R (1654 sym/1 pcs) 4 img

Maintaining a database of price files in R

13.12.2015

Doing quantitative research implies a lot of data crunching and one needs clean and reliable data to achieve this. What is really needed is clean data that is easily accessible (even without an internet connection). The most efficient way to do this for me has been to maintain a set of csv files. Obviously this process can be handled in many ways...

3050 sym R (2230 sym/4 pcs) 2 img