Using random forest to model limit order book dynamic
The R Trader
by The R Trader
4y ago
In this article I use the random forest algorithm to forecast mid price dynamic over short time horizon i.e. a few seconds ahead. This is of particular interest to market makers to skew their bid/ask spread in the direction of the most favorable outcome. Most if not all the literature on the topic (see references below) focuses on applying straight out of the box algorithm to create forecast at any point in time. The problem in a real life environment is different. A market maker can provide a standard bid/ask spread most of the time and only when she/he has a statistical hedge she/he can skew ..read more
Visit website
Speeding up your Python code
The R Trader
by The R Trader
4y ago
I know this topic is addressed on a very regular basis on the web but I’m pretty sure sharing my experience will help some finance people. I’m currently working on Limit Order Book modeling. This means dealing with fairly big data sets. I have around 1 million observations per stock and per day. So modeling the behavior of the order book just over 10 days is already a decent big data exercise. This has a significant impact on how to write the code, the type of objects to use and more generally how to approach the problem. All tests in this post have been ran on my laptop: an ASUS Zenbook with ..read more
Visit website
Limit Order Book: Converting LOBSTER demo R code into Python
The R Trader
by The R Trader
4y ago
It has been more than a year since my last post, I’ve been super busy with consulting assignments working on algorithmic/electronic trading. The workload is still heavy but I managed to find a few hours to write this post as I came across a new great tool: LOBSTER (and before anyone asks I’ve no link whatsoever with the company) LOBSTER stands for: Limit Order Book System – The Efficient Reconstructor. This is an online limit order book data tool to provide easy-to-use, high-quality limit order book data. Since 2013 LOBSTER acts as a data provider for the academic community, giving access to r ..read more
Visit website
Machine Learning Modeling in R : : Cheat Sheet
The R Trader
by The R Trader
4y ago
I came across this excellent article lately “Machine learning at central banks” which I decided to use as a basis for a new cheat sheet called Machine Learning Modelling in R. The cheat sheet can be downloaded from RStudio cheat sheets repository. As the R ecosystem is now far too rich to present all available packages and functions, this cheat sheet is by no means exhaustive . It’s rather a guide to what I consider being the most useful tools available in R for modelling.  It also contains a standard modelling workflow which represents my view on how to app ..read more
Visit website
Visualizing Time Series Data in R
The R Trader
by The R Trader
4y ago
I’m very pleased to announce my DataCamp course on Visualizing Time Series Data in R. This course is also part of the  Time Series with R skills track. Feel free to have a look, the first chapter is free! Course Description As the saying goes, “A chart is worth a thousand words”. This is why visualization is the most used and powerful way to get a better understanding of your data. After this course you will have a very good overview of R time series visualization capabilities and you will be able to better decide which model to choose for subsequent analysis. You will be able to al ..read more
Visit website
Linking R to IQFeed with the QuantTools package
The R Trader
by The R Trader
4y ago
IQFeed provides streaming data services and trading solutions that cover the Agricultural, Energy and Financial marketplace. It is a well known and recognized data feed provider geared toward retail users and small institutions. The subscription price starts at around $80/month. Stanislav Kovalevsky has developed a package called QuantTools. It is an all in one package designed to enhance quantitative trading modelling. It allows to download and organize historical market data from multiple sources like Yahoo, Google, Finam, MOEX and IQFeed. The feature that interests me th ..read more
Visit website
BERT: a newcomer in the R Excel connection
The R Trader
by The R Trader
4y ago
A few months ago a reader point me out this new way of connecting R and Excel. I don’t know for how long this has been around, but I never came across it and I’ve never seen any blog post or article about it. So I decided to write a post as the tool is really worth it and before anyone asks, I’m not related to the company in any way. BERT stands for Basic Excel R Toolkit. It’s free (licensed under the GPL v2)  and it has been developed by Structured Data LLC. At the time of writing the current version of BERT is 1.07. More information can be found here. From a more technica ..read more
Visit website
Trading strategy: Making the most of the out of sample data
The R Trader
by The R Trader
4y ago
When testing trading strategies a common approach is to divide the initial data set into in sample data: the part of the data designed to calibrate the model and out of sample data: the part of the data used to validate the calibration and ensure that the performance created in sample will be reflected in the real world. As a rule of thumb around 70% of the initial data can be used for calibration (i.e. in sample) and 30% for validation (i.e. out of sample). Then a comparison of the in and out of sample data help to decide whether the model is robust enough. This post aims at going a ..read more
Visit website
Introducing fidlr: FInancial Data LoadeR
The R Trader
by The R Trader
4y ago
fidlr is an RStudio addin designed to simplify the financial data downloading process from various providers. This initial version is a wrapper around the getSymbols function in the quantmod package and only Yahoo, Google, FRED and Oanda are supported. I will probably add functionalities over time. As usual with those things just a kind reminder: “THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND…” How to install and use fidlr? You can get the addin/package from its Github repository here (I will register it on CRAN later on) Install the addin. There is an excellen ..read more
Visit website

Follow The R Trader on FeedSpot

Continue with Google
Continue with Apple
OR