Giter VIP home page Giter VIP logo

tradereader's Introduction

Trade Reader

Program allows reading and joining data coming from CSV files of trade.csv, refdata.csv and valuations.csv into one output set.

Refdata and Trade are joined by column Inventory Trade and Valuation are joined by column TradeId

The output will be based on the Trade file. If no valuation or refdata for a given trade, then leave the "refdata" and "valuation" fields BLANK

Usage

Help

java -jar tradereader.jar --help

Use bundled CSV files (Trade, RefData and Valuation) from jar to get output into console

java -jar tradereader.jar --bundled_csv

or

java -jar tradereader.jar --bundled_csv --output console

Use bundled CSV files (Trade, RefData and Valuation) from jar to get output into CSV named output.csv

java -jar tradereader.jar --bundled_csv --output csv

Provide external CSV files (Trade, RefData and Valuation) to get output into console

java -jar tradereader.jar -t path\to\trade.csv -r path\to\refdata.csv -v path\to\valuation.csv

or

java -jar tradereader.jar -t path\to\trade.csv -r path\to\refdata.csv -v path\to\valuation.csv --output console

Provide external CSV files (Trade, RefData and Valuation) to get output into CSV named output.csv

java -jar tradereader.jar -t path\to\trade.csv -r path\to\refdata.csv -v path\to\valuation.csv

or

java -jar tradereader.jar -t path\to\trade.csv -r path\to\refdata.csv -v path\to\valuation.csv --output csv

Input

Columns of Trade.csv

Inventory,Book,System,LegalEntity,TradeId,Version,TradeStatus,ProductType,Resetting Leg,ProductSubType,TDSProductType,SecCodeSubType,SwapType,Description,TradeDate,StartDate,MaturityDate

Columns of RefData.csv

topOfHouse,segment,viceChair,globalBusiness,Policy,desk,portfolio,BU,CLINE,Inventory

Columns of Valuation.csv

TradeId,UQL_OC_MMB_MS,UQL_OC_MMB_MS_PC

Output

Available output :

  • Console by using command line option --output console
  • CSV by using command line option --output csv

Output columns:

topOfHouse,segment,viceChair,globalBusiness,Policy,desk,portfolio,BU,CLINE,Inventory,Book,System, LegalEntity,TradeId,Version,TradeStatus,ProductType,Resetting Leg,ProductSubType,TDSProductType,
SecCodeSubType,SwapType,Description,TradeDate,StartDate,MaturityDate,
UQL_OC_MMB_MS, UQL_OC_MMB_MS_PC, MS-PC, BreakStatus,Term

Calculated columns:

MS-PC = the difference between column UQL_OC_MMB_MS and UQL_OC_MMB_MS_PC

BreakStatus = the difference in Absolute (MS-PC) as following buckets:
0-99
100-999
1000-9999
10000-99999
100000+

Term = Column MaturityDate - Today. If MaturityDate (MaturityDate < Today) is blank or already matured, set it as blank
0m-1m
1m-6m
6m-1yr
1yr-10yr
10yr-30yr
30yr-50yr
50yr+

Misc

Getting output into console does scale better by using IntelliJ/Eclipse comparing to standard Shell

Prerequisite

JDK 11

Libraries

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.