Coder Social home page Coder Social logo

finx's Introduction

Market Data Gathering, Analysis and Trading application.

Dependencies: R, Ruby

Load:
- Scripts for gathering market data from the web

r:
- Scripts for analysis and trading simulation

Setup:
- Set the FINX_HOME env variable to the home directory
  of your FinX environment 
  (i.e. export FINX_HOME=/home/joe_schmoe/FinX)

- cd to the load directory

- Retrieve stock data from the web

-- Run ./scripts/stock_set_update.sh
   This loads the set of stocks (without their data)

-- Run ./scripts/stock_detail_update.sh tick-cap
   This gets the detail data for each stock of interest
   (currently only the dividend rate)

-- Run ./scripts/stock_history_update.sh tick-cap
   This gets daily trade data going back to 2000 for all
   stocks in the set retrieved earlier.

- Load R environment with stock data

-- Run R (from the load directory)

-- execute load-tdt.R via:  load('../source/load-tdt.R')
   This loads the ticker history into one large dataframe,
   and adds some calculated columns to it.

-- Use buy-sell.R as template for selecting sets of tick/day
   combinations to buy or sell and store them in dataframes.

-- Use functions in backtest.R to simulate trading those
   tick/day combinations.  Pass the dataframes from prior step
   into bt.sim to simulate trading those positions over the
   history of market data.  Check bt.pool and bt.ledger for
   results.  

-- Plot, iterate and analyze as necessary

TODO:
- Simulate shorts & test
- Elaborate & Refine functionality (i.e. Run nightly & emit buys/sells)
- Run nightly on home Linux machine (add RAM)
- Formalize abstraction into DDL
- Create market index to relate other data to.  
  - Retrieve outstanding shares data
  - Pull in ticker level data to R data frame
  - Calculate total value of all shares (sum(tdt$cls * tick$shares))
    per day, then chg variable for this index
- Add varying trend durations and analyze which work best 
  over different periods (and try to categorize those periods 
  based on market index)
- Add clustering of ticks based on trend information.  Include
  aggregate cluster information into analysis (i.e. if this 
  stock belongs to a LARGE cluster, then favor it over one in
  a small cluster).  
- Rather than a random sample of those stocks selected via a signal,
  order them by how closely they match the signal.

finx's People

Contributors

chrisnatali avatar

Stargazers

Christian Portocarrero avatar  avatar  avatar

Watchers

James Cloos 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.