Giter Club home page Giter Club logo

aidanabekboeva / tick-level-trade-analysis-and-trade-direction-classification Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 299 KB

In this completed project, tick-level trading data was analyzed using R programming using the dataset, "sampleTQdata.RData". This project offers a practical understanding of working with tick-level trading data and applying diverse methods to ascertain trade direction, encompassing tick tests and the Lee-Ready rule

R 100.00%

tick-level-trade-analysis-and-trade-direction-classification's Introduction

Tick-Level-Trade-Analysis-and-Trade-Direction-Classification

In this completed project, tick-level trading data was analyzed using R programming. The provided dataset, "sampleTQdata.RData," containing trading data for a single day from 09:30 am to 4:00 pm, was used to accomplish the following:

  1. The dataset was loaded and explored, leading to the following outcomes:

i) The total number of trades in the dataset was determined.

ii) Trade prices (pt), best-bid (bt), and best-ask (at) prices were plotted for the entire dataset.

iii) Similar plots were generated for trades with counts falling within the range of 100 to 200.

  1. The number of trades within the spread (pt โˆˆ (bt, at)) and at the touch (pt = bt or pt = at) were counted separately. The sum of these counts was compared to the total trade count from task 1.i to validate the accuracy.

  2. Two methods were used to determine the "trade direction" (dt) of each trade (buy or sell):

i) Tick test: Utilizing trade prices (pt) only to identify upticks, downticks, and zero-upticks/downticks.

ii) Lee-Ready rule: Incorporating both trade prices (pt) and quotes (at, bt), and comparing them to the mid-price (mt).

The implementation of the Lee-Ready rule was verified against the provided "getTradeDirection" function. Furthermore, the results obtained from both methods for determining trade direction were compared, and the fraction of trades classified identically under both tests was calculated.

This project offers a practical understanding of working with tick-level trading data and applying diverse methods to ascertain trade direction, encompassing tick tests and the Lee-Ready rule.

tick-level-trade-analysis-and-trade-direction-classification's People

Contributors

aidanabekboeva avatar

Stargazers

Min Kim avatar

Watchers

 avatar

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.