Skip to content

This project is a replication of the paper Alpha on Trend-Following Beta: a case study of the SocGen Trend Index by Jungle Rock Research

License

Notifications You must be signed in to change notification settings

integerQuant/trend-following-beta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Replicating Jungle Rock Research Trend-Following Model

This project is a replication of the paper:
Alpha on Trend-Following Beta: a case study of the SocGen Trend Index
Jungle Rock Research
(Access available upon creation of a free account on the portal)

Disclaimer & Considerations
The objective of this project is to replicate, to a certain degree, the processes and results of the original paper. This is not intended to be a one-to-one replication; while many of the results and methodologies are comparable, some simplifications and modifications have been made.

A key aspect of this project is the data used. For this replication, Bloomberg's 1st genetic futures px last data point has been used to compute universe returns and derived metrics. In real-life trading, running futures prices along with rolling costs and other practical considerations would be used (Thanks, Frank).

Note: One key exception in this replication is that the equal-weight final portfolio is not split into 10 equal parts with daily rebalancing to avoid rebalancing timing luck.


Table of Contents


Overview

This project replicates the trend-following model described in Jungle Rock Research’s paper. It guides you through the process of fetching data, computing universe returns, and constructing derived metrics that are central to the trend-following strategy. Although the replication process follows almost all steps outlined in the paper, there are some deviations.


Data Requirements

To obtain the results shown in this project, you will need to fetch Bloomberg’s px last data for a set of assets. The recommended process is as follows:

  1. Data Fetching

    • Use Bloomberg’s Spreadsheet VBuilder (or a similar tool) to fetch the px last data points for the assets listed below.
    • Ensure that the data has a date index with asset symbols as columns and the corresponding px last values as the data points.
  2. Asset List

    [
      {
        "symbol": "ES1",
        "exchange": "CME_MINI",
        "name": "E-mini S&P 500",
        "description": "S&P 500 futures",
        "class": "eqty"
      }, 
      {
        "symbol": "SB1",
        "exchange": "ICEUS",
        "name": "Sugar No. 11",
        "description": "Global sugar futures",
        "class": "cmdty"
      },
      {
        "symbol": "HG1",
        "exchange": "COMEX",
        "name": "High-Grade Copper",
        "description": "Copper futures",
        "class": "cmdty"
      },
      {
        "symbol": "GC1",
        "exchange": "COMEX",
        "name": "Gold",
        "description": "Gold futures",
        "class": "cmdty"
      },
      {
        "symbol": "C 1",
        "exchange": "CBOT",
        "name": "Corn",
        "description": "Corn futures",
        "class": "cmdty"
      },
      {
        "symbol": "CL1",
        "exchange": "NYMEX",
        "name": "Crude Oil",
        "description": "Light sweet crude oil futures",
        "class": "energy"
      },
      {
        "symbol": "TY1",
        "exchange": "CBOT",
        "name": "10-Year T-Note",
        "description": "10-year U.S. Treasury Note futures",
        "class": "fi"
      },
      {
        "symbol": "BP1",
        "exchange": "CME",
        "name": "British Pound",
        "description": "British Pound futures",
        "class": "fx"
      },
      {
        "symbol": "EC1",
        "exchange": "CME",
        "name": "Euro",
        "description": "Euro currency futures",
        "class": "fx"
      },
      {
        "symbol": "JY1",
        "exchange": "CME",
        "name": "Japanese Yen",
        "description": "Japanese Yen futures",
        "class": "fx"
      }
    ]
  3. Data Storage

    • Save the fetched data as data/prices.feather file with a date column, where other columns corresponds to assets symbols and contains the px last values.

Installation

Environment Setup

It is recommended to create a new Python virtual environment using conda or a similar environment management tool.

Using conda:

conda create -n trend_following python=3.9 conda activate trend_following conda install install numpy pandas scipy numba tqdm scikit-learn matplotlib requests


Usage

Prepare the Data

Follow the steps in the Data Requirements section to fetch and store the required data.

Run the Notebook

Open the Jupyter Notebook and execute the cells sequentially:

About

This project is a replication of the paper Alpha on Trend-Following Beta: a case study of the SocGen Trend Index by Jungle Rock Research

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published