Giter Club home page Giter Club logo

opinion-based-pair-trading-strategy's Introduction

PairTrading

This repository releases the code for Hedging via Opinion-based Pair Trading Strategy.

Ting-Wei Hsu, Chung-Chi Chen, Hen-Hsen Huang, Meng Chang Chen, and Hsin-Hsi Chen. 2020. Hedging via Opinion-based Pair Trading Strategy. In Companion Proceedings of the Web Conference .

Risk is an important component when constructing a trading strategy. However, most of the previous works that make the market movement prediction on the basis of the opinions on social media platforms do not take the risk into consideration. In order to hedge the market- and sector-risk, we propose an idea of an opinion-based pair trading strategy. Comparing with the task setting of the previous works, our experimental results show that the neural network models with the pair-wise task setting perform better in both accuracy and profitability metrics. That introduces a new research direction for future researches on market movement predictions.

In this paper, we experiment on the benchmark dataset, StockNet, which is collected from Twitter.

Code

  1. GenData.py: Separate the dataset into the training set, validation set, and test set for each sector.

  2. Train the models via NN-PW/train.py (NN-IND/train.py) for pair trading setting (price movement prediction setting).

  3. test.py provides the predictions of test data.

  4. Use result.py to evaluate the results.

opinion-based-pair-trading-strategy's People

Contributors

quanthsu avatar tengweihsu avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

tengweihsu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.