Skip to content

ifquant/kronos

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kronos

Fast and versatile backtest framework to test your quantitative strategies. Here is a list of some of the features:

  • Fast (less than 3 seconds to backtest 1 year of data with a tick of 1 second)
  • Easy to use, send a simple POST request to start your backtest
  • Can be used with a variety of assets (Stocks, Crypto, ...)
  • Place market orders, limit orders and stop orders
  • Able to simulate down to a precision of 1 nanosecond for HFT strategies
  • Configurable slippage for a more realistic result

Important

You should be careful about stock split in your data. If it isn't ajusted, it might falsify the result of the simulation.

Usage

Here is an example of an execution of a strategy with a simple POST request

curl -i http://localhost:3000/run -H "Content-Type: application/json" -d '{
    "parameters": {
      "start_date": "2024-02-17 00:00:00",
      "end_date": "2025-02-17 00:00:00",
      "tick": "1s"
    },
    "data": "AAPL",
    "broker": {
      "cash": 10000.0,
      "fees": { "Flat": 1.0 },
      "slippage": {
        "min": 0.01,
        "max": 0.05
      }
    }
  }'

Ideas and TODO

  • Implement your strategy with any language that compiles to WASM
  • Data source agnostic, provide OHLCV data how you wish
  • Better analytics result with per trade feedback
  • Visualize your strategy using a dedicated frontend. Analyze key performance metrics such as:
    • Return on Investment (ROI)
    • Sharpe Ratio: Measures risk-adjusted return.
    • Max Drawdown: The largest peak-to-trough decline.
    • Win Rate: Percentage of profitable trades.
  • Support for derivatives (Futures, Options, Warrants, ...)
  • Support for Stop-Limit orders
  • Supports multiple instruments in one simulation for complex strategies
  • Support L2 data for a better overview of the order book with spread visualization etc
  • Support other data types like FIX
  • Support for better splippage predictions using liquidity and volatility
  • Support paper trading with live market data
  • Support for stress testing during significant market events
  • Replay system with per trade visual and total history
  • Better time management with timezones etc

About

Fast backtesting engine written in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%