Skip to content

janv93/large-trading-api

Repository files navigation

Large Trading API

This API allows to backtest any custom trading algorithm on symbols like cryptos, stocks, etfs, forex.
A backtest is a test of an algorithm on historical data.
The code provides an infrastructure for backtesting. You may then add your own custom algorithms. Have fun!

Frontend: Trading Chart Visualizer

Status:

Done:

  • Fetch stock, index and crypto candlestick data
  • Caching candlesticks in data base
  • Indicators
  • Algorithms setting position signals on past data
  • Sentiment analysis of popular Twitter traders using Twitter API and OpenAI API
  • Backtesting multiple tickers at once
  • Comparing algorithm profit curves
  • Charting tools, e.g. backtests that test trend lines

Todo:

  • AI: Transformer as improvement to standard NNs (position encoding time steps)
  • Algorithm that builds strategies using multiple indicators and figuring out which combined indicators work the best

How to use backtests:

  1. Add credentials file (.env) to call APIs (most importantly binance or alpaca for ticker retrieval)
  2. Add or use existing backtests in src/controllers/algorithms/backtests
  3. When adding new backtest, add settings for backtest to frontend code
  4. npm i, npm start
  5. Start the Frontend

Requirements:

  • node
  • install or use mongodb web version
  • get api keys and secret of one of 3 exchanges: binance, kucoin, alpaca (recommended binance+alpaca for all tickers)

Notes/Learnings:

  • Tensorflow code commented out because of software requirements
  • Tried C++ NAPI addons for calculations (backtest) - Much slower than typescript because of serialization
  • Tried worker threads - Much slower because of serialization between main thread and worker

About

API for backtesting and trading automation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published