Course Name: Futures Trading: Concepts & Strategies, Section No: 23, Unit No: 5, Unit type: Notebook
In this notebook the authors already upload strategy returns for the three proposed strategies and show the code to rebalance the portfolio and evaluate performance
but does anyone know exactly:
where did the returns uploaded as the returns for each strategy come from (where is this code)? which financial instruments were used for trading?
Hello Pavel,
The strategy data for the three strategies were created using the most liquid commodities at the time of backtest. Here are the tickers of the same:['CL','HO','XB','NG','GC','LE','CN','SY','WC','SB', 'HG', 'CT', 'KC'].
To check the code for strategies core_trend and counter_trend, you can refer to these notebooks (core_trend, counter_trend). However, it should be noted that the notebooks given as references were backtested on a single commodity(PA-Palladium). This must be extended to the above commodities list to generate the strategy returns used as input for the notebook in Section No: 23, Unit No: 5.
The term_structure strategy returns data used as input to the notebook in Section No: 23, Unit No: 5 was generated from a program built using zipline API and which requires an active subscription with Norgate Data. (ref: link).
Reference Code: term_structure
The attached code was run on Quantopian which is no longer active. The code needs a few changes (like using Zipline reloaded and updated methods) and a data subscription to run in any python IDE like PyCharm, Jupyter Notebook etc.
You can use the strategy data available data_modules folder of the course zip file to continue your learning of Section 23, unit 5.
I hope this helps!
Hi Varun, is it possible to confirm is SY the GBP/JPY futures contract and what futures contract does WC refer to?
Hello Pavel,
The list of tickers i.e. ['CL','HO','XB','NG','GC','LE','CN','SY','WC','SB', 'HG', 'CT', 'KC'] belongs to commodities.
Here are the full names of the commodities corresponding to the tickers.
- CL: Crude Oil (WTI) Futures
- HO: Heating Oil Futures
- XB: Natural Gas (Henry Hub) Futures
- NG: Natural Gas Futures
- GC: Gold Futures
- LE: Live Cattle Futures
- CN: Corn Futures
- SY: Soybean Futures
- WC: Wheat Futures
- SB: Sugar No. 11 Futures
- HG: Copper Futures
- CT: Cotton No. 2 Futures
- KC: Coffee C Futures
I hope this helps!
Hello Pavel,
The list of tickers i.e. ['CL','HO','XB','NG','GC','LE','CN','SY','WC','SB', 'HG', 'CT', 'KC'] belongs to commodities.
Here are the full names of the commodities corresponding to the tickers.
- CL: Crude Oil (WTI) Futures
- HO: Heating Oil Futures
- XB: Natural Gas (Henry Hub) Futures
- NG: Natural Gas Futures
- GC: Gold Futures
- LE: Live Cattle Futures
- CN: Corn Futures
- SY: Soybean Futures
- WC: Wheat Futures
- SB: Sugar No. 11 Futures
- HG: Copper Futures
- CT: Cotton No. 2 Futures
- KC: Coffee C Futures
I hope this helps!