Giter Site home page Giter Site logo

trade-application-hx's Introduction

trade-application-hx

Trade Application / Dashboard in C#

Download Demo.zip and run TradeApplication.exe for a compiled executable or check SolutionDir/bin/Release/ for the release build.

gif demo

trade-application-hx is created to showcase desktop development rather than quantitative modeling - the analytics in this project is very basic. The project is currently in alpha and many areas can be further polished.

 

general_info

trade-application-hx is developed with .NET.Framework V4.0.30319 using OxyPlot as the WPF charting library.

The application takes a trade_data.csv in the Data\ directory relative to the executable root as DataFeedSimulator source. A sample zipped csv file of real trading data is provided. The prices are uniformly altered and the prints are in the format [date, time, type, price, volume]

Using the data feed, the application will asynchronously new print events and create the follwing:

  • OHLC - standard Open-High-Low-Close timeseries data for Traded prints only

  • Volume - aggregate Bid1, Ask1, Traded volume.

  • Quotes - Price and Volume on the current / last Bid, Ask, Traded prints

  • VWAP - Volume Weighted Average Price in given timeframe (in minutes)

  • BATV Dist - Bid1, Ask1, Traded volume distribution for a given price in x timeframe, updated every y minutes, value in z interval2

  • PriceRange Dist - price range distribution in x timeframe, updated every y minutes, value in z interval2

  • Total Volume Dist - total Traded volume distribution in x timeframe, updated every y minutes, value in z interval

 

1 volume on the Bid and Ask prints are updates to the volume, so the sum is not very meanful and used for demo purposes

2 eg. 60 minute timeframe updated everyminute, 0.01 value interval for price, 100 value interval for volume

Note: all time in minutes, data classes can handle non traditional time parameters like 17 mins.

 

performance

Trade Application is developed with performance in mind. Without the graphical user interface1, the program processes 4 million+ prints in the sample data file in around 20 seconds. Once the graphical user interface is added, the simulation will take hours. Depending on Thread.Sleep settings in SolutionDir\DataSimulator.cs method SimulationMethod, the display source buttons may be less responsive. To address this the user interface can be change to only update on Traded prints or other filtering methods.

 

1 To do so in GUI, click PauseSim, enter 5000000 click Forward, or in code comment out line

DBuilder.DataUpdate += MWindow.VM.HandleDataUpdate; in SolutionDir\App.xaml.cs

Thread.Sleep(1); in SolutionDir\DataFeedSimulator.cs

 

task_list

future improvements for this project, in no particular order:

  • add test cases
  • improve documentation and comments
  • unify chart viewmodels to inherit from common parent class, common parameter data source
  • add simulation control methods and user interface
    • start, stop, pause, continue simulation
    • run x prints in background
    • start simulation at x prints
  • add functionality to allow user defined inputs, layout
  • multi-panelled user interface
  • add more variable checks

 

change_log

  • 2016-07-25: Added more documentation and comments
  • 2016-07-26: Added simulation control, pause, continue, forward. Note: default DataFeedSimulator Thread.Sleep() is now set to 10 to improve GUI responsiveness to mouse clicks. Simulation with GUI with take longer to run.

trade-application-hx's People

Contributors

portfolio-optimization-hx 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.