System Trade Beginning with Python 3: Hedge Funds and CTA

Get ideas for Systre from hedge funds. CTA is a hedge fund that deals with futures. Generally speaking, hedge funds are more flexible.

Hedge fund (CTA)

--CTA (Commodity trading advisor) is a financial administrative term for individuals or organizations that provide investment advice and services for trading financial futures, options and swaps to individuals or funds.

--Trade in managed futures accounts.

――The term CTA also applies to investment trusts, hedge funds including ETFs, and investment advice for private funds.

--CTAs are regulated by the US Federal Government and are required to be registered with the Commodity Futures Trading Commission (CFTC) and to be a member of the National Futures Association (NFA).

The characteristics of such a CTA are

• One of the most transparent modes of operation • Trade directly on the customer's account • Customers can keep track of operational leverage at any time • You can check for yourself whether the operation method, such as how to take a position, is the same as the published one. • Customers can directly check transaction costs, trading spreads, etc. • You can compare the published investment yield with the investment yield of your own account • High liquidity to invest in listed futures and options markets • Problems / Advantages • Small margin (cash, eligible bonds)

History of CTA

The history of futures trading in the United States dates back to the 1850s. • First federal regulation in the 1920s. • 1922 Grain Futures Act • 1936 Commodity Exchange Act • In 1974, the Commodity Futures Trading Commission (CFTC) was established, and CTA was recognized for the first time as a regulated object.

In the early stages, CTA was regulated only in the commodity market. Since then, the scope of transactions has expanded dramatically due to the spread of derivatives including financial products. In July 2010, the definition of CTA under the Commodity Exchange Act was extended to include swap transactions by the Dodd-Frank Wall Street Reform and Consumer Protection Act.

Overview of CTA activities

CTA works as an asset manager by making full use of investment strategy.

• Investment targets: Financial derivatives such as agricultural products, forest products, metals, energy futures, options, stock indexes, bonds and currencies • Market Strategy: Market-class segment strategies of trend-following, market-neutral, financial, agricultural and currency • Investment style: technical, fundamental, weighing strategy

The strategy to adopt is

• Technical trader: Invest according to chart patterns and price trends by technical analysis. In some cases, the execution of trades is automated. The source of profit is the ups and downs of the market. • Fundamental Trader: Analyze supply and demand to forecast prices. Analyze patterns such as weather, crop yield, and amount of oil drilling. • Weighing Trader: Predict price patterns using statistics and metric analysis. are categorized.

How to get information about CTA

• Data vendor • Berclay Hedge (https://www.barclayhedge.com/) • Credit Suisse Hedge Fund Index (https://lab.credit-suisse.com/#/en/home) • IASG(https://www.iasg.com/en-us/) • Official document (available from IASG) • Advisory Agreement • Due Dilignece Disclosure Documents

image.png

IASG CTA Trading Strategy Classification

• Trend following • Moving average, etc. • Momentum • Price change rate, etc. • Counter trends • Technical indicators • Fundamental (modeling the relationship of receipt (collecting information by telephone etc.)

Let's look at how long such a CTA survives from IASG data.

image.png

image.png

The most interesting survival rate is

image.png

Even those who have survived various aspects will go bankrupt. However, not all those who close the fund are due to operational failures. Sometimes it's called retirement, and sometimes it's because I got another job. In addition, there may be a problem on the side that outsourced the operation. The important thing is to learn from historical data.

Hedge funds perform better than CTA

I wonder why? You can see how the financial market works.

image.png

Candidates for possible reasons

• Are hedge fund managers highly educated? • Can hedge funds invest in real assets? • Can you earn interest income? • Can I trade other than exchange trading?

Another type of reason

• The stock and futures markets are fairly efficient, so it is quite difficult to make a profit from short-term trading. Therefore, it is difficult to make a profit without trends • Over-the-counter market: Probably less efficient than the listed market. Therefore, it can be a source of revenue for hedge funds. So maybe the source of revenue is credit risk, or counterparty risk. This suggests that leveraged trading in the market is likely to be a prey. Moreover, it is treated as model risk and misprice risk and is not seriously discussed.

Investing Basics: Prices are not predictable, they are made

Therefore, in order to make an investment, it is necessary to return to the basics and take a stance of making rather than predicting prices. Academically, prices are supposed to be efficient and fair, but prices are not the only thing that the whole world can't say. So it doesn't make sense to try to predict what you can't predict. This is also a fact that has been handed down.

image.png

Reference: Unit root wiki

Download CTA data

You can download the return data by registering as a user on the IASG homepage. Select Chesapeak Capital from the MANAGED FUTURES tag and select the Diversifid program. Chesapeak is [Turtles](https://www.amazon.co.jp/%E4%BC%9D%E8%AA%AC%E3%81%AE%E3%83%88%E3%83%AC%E3 % 83% BC% E3% 83% 80% E3% 83% BC% E9% 9B% 86% E5% 9B% A3-% E3% 82% BF% E3% 83% BC% E3% 83% 88% E3% 83% AB% E6% B5% 81% E6% 8A% 95% E8% B3% 87% E3% 81% AE% E9% AD% 94% E8% A1% 93-% E3% 82% AB% E3% 83 % BC% E3% 83% 86% E3% 82% A3% E3% 82% B9% E3% 83% BB% E3% 83% 95% E3% 82% A7% E3% 82% A4% E3% 82% B9 / dp / 4198624267 / ref = sr_1_3__mk_ja_JP =% E3% 82% AB% E3% 82% BF% E3% 82% AB% E3% 83% 8A & keywords =% E3% 82% BF% E3% 83% BC% E3% 83 % 88% E3% 83% AB% E3% 82% BA% E3% 81% AE% E7% A7% 98% E5% AF% 86 & qid = 1573459647 & sr = 8-3) A fund run by a famous person.

image.png

The following screen will appear

image.png Click Export Data to download the csv file to the download file folder.

%matplotlib inline
import matplotlib.pyplot as plt
import pandas as pd
tsd=pd.read_csv('Chesapeake-Capital-Diversified-LV-_data.csv')
tsd.head()

The details of the download file are as follows.

Year	Month	Return	Assets
0	1988	2	-2.63	1947370
1	1988	3	-6.89	2091770
2	1988	4	-10.71	248776
3	1988	5	6.93	266024
4	1988	6	32.42	1837050

Visualize. Return is a percentage, so divide by 100 and the cumulative return is calculated using the cumulative multiplication.

(tsd.iloc[:,2]/100+1).cumprod().plot()

image.png

References

"System trade starting with Python 3" (Pan Rolling)

Recommended Posts

System Trade Beginning with Python 3: Hedge Funds and CTA
"System trade starting with Python3" reading memo
System trading starting with Python 3: Investment and risk
Programming with Python and Tkinter
Encryption and decryption with Python
Python and hardware-Using RS232C with Python-
python with pyenv and venv
Beginning with Python machine learning
Presentation Support System with Python3
Works with Python and R
System trade starting with Python3: Get the latest program code
Communicate with FX-5204PS with Python and PyUSB
Robot running with Arduino and python
Install Python 2.7.9 and Python 3.4.x with pip.
Neural network with OpenCV 3 and Python 3
AM modulation and demodulation with python
[Python] font family and font with matplotlib
Scraping with Node, Ruby and Python
Scraping with Python, Selenium and Chromedriver
JSON encoding and decoding with python
Hadoop introduction and MapReduce with Python
[GUI with Python] PyQt5-Drag and drop-
Make a recommender system with python
Reading and writing NetCDF with Python
I played with PyQt5 and Python3
Coexistence of Python2 and 3 with CircleCI (1.0)
Easy modeling with Blender and Python
Sugoroku game and addition game with python
FM modulation and demodulation with Python
System trading starting with Python3: long-term investment
Data pipeline construction with Python and Luigi
Calculate and display standard weight with python
FM modulation and demodulation with Python Part 3
[Automation] Manipulate mouse and keyboard with Python
Passwordless authentication with RDS and IAM (Python)
Python installation and package management with pip
Using Python and MeCab with Azure Databricks
POST variously with Python and receive with Flask
Capturing images with Pupil, python and OpenCV
Fractal to make and play with Python
A memo with Python2.7 and Python3 on CentOS
CentOS 6.4 with Python 2.7.3 with Apache with mod_wsgi and Django
Dealing with "years and months" in Python
I installed and used Numba with Python3.5
Tweet analysis with Python, Mecab and CaboCha
Linking python and JavaScript with jupyter notebook
Traffic monitoring with Kibana, ElasticSearch and Python
FM modulation and demodulation with Python Part 2
Easily download mp3 / mp4 with python and youtube-dl!
Operate home appliances with Python and IRKit
Clean python environment with pythonz and virtualenv
Practice web scraping with Python and Selenium
Easy web scraping with Python and Ruby
Importing and exporting GeoTiff images with Python
I'm using tox and Python 3.3 with Travis-CI
Happy GUI construction with electron and python
Use Python and MeCab with Azure Functions
Touch AWS with Serverless Framework and Python
RaspberryPi L Chika with Python and C #
Create a simple reception system with the Python serverless framework Chalice and Twilio
Creating a temperature control system with Raspberry Pi and ESP32 (3) Recipient Python file